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: Michael Albinus
Subject: Re: Passwords, stored in Gnome Keyring and KWallet
Date: Sun, 16 May 2010 20:39:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

Hi Ted,

> ;;; '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.

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

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

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

I found your implementation with two passes inconvenient for the two new
arguments. Therefore, I have rewritten `auth-source-user-or-password'
and `auth-source-pick'. The latter one just identifies applicable
entries from `auth-sources according' to the spec compiled from
`auth-source-user-or-password' arguments.

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

The new code is appended; please comment.

> Ted

Best regards, Michael.

Attachment: auth-source.el
Description: application/emacs-lisp


reply via email to

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