samba 3.0.6/7 ldap backend bug

Richard Renard richard.renard at idealx.com
Tue Sep 21 08:14:06 GMT 2004


Hello Jeremy,

>Richard, this code has already been changed in SVN to read the
>following :
>  
>
I  am aware of that, it seems that the code has changed a few hours 
after I posted the fix.

>Which calls delete if the name matches. Can you explain exactly what the
>patch is trying to achieve here ? Are you attempting to prevent deletion
>of the LDAP_ATTR_MOD_TIMESTAMP attribute ? If so, I'd prefer the patch to
>look like :
>
>                /* We are only allowed to delete the attributes that
>                   really exist. */
>                                                                                                                                                                                                                                       
>                for (attrib = attrs; *attrib != NULL; attrib++) {
>			/* Don't delete LDAP_ATTR_MOD_TIMESTAMP attribute. */
>			if (strequal(*attrib, get_userattr_key2string(ldap_state->schema_ver,
>					LDAP_ATTR_MOD_TIMESTAMP))) {
>				continue;
>			}
>                        if (strequal(*attrib, name)) {
>                                DEBUG(10, ("ldapsam_delete_entry: deleting "
>                                           "attribute %s\n", name));
>                                smbldap_set_mod(&mods, LDAP_MOD_DELETE, name,
>                                                NULL);
>                        }
>                }
>  
>
You're right,

Thanks !,

Richard.




More information about the samba-technical mailing list