From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: (no subject) Date: Tue, 13 Jun 2006 16:32:26 -0400 Message-ID: <87k67klrtx.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1150230784 31296 80.91.229.2 (13 Jun 2006 20:33:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Jun 2006 20:33:04 +0000 (UTC) Cc: emacs-devel@gnu.org, "Martin J. Reed" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 13 22:32:59 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FqFZC-00009v-Hc for ged-emacs-devel@m.gmane.org; Tue, 13 Jun 2006 22:32:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FqFZB-0007hD-OV for ged-emacs-devel@m.gmane.org; Tue, 13 Jun 2006 16:32:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FqFYy-0007h8-7N for emacs-devel@gnu.org; Tue, 13 Jun 2006 16:32:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FqFYw-0007go-Md for emacs-devel@gnu.org; Tue, 13 Jun 2006 16:32:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FqFYw-0007gl-JP for emacs-devel@gnu.org; Tue, 13 Jun 2006 16:32:34 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FqFhe-0008J2-O1; Tue, 13 Jun 2006 16:41:34 -0400 Original-Received: by cyd (Postfix, from userid 1000) id A368B4E7F3; Tue, 13 Jun 2006 16:32:26 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 01 Jun 2006 23:14:07 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:55870 Archived-At: > I have had problems with ldap.el. It seems that the version shipped > (and latest CVS) matches erroneous lines in the grabbed output from > ldapsearch when SASL authentication is used. The problem may also > occur in other situations (I think it is a genuine bug). I have had to > apply the following diff (to ldap-1.11.2.10.el grabbed from CVS): Your patch looks OK, so I've installed it. > - --------------------------->8------------------------------------- > diff -u ldap-1.11.2.10.el ldap-1.11.2.10-reed.el > - --- ldap-1.11.2.10.el 2006-06-01 17:05:40.000000000 +0100 > +++ ldap-1.11.2.10-reed.el 2006-06-01 17:04:41.000000000 +0100 > @@ -154,7 +154,7 @@ > :type '(string :tag "`ldapsearch' Program") > :group 'ldap) > > - -(defcustom ldap-ldapsearch-args '("-LL" "-tt" "-x") > +(defcustom ldap-ldapsearch-args '("-LL" "-tt") > "*A list of additional arguments to pass to `ldapsearch'." > :type '(repeat :tag "`ldapsearch' Arguments" > (string :tag "Argument")) > @@ -555,7 +555,7 @@ > (setq arglist (nconc arglist (list (format "-z%s" sizelimit))))) > (eval `(call-process ldap-ldapsearch-prog > nil > - - `(,buf nil) > + buf > nil > ,@arglist > ,@ldap-ldapsearch-args > @@ -580,7 +580,7 @@ > (end-of-line) > (point)))) > (forward-line 1) > - - (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$") > + (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)\\(.*\\)$") > (setq name (match-string 1) > value (match-string 4)) > ;; Need to handle file:///D:/... as generated by OpenLDAP > - --------------------------->8------------------------------------- > The main problem I have is the last change in the diff. The "?" is > removed as with it there is a match on "one or none" instances of the > "file://". This seems to mean that it grabs any available line not > just those with a "file://" in it. Then the defun tries to load files > that match the erroneous lines (and fails). > > The change of ldap-ldapsearch-args is probably not important (although > do we want users to use the insecure unencrypted form by default?), > also I do not understand why the change from `(,buf nil) to buf is > required (probably my elisp ignorance). > > Example output of ldapsearch that causes a problem (OpenLdap 2.2.28) > with cleaned content. The error occurs on the second line where the > (looking-at regexp...) matches true and the defun tries to load a file > "/home/myhome/username: myusername". > - -------------------------->8---------------------------------------- > SASL/DIGEST-MD5 authentication started > SASL username: myusername > SASL SSF: 128 > SASL installing layers > version: 1 > > dn: CN=xxxx,OU=xxxxxx,DC=xxxxx,DC=xx,DC=xx > objectClass:< file:///tmp/ldapsearch-objectClass-8bcsA7 > objectClass:< file:///tmp/ldapsearch-objectClass-wlxT99 > objectClass:< file:///tmp/ldapsearch-objectClass-GPNlJc > objectClass:< file:///tmp/ldapsearch-objectClass-G4DOif > cn:< file:///tmp/ldapsearch-cn-u79hSh > sn:< file:///tmp/ldapsearch-sn-YjeMrk > title:< file:///tmp/ldapsearch-title-qHNg1m > givenName:< file:///tmp/ldapsearch-givenName-8ATLAp > initials:< file:///tmp/ldapsearch-initials-83xhas > distinguishedName:< file:///tmp/ldapsearch-distinguishedName-uiXNJu > - -------------------------->8--------------------------------------- > > Also there is a problem with ldapsearch from latest OpenLDAP in that > it can wrap long lines. Not sure if there is a possible fix in emacs > but maybe a warning could be added (I use a wrapper script to get rid > of the "bad line wraps"). > > Otherwise thanks for the updates it works much better than ldap.el > shipped with 21.4. > > Regards, > > Martin > - -- > Dr. M.J. Reed Room: 1NW.5.3G > Dept. Electronic Systems Engineering Tel:+44 (0)1206 872479 > University of Essex, Colchester CO4 3SQ, UK FAX:+44 (0)1206 872900 > Email mjreed (non Essex users should add @essex.ac.uk) > Web: http://esewww.essex.ac.uk/~mjreed > > > _______________________________________________ > bug-gnu-emacs mailing list > bug-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs > ---------- > > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel