From 4c6f04d83f20ecfe62cd87dadf9b48a898502ea7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Jun 2004 04:51:24 +0000 Subject: r1029: cope wiith samdb_result_passwords() returning a null machine password (This used to be commit ee6c17f3735381568d38e6c2df80bec687d00fbb) --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 05ee0521fc..5c5e812805 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -182,7 +182,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL *r->out.rid = samdb_result_rid_from_sid(mem_ctx, msgs[0], "objectSid", 0); nt_status = samdb_result_passwords(mem_ctx, msgs[0], NULL, &mach_pwd); - if (!NT_STATUS_IS_OK(nt_status)) { + if (!NT_STATUS_IS_OK(nt_status) || mach_pwd == NULL) { samdb_close(sam_ctx); return NT_STATUS_ACCESS_DENIED; } @@ -336,6 +336,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO domain_sid = samdb_result_sid_prefix(mem_ctx, msgs[0], "objectSid"); if (!domain_sid) { samdb_close(sam_ctx); + DEBUG(1,("no objectSid in user record\n")); return NT_STATUS_INTERNAL_DB_CORRUPTION; } -- cgit