libcli/security/test_sddl_conditional_ace: adjust RA octet parse tests
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 9 Nov 2023 22:35:42 +0000 (11:35 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Nov 2023 01:12:40 +0000 (01:12 +0000)
We are going to parse octet strings like Windows (as opposed to like
Windows docs), so the tests need changing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/tests/test_run_conditional_ace.c
libcli/security/tests/test_sddl_conditional_ace.c
selftest/knownfail.d/ra-escapes [new file with mode: 0644]

index 433f830afedd8163d80d5bfccd8bfed4260ce4de..ebc3524fa4b1f3731558f1493b27a559b7b2e540 100644 (file)
@@ -613,7 +613,7 @@ static void test_user_attr_any_of_missing_user_attr(void **state)
         INIT();
         USER_SIDS("WD", "AA");
         SD("D:(XD;;FX;;;S-1-1-0;(@User.Project Any_of @Resource.Project))"
-          "S:(RA;;;;;WD;(\"Project\",TX,0,#1234))");
+          "S:(RA;;;;;WD;(\"Project\",TX,0,1234))");
         DENY_CHECK(0x10);
 }
 
index 2b084c80281e138f7d98f4756059fe7d11924080..4aaf4f21d19d1c47e88dfe181b8d26520e5c81eb 100644 (file)
@@ -484,10 +484,10 @@ static void test_full_sddl_ra_escapes(void **state)
                "%0016%0016%0016%0016%0016%0016%0016%0016%0016%0016%0016"
                "%0016%0016%0016%0016%0016%0016r\","
                "TX,0x0,"
-               "#0077,#00,#0077,#00,#0077,#00,#00,#00,#0077,#00,#0077,"
-               "#00,#0077,#007777,#007777,#0077,#007777,#0077,#007777,"
-               "#007770,#0077,#00,#0077,#00,#00,#00,#0077,#00,#0077,#00,"
-               "#0077,#007777,#007777,#0077,#007777,#0077,#007777,#007777))");
+               "0077,00,0077,00,0077,00,00,00,0077,00,0077,"
+               "00,0077,007777,007777,0077,007777,0077,007777,"
+               "007770,0077,00,0077,00,00,00,0077,00,0077,00,"
+               "0077,007777,007777,0077,007777,0077,007777,007777))");
        uint8_t win_bytes[] = {
                0x01, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00,
diff --git a/selftest/knownfail.d/ra-escapes b/selftest/knownfail.d/ra-escapes
new file mode 100644 (file)
index 0000000..ed5671b
--- /dev/null
@@ -0,0 +1,2 @@
+samba.unittests.sddl_conditional_ace.test_full_sddl_ra_escapes
+samba.unittests.run_conditional_ace.test_user_attr_any_of_missing_user_attr