]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gpupdate: Test that PAM Access uses winbind separator
authorDavid Mulder <dmulder@samba.org>
Thu, 16 Mar 2023 21:39:47 +0000 (15:39 -0600)
committerJeremy Allison <jra@samba.org>
Mon, 20 Mar 2023 19:23:32 +0000 (19:23 +0000)
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/tests/gpo.py
selftest/knownfail.d/gpo [new file with mode: 0644]

index b9ded20c82889c6e470cb278a4670e0b565376d5..8aea59eb61a41b49155470c50db37b719cc587ee 100644 (file)
@@ -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 (file)
index 0000000..1ad05a1
--- /dev/null
@@ -0,0 +1 @@
+samba.tests.gpo.samba.tests.gpo.GPOTests.test_vgp_access