Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31579
Modified Files:
memberof.c
Log Message:
Resolves: 438891
Summary: Handle updates of memberOf attributes for indirect members when a group is renamed.
Index: memberof.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- memberof.c 19 Feb 2008 06:04:56 -0000 1.1
+++ memberof.c 26 Mar 2008 22:25:49 -0000 1.2
@@ -1177,7 +1177,17 @@
strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len);
- memberof_modop_one_r(pb, mod, group_dn, op_this, dn_str, stack);
+ /* If we're doing a replace (as we would in the MODRDN case), we need
+ * to specify the new group DN value */
+ if(mod == LDAP_MOD_REPLACE)
+ {
+ memberof_modop_one_replace_r(pb, mod, group_dn, op_this, group_dn,
+ dn_str, stack);
+ }
+ else
+ {
+ memberof_modop_one_r(pb, mod, group_dn, op_this, dn_str, stack);
+ }
hint = slapi_attr_next_value(attr, hint, &val);
}