summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-10-18 17:05:38 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-11-14 12:31:45 +0100
commitc18f84fe65b53e40e5f2ab76aac29d51167807e6 (patch)
tree9dcae545b348801418b62edec1c55b3f9cbef3b4
parent97139975c91bcd5015141d5c18178df927b91b73 (diff)
downloadsssd-1.9.2-130.el6.tar.gz
sssd-1.9.2-130.el6.tar.xz
sssd-1.9.2-130.el6.zip
Inherit ID limits of parent domains if setsssd-1.9.2-130.el6
https://fedorahosted.org/sssd/ticket/2123 Previously, the subdomains were always unbound even if the administrator limited the ranges with min_id/max_id. This could have posed problems when running programs that scan the whole ID space, such as "groupadd -r".
-rw-r--r--src/util/domain_info_utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
index a6aa5c733..4da0c9d2a 100644
--- a/src/util/domain_info_utils.c
+++ b/src/util/domain_info_utils.c
@@ -74,9 +74,11 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx,
dom->enumerate = false;
dom->fqnames = false;
- /* FIXME: get ranges from the server */
- dom->id_min = 0;
- dom->id_max = 0xffffffff;
+ /* If the parent domain explicitly limits ID ranges, the subdomain
+ * should honour the limits as well.
+ */
+ dom->id_min = parent->id_min ? parent->id_min : 0;
+ dom->id_max = parent->id_max ? parent->id_max : 0xffffffff;
dom->pwd_expiration_warning = parent->pwd_expiration_warning;
dom->cache_credentials = parent->cache_credentials;
dom->case_sensitive = false;