gpo: Display Security Extension RSOP on ADDC only
authorDavid Mulder <dmulder@suse.com>
Fri, 7 Aug 2020 17:09:17 +0000 (11:09 -0600)
committerDavid Mulder <dmulder@samba.org>
Thu, 27 Aug 2020 15:59:33 +0000 (15:59 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/gp_sec_ext.py

index 5e49dec75e1c8f4b676c38ed6c905083a1d286f9..620e5adfbf5aa00744eb2c71dc287a5256210e09 100644 (file)
@@ -91,6 +91,8 @@ class gp_krb_ext(gp_inf_ext):
 
     def rsop(self, gpo):
         output = {}
+        if self.lp.get('server role') != 'active directory domain controller':
+            return output
         inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf'
         if gpo.file_sys_path:
             path = os.path.join(gpo.file_sys_path, inf_file)
@@ -205,6 +207,8 @@ class gp_access_ext(gp_inf_ext):
 
     def rsop(self, gpo):
         output = {}
+        if self.lp.get('server role') != 'active directory domain controller':
+            return output
         inf_file = 'MACHINE/Microsoft/Windows NT/SecEdit/GptTmpl.inf'
         if gpo.file_sys_path:
             path = os.path.join(gpo.file_sys_path, inf_file)