pdbtest: Call make_auth_context_subsystem directly
authorVolker Lendecke <vl@samba.org>
Mon, 13 Mar 2017 07:19:41 +0000 (08:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Mar 2017 10:57:09 +0000 (11:57 +0100)
Last caller of make_auth_context_fixed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/torture/pdbtest.c

index fe51a764798e7974492b32e472c43043ad1e2c20..a9f49bb48d24b3e74560ac9ad717a5ae9bea0fc7 100644 (file)
@@ -268,6 +268,7 @@ static bool test_auth(TALLOC_CTX *mem_ctx, struct samu *pdb_entry)
        struct netr_SamInfo3 *info3_sam, *info3_auth;
        struct auth_serversupplied_info *server_info;
        NTSTATUS status;
+       bool ok;
        
        SMBOWFencrypt(pdb_get_nt_passwd(pdb_entry), challenge_8,
                      local_nt_response);
@@ -298,13 +299,20 @@ static bool test_auth(TALLOC_CTX *mem_ctx, struct samu *pdb_entry)
                return False;
        }
 
-       status = make_auth_context_fixed(NULL, &auth_context, challenge.data);
+       status = make_auth_context_subsystem(NULL, &auth_context);
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Failed to test authentication with check_sam_security_info3: %s\n", nt_errstr(status)));
                return False;
        }
-       
+
+       ok = auth3_context_set_challenge(
+               auth_context, challenge.data, "fixed");
+       if (!ok) {
+               DBG_ERR("auth3_context_set_challenge failed\n");
+               return false;
+       }
+
        status = auth_check_ntlm_password(mem_ctx,
                                          auth_context,
                                          user_info,