summaryrefslogtreecommitdiffstats
path: root/ipa-server
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2008-03-26 15:03:01 -0700
committerNathan Kinder <nkinder@redhat.com>2008-03-26 15:03:01 -0700
commit07059a5ef25143b0f0a99f27d6039276a4f557f4 (patch)
tree7028f6f98f967c0af379f767bffb7d9293597f09 /ipa-server
parentfd92652ace1ab95e850c256f0ecca50ded79debf (diff)
downloadfreeipa-07059a5ef25143b0f0a99f27d6039276a4f557f4.tar.gz
freeipa-07059a5ef25143b0f0a99f27d6039276a4f557f4.tar.xz
freeipa-07059a5ef25143b0f0a99f27d6039276a4f557f4.zip
Handle MODRDN operations properly for indirect group members.
Without this, an entry's memberOf attribute is not updated with the new group DN when an indirect group is renamed. This is in bugzilla for FDS as bz 438891.
Diffstat (limited to 'ipa-server')
-rw-r--r--ipa-server/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ipa-server/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c b/ipa-server/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c
index dd72e6ec6..c8ad71b36 100644
--- a/ipa-server/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c
+++ b/ipa-server/ipa-slapi-plugins/ipa-memberof/ipa-memberof.c
@@ -1175,7 +1175,17 @@ int ipamo_mod_attr_list_r(Slapi_PBlock *pb, int mod, char *group_dn, char *op_th
strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len);
- ipamo_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)
+ {
+ ipamo_modop_one_replace_r(pb, mod, group_dn, op_this, group_dn,
+ dn_str, stack);
+ }
+ else
+ {
+ ipamo_modop_one_r(pb, mod, group_dn, op_this, dn_str, stack);
+ }
hint = slapi_attr_next_value(attr, hint, &val);
}