summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-03-10 10:25:03 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-03-11 09:05:44 -0500
commit1ac7ae8a0973415bf52a46bfb265e745a8fab932 (patch)
tree36e15d0eb32946f89a6755cb08716e8ec0f5d7b7 /src
parent33e3726b4576d65e0bb2f472ebb8b5b002f8fdb1 (diff)
downloadsssd-1ac7ae8a0973415bf52a46bfb265e745a8fab932.tar.gz
sssd-1ac7ae8a0973415bf52a46bfb265e745a8fab932.tar.xz
sssd-1ac7ae8a0973415bf52a46bfb265e745a8fab932.zip
Fix memberof calculation when deleting groups
With complex hierarchies it could happen that the group just deleted was re-added by mistake to the list of groups a user is member of, causing the user to have a stray memberof value in its entry.
Diffstat (limited to 'src')
-rw-r--r--src/ldb_modules/memberof.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index e0a241a5e..c3f57630e 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -1876,6 +1876,11 @@ static int mbof_del_anc_callback(struct ldb_request *req,
talloc_free(valdn);
continue;
}
+ /* do not re-add the original deleted entry by mistake */
+ if (ldb_dn_compare(valdn, del_ctx->first->entry_dn) == 0) {
+ talloc_free(valdn);
+ continue;
+ }
new_list->dns = talloc_realloc(new_list,
new_list->dns,
struct ldb_dn *,