From: David Mulder Date: Mon, 21 Dec 2020 23:47:51 +0000 (-0700) Subject: gpo: Test that VGP Sudoers policy handles group principals X-Git-Tag: tevent-0.11.0~1749 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c2f2d31c396e18ccce326ad3f5619619973738d;p=thirdparty%2Fsamba.git gpo: Test that VGP Sudoers policy handles group principals Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py index ba0e91bde79..e3b500868ec 100644 --- a/python/samba/tests/gpo.py +++ b/python/samba/tests/gpo.py @@ -484,7 +484,11 @@ class GPOTests(tests.TestCase): principal = etree.Element('principal') principal.text = 'fakeu' principal.attrib['type'] = 'user' + group = etree.Element('principal') + group.text = 'fakeg' + group.attrib['type'] = 'group' principal_list.append(principal) + principal_list.append(group) sudoers_entry.append(principal_list) data.append(sudoers_entry) policysetting.append(data) @@ -492,7 +496,7 @@ class GPOTests(tests.TestCase): self.assertTrue(ret, 'Could not create the target %s' % manifest) # Process all gpos, with temp output directory - data = 'fakeu ALL=(ALL) NOPASSWD: ALL' + data = 'fakeu,fakeg% ALL=(ALL) NOPASSWD: ALL' with TemporaryDirectory() as dname: ext.process_group_policy([], gpos, dname) sudoers = os.listdir(dname) diff --git a/selftest/knownfail.d/gpo b/selftest/knownfail.d/gpo new file mode 100644 index 00000000000..4be23fb2004 --- /dev/null +++ b/selftest/knownfail.d/gpo @@ -0,0 +1 @@ +^samba.tests.gpo.samba.tests.gpo.GPOTests.test_vgp_sudoers