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: Ted Zlatanov
Subject: Re: using auth-source for authentication
Date: Wed, 14 May 2008 12:33:21 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Tue, 13 May 2008 16:13:27 +0200 Michael Albinus <address@hidden> wrote: 

MA> In general, Tramp does not need a port. Almost ever, ports are not
MA> given by the user, and Tramp uses (implicitely) the default port of
MA> the given method. So it would be OK for Tramp, if the port in your
MA> authinfo is optional.

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):

1) get password where tramp-current-method == port
2) get password where tramp-default-method == port
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".

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

I tested it on my machine and it worked for me.

I know the patch could be nicer with a loop, but I was going for clarity
over cleverness :)

Ted

Attachment: tramp.auth-source.patch
Description: Text Data


reply via email to

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