torture: Show sddl_decode() failure for "GWFX" access mask
authorVolker Lendecke <vl@samba.org>
Mon, 19 Apr 2021 14:04:00 +0000 (16:04 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 20 Apr 2021 23:19:28 +0000 (23:19 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
python/samba/tests/sddl.py
selftest/selftesthelpers.py

index 006a49dbee3bb88a5a8a60de7a7bd8f179221a06..9e1e1147a6a754d27be83b4b3e44d27465251e36 100644 (file)
@@ -178,3 +178,9 @@ class SddlDecodeEncode(TestCase):
             sddl = sd.as_sddl(sid)
             sd2 = security.descriptor.from_sddl(sddl, sid)
             self.assertEqual(sd, sd2)
+
+    def test_multiflag(self):
+        sid = security.dom_sid("S-1-2-3-4")
+        raised = False
+        with self.assertRaises(Exception):
+            sd = security.descriptor.from_sddl("D:(A;;GWFX;;;DA)", sid)
index 7b4c084b6de5963d61f2c144319b6d87f084a803..23f1b9ccd6866ebb181e17d3eaf019ecb063ab7a 100644 (file)
@@ -109,7 +109,7 @@ def plantestsuite_loadlist(name, env, cmdline):
         raise AssertionError("loadlist test %s does not support not --list" % name)
     if "$LOADLIST" not in cmdline:
         raise AssertionError("loadlist test %s does not support --load-list" % name)
-    print(("%s | %s" % (cmdline.replace("$LOADLIST", ""), add_prefix(name, env, support_list))).replace("$LISTOPT", "--list"))
+    print(("%s | %s" % (cmdline.replace("$LOADLIST", ""), add_prefix(name, env, support_list))).replace("$LISTOPT", "--list "))
     print(cmdline.replace("$LISTOPT", "") + " 2>&1 " + " | " + add_prefix(name, env, False))