]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture/rpc: prepare lsa lookup tests for ServerAuthenticateKerberos
authorStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2024 11:18:36 +0000 (12:18 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 13 Jan 2025 23:40:30 +0000 (23:40 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
source4/torture/rpc/lsa.c

index ab672f41d542838ae562126db527465e294f3e49..bac0f29695e4da95ad6d7b014fc724ff2525416c 100644 (file)
@@ -1123,7 +1123,7 @@ static bool test_LookupSids3_fail(struct dcerpc_binding_handle *b,
        if (NT_STATUS_EQUAL(r.out.result, NT_STATUS_ACCESS_DENIED) ||
            NT_STATUS_EQUAL(r.out.result, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) {
                torture_comment(tctx,
-                               "LookupNames4 correctly returned with "
+                               "LookupSids3 correctly returned with "
                                "result: %s\n",
                                nt_errstr(r.out.result));
                return true;
@@ -1218,6 +1218,15 @@ bool test_many_LookupSids(struct dcerpc_pipe *p,
                        if (!test_LookupNames4(b, tctx, level, &names, true)) {
                                return false;
                        }
+               } else if (auth_type == DCERPC_AUTH_TYPE_KRB5 &&
+                          auth_level == DCERPC_AUTH_LEVEL_PRIVACY)
+               {
+                       if (!test_LookupSids3(b, tctx, level, &sids)) {
+                               return false;
+                       }
+                       if (!test_LookupNames4(b, tctx, level, &names, true)) {
+                               return false;
+                       }
                } else {
                        /*
                         * If we don't have a secure channel these tests must