tramp-devel
[Top][All Lists]
Advanced

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

Re: using auth-source for authentication


From: Michael Albinus
Subject: Re: using auth-source for authentication
Date: Wed, 14 May 2008 22:23:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

Hi Ted,

> OK, here's a patch to do the following, if auth-sources is bound
> (because Tramp still exists outside of Emacs, I didn't want to autoload
> auth-source.el by default):

Maybe you could load auth-source like we do it for password-cache.el
(also from Gnus):

(if (featurep 'xemacs)
    (load "auth-source" 'noerror)
  (require 'auth-source nil 'noerror))

The advantage is, that there is no need to require auth-source.el
somewhere else.

> 1) get password where tramp-current-method == port
> 2) get password where tramp-default-method == port

I don't believe we shall use tramp-default-method. tramp-current-method
shall be set already, when tramp-read-passwd is called. And
tramp-default-method has even less priority than
tramp-default-method-alist, which would be needed to be checked as well then.

> 3) get password where "tramp" == port
>
> The user name doesn't come from auth-sources now, but it could, if you
> want to allow that.  Then the user could say
>
> machine mymachine login tzz password zzt port tramp
>
> and opening /mymachine:/file would automatically use 'tzz' as the user
> name.  It's just another call to auth-source-user-or-password with
> "login" instead of "password".

That would be a third mechanism, beside tramp-default-user-alist and
tramp-default-user. And likely, tramp-read-passwd is too late for this
decision, this must be checked earlier I believe.

Hmm, I'm not decided yet. Maybe we should wait, whether somebody asks for.

> This is only against lisp/tramp.el, I didn't look at tramp2/

That's OK. tramp2/ is dead code.

It would also be nice if we could have some documentation in
tramp.texi. There is a node "Password caching", maybe you can extend it
to something called "Password handling" or so.

Feel free to commit your changes to Tramp CVS. I'll sync it regularly
with Emacs CVS, so we will get a chance for a pretest, before Tramp
2.1.14 is out.

> Ted

Best regards, Michael.




reply via email to

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