help-gnu-emacs
[Top][All Lists]
Advanced

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

LDAP problems?


From: Paul D. Smith
Subject: LDAP problems?
Date: 14 Sep 2002 00:15:44 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

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 <pausmith@nortelnetworks.com> 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.


reply via email to

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