summaryrefslogtreecommitdiff
path: root/python/samba/gp_sec_ext.py
diff options
context:
space:
mode:
authorDavid Mulder <dmulder@suse.com>2020-08-07 11:09:17 -0600
committerDavid Mulder <dmulder@samba.org>2020-08-27 15:59:33 +0000
commit7d6d160a8ed74ae44e3bbb01818fcf54d18e1fa6 (patch)
treeb3d97726ae683e879a96a69253900eca5e2e3133 /python/samba/gp_sec_ext.py
parentc887f7a7d2303121a3a59fa7161ddf08053c31da (diff)
downloadsamba-7d6d160a8ed74ae44e3bbb01818fcf54d18e1fa6.tar.gz
gpo: Display Security Extension RSOP on ADDC only
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python/samba/gp_sec_ext.py')
-rw-r--r--python/samba/gp_sec_ext.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/gp_sec_ext.py b/python/samba/gp_sec_ext.py
index 5e49dec75e1..620e5adfbf5 100644
--- a/python/samba/gp_sec_ext.py
+++ b/python/samba/gp_sec_ext.py
@@ -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)