I've been using ldap.compare_s(), ldap.modlist.modifyModlist() and
ldap_modify_s() to keep an OpenLDAP database up to date from an
external datasource. 

I've just noticed, however, that when the old and new entry consist of
the same characters but in a different order (as occurs when initials
are swapped around, for example) ldap_compare_s() returns
COMPARE_FALSE but modifyModlist() returns an empty list - the result
being that nothing gets updated.

Here's some examples:

modlist = ldap.modlist.modifyModlist({"givenName": "Fred"}, {"givenName": 
"Bob"})
print str(modlist)
[(1, 'givenName', None), (0, 'givenName', 'Bob')]

modlist = ldap.modlist.modifyModlist({"givenName": "Fred"}, {"givenName": 
"derF"})
print str(modlist)
[]

Is this a bug in modifyModlist() or a feature? 

Craig
--
Craig Balfour <[EMAIL PROTECTED]> - Unix Systems Administrator 
Computer Science, University of Cape Town, Private Bag, Rondebosch, 7701

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to