From: Craig B. <cr...@cs...> - 2007-12-10 12:32:50
|
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 <cr...@cs...> - Unix Systems Administrator Computer Science, University of Cape Town, Private Bag, Rondebosch, 7701 |