summaryrefslogtreecommitdiffstats
path: root/src/confdb
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-05-17 16:28:15 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-05-20 05:49:25 -0400
commit54af51d2129d29258108a6dbf072a82c930bf399 (patch)
tree03b97d3b98b82395f5b35b6fbf0f0d67e3712262 /src/confdb
parent217d7e26345fb5f7e296551b62a4c1d82c9d9585 (diff)
downloadsssd-54af51d2129d29258108a6dbf072a82c930bf399.tar.gz
sssd-54af51d2129d29258108a6dbf072a82c930bf399.tar.xz
sssd-54af51d2129d29258108a6dbf072a82c930bf399.zip
Add a new option to override primary GID number
https://fedorahosted.org/sssd/ticket/742
Diffstat (limited to 'src/confdb')
-rw-r--r--src/confdb/confdb.c7
-rw-r--r--src/confdb/confdb.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 4975a4276..fdf409f96 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -842,6 +842,13 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
goto done;
}
+ ret = get_entry_as_uint32(res->msgs[0], &domain->override_gid,
+ CONFDB_DOMAIN_OVERRIDE_GID, 0);
+ if (ret != EOK) {
+ DEBUG(0, ("Invalid value for [%s]\n", CONFDB_DOMAIN_OVERRIDE_GID));
+ goto done;
+ }
+
*_domain = domain;
ret = EOK;
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 7173c9fc8..4e8a6dd84 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -109,6 +109,7 @@
#define CONFDB_DOMAIN_DNS_DISCOVERY_NAME "dns_discovery_domain"
#define CONFDB_DOMAIN_FAMILY_ORDER "lookup_family_order"
#define CONFDB_DOMAIN_ACCOUNT_CACHE_EXPIRATION "account_cache_expiration"
+#define CONFDB_DOMAIN_OVERRIDE_GID "override_gid"
/* Local Provider */
#define CONFDB_LOCAL_DEFAULT_SHELL "default_shell"
@@ -143,6 +144,8 @@ struct sss_domain_info {
bool cache_credentials;
bool legacy_passwords;
+ gid_t override_gid;
+
uint32_t entry_cache_timeout;
struct sss_domain_info *next;