From: David Mulder Date: Thu, 16 Mar 2023 21:39:47 +0000 (-0600) Subject: gpupdate: Test that PAM Access uses winbind separator X-Git-Tag: talloc-2.4.1~1368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=893cfefa9ed6048fc45d0a5d2b48a4821e8ff3d1;p=thirdparty%2Fsamba.git gpupdate: Test that PAM Access uses winbind separator Signed-off-by: David Mulder Reviewed-by: Andrew Bartlett Reviewed-by: Jeremy Allison --- diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py index b9ded20c828..8aea59eb61a 100644 --- a/python/samba/tests/gpo.py +++ b/python/samba/tests/gpo.py @@ -6415,6 +6415,9 @@ class GPOTests(tests.TestCase): machine_creds.set_machine_account() # Initialize the group policy extension + winbind_sep = self.lp.get('winbind separator') + self.addCleanup(self.lp.set, 'winbind separator', winbind_sep) + self.lp.set('winbind separator', '+') ext = vgp_access_ext(self.lp, machine_creds, machine_creds.get_username(), store) @@ -6517,10 +6520,10 @@ class GPOTests(tests.TestCase): # Check the access config for the correct access.conf entries print('Config file %s found' % gp_cfg) data = open(gp_cfg, 'r').read() - self.assertIn('+:%s\\goodguy:ALL' % realm, data) - self.assertIn('+:%s\\goodguys:ALL' % realm, data) - self.assertIn('-:%s\\badguy:ALL' % realm, data) - self.assertIn('-:%s\\badguys:ALL' % realm, data) + self.assertIn('+:%s+goodguy:ALL' % realm, data) + self.assertIn('+:%s+goodguys:ALL' % realm, data) + self.assertIn('-:%s+badguy:ALL' % realm, data) + self.assertIn('-:%s+badguys:ALL' % realm, data) # Check that a call to gpupdate --rsop also succeeds ret = rsop(self.lp) diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo new file mode 100644 index 00000000000..1ad05a14aa4 --- /dev/null +++ b/selftest/knownfail.d/gpo @@ -0,0 +1 @@ +samba.tests.gpo.samba.tests.gpo.GPOTests.test_vgp_access