unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ldap support: eudc and ldap.el
@ 2013-12-03 16:46 T.V. Raman
  2013-12-03 17:23 ` Thomas Fitzsimmons
  0 siblings, 1 reply; 6+ messages in thread
From: T.V. Raman @ 2013-12-03 16:46 UTC (permalink / raw)
  To: emacs-devel

Is any one successfully using the code from either net/eudc.el or
net/ldap.el to query ldap databases successfully? It has not
worked for a long time for me in different environments,
-- 

--



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ldap support: eudc and ldap.el
  2013-12-03 16:46 ldap support: eudc and ldap.el T.V. Raman
@ 2013-12-03 17:23 ` Thomas Fitzsimmons
  2013-12-03 17:59   ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Fitzsimmons @ 2013-12-03 17:23 UTC (permalink / raw)
  To: emacs-devel

Hi T.V.,

"T.V. Raman" <tv.raman.tv@gmail.com> writes:

> Is any one successfully using the code from either net/eudc.el or
> net/ldap.el to query ldap databases successfully? It has not
> worked for a long time for me in different environments,

Yes, sort of, but it required major surgery to eudc-expand-inline and
ldap-search-internal.  I made invasive changes to support the following:

1) Completion of either username or full name with one press of TAB in
   message-mode

2) LDAP-SSL (via ldapsearch command line options)

3) Prompting for the password in the minibuffer instead of storing it in
   a config file

4) OpenLDAP 2.4.23

5) Sending the password to ldapsearch via its stdin instead of on the
   command line

6) Integration of both LDAP and BBDB results into one result set

I also found EUDC's configuration system strange; it doesn't make use of
customize, but instead provides its own options file and a mode for
editing a server hotlist.  Wading through that resulted in a bunch of
other variable settings in init.el.

I've got it working to my satisfaction now, but I consider most of the
changes I made hacks.  It would definitely be nice to see EUDC/ldap.el
modernized.

Thomas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ldap support: eudc and ldap.el
  2013-12-03 17:23 ` Thomas Fitzsimmons
@ 2013-12-03 17:59   ` Stefan Monnier
  2013-12-04  1:38     ` T.V. Raman
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefan Monnier @ 2013-12-03 17:59 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: emacs-devel

> I've got it working to my satisfaction now, but I consider most of the
> changes I made hacks.  It would definitely be nice to see EUDC/ldap.el
> modernized.

Patches welcome.  You could post your hacks as patches included in
a bug-report.  Even if it's not "good enough", it can be very useful
since someone else may be able to improve/clean it.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* ldap support: eudc and ldap.el
  2013-12-03 17:59   ` Stefan Monnier
@ 2013-12-04  1:38     ` T.V. Raman
  2013-12-10 14:08     ` Thomas Fitzsimmons
  2014-01-02  2:17     ` Thomas Fitzsimmons
  2 siblings, 0 replies; 6+ messages in thread
From: T.V. Raman @ 2013-12-04  1:38 UTC (permalink / raw)
  To: Stefan Monnier, Thomas Fitzsimmons, emacs-devel

Agreed, this would be good to get going.

Also, it would be good to state clearly what versions of
ldapsearch it is designed to work with.
-- 

-- 


On 12/3/13, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I've got it working to my satisfaction now, but I consider most of the
>> changes I made hacks.  It would definitely be nice to see EUDC/ldap.el
>> modernized.
>
> Patches welcome.  You could post your hacks as patches included in
> a bug-report.  Even if it's not "good enough", it can be very useful
> since someone else may be able to improve/clean it.
>
>
>         Stefan
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ldap support: eudc and ldap.el
  2013-12-03 17:59   ` Stefan Monnier
  2013-12-04  1:38     ` T.V. Raman
@ 2013-12-10 14:08     ` Thomas Fitzsimmons
  2014-01-02  2:17     ` Thomas Fitzsimmons
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Fitzsimmons @ 2013-12-10 14:08 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I've got it working to my satisfaction now, but I consider most of the
>> changes I made hacks.  It would definitely be nice to see EUDC/ldap.el
>> modernized.
>
> Patches welcome.  You could post your hacks as patches included in
> a bug-report.  Even if it's not "good enough", it can be very useful
> since someone else may be able to improve/clean it.

OK, I'm readying my patches for submission.  One area where I could use
some guidance is how to improve ldap.el's interaction with the
ldapsearch process.

Currently the password is passed as a command-line argument:

(defun ldap-search-internal (search-plist)
[...]
      (if (and passwd
	       (not (equal "" passwd)))
	  (setq arglist (nconc arglist (list (format "-w%s" passwd)))))
[...]
      (apply #'call-process ldap-ldapsearch-prog
	     ;; Ignore stderr, which can corrupt results
	     nil (list buf nil) nil
	     (append arglist ldap-ldapsearch-args filter))

which means it can be seen in clear text in the process list by other
users on the system.

ldapsearch provides a -W option to prompt for the password and receive
it on stdin, so I'm trying to use that instead.  I hacked an
implementation using a sentinel, but it's too simplistic (it does a
timed wait instead of watching for the prompt).

The steps are: 1) run the process, 2) wait for the "Enter LDAP
Password:" prompt, 3) send the contents of the passwd variable to the
process's stdin.

Can you recommend an approach to implementing those steps?  Should I do
a full process-filter-based implementation or is there a simpler way?

Thanks,
Thomas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ldap support: eudc and ldap.el
  2013-12-03 17:59   ` Stefan Monnier
  2013-12-04  1:38     ` T.V. Raman
  2013-12-10 14:08     ` Thomas Fitzsimmons
@ 2014-01-02  2:17     ` Thomas Fitzsimmons
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Fitzsimmons @ 2014-01-02  2:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I've got it working to my satisfaction now, but I consider most of the
>> changes I made hacks.  It would definitely be nice to see EUDC/ldap.el
>> modernized.
>
> Patches welcome.  You could post your hacks as patches included in
> a bug-report.  Even if it's not "good enough", it can be very useful
> since someone else may be able to improve/clean it.

I cleaned up the hacks and posted a set of patches for review:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16322

Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-02  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-03 16:46 ldap support: eudc and ldap.el T.V. Raman
2013-12-03 17:23 ` Thomas Fitzsimmons
2013-12-03 17:59   ` Stefan Monnier
2013-12-04  1:38     ` T.V. Raman
2013-12-10 14:08     ` Thomas Fitzsimmons
2014-01-02  2:17     ` Thomas Fitzsimmons

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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