[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Mar 16 08:13:19 MDT 2010


The branch, master has been updated
       via  38cba5e... s4:torture-ndr add lsarSetForestTrustInformation ndr test
       via  a5ad510... s4-lsa: fix dcesrv_lsa_lsaRSetForestTrustInformation server stub.
       via  ce8c622... s3-lsa: fix _lsa_lsaRSetForestTrustInformation server stub.
       via  a6d4278... s3: re-run make samba3-idl.
       via  cfa2b7b... s4:idl add lsaRSetForestTrustInformation
      from  8c5df22... Revert "Revert "s4-smbtorture: skip extended SetValue test against Samba (both dont survive).""

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 38cba5e930c3ac1e7ccfbb6d39e1d464fd3fa344
Author: Simo Sorce <idra at samba.org>
Date:   Thu Feb 25 21:40:27 2010 -0500

    s4:torture-ndr add lsarSetForestTrustInformation ndr test
    
    Signed-off-by: Günther Deschner <gd at samba.org>

commit a5ad510fc417557608bd9a13405e9df3791658e4
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 14:03:49 2010 +0100

    s4-lsa: fix dcesrv_lsa_lsaRSetForestTrustInformation server stub.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>

commit ce8c622ffbb72f76ac1cb694be4b4e433aa2bee7
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 14:03:35 2010 +0100

    s3-lsa: fix _lsa_lsaRSetForestTrustInformation server stub.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>

commit a6d42784d02e1b0305a6616f4f7d5eb350447d75
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 14:01:27 2010 +0100

    s3: re-run make samba3-idl.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>

commit cfa2b7b6bf5f8527585c8c9c26a6336b503a682c
Author: Simo Sorce <idra at samba.org>
Date:   Tue Mar 16 13:59:32 2010 +0100

    s4:idl add lsaRSetForestTrustInformation
    
    Signed-off-by: Günther Deschner <gd at samba.org>

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

Summary of changes:
 librpc/gen_ndr/cli_lsa.c            |   67 ++++--
 librpc/gen_ndr/cli_lsa.h            |   22 ++-
 librpc/gen_ndr/lsa.h                |   53 ++++-
 librpc/gen_ndr/ndr_lsa.c            |  439 ++++++++++++++++++++++++++++++++++-
 librpc/gen_ndr/ndr_lsa.h            |   10 +-
 librpc/gen_ndr/srv_lsa.c            |   31 ++-
 librpc/gen_ndr/srv_lsa.h            |    4 +-
 librpc/idl/lsa.idl                  |   52 ++++-
 source3/rpc_server/srv_lsa_nt.c     |    2 +-
 source4/rpc_server/lsa/dcesrv_lsa.c |    6 +-
 source4/torture/ndr/lsa.c           |   51 ++++
 11 files changed, 684 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_lsa.c b/librpc/gen_ndr/cli_lsa.c
index aa329b1..c75fb8f 100644
--- a/librpc/gen_ndr/cli_lsa.c
+++ b/librpc/gen_ndr/cli_lsa.c
@@ -10840,25 +10840,31 @@ NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli,
 	return r.out.result;
 }
 
-struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state {
-	struct lsa_LSARSETFORESTTRUSTINFORMATION orig;
-	struct lsa_LSARSETFORESTTRUSTINFORMATION tmp;
+struct rpccli_lsa_lsaRSetForestTrustInformation_state {
+	struct lsa_lsaRSetForestTrustInformation orig;
+	struct lsa_lsaRSetForestTrustInformation tmp;
 	TALLOC_CTX *out_mem_ctx;
 	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 };
 
-static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq);
+static void rpccli_lsa_lsaRSetForestTrustInformation_done(struct tevent_req *subreq);
 
-struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem_ctx,
+struct tevent_req *rpccli_lsa_lsaRSetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
 								 struct tevent_context *ev,
-								 struct rpc_pipe_client *cli)
+								 struct rpc_pipe_client *cli,
+								 struct policy_handle *_handle /* [in] [ref] */,
+								 struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
+								 uint16_t _highest_record_type /* [in]  */,
+								 struct lsa_ForestTrustInformation *_forest_trust_info /* [in] [ref] */,
+								 uint8_t _check_only /* [in]  */,
+								 struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */)
 {
 	struct tevent_req *req;
-	struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state;
+	struct rpccli_lsa_lsaRSetForestTrustInformation_state *state;
 	struct tevent_req *subreq;
 
 	req = tevent_req_create(mem_ctx, &state,
-				struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
+				struct rpccli_lsa_lsaRSetForestTrustInformation_state);
 	if (req == NULL) {
 		return NULL;
 	}
@@ -10866,12 +10872,24 @@ struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem
 	state->dispatch_recv = cli->dispatch_recv;
 
 	/* In parameters */
+	state->orig.in.handle = _handle;
+	state->orig.in.trusted_domain_name = _trusted_domain_name;
+	state->orig.in.highest_record_type = _highest_record_type;
+	state->orig.in.forest_trust_info = _forest_trust_info;
+	state->orig.in.check_only = _check_only;
 
 	/* Out parameters */
+	state->orig.out.collision_info = _collision_info;
 
 	/* Result */
 	ZERO_STRUCT(state->orig.out.result);
 
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_lsa_lsaRSetForestTrustInformation_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
 	/* make a temporary copy, that we pass to the dispatch function */
 	state->tmp = state->orig;
 
@@ -10882,16 +10900,16 @@ struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem
 	if (tevent_req_nomem(subreq, req)) {
 		return tevent_req_post(req, ev);
 	}
-	tevent_req_set_callback(subreq, rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done, req);
+	tevent_req_set_callback(subreq, rpccli_lsa_lsaRSetForestTrustInformation_done, req);
 	return req;
 }
 
-static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq)
+static void rpccli_lsa_lsaRSetForestTrustInformation_done(struct tevent_req *subreq)
 {
 	struct tevent_req *req = tevent_req_callback_data(
 		subreq, struct tevent_req);
-	struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data(
-		req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
+	struct rpccli_lsa_lsaRSetForestTrustInformation_state *state = tevent_req_data(
+		req, struct rpccli_lsa_lsaRSetForestTrustInformation_state);
 	NTSTATUS status;
 	TALLOC_CTX *mem_ctx;
 
@@ -10909,6 +10927,7 @@ static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *sub
 	}
 
 	/* Copy out parameters */
+	*state->orig.out.collision_info = *state->tmp.out.collision_info;
 
 	/* Copy result */
 	state->orig.out.result = state->tmp.out.result;
@@ -10919,12 +10938,12 @@ static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *sub
 	tevent_req_done(req);
 }
 
-NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req,
+NTSTATUS rpccli_lsa_lsaRSetForestTrustInformation_recv(struct tevent_req *req,
 						       TALLOC_CTX *mem_ctx,
 						       NTSTATUS *result)
 {
-	struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data(
-		req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
+	struct rpccli_lsa_lsaRSetForestTrustInformation_state *state = tevent_req_data(
+		req, struct rpccli_lsa_lsaRSetForestTrustInformation_state);
 	NTSTATUS status;
 
 	if (tevent_req_is_nterror(req, &status)) {
@@ -10942,13 +10961,24 @@ NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req,
 	return NT_STATUS_OK;
 }
 
-NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
-						  TALLOC_CTX *mem_ctx)
+NTSTATUS rpccli_lsa_lsaRSetForestTrustInformation(struct rpc_pipe_client *cli,
+						  TALLOC_CTX *mem_ctx,
+						  struct policy_handle *handle /* [in] [ref] */,
+						  struct lsa_StringLarge *trusted_domain_name /* [in] [ref] */,
+						  uint16_t highest_record_type /* [in]  */,
+						  struct lsa_ForestTrustInformation *forest_trust_info /* [in] [ref] */,
+						  uint8_t check_only /* [in]  */,
+						  struct lsa_ForestTrustCollisionInfo **collision_info /* [out] [ref] */)
 {
-	struct lsa_LSARSETFORESTTRUSTINFORMATION r;
+	struct lsa_lsaRSetForestTrustInformation r;
 	NTSTATUS status;
 
 	/* In parameters */
+	r.in.handle = handle;
+	r.in.trusted_domain_name = trusted_domain_name;
+	r.in.highest_record_type = highest_record_type;
+	r.in.forest_trust_info = forest_trust_info;
+	r.in.check_only = check_only;
 
 	status = cli->dispatch(cli,
 				mem_ctx,
@@ -10965,6 +10995,7 @@ NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
+	*collision_info = *r.out.collision_info;
 
 	/* Return result */
 	return r.out.result;
diff --git a/librpc/gen_ndr/cli_lsa.h b/librpc/gen_ndr/cli_lsa.h
index d49c0ff..3caeb84 100644
--- a/librpc/gen_ndr/cli_lsa.h
+++ b/librpc/gen_ndr/cli_lsa.h
@@ -1013,14 +1013,26 @@ NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli,
 						    struct lsa_String *trusted_domain_name /* [in] [ref] */,
 						    uint16_t unknown /* [in]  */,
 						    struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */);
-struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem_ctx,
+struct tevent_req *rpccli_lsa_lsaRSetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
 								 struct tevent_context *ev,
-								 struct rpc_pipe_client *cli);
-NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req,
+								 struct rpc_pipe_client *cli,
+								 struct policy_handle *_handle /* [in] [ref] */,
+								 struct lsa_StringLarge *_trusted_domain_name /* [in] [ref] */,
+								 uint16_t _highest_record_type /* [in]  */,
+								 struct lsa_ForestTrustInformation *_forest_trust_info /* [in] [ref] */,
+								 uint8_t _check_only /* [in]  */,
+								 struct lsa_ForestTrustCollisionInfo **_collision_info /* [out] [ref] */);
+NTSTATUS rpccli_lsa_lsaRSetForestTrustInformation_recv(struct tevent_req *req,
 						       TALLOC_CTX *mem_ctx,
 						       NTSTATUS *result);
-NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
-						  TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_lsaRSetForestTrustInformation(struct rpc_pipe_client *cli,
+						  TALLOC_CTX *mem_ctx,
+						  struct policy_handle *handle /* [in] [ref] */,
+						  struct lsa_StringLarge *trusted_domain_name /* [in] [ref] */,
+						  uint16_t highest_record_type /* [in]  */,
+						  struct lsa_ForestTrustInformation *forest_trust_info /* [in] [ref] */,
+						  uint8_t check_only /* [in]  */,
+						  struct lsa_ForestTrustCollisionInfo **collision_info /* [out] [ref] */);
 struct tevent_req *rpccli_lsa_CREDRRENAME_send(TALLOC_CTX *mem_ctx,
 					       struct tevent_context *ev,
 					       struct rpc_pipe_client *cli);
diff --git a/librpc/gen_ndr/lsa.h b/librpc/gen_ndr/lsa.h
index 1c6323f..82c377f 100644
--- a/librpc/gen_ndr/lsa.h
+++ b/librpc/gen_ndr/lsa.h
@@ -773,6 +773,48 @@ struct lsa_ForestTrustInformation {
 	struct lsa_ForestTrustRecord **entries;/* [unique,size_is(count)] */
 }/* [public] */;
 
+enum lsa_ForestTrustCollisionRecordType
+#ifndef USE_UINT_ENUMS
+ {
+	LSA_FOREST_TRUST_COLLISION_TDO=(int)(0),
+	LSA_FOREST_TRUST_COLLISION_XREF=(int)(1),
+	LSA_FOREST_TRUST_COLLISION_OTHER=(int)(2)
+}
+#else
+ { __donnot_use_enum_lsa_ForestTrustCollisionRecordType=0x7FFFFFFF}
+#define LSA_FOREST_TRUST_COLLISION_TDO ( 0 )
+#define LSA_FOREST_TRUST_COLLISION_XREF ( 1 )
+#define LSA_FOREST_TRUST_COLLISION_OTHER ( 2 )
+#endif
+;
+
+/* bitmap lsa_ForestTrustCollisionTDOFlags */
+#define LSA_TLN_DISABLED_NEW ( 0x00000001 )
+#define LSA_TLN_DISABLED_ADMIN ( 0x00000002 )
+#define LSA_TLN_DISABLED_CONFLICT ( 0x00000004 )
+
+/* bitmap lsa_ForestTrustCollisionXrefFlags */
+#define LSA_SID_DISABLED_ADMIN ( 0x00000001 )
+#define LSA_SID_DISABLED_CONFLICT ( 0x00000002 )
+#define LSA_NB_DISABLED_ADMIN ( 0x00000004 )
+#define LSA_NB_DISABLED_CONFLICT ( 0x00000008 )
+
+union lsa_ForestTrustCollisionFlags {
+	uint32_t flags;/* [case(LSA_FOREST_TRUST_COLLISION_TDO)] */
+}/* [nodiscriminant] */;
+
+struct lsa_ForestTrustCollisionRecord {
+	uint32_t index;
+	enum lsa_ForestTrustCollisionRecordType type;
+	union lsa_ForestTrustCollisionFlags flags;/* [switch_is(type)] */
+	struct lsa_String name;
+};
+
+struct lsa_ForestTrustCollisionInfo {
+	uint32_t count;
+	struct lsa_ForestTrustCollisionRecord **entries;/* [unique,size_is(count)] */
+};
+
 
 struct lsa_Close {
 	struct {
@@ -1771,8 +1813,17 @@ struct lsa_lsaRQueryForestTrustInformation {
 };
 
 
-struct lsa_LSARSETFORESTTRUSTINFORMATION {
+struct lsa_lsaRSetForestTrustInformation {
+	struct {
+		struct policy_handle *handle;/* [ref] */
+		struct lsa_StringLarge *trusted_domain_name;/* [ref] */
+		uint16_t highest_record_type;
+		struct lsa_ForestTrustInformation *forest_trust_info;/* [ref] */
+		uint8_t check_only;
+	} in;
+
 	struct {
+		struct lsa_ForestTrustCollisionInfo **collision_info;/* [ref] */
 		NTSTATUS result;
 	} out;
 
diff --git a/librpc/gen_ndr/ndr_lsa.c b/librpc/gen_ndr/ndr_lsa.c
index 55f876a..4389b95 100644
--- a/librpc/gen_ndr/ndr_lsa.c
+++ b/librpc/gen_ndr/ndr_lsa.c
@@ -5355,6 +5355,328 @@ _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const
 	ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustCollisionRecordType r)
+{
+	NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustCollisionRecordType *r)
+{
+	uint32_t v;
+	NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_ForestTrustCollisionRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustCollisionRecordType r)
+{
+	const char *val = NULL;
+
+	switch (r) {
+		case LSA_FOREST_TRUST_COLLISION_TDO: val = "LSA_FOREST_TRUST_COLLISION_TDO"; break;
+		case LSA_FOREST_TRUST_COLLISION_XREF: val = "LSA_FOREST_TRUST_COLLISION_XREF"; break;
+		case LSA_FOREST_TRUST_COLLISION_OTHER: val = "LSA_FOREST_TRUST_COLLISION_OTHER"; break;
+	}
+	ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionTDOFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionTDOFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+	uint32_t v;
+	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_ForestTrustCollisionTDOFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+	ndr_print_uint32(ndr, name, r);
+	ndr->depth++;
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_NEW", LSA_TLN_DISABLED_NEW, r);
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_ADMIN", LSA_TLN_DISABLED_ADMIN, r);
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TLN_DISABLED_CONFLICT", LSA_TLN_DISABLED_CONFLICT, r);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionXrefFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionXrefFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+	uint32_t v;
+	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_ForestTrustCollisionXrefFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+	ndr_print_uint32(ndr, name, r);
+	ndr->depth++;
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SID_DISABLED_ADMIN", LSA_SID_DISABLED_ADMIN, r);
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_SID_DISABLED_CONFLICT", LSA_SID_DISABLED_CONFLICT, r);
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_NB_DISABLED_ADMIN", LSA_NB_DISABLED_ADMIN, r);
+	ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_NB_DISABLED_CONFLICT", LSA_NB_DISABLED_CONFLICT, r);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionFlags(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustCollisionFlags *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		NDR_CHECK(ndr_push_union_align(ndr, 4));
+		switch (level) {
+			case LSA_FOREST_TRUST_COLLISION_TDO: {
+				NDR_CHECK(ndr_push_lsa_ForestTrustCollisionTDOFlags(ndr, NDR_SCALARS, r->flags));
+			break; }
+
+			case LSA_FOREST_TRUST_COLLISION_XREF: {
+				NDR_CHECK(ndr_push_lsa_ForestTrustCollisionXrefFlags(ndr, NDR_SCALARS, r->flags));
+			break; }
+
+			default: {
+				NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		switch (level) {
+			case LSA_FOREST_TRUST_COLLISION_TDO:
+			break;
+
+			case LSA_FOREST_TRUST_COLLISION_XREF:
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionFlags(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustCollisionFlags *r)
+{
+	int level;
+	level = ndr_pull_get_switch_value(ndr, r);
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_union_align(ndr, 4));
+		switch (level) {
+			case LSA_FOREST_TRUST_COLLISION_TDO: {
+				NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionTDOFlags(ndr, NDR_SCALARS, &r->flags));
+			break; }
+
+			case LSA_FOREST_TRUST_COLLISION_XREF: {
+				NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionXrefFlags(ndr, NDR_SCALARS, &r->flags));
+			break; }
+
+			default: {
+				NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		switch (level) {
+			case LSA_FOREST_TRUST_COLLISION_TDO:
+			break;
+
+			case LSA_FOREST_TRUST_COLLISION_XREF:
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_ForestTrustCollisionFlags(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustCollisionFlags *r)
+{
+	int level;
+	level = ndr_print_get_switch_value(ndr, r);
+	ndr_print_union(ndr, name, level, "lsa_ForestTrustCollisionFlags");
+	switch (level) {
+		case LSA_FOREST_TRUST_COLLISION_TDO:
+			ndr_print_lsa_ForestTrustCollisionTDOFlags(ndr, "flags", r->flags);
+		break;
+
+		case LSA_FOREST_TRUST_COLLISION_XREF:
+			ndr_print_lsa_ForestTrustCollisionXrefFlags(ndr, "flags", r->flags);
+		break;
+
+		default:
+			ndr_print_uint32(ndr, "flags", r->flags);
+		break;
+
+	}
+}
+
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustCollisionRecord *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->index));
+		NDR_CHECK(ndr_push_lsa_ForestTrustCollisionRecordType(ndr, NDR_SCALARS, r->type));
+		NDR_CHECK(ndr_push_set_switch_value(ndr, &r->flags, r->type));
+		NDR_CHECK(ndr_push_lsa_ForestTrustCollisionFlags(ndr, NDR_SCALARS, &r->flags));
+		NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_ForestTrustCollisionRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustCollisionRecord *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->index));
+		NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionRecordType(ndr, NDR_SCALARS, &r->type));
+		NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->flags, r->type));
+		NDR_CHECK(ndr_pull_lsa_ForestTrustCollisionFlags(ndr, NDR_SCALARS, &r->flags));
+		NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_ForestTrustCollisionRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustCollisionRecord *r)
+{
+	ndr_print_struct(ndr, name, "lsa_ForestTrustCollisionRecord");
+	ndr->depth++;
+	ndr_print_uint32(ndr, "index", r->index);
+	ndr_print_lsa_ForestTrustCollisionRecordType(ndr, "type", r->type);
+	ndr_print_set_switch_value(ndr, &r->flags, r->type);
+	ndr_print_lsa_ForestTrustCollisionFlags(ndr, "flags", &r->flags);
+	ndr_print_lsa_String(ndr, "name", &r->name);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_ForestTrustCollisionInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustCollisionInfo *r)
+{
+	uint32_t cntr_entries_1;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+		NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries));
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		if (r->entries) {
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
+			for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+				NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries[cntr_entries_1]));
+			}
+			for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+				if (r->entries[cntr_entries_1]) {
+					NDR_CHECK(ndr_push_lsa_ForestTrustCollisionRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1]));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list