diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-07 12:40:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:37 -0500 |
commit | 930f9090ba44aba8ead7fef895033bd58d4f14f9 (patch) | |
tree | b5890004af8f801b206b12a18c71202b653300c2 | |
parent | 396b5bdafe781bb7313a24ade4a94d6821628aab (diff) | |
download | samba-930f9090ba44aba8ead7fef895033bd58d4f14f9.tar.gz samba-930f9090ba44aba8ead7fef895033bd58d4f14f9.tar.xz samba-930f9090ba44aba8ead7fef895033bd58d4f14f9.zip |
r3599: fixed a couple of memory errors in the rpc netlogon server
(found with valgrind)
(This used to be commit 151dd4593d30c703b70099cd240784134fdb4e0f)
-rw-r--r-- | source4/auth/ntlm_check.c | 7 | ||||
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source4/auth/ntlm_check.c b/source4/auth/ntlm_check.c index e31424d8085..e6a8ce681fa 100644 --- a/source4/auth/ntlm_check.c +++ b/source4/auth/ntlm_check.c @@ -187,6 +187,13 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx, username)); } + if (lm_sess_key) { + *lm_sess_key = data_blob(NULL, 0); + } + if (user_sess_key) { + *user_sess_key = data_blob(NULL, 0); + } + if (nt_interactive_password && nt_interactive_password->length && nt_pw) { if (nt_interactive_password->length != 16) { DEBUG(3,("ntlm_password_check: Interactive logon: Invalid NT password length (%d) supplied for user %s\n", (int)nt_interactive_password->length, diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 5319705e328..dcdcd7237cb 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -548,11 +548,12 @@ static NTSTATUS netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce_call, mem_ctx, &server_info); + /* keep the auth_context for the life of this call */ + talloc_steal(dce_call, auth_context); + if (!NT_STATUS_IS_OK(nt_status)) { - free_auth_context(&auth_context); return nt_status; } - free_auth_context(&auth_context); sam = talloc_p(mem_ctx, struct netr_SamBaseInfo); |