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:55:13 +0200 |
commit | 716705950986a3221d64aec4274b6e1e73f16121 (patch) | |
tree | 63f3716bab93ab83322f17ba8dd7da6f5a77c59d /src | |
parent | 044cdd34ff41936fed16c3e41a2164cf89112189 (diff) | |
download | sssd-716705950986a3221d64aec4274b6e1e73f16121.tar.gz sssd-716705950986a3221d64aec4274b6e1e73f16121.tar.xz sssd-716705950986a3221d64aec4274b6e1e73f16121.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')
-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 4a9328482..79b33137b 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); } |