From: David Mulder Date: Tue, 15 Dec 2020 19:48:30 +0000 (-0700) Subject: gpo: Security gpext rsop list only own policies X-Git-Tag: tevent-0.11.0~1765 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fa53985920f16b0e79c4386e90bfd1bb25be347;p=thirdparty%2Fsamba.git gpo: Security gpext rsop list only own policies The rsop should only list the policies from that extension, not from all policies in the same file. Signed-off-by: David Mulder Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Feb 11 18:28:09 UTC 2021 on sn-devel-184 --- diff --git a/python/samba/gp_sec_ext.py b/python/samba/gp_sec_ext.py index 136ba220de7..a9f5bbe5a6c 100644 --- a/python/samba/gp_sec_ext.py +++ b/python/samba/gp_sec_ext.py @@ -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 index 87a8c3c8d0e..00000000000 --- a/selftest/knownfail.d/gpo +++ /dev/null @@ -1 +0,0 @@ -^samba.tests.gpo.samba.tests.gpo.GPOTests.test_rsop