diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-03-08 20:12:04 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-09 11:23:03 -0400 |
commit | da481aa47c4f4545c1bbb7699a04566dc94e6db2 (patch) | |
tree | 6965e1ead94b6586f6a571b55dcd08ac8beedfda /server | |
parent | ad269edd6fd2222da07f23ba7b234eb0a6571411 (diff) | |
download | sssd-da481aa47c4f4545c1bbb7699a04566dc94e6db2.tar.gz sssd-da481aa47c4f4545c1bbb7699a04566dc94e6db2.tar.bz2 sssd-da481aa47c4f4545c1bbb7699a04566dc94e6db2.zip |
Make MPG a configurable option for the domain.
Diffstat (limited to 'server')
-rw-r--r-- | server/confdb/confdb.c | 11 | ||||
-rw-r--r-- | server/confdb/confdb.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/server/confdb/confdb.c b/server/confdb/confdb.c index 462a0f2f..9ada97f3 100644 --- a/server/confdb/confdb.c +++ b/server/confdb/confdb.c @@ -29,6 +29,7 @@ #define CONFDB_VERSION "0.1" #define CONFDB_DOMAIN_BASEDN "cn=domains,cn=config" #define CONFDB_DOMAIN_ATTR "cn" +#define CONFDB_MPG "magicPrivateGroups" #define CONFDB_ZERO_CHECK_OR_JUMP(var, ret, err, label) do { \ if (!var) { \ @@ -629,6 +630,11 @@ static int confdb_init_db(struct confdb_ctx *cdb) ret = confdb_add_param(cdb, false, "config/domains/LOCAL", "enumerate", val); if (ret != EOK) goto done; + /* LOCAL uses Magic Private Groups by default */ + val[0] = "1"; + ret = confdb_add_param(cdb, false, "config/domains/LOCAL", CONFDB_MPG, val); + if (ret != EOK) goto done; + done: talloc_free(tmp_ctx); return ret; @@ -750,6 +756,11 @@ int confdb_get_domains(struct confdb_ctx *cdb, domain->legacy = true; } + /* Determine if this is domain uses MPG */ + if (ldb_msg_find_attr_as_bool(res->msgs[i], CONFDB_MPG, 0)) { + domain->mpg = true; + } + domain->id_min = ldb_msg_find_attr_as_uint(res->msgs[i], "minId", SSSD_MIN_ID); domain->id_max = ldb_msg_find_attr_as_uint(res->msgs[i], diff --git a/server/confdb/confdb.h b/server/confdb/confdb.h index dbddcecf..4767a78e 100644 --- a/server/confdb/confdb.h +++ b/server/confdb/confdb.h @@ -35,6 +35,7 @@ struct sss_domain_info { int timeout; int enumerate; bool legacy; + bool mpg; uint32_t id_min; uint32_t id_max; }; |