]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gp: Test PAM Access with DENY_ALL
authorDavid Mulder <dmulder@samba.org>
Fri, 18 Nov 2022 18:42:15 +0000 (11:42 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 21 Nov 2022 22:05:01 +0000 (22:05 +0000)
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 21 22:05:01 UTC 2022 on sn-devel-184

python/samba/tests/gpo.py

index 7ba193884a17c716dbcf4ca302422f7bcda12a7e..9873f13c1e377fe204e2cbba70a1e93d468481a5 100644 (file)
@@ -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)