diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-02-27 15:18:56 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-03-02 07:07:10 +0100 |
commit | f7acb36784fbc8fed72c70d51ef0fbb8493edf8f (patch) | |
tree | 7f8935b1abd6fb35e7943856088184ec58bbe995 /source4/auth/gensec | |
parent | cfa33c45675c55689018ee700e07c81566904ea6 (diff) | |
download | samba-f7acb36784fbc8fed72c70d51ef0fbb8493edf8f.tar.gz samba-f7acb36784fbc8fed72c70d51ef0fbb8493edf8f.tar.bz2 samba-f7acb36784fbc8fed72c70d51ef0fbb8493edf8f.zip |
s4:auth/gensec/schannel: make a copy of netlogon_creds_CredentialState in the client
This is really a copy for the lifetime of the rpc connection.
metze
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r-- | source4/auth/gensec/schannel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c index 51be445dbb..4c846c02c8 100644 --- a/source4/auth/gensec/schannel.c +++ b/source4/auth/gensec/schannel.c @@ -73,7 +73,14 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_ return NT_STATUS_OK; } - state->creds = talloc_reference(state, cli_credentials_get_netlogon_creds(gensec_security->credentials)); + state->creds = cli_credentials_get_netlogon_creds(gensec_security->credentials); + if (state->creds == NULL) { + return NT_STATUS_INVALID_PARAMETER_MIX; + } + state->creds = netlogon_creds_copy(state, state->creds); + if (state->creds == NULL) { + return NT_STATUS_NO_MEMORY; + } bind_schannel.MessageType = NL_NEGOTIATE_REQUEST; #if 0 |