netlogon4: make use of auth_context_create_for_netlogon()
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Mar 2017 11:15:13 +0000 (12:15 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Mar 2017 10:57:09 +0000 (11:57 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/rpc_server/netlogon/dcerpc_netlogon.c

index afa9b1c91e1c853df605b987a86cd4df8d2dcf08..332afd3b4630731e8aebcb125f584c475fddc042 100644 (file)
@@ -868,11 +868,10 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
        case NetlogonInteractiveTransitiveInformation:
        case NetlogonServiceTransitiveInformation:
 
-               /* TODO: we need to deny anonymous access here */
-               nt_status = auth_context_create(mem_ctx,
-                                               dce_call->event_ctx, dce_call->msg_ctx,
-                                               dce_call->conn->dce_ctx->lp_ctx,
-                                               &auth_context);
+               nt_status = auth_context_create_for_netlogon(mem_ctx,
+                                       dce_call->event_ctx, dce_call->msg_ctx,
+                                       dce_call->conn->dce_ctx->lp_ctx,
+                                       &auth_context);
                NT_STATUS_NOT_OK_RETURN(nt_status);
 
                user_info->logon_parameters = r->in.logon->password->identity_info.parameter_control;
@@ -895,11 +894,10 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
        case NetlogonNetworkInformation:
        case NetlogonNetworkTransitiveInformation:
 
-               /* TODO: we need to deny anonymous access here */
-               nt_status = auth_context_create(mem_ctx,
-                                               dce_call->event_ctx, dce_call->msg_ctx,
-                                               dce_call->conn->dce_ctx->lp_ctx,
-                                               &auth_context);
+               nt_status = auth_context_create_for_netlogon(mem_ctx,
+                                       dce_call->event_ctx, dce_call->msg_ctx,
+                                       dce_call->conn->dce_ctx->lp_ctx,
+                                       &auth_context);
                NT_STATUS_NOT_OK_RETURN(nt_status);
 
                nt_status = auth_context_set_challenge(auth_context, r->in.logon->network->challenge, "netr_LogonSamLogonWithFlags");