]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpo: Security gpext rsop list only own policies
authorDavid Mulder <dmulder@suse.com>
Tue, 15 Dec 2020 19:48:30 +0000 (12:48 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 11 Feb 2021 18:28:09 +0000 (18:28 +0000)
The rsop should only list the policies from
that extension, not from all policies in the
same file.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 11 18:28:09 UTC 2021 on sn-devel-184

python/samba/gp_sec_ext.py
selftest/knownfail.d/gpo [deleted file]

index 136ba220de766e555ad42792967a4381e065198f..a9f5bbe5a6c19a04353c4d7022845299a7bde758 100644 (file)
@@ -102,7 +102,8 @@ class gp_krb_ext(gp_inf_ext):
             inf_conf = self.parse(path)
             if not inf_conf:
                 return output
-            for section in inf_conf.sections():
+            if str(self) in inf_conf.sections():
+                section = str(self)
                 output[section] = {k: v for k, v in inf_conf.items(section) \
                                       if gp_krb_ext.apply_map.get(k)}
         return output
@@ -210,7 +211,8 @@ class gp_access_ext(gp_inf_ext):
             inf_conf = self.parse(path)
             if not inf_conf:
                 return output
-            for section in inf_conf.sections():
+            if str(self) in inf_conf.sections():
+                section = str(self)
                 output[section] = {k: v for k, v in inf_conf.items(section) \
                                       if gp_access_ext.apply_map.get(k)}
         return output
diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo
deleted file mode 100644 (file)
index 87a8c3c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba.tests.gpo.samba.tests.gpo.GPOTests.test_rsop