[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2299-g4780638

Günther Deschner gd at samba.org
Fri Feb 15 22:37:32 GMT 2008


The branch, v3-2-test has been updated
       via  47806386e5cb12919615bb3075c9ed613efa4fdb (commit)
       via  b7818ec598fc942ba9c86dac0d47e239a6953301 (commit)
       via  3bee9b89792055bc902e3feab21e80a6f5a756fe (commit)
      from  b419e7fa32ce34ee1ddde562223fe08f5d07a012 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 47806386e5cb12919615bb3075c9ed613efa4fdb
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 15 23:36:31 2008 +0100

    Fix the netlogon rpc_server build.
    
    Guenther

commit b7818ec598fc942ba9c86dac0d47e239a6953301
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 15 23:32:02 2008 +0100

    Re-run make idl.
    
    Guenther

commit 3bee9b89792055bc902e3feab21e80a6f5a756fe
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 15 23:30:53 2008 +0100

    Fix IDL for netr_ServerReqChallenge, netr_ServerAuthenticate and
    netr_ServerAuthenticate2 to match what is on NDR and to
    generate a more appropriate samba3 netlogon client.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/librpc/gen_ndr/cli_netlogon.c |   13 ++++--
 source/librpc/gen_ndr/cli_netlogon.h |    7 ++-
 source/librpc/gen_ndr/ndr_netlogon.c |   69 +++++++++++++++++----------------
 source/librpc/gen_ndr/ndr_winreg.c   |    2 +-
 source/librpc/gen_ndr/netlogon.h     |    6 +-
 source/librpc/gen_ndr/srv_netlogon.c |   21 +++++++++-
 source/librpc/idl/netlogon.idl       |    9 +++-
 source/rpc_server/srv_netlog_nt.c    |   10 ++--
 8 files changed, 82 insertions(+), 55 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_netlogon.c b/source/librpc/gen_ndr/cli_netlogon.c
index ef9eeaf..e8b4243 100644
--- a/source/librpc/gen_ndr/cli_netlogon.c
+++ b/source/librpc/gen_ndr/cli_netlogon.c
@@ -220,7 +220,8 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
 					TALLOC_CTX *mem_ctx,
 					const char *server_name,
 					const char *computer_name,
-					struct netr_Credential *credentials)
+					struct netr_Credential *credentials,
+					struct netr_Credential *return_credentials)
 {
 	struct netr_ServerReqChallenge r;
 	NTSTATUS status;
@@ -254,7 +255,7 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	*credentials = *r.out.credentials;
+	*return_credentials = *r.out.return_credentials;
 
 	/* Return result */
 	return r.out.result;
@@ -266,7 +267,8 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
 					const char *account_name,
 					enum netr_SchannelType secure_channel_type,
 					const char *computer_name,
-					struct netr_Credential *credentials)
+					struct netr_Credential *credentials,
+					struct netr_Credential *return_credentials)
 {
 	struct netr_ServerAuthenticate r;
 	NTSTATUS status;
@@ -302,7 +304,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	*credentials = *r.out.credentials;
+	*return_credentials = *r.out.return_credentials;
 
 	/* Return result */
 	return r.out.result;
@@ -799,6 +801,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
 					 enum netr_SchannelType secure_channel_type,
 					 const char *computer_name,
 					 struct netr_Credential *credentials,
+					 struct netr_Credential *return_credentials,
 					 uint32_t *negotiate_flags)
 {
 	struct netr_ServerAuthenticate2 r;
@@ -836,7 +839,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	*credentials = *r.out.credentials;
+	*return_credentials = *r.out.return_credentials;
 	*negotiate_flags = *r.out.negotiate_flags;
 
 	/* Return result */
diff --git a/source/librpc/gen_ndr/cli_netlogon.h b/source/librpc/gen_ndr/cli_netlogon.h
index 35f9032..706b794 100644
--- a/source/librpc/gen_ndr/cli_netlogon.h
+++ b/source/librpc/gen_ndr/cli_netlogon.h
@@ -38,14 +38,16 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
 					TALLOC_CTX *mem_ctx,
 					const char *server_name,
 					const char *computer_name,
-					struct netr_Credential *credentials);
+					struct netr_Credential *credentials,
+					struct netr_Credential *return_credentials);
 NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
 					TALLOC_CTX *mem_ctx,
 					const char *server_name,
 					const char *account_name,
 					enum netr_SchannelType secure_channel_type,
 					const char *computer_name,
-					struct netr_Credential *credentials);
+					struct netr_Credential *credentials,
+					struct netr_Credential *return_credentials);
 NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
 				       TALLOC_CTX *mem_ctx,
 				       const char *server_name,
@@ -137,6 +139,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
 					 enum netr_SchannelType secure_channel_type,
 					 const char *computer_name,
 					 struct netr_Credential *credentials,
+					 struct netr_Credential *return_credentials,
 					 uint32_t *negotiate_flags);
 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
 				   TALLOC_CTX *mem_ctx,
diff --git a/source/librpc/gen_ndr/ndr_netlogon.c b/source/librpc/gen_ndr/ndr_netlogon.c
index e576648..a81ae09 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -8608,10 +8608,10 @@ static enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr,
 		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
 	}
 	if (flags & NDR_OUT) {
-		if (r->out.credentials == NULL) {
+		if (r->out.return_credentials == NULL) {
 			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 		}
-		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
 		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -8622,6 +8622,7 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
 	uint32_t _ptr_server_name;
 	TALLOC_CTX *_mem_save_server_name_0;
 	TALLOC_CTX *_mem_save_credentials_0;
+	TALLOC_CTX *_mem_save_return_credentials_0;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
 
@@ -8657,17 +8658,17 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
 		NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
 		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
-		NDR_PULL_ALLOC(ndr, r->out.credentials);
-		*r->out.credentials = *r->in.credentials;
+		NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+		ZERO_STRUCTP(r->out.return_credentials);
 	}
 	if (flags & NDR_OUT) {
 		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-			NDR_PULL_ALLOC(ndr, r->out.credentials);
+			NDR_PULL_ALLOC(ndr, r->out.return_credentials);
 		}
-		_mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-		NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+		_mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -8699,9 +8700,9 @@ _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const cha
 	if (flags & NDR_OUT) {
 		ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
 		ndr->depth++;
-		ndr_print_ptr(ndr, "credentials", r->out.credentials);
+		ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth++;
-		ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+		ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth--;
 		ndr_print_NTSTATUS(ndr, "result", r->out.result);
 		ndr->depth--;
@@ -8734,10 +8735,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr,
 		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
 	}
 	if (flags & NDR_OUT) {
-		if (r->out.credentials == NULL) {
+		if (r->out.return_credentials == NULL) {
 			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 		}
-		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
 		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -8748,6 +8749,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
 	uint32_t _ptr_server_name;
 	TALLOC_CTX *_mem_save_server_name_0;
 	TALLOC_CTX *_mem_save_credentials_0;
+	TALLOC_CTX *_mem_save_return_credentials_0;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
 
@@ -8791,17 +8793,17 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
 		NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
 		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
-		NDR_PULL_ALLOC(ndr, r->out.credentials);
-		*r->out.credentials = *r->in.credentials;
+		NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+		ZERO_STRUCTP(r->out.return_credentials);
 	}
 	if (flags & NDR_OUT) {
 		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-			NDR_PULL_ALLOC(ndr, r->out.credentials);
+			NDR_PULL_ALLOC(ndr, r->out.return_credentials);
 		}
-		_mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-		NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+		_mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -8835,9 +8837,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const cha
 	if (flags & NDR_OUT) {
 		ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
 		ndr->depth++;
-		ndr_print_ptr(ndr, "credentials", r->out.credentials);
+		ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth++;
-		ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+		ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth--;
 		ndr_print_NTSTATUS(ndr, "result", r->out.result);
 		ndr->depth--;
@@ -10365,10 +10367,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr,
 		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.negotiate_flags));
 	}
 	if (flags & NDR_OUT) {
-		if (r->out.credentials == NULL) {
+		if (r->out.return_credentials == NULL) {
 			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 		}
-		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+		NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
 		if (r->out.negotiate_flags == NULL) {
 			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
 		}
@@ -10383,6 +10385,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
 	uint32_t _ptr_server_name;
 	TALLOC_CTX *_mem_save_server_name_0;
 	TALLOC_CTX *_mem_save_credentials_0;
+	TALLOC_CTX *_mem_save_return_credentials_0;
 	TALLOC_CTX *_mem_save_negotiate_flags_0;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
@@ -10434,19 +10437,19 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
 		NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.negotiate_flags));
 		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
-		NDR_PULL_ALLOC(ndr, r->out.credentials);
-		*r->out.credentials = *r->in.credentials;
+		NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+		ZERO_STRUCTP(r->out.return_credentials);
 		NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
 		*r->out.negotiate_flags = *r->in.negotiate_flags;
 	}
 	if (flags & NDR_OUT) {
 		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-			NDR_PULL_ALLOC(ndr, r->out.credentials);
+			NDR_PULL_ALLOC(ndr, r->out.return_credentials);
 		}
-		_mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
-		NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
-		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
-		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+		_mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
 		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
 			NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
 		}
@@ -10491,9 +10494,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const ch
 	if (flags & NDR_OUT) {
 		ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
 		ndr->depth++;
-		ndr_print_ptr(ndr, "credentials", r->out.credentials);
+		ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth++;
-		ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+		ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
 		ndr->depth--;
 		ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
 		ndr->depth++;
diff --git a/source/librpc/gen_ndr/ndr_winreg.c b/source/librpc/gen_ndr/ndr_winreg.c
index b63d410..ed511a6 100644
--- a/source/librpc/gen_ndr/ndr_winreg.c
+++ b/source/librpc/gen_ndr/ndr_winreg.c
@@ -3700,7 +3700,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *nd
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
 		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
-		memcpy(r->out.values, r->in.values, r->in.num_values * sizeof(*r->in.values));
+		memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
 		NDR_PULL_ALLOC(ndr, r->out.buffer_size);
 		*r->out.buffer_size = *r->in.buffer_size;
 		if (r->in.values) {
diff --git a/source/librpc/gen_ndr/netlogon.h b/source/librpc/gen_ndr/netlogon.h
index c18527d..80434a1 100644
--- a/source/librpc/gen_ndr/netlogon.h
+++ b/source/librpc/gen_ndr/netlogon.h
@@ -890,7 +890,7 @@ struct netr_ServerReqChallenge {
 	} in;
 
 	struct {
-		struct netr_Credential *credentials;/* [ref] */
+		struct netr_Credential *return_credentials;/* [ref] */
 		NTSTATUS result;
 	} out;
 
@@ -907,7 +907,7 @@ struct netr_ServerAuthenticate {
 	} in;
 
 	struct {
-		struct netr_Credential *credentials;/* [ref] */
+		struct netr_Credential *return_credentials;/* [ref] */
 		NTSTATUS result;
 	} out;
 
@@ -1093,7 +1093,7 @@ struct netr_ServerAuthenticate2 {
 	} in;
 
 	struct {
-		struct netr_Credential *credentials;/* [ref] */
+		struct netr_Credential *return_credentials;/* [ref] */
 		uint32_t *negotiate_flags;/* [ref] */
 		NTSTATUS result;
 	} out;
diff --git a/source/librpc/gen_ndr/srv_netlogon.c b/source/librpc/gen_ndr/srv_netlogon.c
index 98ba48a..67876f1 100644
--- a/source/librpc/gen_ndr/srv_netlogon.c
+++ b/source/librpc/gen_ndr/srv_netlogon.c
@@ -367,7 +367,12 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p)
 	}
 
 	ZERO_STRUCT(r->out);
-	r->out.credentials = r->in.credentials;
+	r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+	if (r->out.return_credentials == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
 	r->out.result = _netr_ServerReqChallenge(p, r);
 
 	if (p->rng_fault_state) {
@@ -442,7 +447,12 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p)
 	}
 
 	ZERO_STRUCT(r->out);
-	r->out.credentials = r->in.credentials;
+	r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+	if (r->out.return_credentials == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
 	r->out.result = _netr_ServerAuthenticate(p, r);
 
 	if (p->rng_fault_state) {
@@ -1280,7 +1290,12 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p)
 	}
 
 	ZERO_STRUCT(r->out);
-	r->out.credentials = r->in.credentials;
+	r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+	if (r->out.return_credentials == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
 	r->out.negotiate_flags = r->in.negotiate_flags;
 	r->out.result = _netr_ServerAuthenticate2(p, r);
 
diff --git a/source/librpc/idl/netlogon.idl b/source/librpc/idl/netlogon.idl
index 60bf075..e5e789c 100644
--- a/source/librpc/idl/netlogon.idl
+++ b/source/librpc/idl/netlogon.idl
@@ -272,7 +272,8 @@ interface netlogon
 	NTSTATUS netr_ServerReqChallenge(
 		[in,unique,string,charset(UTF16)] uint16 *server_name,
 		[in,string,charset(UTF16)] uint16 computer_name[],
-		[in,out,ref] netr_Credential *credentials
+		[in,ref] netr_Credential *credentials,
+		[out,ref] netr_Credential *return_credentials
 		);
 
 
@@ -286,7 +287,8 @@ interface netlogon
 		[in,string,charset(UTF16)] uint16 account_name[],
 		[in]                       netr_SchannelType secure_channel_type,
 		[in,string,charset(UTF16)] uint16 computer_name[],
-		[in,out,ref] netr_Credential *credentials
+		[in,ref] netr_Credential *credentials,
+		[out,ref] netr_Credential *return_credentials
 		);
 
 
@@ -854,7 +856,8 @@ interface netlogon
 		[in]         [string,charset(UTF16)] uint16 account_name[],
 		[in]         netr_SchannelType secure_channel_type,
 		[in]         [string,charset(UTF16)] uint16 computer_name[],
-		[in,out,ref] netr_Credential *credentials,
+		[in,ref]     netr_Credential *credentials,
+		[out,ref]    netr_Credential *return_credentials,
 		[in,out,ref] uint32 *negotiate_flags
 		);
 
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index 30066dc..3e15d38 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -390,7 +390,7 @@ NTSTATUS _netr_ServerReqChallenge(pipes_struct *p,
 	generate_random_buffer(p->dc->srv_chal.data, 8);
 
 	/* set up the LSA REQUEST CHALLENGE response */
-	init_net_r_req_chal(r->out.credentials, &p->dc->srv_chal);
+	init_net_r_req_chal(r->out.return_credentials, &p->dc->srv_chal);
 
 	p->dc->challenge_sent = True;
 
@@ -450,8 +450,8 @@ NTSTATUS _netr_ServerAuthenticate(pipes_struct *p,
 	/* set up the LSA AUTH response */
 	/* Return the server credentials. */
 
-	memcpy(r->out.credentials->data, &srv_chal_out.data,
-	       sizeof(r->out.credentials->data));
+	memcpy(r->out.return_credentials->data, &srv_chal_out.data,
+	       sizeof(r->out.return_credentials->data));
 
 	return NT_STATUS_OK;
 }
@@ -521,8 +521,8 @@ NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p,
 	}
 
 	/* set up the LSA AUTH 2 response */
-	memcpy(r->out.credentials->data, &srv_chal_out.data,
-	       sizeof(r->out.credentials->data));
+	memcpy(r->out.return_credentials->data, &srv_chal_out.data,
+	       sizeof(r->out.return_credentials->data));
 	*r->out.negotiate_flags = srv_flgs;
 
 	fstrcpy(p->dc->mach_acct, r->in.account_name);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list