]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/security: Check for sddl_from_conditional_ace() failure in test_sddl_condition...
authorAndrew Bartlett <abartlet@samba.org>
Wed, 20 Sep 2023 23:56:58 +0000 (11:56 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 26 Sep 2023 23:45:36 +0000 (23:45 +0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
libcli/security/tests/test_sddl_conditional_ace.c

index cf487d09f25e495eebaa7a8b1e19ad63d547f415..479c0aa0527d89e7e6a195a719474dde5c8ec49d 100644 (file)
@@ -660,7 +660,17 @@ static void test_round_trips(void **state)
                }
 
                resddl1 = sddl_from_conditional_ace(mem_ctx, s1);
+               if (resddl1 == NULL) {
+                       failed = true;
+                       debug_fail("could not re-make SDDL of %s\n", sddl[i]);
+                       continue;
+               }
                resddl2 = sddl_from_conditional_ace(mem_ctx, s2);
+               if (resddl2 == NULL) {
+                       failed = true;
+                       debug_fail("could not re-make SDDL of %s\n", sddl[i]);
+                       continue;
+               }
                if (strcmp(resddl1, resddl2) != 0) {
                        print_message("SDDL 2: %s\n", resddl2);
                        failed = failed || ok;