[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-707-g6f47432

Günther Deschner gd at samba.org
Tue Apr 8 21:00:45 GMT 2008


The branch, v3-2-test has been updated
       via  6f474326030b916ca972b68ce36e4d7287192a33 (commit)
       via  a064d000969233cf517f2e47b890d4e983c957ad (commit)
      from  e0eae3901750c7b76560bbab9a86f24a64d42c8b (commit)

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


- Log -----------------------------------------------------------------
commit 6f474326030b916ca972b68ce36e4d7287192a33
Author: Günther Deschner <gd at samba.org>
Date:   Tue Apr 8 22:58:16 2008 +0200

    Re-run make idl.
    
    Guenther

commit a064d000969233cf517f2e47b890d4e983c957ad
Author: Günther Deschner <gd at samba.org>
Date:   Tue Apr 8 22:57:16 2008 +0200

    Fix IDL for lsa_QueryTrustedDomainInfo.
    
    Guenther

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

Summary of changes:
 source/librpc/gen_ndr/cli_lsa.c |    6 +---
 source/librpc/gen_ndr/cli_lsa.h |    2 +-
 source/librpc/gen_ndr/lsa.h     |    2 +-
 source/librpc/gen_ndr/ndr_lsa.c |   45 ++++++++++++++++++++++++++-------------
 source/librpc/gen_ndr/srv_lsa.c |    2 +-
 source/librpc/idl/lsa.idl       |    4 +-
 6 files changed, 37 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_lsa.c b/source/librpc/gen_ndr/cli_lsa.c
index 475dd1e..8df638f 100644
--- a/source/librpc/gen_ndr/cli_lsa.c
+++ b/source/librpc/gen_ndr/cli_lsa.c
@@ -1128,7 +1128,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
 					   TALLOC_CTX *mem_ctx,
 					   struct policy_handle *trustdom_handle /* [in] [ref] */,
 					   enum lsa_TrustDomInfoEnum level /* [in]  */,
-					   union lsa_TrustedDomainInfo *info /* [out] [unique,switch_is(level)] */)
+					   union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
 {
 	struct lsa_QueryTrustedDomainInfo r;
 	NTSTATUS status;
@@ -1161,9 +1161,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	if (info && r.out.info) {
-		*info = *r.out.info;
-	}
+	*info = *r.out.info;
 
 	/* Return result */
 	return r.out.result;
diff --git a/source/librpc/gen_ndr/cli_lsa.h b/source/librpc/gen_ndr/cli_lsa.h
index f4af6ed..6befb1d 100644
--- a/source/librpc/gen_ndr/cli_lsa.h
+++ b/source/librpc/gen_ndr/cli_lsa.h
@@ -131,7 +131,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
 					   TALLOC_CTX *mem_ctx,
 					   struct policy_handle *trustdom_handle /* [in] [ref] */,
 					   enum lsa_TrustDomInfoEnum level /* [in]  */,
-					   union lsa_TrustedDomainInfo *info /* [out] [unique,switch_is(level)] */);
+					   union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */);
 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli,
 						TALLOC_CTX *mem_ctx);
 NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli,
diff --git a/source/librpc/gen_ndr/lsa.h b/source/librpc/gen_ndr/lsa.h
index a9c8906..044d07b 100644
--- a/source/librpc/gen_ndr/lsa.h
+++ b/source/librpc/gen_ndr/lsa.h
@@ -964,7 +964,7 @@ struct lsa_QueryTrustedDomainInfo {
 	} in;
 
 	struct {
-		union lsa_TrustedDomainInfo *info;/* [unique,switch_is(level)] */
+		union lsa_TrustedDomainInfo **info;/* [ref,switch_is(level)] */
 		NTSTATUS result;
 	} out;
 
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index 070ac00..396791a 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/librpc/gen_ndr/ndr_lsa.c
@@ -7002,10 +7002,13 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *nd
 		NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
 	}
 	if (flags & NDR_OUT) {
-		NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
-		if (r->out.info) {
-			NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
-			NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+		if (r->out.info == NULL) {
+			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+		}
+		NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
+		if (*r->out.info) {
+			NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level));
+			NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
 		}
 		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
 	}
@@ -7017,6 +7020,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *nd
 	uint32_t _ptr_info;
 	TALLOC_CTX *_mem_save_trustdom_handle_0;
 	TALLOC_CTX *_mem_save_info_0;
+	TALLOC_CTX *_mem_save_info_1;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
 
@@ -7028,21 +7032,29 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *nd
 		NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trustdom_handle));
 		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+		NDR_PULL_ALLOC(ndr, r->out.info);
+		ZERO_STRUCTP(r->out.info);
 	}
 	if (flags & NDR_OUT) {
+		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+			NDR_PULL_ALLOC(ndr, r->out.info);
+		}
+		_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 		if (_ptr_info) {
-			NDR_PULL_ALLOC(ndr, r->out.info);
+			NDR_PULL_ALLOC(ndr, *r->out.info);
 		} else {
-			r->out.info = NULL;
+			*r->out.info = NULL;
 		}
-		if (r->out.info) {
-			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
-			NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
-			NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
-			NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
-			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+		if (*r->out.info) {
+			_mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+			NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
+			NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level));
+			NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
+			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
 		}
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -7070,11 +7082,14 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const
 		ndr->depth++;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
-			ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
-			ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
+			ndr_print_set_switch_value(ndr, *r->out.info, r->in.level);
+			ndr_print_lsa_TrustedDomainInfo(ndr, "info", *r->out.info);
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_NTSTATUS(ndr, "result", r->out.result);
 		ndr->depth--;
 	}
diff --git a/source/librpc/gen_ndr/srv_lsa.c b/source/librpc/gen_ndr/srv_lsa.c
index e38c545..e6fca84 100644
--- a/source/librpc/gen_ndr/srv_lsa.c
+++ b/source/librpc/gen_ndr/srv_lsa.c
@@ -2057,7 +2057,7 @@ static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
 	}
 
 	ZERO_STRUCT(r->out);
-	r->out.info = talloc_zero(r, union lsa_TrustedDomainInfo);
+	r->out.info = talloc_zero(r, union lsa_TrustedDomainInfo *);
 	if (r->out.info == NULL) {
 		talloc_free(r);
 		return false;
diff --git a/source/librpc/idl/lsa.idl b/source/librpc/idl/lsa.idl
index 531b754..994553f 100644
--- a/source/librpc/idl/lsa.idl
+++ b/source/librpc/idl/lsa.idl
@@ -630,8 +630,8 @@ import "security.idl";
 	/* Function:       0x1a */
 	NTSTATUS lsa_QueryTrustedDomainInfo(
 		[in]     policy_handle                   *trustdom_handle,
-		[in]     lsa_TrustDomInfoEnum             level, 
-		[out,switch_is(level),unique] lsa_TrustedDomainInfo *info
+		[in]     lsa_TrustDomInfoEnum             level,
+		[out,switch_is(level),ref] lsa_TrustedDomainInfo **info
 		);
 
 	/* Function:     0x1b */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list