[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Fri Mar 2 00:49:04 MST 2012
The branch, master has been updated
via 89b4138 s3:rpc_server: initialize struct schannel_state to zero
via 083d80c s3:rpc_client: initialize struct schannel_state to zero
via 93261a1 s4:auth/gensec/schannel: initialize struct schannel_state to zero
via f7acb36 s4:auth/gensec/schannel: make a copy of netlogon_creds_CredentialState in the client
from cfa33c4 s3-selftest: Add tests for ntlm_auth gss-spnego client and server
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 89b413895b37004ce41c30a6fcbd76ab19a23d4b
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 27 15:20:45 2012 +0100
s3:rpc_server: initialize struct schannel_state to zero
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Fri Mar 2 08:48:23 CET 2012 on sn-devel-104
commit 083d80c502eaff8983ff4536c2ba86e547c6dc29
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 27 15:20:45 2012 +0100
s3:rpc_client: initialize struct schannel_state to zero
metze
commit 93261a118447d06581ed154bf11ca574038d7a00
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 27 15:20:45 2012 +0100
s4:auth/gensec/schannel: initialize struct schannel_state to zero
metze
commit f7acb36784fbc8fed72c70d51ef0fbb8493edf8f
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 27 15:18:56 2012 +0100
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
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_client/cli_pipe.c | 3 +--
source3/rpc_server/srv_pipe.c | 3 +--
source4/auth/gensec/schannel.c | 12 +++++++++---
3 files changed, 11 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 7740fbc..12f911b 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2243,13 +2243,12 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
goto fail;
}
- schannel_auth = talloc(result, struct schannel_state);
+ schannel_auth = talloc_zero(result, struct schannel_state);
if (schannel_auth == NULL) {
goto fail;
}
schannel_auth->state = SCHANNEL_STATE_START;
- schannel_auth->seq_num = 0;
schannel_auth->initiator = true;
schannel_auth->creds = netlogon_creds_copy(result, creds);
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 9be2bc8..4330a7d 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -479,14 +479,13 @@ static bool pipe_schannel_auth_bind(struct pipes_struct *p,
return False;
}
- schannel_auth = talloc(p, struct schannel_state);
+ schannel_auth = talloc_zero(p, struct schannel_state);
if (!schannel_auth) {
TALLOC_FREE(creds);
return False;
}
schannel_auth->state = SCHANNEL_STATE_START;
- schannel_auth->seq_num = 0;
schannel_auth->initiator = false;
schannel_auth->creds = creds;
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index 51be445..2465e53 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
@@ -229,13 +236,12 @@ static NTSTATUS schannel_start(struct gensec_security *gensec_security)
{
struct schannel_state *state;
- state = talloc(gensec_security, struct schannel_state);
+ state = talloc_zero(gensec_security, struct schannel_state);
if (!state) {
return NT_STATUS_NO_MEMORY;
}
state->state = SCHANNEL_STATE_START;
- state->seq_num = 0;
gensec_security->private_data = state;
return NT_STATUS_OK;
--
Samba Shared Repository
More information about the samba-cvs
mailing list