From: Leonidas Tsampros <ltsampros@upnet.gr>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] ldap.el: use auth-source if passwd is not defined in ldap-host-parameters-list
Date: Fri, 11 Mar 2011 15:50:49 +0200 [thread overview]
Message-ID: <87lj0l7oli.fsf@bifteki.lan> (raw)
In-Reply-To: 87oc5iiqbx.fsf@lifelogs.com
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Thu, 10 Mar 2011 23:05:25 +0200 Leonidas Tsampros <ltsampros@upnet.gr> 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
Of course I agree since the specific testcases work fine.
FWIW the problem I noticed in eudc-ldap seem to be something different
and most probably is irrelevant to the ldap.el change. I'll probably
take a look at it again within the weekend.
Thanks,
Leonidas Tsampros
next prev parent reply other threads:[~2011-03-11 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 20:47 [PATCH] ldap.el: use auth-source if passwd is not defined in ldap-host-parameters-list Leonidas Tsampros
2011-03-05 3:07 ` Ted Zlatanov
2011-03-05 9:16 ` Leonidas Tsampros
2011-03-07 10:55 ` Ted Zlatanov
2011-03-10 21:05 ` Leonidas Tsampros
2011-03-10 22:05 ` Ted Zlatanov
2011-03-11 13:50 ` Leonidas Tsampros [this message]
2011-03-13 22:06 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lj0l7oli.fsf@bifteki.lan \
--to=ltsampros@upnet.gr \
--cc=emacs-devel@gnu.org \
--cc=tzz@lifelogs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).