[dev] [patch] Turba LDAP driver fix - edit ldap entry without dn attribute

Ben Davis ben.davis at pca-wichita.com
Tue Mar 30 13:13:12 PST 2004


When editing an ldap entry, it fails because the ldap driver first 
checks to see if the rdn has changed, however if the value of 'dn' is 
not in the $attributes array, it will think the rdn has changed.  This 
can be a problem with people who want to use ldap for authentication, 
and their users are in the format of 
"uid=username,ou=people,dc=example,dc=com", and they also want to keep 
each user's "extra" information in a shared ldap directory.

This fix basically changes the driver's setObject() function to perform 
an extra check when it checks to see if the rdn has changed. If  
$this->params['dn'] is not a key in $attributes, then by default the rdn 
will not change, and it will not attempt to change it.

I wasn't sure how to do a patch from cvs ... I tried   cvs diff -urN 
filename.php > file.patch  .. but I got permission denied. Anyways, 
here's the patch made using diff -Naur .. It's just a one liner so no biggy.

modified files:
    turba/lib/Driver/ldap.php

--BD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap.php.diff
Type: text/x-patch
Size: 676 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040330/01ab0613/ldap.php.bin


More information about the dev mailing list