[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netrc field encryption in auth-source

From: Ted Zlatanov
Subject: Re: netrc field encryption in auth-source
Date: Fri, 17 Jun 2011 04:32:42 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Fri, 17 Jun 2011 09:17:13 +0200 Robert Pluim <address@hidden> wrote: 

RP> Ted Zlatanov <address@hidden> writes:
RP> Also, does ask mean 'ask once', or does it mean 'ask every time'? I'm
RP> personally looking for something that would give me "don't store
RP> passwords and don't ask me about storing them except maybe the first
RP> time".
>> I'm not sure yet.  Right now it's once per Emacs session, if 'ask, but I
>> left the default nil since it's 100% experimental.  So users that update
>> blindly will not be affected at all, for now.
>> I can certainly use Customize to set it to 'gpg or nil forever after the
>> first time it's asked.  The problem is, I'm also not sure if it should
>> be a single global setting.  It feels like something that should be
>> decided for each individual netrc file.  And if that's the case, maybe
>> the defcustom should hold that choice in an alist with regex matching.

RP> Hmm, a single global setting works for me, but I can envisage people
RP> desiring to have different values for different servers, not just
RP> different files. At that point we'd be stuffing server values in the
RP> custom variables, and we're back at square one. 

Not quite square one, but yes, I know what you mean.  Per file regex is
the lowest granularity I would implement without bribery, because it's
what I would use.  But wait, we can do better if it's an alist...  Let's
use the EPA file pattern!  The default can then be:

`((,(car epa-file-auto-mode-alist-entry) nil)
  (t ask))

...and when the user says "yes, use GPG tokens for file xyz" we'd add
'("xyz" gpg) to the head of the alist and offer to save the defcustom.
We have to make the "never ask to add" choice 'never, because nil is now
a valid alist for the value.  So it could only be 'never or a valid
alist.  Yes, that would work.

RP> Would a new keyword in the file itself work?  save-token
RP> {cleartext,ask,gpg,no}? Tell me if I'm over-engineering this :)

Every line in a netrc file should be self-sufficient, so I'd rather not
add global keywords.  If you mean on each line, then yes, that's too


reply via email to

[Prev in Thread] Current Thread [Next in Thread]