summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-06-29 17:02:45 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-07 10:30:08 +0200
commit93b9f0bb4694425a0ce766552ea1d1b775ab3c38 (patch)
treef7a2a8fad59855e9bcfd1cf9b6184be61a10a789
parent3b67fc6488ac10ca13561d9032f59951f82203e6 (diff)
downloadsssd-93b9f0bb4694425a0ce766552ea1d1b775ab3c38.tar.gz
sssd-93b9f0bb4694425a0ce766552ea1d1b775ab3c38.tar.xz
sssd-93b9f0bb4694425a0ce766552ea1d1b775ab3c38.zip
MEMBEROF: Allow bypassing memberof during upgrade
The next sysdb upgrade will be changing memberUid and memberOf attributes as well. To avoid chanding the memberof module just because of an upgrade, add a environment variable that disabled the memberof plugin altogether when set. The variable will be set at the beginning of the upgrade and unset later. Reviewed-by: Sumit Bose <sbose@redhat.com>
-rw-r--r--src/ldb_modules/memberof.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
index 2664bd1ed..af7147ee7 100644
--- a/src/ldb_modules/memberof.c
+++ b/src/ldb_modules/memberof.c
@@ -2873,6 +2873,11 @@ static int memberof_mod(struct ldb_module *module, struct ldb_request *req)
struct ldb_request *search;
int ret;
+ if (getenv("SSSD_UPGRADE_DB")) {
+ /* do not do anything during upgrade */
+ return ldb_next_request(module, req);
+ }
+
if (ldb_dn_is_special(req->op.mod.message->dn)) {
/* do not manipulate our control entries */
return ldb_next_request(module, req);