summaryrefslogtreecommitdiff
path: root/src/ldb_modules
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-15 11:00:04 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-07-17 14:51:28 +0200
commitaab77886be61d915805bf16500e06fab6a5a7e4f (patch)
treef4509823f701f1813748f419810524f69faff250 /src/ldb_modules
parent6f6e4408cedaebbfcef61e5adb78ba75abe5839d (diff)
downloadsssd-aab77886be61d915805bf16500e06fab6a5a7e4f.tar.gz
sssd-aab77886be61d915805bf16500e06fab6a5a7e4f.tar.bz2
sssd-aab77886be61d915805bf16500e06fab6a5a7e4f.zip
Every time use permissive control in function memberof_mod.
Storing cyclic groups into sysdb can cause adding ghost members, which has already been stored. Function ldb_modify will fail with error [Attribute or value exists]. With permisive control, duplicated attributes will be skipped as if it was never added. https://fedorahosted.org/sssd/ticket/1846
Diffstat (limited to 'src/ldb_modules')
-rw-r--r--src/ldb_modules/memberof.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index 4a932848..79b33137 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -1135,6 +1135,13 @@ static int mbof_add_muop(struct mbof_add_ctx *add_ctx)
return ret;
}
+ ret = ldb_request_add_control(mod_req, LDB_CONTROL_PERMISSIVE_MODIFY_OID,
+ false, NULL);
+ if (ret != LDB_SUCCESS) {
+ talloc_free(mod_req);
+ return ret;
+ }
+
return ldb_next_request(ctx->module, mod_req);
}