Blame SOURCES/0093-AD-Inherit-the-MPG-setting-from-the-main-domain.patch

9f2ebf
From e67f94d854ef125626294771473a1204726eeba4 Mon Sep 17 00:00:00 2001
9f2ebf
From: Jakub Hrozek <jhrozek@redhat.com>
9f2ebf
Date: Mon, 15 Jan 2018 22:11:24 +0100
9f2ebf
Subject: [PATCH 93/96] AD: Inherit the MPG setting from the main domain
9f2ebf
MIME-Version: 1.0
9f2ebf
Content-Type: text/plain; charset=UTF-8
9f2ebf
Content-Transfer-Encoding: 8bit
9f2ebf
9f2ebf
If the auto_private_groups option was set in the domain section for
9f2ebf
direct integration, it only had an effect on the joined domain, not any
9f2ebf
of the subdomains, so requesting a user from the child domain would look
9f2ebf
like this:
9f2ebf
    $ id childuser@child.win.trust.test
9f2ebf
    uid=30000(childuser@child.win.trust.test) gid=40000(usergroup@child.win.trust.test) groups=40000(usergroup@child.win.trust.test)
9f2ebf
The expected result, visible after this patch is:
9f2ebf
    $ id childuser@child.win.trust.test
9f2ebf
    uid=30000(childuser@child.win.trust.test) gid=30000(childuser@child.win.trust.test) groups=30000(childuser@child.win.trust.test),40000(usergroup@child.win.trust.test)
9f2ebf
9f2ebf
Resolves:
9f2ebf
https://pagure.io/SSSD/sssd/issue/3613
9f2ebf
9f2ebf
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
9f2ebf
(cherry picked from commit 29ebf45f96b13590ae76a19c7c16c53f172e4ae4)
9f2ebf
---
9f2ebf
 src/providers/ad/ad_subdomains.c | 7 +++++++
9f2ebf
 1 file changed, 7 insertions(+)
9f2ebf
9f2ebf
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
9f2ebf
index 3fb9b950f171d85817cce35ac92ad7c4974ccb68..1b9483a5dce937d6acdd813486a1e8c18210d35f 100644
9f2ebf
--- a/src/providers/ad/ad_subdomains.c
9f2ebf
+++ b/src/providers/ad/ad_subdomains.c
9f2ebf
@@ -391,6 +391,13 @@ ad_subdom_store(struct sdap_idmap_ctx *idmap_ctx,
9f2ebf
     }
9f2ebf
 
9f2ebf
     mpg = sdap_idmap_domain_has_algorithmic_mapping(idmap_ctx, name, sid_str);
9f2ebf
+    if (mpg == false) {
9f2ebf
+        /* Domains that use the POSIX attributes set by the admin must
9f2ebf
+         * inherit the MPG setting from the parent domain so that the
9f2ebf
+         * auto_private_groups options works for trusted domains as well
9f2ebf
+         */
9f2ebf
+        mpg = domain->mpg;
9f2ebf
+    }
9f2ebf
 
9f2ebf
     ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, sid_str,
9f2ebf
                                 mpg, enumerate, domain->forest, 0, NULL);
9f2ebf
-- 
9f2ebf
2.14.3
9f2ebf