diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-01-10 12:14:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:37 -0500 |
commit | 3136462ea9d2b97e5385386e2c37b1ac403db6ca (patch) | |
tree | 0af052bff80717e0ac27670d6a1f077db80678a1 | |
parent | 0c75667594e6d3aaf856289ac6e09230c45808d8 (diff) | |
download | samba-3136462ea9d2b97e5385386e2c37b1ac403db6ca.tar.gz samba-3136462ea9d2b97e5385386e2c37b1ac403db6ca.tar.bz2 samba-3136462ea9d2b97e5385386e2c37b1ac403db6ca.zip |
r4639: initialize all struct members!
tridge: sorry for making you such a pain...
could you check if that fixes your bugs
metze
(This used to be commit c215372eb0916df1e532b77c8365f401a8c32a38)
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 0733a467f7..259f43895b 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -563,21 +563,21 @@ static NTSTATUS netr_LogonSamLogonEx(struct dcesrv_call_state *dce_call, TALLOC_ sam->group_count = 0; sam->groupids = NULL; sam->user_flags = 0; /* TODO: w2k3 uses 0x120 - what is this? */ - sam->acct_flags = server_info->acct_flags; + sam->acct_flags = server_info->acct_flags; sam->logon_server.string = lp_netbios_name(); - sam->domain.string = server_info->domain_name; sam->domain_sid = dom_sid_dup(mem_ctx, server_info->account_sid); NT_STATUS_HAVE_NO_MEMORY(sam->domain_sid); sam->domain_sid->num_auths--; + ZERO_ARRAY(sam->unknown); + + ZERO_STRUCT(sam->key); if (server_info->user_session_key.length == sizeof(sam->key.key)) { memcpy(sam->key.key, server_info->user_session_key.data, sizeof(sam->key.key)); - } else { - ZERO_STRUCT(sam->key.key); } - + /* Don't crypt an all-zero key, it would give away the NETLOGON pipe session key */ /* It appears that level 6 is not individually encrypted */ if ((r->in.validation_level != 6) @@ -591,12 +591,11 @@ static NTSTATUS netr_LogonSamLogonEx(struct dcesrv_call_state *dce_call, TALLOC_ sizeof(sam->key.key)); } } - + + ZERO_STRUCT(sam->LMSessKey); if (server_info->lm_session_key.length == sizeof(sam->LMSessKey.key)) { memcpy(sam->LMSessKey.key, server_info->lm_session_key.data, sizeof(sam->LMSessKey.key)); - } else { - ZERO_STRUCT(sam->LMSessKey.key); } /* Don't crypt an all-zero key, it would give away the NETLOGON pipe session key */ |