summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-15 11:00:04 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-08-09 12:05:26 +0200
commit020104883d08343925c3cebbc716ac2bf4a90ce7 (patch)
treeba7f14bc5c4a00db827d733af89bae9051c2f42e
parent6605b613d57d2ca62d5c9cc81423f1c5fa8afcb9 (diff)
downloadsssd-1.9.2-109.el6.tar.gz
sssd-1.9.2-109.el6.tar.xz
sssd-1.9.2-109.el6.zip
Every time use permissive control in function memberof_mod.sssd-1.9.2-109.el6
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
-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 338d18a46..355feac2f 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -1139,6 +1139,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);
}