summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-06-05 04:51:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:30 -0500
commit4c6f04d83f20ecfe62cd87dadf9b48a898502ea7 (patch)
tree921e08e8a65f094ba0668412ee96a87fe94b5de2
parentc455b0a935dec8c9644634c496f2b95d7678df05 (diff)
downloadsamba-4c6f04d83f20ecfe62cd87dadf9b48a898502ea7.tar.gz
samba-4c6f04d83f20ecfe62cd87dadf9b48a898502ea7.tar.xz
samba-4c6f04d83f20ecfe62cd87dadf9b48a898502ea7.zip
r1029: cope wiith samdb_result_passwords() returning a null machine password
(This used to be commit ee6c17f3735381568d38e6c2df80bec687d00fbb)
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 05ee0521fc4..5c5e8128050 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;
}