s4:rpc_server/samr: make use of dcesrv_call_auth_info()
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Nov 2018 11:44:30 +0000 (12:44 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:35 +0000 (03:13 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/samr/dcesrv_samr.c

index b823d9c..921d296 100644 (file)
@@ -4876,12 +4876,14 @@ static NTSTATUS dcesrv_samr_ValidatePassword(struct dcesrv_call_state *dce_call,
        NTSTATUS status;
        enum dcerpc_transport_t transport =
                dcerpc_binding_get_transport(dce_call->conn->endpoint->ep_description);
+       enum dcerpc_AuthLevel auth_level = DCERPC_AUTH_LEVEL_NONE;
 
        if (transport != NCACN_IP_TCP && transport != NCALRPC) {
                DCESRV_FAULT(DCERPC_FAULT_ACCESS_DENIED);
        }
 
-       if (dce_call->conn->auth_state.auth_level != DCERPC_AUTH_LEVEL_PRIVACY) {
+       dcesrv_call_auth_info(dce_call, NULL, &auth_level);
+       if (auth_level != DCERPC_AUTH_LEVEL_PRIVACY) {
                DCESRV_FAULT(DCERPC_FAULT_ACCESS_DENIED);
        }