netlogond3: Call make_auth_context_subsystem directly
authorVolker Lendecke <vl@samba.org>
Mon, 13 Mar 2017 07:14:00 +0000 (08:14 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Mar 2017 10:57:08 +0000 (11:57 +0100)
Soon we'll call specific methods here

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/rpc_server/netlogon/srv_netlog_nt.c

index 005bd030bac2bff913ee72b318cf0f8b45673047..09feb130a8756360708978582272fa9a429e9217 100644 (file)
@@ -1586,13 +1586,20 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
        {
                const char *wksname = nt_workstation;
                const char *workgroup = lp_workgroup();
+               bool ok;
 
-               status = make_auth_context_fixed(talloc_tos(), &auth_context,
-                                                logon->network->challenge);
+               status = make_auth_context_subsystem(talloc_tos(),
+                                                    &auth_context);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
                }
 
+               ok = auth3_context_set_challenge(
+                       auth_context, logon->network->challenge, "fixed");
+               if (!ok) {
+                       return NT_STATUS_NO_MEMORY;
+               }
+
                /* For a network logon, the workstation name comes in with two
                 * backslashes in the front. Strip them if they are there. */