diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-10-18 17:05:38 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-10-24 16:15:03 +0200 |
commit | 8a5b0728ed6ed5deb6ad53cd4ccb23121babfd0c (patch) | |
tree | c29ac402216287e40ca215dd110f94f298d9bcc2 | |
parent | 212fca42b7b2e2e5779e151a49b9105ccfd69dcf (diff) | |
download | sssd-8a5b0728ed6ed5deb6ad53cd4ccb23121babfd0c.tar.gz sssd-8a5b0728ed6ed5deb6ad53cd4ccb23121babfd0c.tar.xz sssd-8a5b0728ed6ed5deb6ad53cd4ccb23121babfd0c.zip |
Inherit ID limits of parent domains if set
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 9d7bb5f5a..8d07871ec 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -251,9 +251,11 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, dom->enumerate = enumerate; dom->fqnames = true; dom->mpg = mpg; - /* 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; |