emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] ldap.el: use auth-source if passwd is not defined in ldap-ho


From: Ted Zlatanov
Subject: Re: [PATCH] ldap.el: use auth-source if passwd is not defined in ldap-host-parameters-list
Date: Thu, 10 Mar 2011 16:05:38 -0600
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

On Thu, 10 Mar 2011 23:05:25 +0200 Leonidas Tsampros <address@hidden> wrote: 

LT> 1) authinfo machine ip-address login username password secret-key imap

LT> and (setq ldap-host-parameters-alist
LT>       (quote (("ip-address" base "dc=domain,dc=com"
LT>                binddn "domain\\username" "auth-source "yes"))))

LT> Logging in to both the LDAP and the IMAP server works as expected (on
LT> the assumption that they are the same hosts, and this is my personal
LT> setup, so I'm pretty happy.

Good.

LT> 2) authinfo machine ip-address login username password secret-key imap
LT>    authinfo machine ip-address binddn domain\username password secret-key 
port ldap

LT> and (setq ldap-host-parameters-alist
LT>       (quote (("ip-address" base "dc=domain,dc=com"
LT>                auth-source "yes"))))

LT> The above is the more general case of having a separate LDAP
LT> server. This case doesn't work, since auth-source-search returns the
LT> first entry and so (plist-get asfound :binddin) returns nothing.

Yeah, we don't require the "ldap" port...  I think it's OK, the user can
reorder them since IMAP does require the port.

LT> In order to work around this case, I thought of the following:

LT> 3) authinfo machine ip-address login username password secret-key imap
LT>    authinfo machine ip-address:389 binddn domain\username password 
secret-key

LT> and (setq ldap-host-parameters-alist
LT>       (quote (("ip-address:389" base "dc=domain,dc=com"
LT>                auth-source "yes"))))

LT> which should work as expected but I think it breaks eudc-ldap. The
LT> module seems trying to match only the 'ip-address' part of the
LT> ldap-host-parameters-alist entry and as such a check to see if a base dn
LT> is defined fails. However I want to double check this again.

I think this has to work so users can specify other LDAP ports.  So we
need to fix eudc-ldap then.  Can you look at what's needed?  I don't use
that package so I'm hardly the one to fix this issue.

Let me know if you agree with the above and I'll push the patch tonight.

Thanks
Ted




reply via email to

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