summaryrefslogtreecommitdiffstats
path: root/src/ldb_modules/memberof.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-11-24 17:11:06 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-06 11:54:19 +0100
commit5b6ea01e0398adbeaba1eacb5de85b2e2f668699 (patch)
tree697edcb1dfd5c7de654afa365101fa216c122637 /src/ldb_modules/memberof.c
parentf0b828e9d57a1ec6160c04d050c23bab9a6bd4b5 (diff)
downloadsssd-5b6ea01e0398adbeaba1eacb5de85b2e2f668699.tar.gz
sssd-5b6ea01e0398adbeaba1eacb5de85b2e2f668699.tar.xz
sssd-5b6ea01e0398adbeaba1eacb5de85b2e2f668699.zip
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.
Diffstat (limited to 'src/ldb_modules/memberof.c')
-rw-r--r--src/ldb_modules/memberof.c12
1 files changed, 1 insertions, 11 deletions
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;
- }
}
}