From: David Mulder Date: Fri, 18 Nov 2022 18:42:15 +0000 (-0700) Subject: gp: Test PAM Access with DENY_ALL X-Git-Tag: talloc-2.4.0~525 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59b5abbe8cec52d7cf1197a91f32d832670284d5;p=thirdparty%2Fsamba.git gp: Test PAM Access with DENY_ALL Signed-off-by: David Mulder Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Nov 21 22:05:01 UTC 2022 on sn-devel-184 --- diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py index 7ba193884a1..9873f13c1e3 100644 --- a/python/samba/tests/gpo.py +++ b/python/samba/tests/gpo.py @@ -8543,8 +8543,11 @@ class GPOTests(tests.TestCase): with TemporaryDirectory() as dname: ext.process_group_policy([], gpos, dname) conf = os.listdir(dname) - self.assertEquals(len(conf), 1, 'The conf file was not created') - gp_cfg = os.path.join(dname, conf[0]) + # There will be 2 files, the policy file and the deny file + self.assertEquals(len(conf), 2, 'The conf file was not created') + # Ignore the DENY_ALL conf file + gp_cfg = os.path.join(dname, + [c for c in conf if '_gp_DENY_ALL.conf' not in c][0]) # Check the access config for the correct access.conf entries print('Config file %s found' % gp_cfg)