From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: bug: epg send unencrypted data in trash Date: Fri, 11 Feb 2011 13:54:07 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87sjvuxs80.fsf@lifelogs.com> References: <87oc6jav1s.fsf@gmail.com> <87k4h6sahe.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297454119 30933 80.91.229.12 (11 Feb 2011 19:55:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2011 19:55:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 20:55:15 2011 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.69) (envelope-from ) id 1Pnz5G-0007sn-2U for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 20:55:14 +0100 Original-Received: from localhost ([127.0.0.1]:55557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnz5F-0005JD-EY for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 14:55:13 -0500 Original-Received: from [140.186.70.92] (port=32826 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnz5A-0005J6-4V for emacs-devel@gnu.org; Fri, 11 Feb 2011 14:55:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pnz58-00089H-UO for emacs-devel@gnu.org; Fri, 11 Feb 2011 14:55:07 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pnz58-00088t-K7 for emacs-devel@gnu.org; Fri, 11 Feb 2011 14:55:06 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pnz56-0007mp-HE for emacs-devel@gnu.org; Fri, 11 Feb 2011 20:55:04 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Feb 2011 20:55:04 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Feb 2011 20:55:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:RSfbXix7UCRkvW4ZOvYbC5KxSHA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:135909 Archived-At: On Fri, 11 Feb 2011 19:16:13 +0100 Thierry Volpiatto wrote: TV> Thierry Volpiatto writes: >> i start using recently delete-by-moving-to-trash.(i had no trash before) >> So now when i decrypt a file and read it in emacs, i have an unencrypted >> file world readable 'epg-output-xxx' in the trash. >> That's bad. TV> So if one use gnus with a .authinfo.gpg, and use also TV> delete-by-moving-to-trash, he will have the bad surprise to find his TV> authinfo data in clear text in the trash. TV> Maybe let-bind delete-by-moving-to-trash in epg-delete-output-file would TV> be good. TV> It's what i will do here anyway. TV> (defun epg-delete-output-file (context) TV> "Delete the output file of CONTEXT." TV> (let ((delete-by-moving-to-trash nil)) TV> (when (and (epg-context-output-file context) TV> (file-exists-p (epg-context-output-file context))) TV> (delete-file (epg-context-output-file context))))) TV> With this change, data in clear text will never go to trash. According to the docs for `delete-file' it shouldn't matter what `delete-by-moving-to-trash' says because this is called non-interactively (TRASH is nil when delete-file is called non-interactively). Or is this funcall interactive somehow? Ted