From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76215 Path: news.gmane.org!not-for-mail From: Philipp Haselwarter Newsgroups: gmane.emacs.gnus.general Subject: Re: Guns and Privacy : sample use case/tutorial effort Date: Tue, 01 Feb 2011 13:42:03 +0100 Message-ID: <87fws8sz8k.fsf@nzebook.haselwarter.org> References: <87sjw8t1l1.fsf@nzebook.haselwarter.org> <9ilj20ndyz.fsf@news.eternal-september.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296564158 22278 80.91.229.12 (1 Feb 2011 12:42:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2011 12:42:38 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M24567@lists.math.uh.edu Tue Feb 01 13:42:30 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PkFYy-0006dm-PK for ding-account@gmane.org; Tue, 01 Feb 2011 13:42:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PkFYp-0006vs-Fh; Tue, 01 Feb 2011 06:42:19 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PkFYo-0006vl-IK for ding@lists.math.uh.edu; Tue, 01 Feb 2011 06:42:18 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PkFYn-0005vr-AM for ding@lists.math.uh.edu; Tue, 01 Feb 2011 06:42:18 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PkFYm-0003nu-JD for ding@gnus.org; Tue, 01 Feb 2011 13:42:16 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PkFYk-0006UR-Kl for ding@gnus.org; Tue, 01 Feb 2011 13:42:14 +0100 Original-Received: from mna75-3-89-83-43-131.dsl.club-internet.fr ([89.83.43.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2011 13:42:14 +0100 Original-Received: from philipp.haselwarter by mna75-3-89-83-43-131.dsl.club-internet.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2011 13:42:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: mna75-3-89-83-43-131.dsl.club-internet.fr X-NSA-Fodder: DRM Etacs S Box spy TWA Afghanistan Rand Corporation Nazi X-Antipastobozoticataclysm: When George Bush projectile vomits antipasto on the Japanese. User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Wa+h9qfB2HDGJs3d7eLZvF1acoI= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:76215 Archived-At: Richard Riley writes: > Philipp Haselwarter writes: > >> Richard Riley writes: >> >> ---8<---[snipped 61 lines]---8<--- >>> >>> The loading of this file would cause emacs or the system to prompt you >>> for a password to decrypt the file if the agent (gpg-agent) or emacs >>> hasnt already cached the password for that key. This prompt can be an >>> issue if you're using the emacs daemon especially if starting the >>> process at system login. When to prompt? One nice way is to only load >>> the gpg file when you create an emacs frame. e.g >>> >>> ,---- >>> | (defun load-secure-config(frame) >>> | (require 'my-config "my-config.gpg")) >>> | >>> | (add-hook 'after-make-frame-functions 'load-secure-config) >>> `---- >>> >>> Here we see that the private configuration information is only loaded and >>> decrypted when you actually bring up an emacs frame - generally that >>> would be sufficient in the case of gnus. >> >> Just wondering, how does this prevent emacs from prompting when there's >> no frame? > > This is aimed at the initial load : it only loads after the initial > frame. It then assumes that the password is cached. Clearly if the > password is then needed again (cache expiry) in something involving gnus then there is > generally a frame available anyway. > But this opens the encrypted file for any emacs instance that creates a frame, even if you don't want to use gnus at all. Which is not very much in the spirit of securing your personal data. >> >> I used to start emacs-daemon on system start, and ran into this problem, >> but that was in conjunction with desktop.el. Opening pdf's asks if you > > > I stopped using desktop.el for related reasons. > I just use `emacsclient -a="" -nw' (aliased) as editor now, the prevents starting emacs unnecessarily (okay, I rarely don't have emacs open) and is Really Simple to set up. No problems since. Another desktop.el-related PITA is when files that have auto-save data around are restored (user gets queried too), haven't found a way around that yet.. -- Philipp Haselwarter