diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-07-15 11:00:04 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-07-17 14:51:28 +0200 |
commit | aab77886be61d915805bf16500e06fab6a5a7e4f (patch) | |
tree | f4509823f701f1813748f419810524f69faff250 /src/ldb_modules | |
parent | 6f6e4408cedaebbfcef61e5adb78ba75abe5839d (diff) | |
download | sssd-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.c | 7 |
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); } |