[dev] problems with horde/lib/Prefs/LDAP.php

Jon Parise jon@csh.rit.edu
Mon, 5 Feb 2001 23:23:43 -0500


On Mon, Feb 05, 2001 at 02:42:03PM -0500, rectrix@rectrix.cx wrote:

> Jon - something to keep in mind as you continue to refine the LDAP
> prefs - When the prefs are retrieved it is done via anonymous bind.
> If the prefs are only available via non-anonymous bind (as mine are)
> then they can be set but are never retrieved.

Good point.  I hadn't considered that when I wrote the LDAP driver a
few months back.
 
> Of course, setting $this->connect(false) to $this->connect(true) in
> the retrieve function gets around this.
 
I just committed that change.  That should keep things working for the
time being.

> The connect function looks to see if it could get the DN via anon
> bind, but that doesn't mean the prefs are also available that way.
> I don't think you want to check if each pref is anonymously
> readable.  Perhaps a conf setting to force non-anonymous bind?
> That's not very elegant however.

Right.  The above "fix" is good enough for now, but the driver's logic
may need to be revisited in the future for efficiency improvements.  A
configuration setting may be the best solution to this particular
problem.


Update:

Actually, on second thought, a configuration option is probably the
best idea.  I just added $conf['prefs']['params']['always_bind'].  If
it's set to 'false' (the default if not specified), the "old" behavior
will be used.  Setting it to 'true' will bind to the LDAP server for
both retrievals and stores.

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member