Browse Source

Resolves: 438891
Summary: Handle updates of memberOf attributes for indirect members when a group is renamed.

Nathan Kinder 17 years ago
parent
commit
884f4588b9
1 changed files with 11 additions and 1 deletions
  1. 11 1
      ldap/servers/plugins/memberof/memberof.c

+ 11 - 1
ldap/servers/plugins/memberof/memberof.c

@@ -1177,7 +1177,17 @@ int memberof_mod_attr_list_r(Slapi_PBlock *pb, int mod, char *group_dn, char *op
 
 		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);
 	}