From 5b6ea01e0398adbeaba1eacb5de85b2e2f668699 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sat, 24 Nov 2012 17:11:06 +0100 Subject: MEMBEROF: Do not add the ghost attribute to self When a nested group with ghost users is added, its ghost attribute should propagate within the nested group structure much like the memberuid attribute. Unlike the memberuid attribute, the ghost attribute is only semi-managed by the memberof plugin and added manually to the original entry. This bug caused LDB errors saying that attribute or value already exists when a group with a ghost user was added to the hierarchy as groups were updated with an attribute they already had. --- src/ldb_modules/memberof.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/ldb_modules') diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c index f0b5b72ed..b884228d2 100644 --- a/src/ldb_modules/memberof.c +++ b/src/ldb_modules/memberof.c @@ -813,7 +813,7 @@ static int mbof_add_operation(struct mbof_add_operation *addop) el = ldb_msg_find_element(addop->entry, DB_GHOST); if (el) { for (i = 0; i < el->num_values; i++) { - /* add memberuid to all group's parents */ + /* add ghost to all group's parents */ for (j = 0; j < parents->num; j++) { ret = mbof_append_muop(add_ctx, &add_ctx->muops, &add_ctx->num_muops, @@ -826,16 +826,6 @@ static int mbof_add_operation(struct mbof_add_operation *addop) } } - /* now add memberuid to the group itself */ - ret = mbof_append_muop(add_ctx, &add_ctx->muops, - &add_ctx->num_muops, - LDB_FLAG_MOD_ADD, - addop->entry_dn, - (char *)el->values[i].data, - DB_GHOST); - if (ret != LDB_SUCCESS) { - return ret; - } } } -- cgit