pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0003-adtrust-define-Guests-mapping.patch

b01884
From 1ef0fe8bb824282c2f48417efda3a60e7c1bf580 Mon Sep 17 00:00:00 2001
b01884
From: Alexander Bokovoy <abokovoy@redhat.com>
b01884
Date: Tue, 9 Oct 2018 17:21:37 +0300
b01884
Subject: [PATCH] adtrust: define Guests mapping after creating cifs/ principal
b01884
b01884
All Samba utilities load passdb modules from the configuration file. As
b01884
result, 'net groupmap' call would try to initialize ipasam passdb module
b01884
and that one would try to connect to LDAP using Kerberos authentication.
b01884
b01884
We should be running it after cifs/ principal is actually created in
b01884
ipa-adtrust-install or otherwise setting up group mapping will fail.
b01884
b01884
This only affects new installations. For older ones 'net groupmap' would
b01884
work just fine because adtrust is already configured and all principals
b01884
exist already.
b01884
b01884
A re-run of 'ipa-server-upgrade' is a workaround too but better to fix
b01884
the initial setup.
b01884
b01884
Related: https://pagure.io/freeipa/issue/7705
b01884
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
b01884
---
b01884
 ipaserver/install/adtrustinstance.py | 4 ++--
b01884
 1 file changed, 2 insertions(+), 2 deletions(-)
b01884
b01884
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
b01884
index 46c4ad663..da16748cf 100644
b01884
--- a/ipaserver/install/adtrustinstance.py
b01884
+++ b/ipaserver/install/adtrustinstance.py
b01884
@@ -837,8 +837,6 @@ class ADTRUSTInstance(service.Service):
b01884
                   self.__create_samba_domain_object)
b01884
         self.step("creating samba config registry", self.__write_smb_registry)
b01884
         self.step("writing samba config file", self.__write_smb_conf)
b01884
-        self.step("map BUILTIN\\Guests to nobody group",
b01884
-                  self.__map_Guests_to_nobody)
b01884
         self.step("adding cifs Kerberos principal",
b01884
                   self.request_service_keytab)
b01884
         self.step("adding cifs and host Kerberos principals to the adtrust agents group", \
b01884
@@ -850,6 +848,8 @@ class ADTRUSTInstance(service.Service):
b01884
         self.step("updating Kerberos config", self.__update_krb5_conf)
b01884
         self.step("activating CLDAP plugin", self.__add_cldap_module)
b01884
         self.step("activating sidgen task", self.__add_sidgen_task)
b01884
+        self.step("map BUILTIN\\Guests to nobody group",
b01884
+                  self.__map_Guests_to_nobody)
b01884
         self.step("configuring smbd to start on boot", self.__enable)
b01884
         self.step("adding special DNS service records", \
b01884
                   self.__add_dns_service_records)
b01884
-- 
b01884
2.17.1
b01884