unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* LDAP problems?
@ 2002-09-14  4:15 Paul D. Smith
  0 siblings, 0 replies; only message in thread
From: Paul D. Smith @ 2002-09-14  4:15 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-14  4:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-14  4:15 LDAP problems? Paul D. Smith

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).