From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Paul D. Smith" Newsgroups: gmane.emacs.help Subject: LDAP problems? Date: 14 Sep 2002 00:15:44 -0400 Organization: Nortel Networks, Inc. / Billerica, MA Sender: help-gnu-emacs-admin@gnu.org Message-ID: Reply-To: pausmith@nortelnetworks.com NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031978189 16472 127.0.0.1 (14 Sep 2002 04:36:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 14 Sep 2002 04:36:29 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17q4fT-0004HY-00 for ; Sat, 14 Sep 2002 06:36:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17q4fa-0000pq-00; Sat, 14 Sep 2002 00:36:34 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!torn!qcarhaaa.nortelnetworks.com!bcarh189.ca.nortel.com!bcarh8ab.ca.nortel.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Original-NNTP-Posting-Host: lemming.engeast.baynetworks.com User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: nntp.stanford.edu gnu.emacs.help:104898 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1453 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1453 I've just reinstalled my Debian system (my PC lease at work got refreshed) and now I can't do LDAP lookups any longer. There's something very strange going on and I can't tell whether it's an LDAP problem or an Emacs problem. I'm using Emacs 21.2 and LDAP 2.0.23. I'm actually using EUDC, but the problem is with the LDAP functions themselves not EUDC. Emacs' ldap-search function invokes the ldapsearch program, using the -t option which tells ldapsearch to put the results into a temporary file and put the filename in the output. Well, I'm just looking up an email address, not binary data, so it's silly to put that into a file. Apparently ldapsearch thinks it's silly as well because it doesn't do it: it leaves the output in the file. In other words, according to the ldapsearch man page I should see something like: dn: ou=people,o=nortelnetworks mail:< file: /tmp/somefile and /tmp/somefile will have the mail address: foo@nortelnetworks.com But, that's not what I get; I get the mail address embedded in the output: dn: ou=people,o=nortelnetworks mail: foo@nortelnetworks.com The ldapsearch man page is pretty skimpy on details about -t, so maybe it's only _supposed_ to put binary data in the file. However, the regular expression that ldap-search-internal uses to parse the output completely ignores the "< file:" token, and regardless of whether it's there or not it tries to open the value as if it were a file. So, I get errors about trying to open a file named "foo@nortelnetworks.com" etc. So, I don't know whether this is a bug in ldapsearch -t or not, but it seems like the Emacs ldap-search-internal could be a bit smarter about the output it parses, and only try to read the file if it sees the "< file:" token. -- ------------------------------------------------------------------------------- Paul D. Smith HASMAT--HA Software Mthds & Tools "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ------------------------------------------------------------------------------- These are my opinions---Nortel Networks takes no responsibility for them.