]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security:sddl_decode_ace: fix ';' count message
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 9 Nov 2023 22:28:35 +0000 (11:28 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Nov 2023 22:07:35 +0000 (22:07 +0000)
The wrong number of semicolons is usually one less than count (which
counts sections separated by semicolons), except when count is zero.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/sddl.c
selftest/knownfail.d/domain_auth_policy-errmsg [deleted file]

index 70bf6d07f757d0a0d9e6efaa00ffa0bd6795a849..032048544a01053c2b4669ae74567d800e80f41a 100644 (file)
@@ -588,7 +588,8 @@ static bool sddl_decode_ace(TALLOC_CTX *mem_ctx,
        if (count != 6) {
                /* we hit the '\0' or ')' before all of ';;;;;)' */
                *msg = talloc_asprintf(mem_ctx,
-                                      "malformed ACE with only %zu ';'", count);
+                                      "malformed ACE with only %zu ';'",
+                                      MIN(count - 1, count));
                return false;
        }
 
diff --git a/selftest/knownfail.d/domain_auth_policy-errmsg b/selftest/knownfail.d/domain_auth_policy-errmsg
deleted file mode 100644 (file)
index 4790594..0000000
+++ /dev/null
@@ -1 +0,0 @@
-samba.tests.samba_tool.domain_auth_policy.samba.tests.samba_tool.domain_auth_policy.AuthPolicyCmdTestCase.test_create__invalid_sddl_normal_ace