diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-08-23 05:51:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:15 -0500 |
commit | aca6a1e1ee46fea49a5290613347d2f1d4b235c8 (patch) | |
tree | 80ec3511d9d0758e556c78af67718e48c4c7a1a2 /source4/rpc_server/netlogon/dcerpc_netlogon.c | |
parent | 0e5260c4f5defecce814243df18c0ab36dd7387b (diff) | |
download | samba-aca6a1e1ee46fea49a5290613347d2f1d4b235c8.tar.gz samba-aca6a1e1ee46fea49a5290613347d2f1d4b235c8.tar.bz2 samba-aca6a1e1ee46fea49a5290613347d2f1d4b235c8.zip |
r1993: Allow WinXP domain logon to progress a bit further (it seems broken for me).
Fix indent, and add a few more useful debug messages.
Send a fault, if the bind is not accepted - don't just leave the client hanging.
Andrew Bartlett
(This used to be commit 486215edc1148ad754632be37760dc0d38b0340d)
Diffstat (limited to 'source4/rpc_server/netlogon/dcerpc_netlogon.c')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index d01c0c577b..b58a33ded1 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -53,6 +53,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call) state = talloc_p(mem_ctx, struct server_pipe_state); if (state == NULL) { talloc_destroy(mem_ctx); + return NT_STATUS_NO_MEMORY; } ZERO_STRUCTP(state); state->mem_ctx = mem_ctx; @@ -60,6 +61,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call) if (dce_call->conn->auth_state.session_info == NULL) { talloc_destroy(mem_ctx); + smb_panic("No session info provided by schannel level setup!"); return NT_STATUS_NO_USER_SESSION_KEY; } @@ -68,6 +70,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call) &state->creds); if (!NT_STATUS_IS_OK(status)) { + DEBUG(3, ("getting schannel credentials failed with %s\n", nt_errstr(status))); talloc_destroy(mem_ctx); return status; } @@ -89,8 +92,11 @@ static NTSTATUS netlogon_bind(struct dcesrv_call_state *dce_call, const struct d dce_call->conn->auth_state.auth_info->auth_type == DCERPC_AUTH_TYPE_SCHANNEL) { NTSTATUS status; + DEBUG(5, ("schannel bind on netlogon\n")); + status = netlogon_schannel_setup(dce_call); if (!NT_STATUS_IS_OK(status)) { + DEBUG(3, ("schannel bind on netlogon failed with %s\n", nt_errstr(status))); return status; } } @@ -190,16 +196,16 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL "(&(sAMAccountName=%s)(objectclass=user))", r->in.account_name); + samdb_close(sam_ctx); + if (num_records == 0) { DEBUG(3,("Couldn't find user [%s] in samdb.\n", r->in.account_name)); - samdb_close(sam_ctx); return NT_STATUS_NO_SUCH_USER; } if (num_records > 1) { DEBUG(0,("Found %d records matching user [%s]\n", num_records, r->in.account_name)); - samdb_close(sam_ctx); return NT_STATUS_INTERNAL_DB_CORRUPTION; } @@ -239,12 +245,9 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL nt_status = samdb_result_passwords(mem_ctx, msgs[0], NULL, &mach_pwd); if (!NT_STATUS_IS_OK(nt_status) || mach_pwd == NULL) { - samdb_close(sam_ctx); return NT_STATUS_ACCESS_DENIED; } - samdb_close(sam_ctx); - if (!pipe_state->creds) { pipe_state->creds = talloc_p(pipe_state->mem_ctx, struct creds_CredentialState); if (!pipe_state->creds) { |