From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leonidas Tsampros Newsgroups: gmane.emacs.devel 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 Message-ID: <87lj0l7oli.fsf@bifteki.lan> References: <878vwuvciv.fsf@bifteki.lan> <87ipvyz2md.fsf@lifelogs.com> <87fwr2udu0.fsf@bifteki.lan> <87ipvvxkqx.fsf@lifelogs.com> <87tyfak7oq.fsf@bifteki.lan> <87oc5iiqbx.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299851476 14911 80.91.229.12 (11 Mar 2011 13:51:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2011 13:51:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 11 14:51:12 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Py2kF-0003bS-VV for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2011 14:51:08 +0100 Original-Received: from localhost ([127.0.0.1]:50258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Py2kE-0004TS-TY for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2011 08:51:06 -0500 Original-Received: from [140.186.70.92] (port=58518 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Py2k8-0004RL-1u for emacs-devel@gnu.org; Fri, 11 Mar 2011 08:51:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Py2k6-0007Y0-QN for emacs-devel@gnu.org; Fri, 11 Mar 2011 08:51:00 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:35792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Py2k6-0007Xf-M5 for emacs-devel@gnu.org; Fri, 11 Mar 2011 08:50:58 -0500 Original-Received: by wwc33 with SMTP id 33so2674736wwc.30 for ; Fri, 11 Mar 2011 05:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:references:date :message-id:user-agent:mime-version:content-type; bh=k7SUTJT8mt6irCSEvDZ7VRWefS2zEqNV0EnUiTIukac=; b=JRIbg9XFUS+gsTC5HYX3IH3ZOXobcXklRGjnNfZfZJOxgMHI319eakyouq9aM3gYWo EmAzxffJAWBDp2TTvZcEslkgRjTidwNudntL2hiL5GoR0N5k6UalgM2j4gsFxe8epFsF pfLBW8DcsMaqPZaQj/pqF/Z92iEmcy+ZufdKM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; b=k32dRpxE1/bFeuBd/nMxW46Wlv2XU2dfIC2D7CO7mV7iPfxBp3/TI99/1AbvKh4gVa P0aGlSH5sS7VDXzEDh3fYGma5SFstxndR+jQ+5USUTvDasURa9hz8ohMTNsmk3cg68vj dj//9S/lzZj04rrI+oWKWzCzMCz3Toiz/pCf0= Original-Received: by 10.216.230.99 with SMTP id i77mr7766501weq.100.1299851457475; Fri, 11 Mar 2011 05:50:57 -0800 (PST) Original-Received: from bifteki.lan ([212.205.26.1]) by mx.google.com with ESMTPS id a50sm2172502wer.42.2011.03.11.05.50.55 (version=SSLv3 cipher=OTHER); Fri, 11 Mar 2011 05:50:56 -0800 (PST) Original-Received: from ltsampros-ferrari-one-200 (localhost.localdomain [127.0.0.1]) by bifteki.lan (Postfix) with ESMTP id 061FB64A1F1; Fri, 11 Mar 2011 15:50:49 +0200 (EET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137103 Archived-At: Ted Zlatanov writes: > On Thu, 10 Mar 2011 23:05:25 +0200 Leonidas Tsampros 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