tramp-devel
[Top][All Lists]
Advanced

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

Re: Passwords, stored in Gnome Keyring and KWallet


From: Ted Zlatanov
Subject: Re: Passwords, stored in Gnome Keyring and KWallet
Date: Mon, 07 Jun 2010 11:28:14 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Sun, 16 May 2010 20:39:49 +0200 Michael Albinus <address@hidden> wrote: 

>> ;;; 'create-if-missing should be supplemented by a global
>> ;;; auth-source-create-if-missing which could be 'never, 'always, or nil
>> (auth-source-user-or-password "password" server port user 'create-if-missing)
>> 
>> and it would (theoretically) work for any editable backend.  At least
>> for the two backends we've discussed (Secrets API and flat netrc files)
>> this would work.  That would give us a stateless way to ensure that a
>> password exists, prompting the user if necessary without interrupting
>> the code flow, and allowing the user to specify their preference as well
>> if they want to always or never create entries.

MA> I've tried to implement it last days. What I've obeserved is that we
MA> also need a `delete-existing' argument. The reason behind is, that
MA> people might add wrong passwords, which will be detected by the client
MA> only. The client must be able to overwrite this password. So I have
MA> changed the function too

Wonderful, I didn't think of that.  auth-source.el started life as
basically a wrapper around a Customize statement and it shows.

MA> (defun auth-source-user-or-password (mode host protocol &optional username 
create-missing delete-existing)

MA> Maybe `create-missing' and `delete-existing' could be put into one
MA> argument; but this would be more complex then.

MA> I found your implementation with two passes inconvenient for the two new
MA> arguments.

Yes, it was very much a quick hack.

MA> Therefore, I have rewritten `auth-source-user-or-password' and
MA> `auth-source-pick'. The latter one just identifies applicable
MA> entries from `auth-sources according' to the spec compiled from
MA> `auth-source-user-or-password' arguments.

MA> There are also the new functions `auth-get-source',
MA> `auth-source-retrieve', `auth-source-create' and
MA> `auth-source-delete'. These functions are introduced in order to make
MA> `auth-source-user-or-password' readable.

MA> The new code is appended; please comment.

Your version is much more readable and extensible than mine (I should
have rewritten like you did long ago).  I'm 100% in favor of using it.
Do you want to use the Gnus repo as a testbed or would you rather push
straight into Emacs (from where it will be synchronized back into Gnus)?

Thanks
Ted



reply via email to

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