From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 22.1.50; insert-file-contents is slow under tramp Date: Mon, 27 Aug 2007 13:41:09 +0200 Message-ID: References: <87veb6l9b0.fsf@escher.local.home> <46CD98DC.1050701@gmx.at> <87r6lul2fc.fsf@escher.local.home> <46CDC8B3.7000301@gmx.at> <46CDED2B.3080904@gmx.at> <87k5rmkmu0.fsf@escher.local.home> <46CDF5B7.2030201@gmx.at> <87fy2akjzt.fsf@escher.local.home> <87bqcxzeat.fsf@gmx.de> <871wdqlgzz.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188214908 6739 80.91.229.12 (27 Aug 2007 11:41:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2007 11:41:48 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Stephen Berman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 27 13:41:46 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IPcyX-0002QD-Eu for ged-emacs-devel@m.gmane.org; Mon, 27 Aug 2007 13:41:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPcyW-0002xx-2R for ged-emacs-devel@m.gmane.org; Mon, 27 Aug 2007 07:41:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPcxv-0002sx-Ao for emacs-devel@gnu.org; Mon, 27 Aug 2007 07:41:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPcxs-0002rh-CG for emacs-devel@gnu.org; Mon, 27 Aug 2007 07:41:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPcxr-0002rY-N1 for emacs-devel@gnu.org; Mon, 27 Aug 2007 07:41:03 -0400 Original-Received: from mailrelay1.alcatel.de ([194.113.59.95]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IPcxm-0006DL-Qo; Mon, 27 Aug 2007 07:40:59 -0400 Original-Received: from slbhab.alcatel.de (slbhab.bln.sel.alcatel.de [149.204.63.218]) by mailrelay1.alcatel.de (8.13.4/8.13.4/ICT) with ESMTP id l7RBeh45018725; Mon, 27 Aug 2007 13:40:44 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 27 Aug 2007 00:16:40 -0400") User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux) X-Scanned-By: MIMEDefang 2.51 on 149.204.45.72 X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:77280 gmane.emacs.pretest.bugs:19640 Archived-At: Stefan Monnier writes: >> Similar approach. It calls `tramp-do-copy-or-rename-file-directly', >> which copies the "remote" file to /tmp, and assigns proper >> permissions. > > What would be proper permissions? I mean: how do you make sure that some > nasty third party won't be able to read the content of that temp file, while > still making it possible for Emacs to access the file? The current approach(1) is to remove any temporary file immediately after it has been processes by Emacs (for example, insert-file-contents is finished). This reduces the time nasty third party can see such a file. But I admit, this might not be sufficient wrt security threats. Maybe one could change it such a way, that temporary files shall be owned by (user-login-name), and shall carry 0400 permissions. (1): That's the theory. In practice, there are still some zero-length temporary files left, for which I haven't debugged yet who is responsible to remove them. On my todo list. > 1MB/s for base64 sounds terribly slow. My 266MHz home-router can send > and encrypt data from disk to the network at about that speed. > But admittedly, we're not talking `mimencode' but base64-decode-region which > may include a lot of overhead to extract and insert data from/to the buffer. Don't take the absolute values, I just wanted to show the comparison. Tests were run on my stone-age 700MHz PIII machine. > Stefan Best regards, Michael.