From 587a2dbf8d000640109c2b36a924cd4c2694897f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jan 2008 16:31:49 +0100 Subject: Merge lsarpc.idl from samba4 and rerun make idl. Guenther (This used to be commit d9c8a2271d5d4ff845f1fe5986a2c63d79c41415) --- source3/librpc/gen_ndr/cli_lsa.c | 26 +- source3/librpc/gen_ndr/cli_lsa.h | 16 +- source3/librpc/gen_ndr/lsa.h | 135 +++++++- source3/librpc/gen_ndr/ndr_lsa.c | 679 +++++++++++++++++++++++++++++++++++---- source3/librpc/gen_ndr/ndr_lsa.h | 46 ++- source3/librpc/gen_ndr/srv_lsa.c | 21 +- source3/librpc/gen_ndr/srv_lsa.h | 2 +- 7 files changed, 831 insertions(+), 94 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 92ba8bdfee..76370cabf1 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -609,7 +609,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count) { struct lsa_LookupNames r; @@ -2528,7 +2528,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray2 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2) @@ -2920,7 +2920,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2) @@ -3120,16 +3120,23 @@ NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, return r.out.result; } -NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + struct lsa_String *trusted_domain_name, + uint16_t unknown, + struct lsa_ForestTrustInformation **forest_trust_info) { - struct lsa_LSARQUERYFORESTTRUSTINFORMATION r; + struct lsa_lsaRQueryForestTrustInformation r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.trusted_domain_name = trusted_domain_name; + r.in.unknown = unknown; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r); + NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation, &r); } status = cli_do_rpc_ndr(cli, @@ -3144,7 +3151,7 @@ NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r); + NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -3152,6 +3159,7 @@ NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } /* Return variables */ + *forest_trust_info = *r.out.forest_trust_info; /* Return result */ return r.out.result; @@ -3292,7 +3300,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2) diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 4ab8be9939..c45aed1d37 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -71,7 +71,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count); NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -280,7 +280,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray2 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2); @@ -309,7 +309,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2); @@ -321,8 +321,12 @@ NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); -NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + struct lsa_String *trusted_domain_name, + uint16_t unknown, + struct lsa_ForestTrustInformation **forest_trust_info); NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, @@ -342,7 +346,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, - uint16_t level, + enum lsa_LookupNamesLevel level, uint32_t *count, uint32_t unknown1, uint32_t unknown2); diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 513d17b5df..cbaa9083e4 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -75,9 +75,55 @@ struct lsa_AuditLogInfo { uint32_t unknown; }; +enum lsa_PolicyAuditPolicy +#ifndef USE_UINT_ENUMS + { + LSA_AUDIT_POLICY_NONE=0, + LSA_AUDIT_POLICY_SUCCESS=1, + LSA_AUDIT_POLICY_FAILURE=2, + LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE), + LSA_AUDIT_POLICY_CLEAR=4 +} +#else + { __donnot_use_enum_lsa_PolicyAuditPolicy=0x7FFFFFFF} +#define LSA_AUDIT_POLICY_NONE ( 0 ) +#define LSA_AUDIT_POLICY_SUCCESS ( 1 ) +#define LSA_AUDIT_POLICY_FAILURE ( 2 ) +#define LSA_AUDIT_POLICY_ALL ( (LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE) ) +#define LSA_AUDIT_POLICY_CLEAR ( 4 ) +#endif +; + +enum lsa_PolicyAuditEventType +#ifndef USE_UINT_ENUMS + { + LSA_AUDIT_CATEGORY_SYSTEM=0, + LSA_AUDIT_CATEGORY_LOGON=1, + LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS=2, + LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS=3, + LSA_AUDIT_CATEGORY_PROCCESS_TRACKING=4, + LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES=5, + LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT=6, + LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS=7, + LSA_AUDIT_CATEGORY_ACCOUNT_LOGON=8 +} +#else + { __donnot_use_enum_lsa_PolicyAuditEventType=0x7FFFFFFF} +#define LSA_AUDIT_CATEGORY_SYSTEM ( 0 ) +#define LSA_AUDIT_CATEGORY_LOGON ( 1 ) +#define LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS ( 2 ) +#define LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS ( 3 ) +#define LSA_AUDIT_CATEGORY_PROCCESS_TRACKING ( 4 ) +#define LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES ( 5 ) +#define LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT ( 6 ) +#define LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS ( 7 ) +#define LSA_AUDIT_CATEGORY_ACCOUNT_LOGON ( 8 ) +#endif +; + struct lsa_AuditEventsInfo { uint32_t auditing_mode; - uint32_t *settings;/* [unique,size_is(count)] */ + enum lsa_PolicyAuditPolicy *settings;/* [unique,size_is(count)] */ uint32_t count; }; @@ -240,6 +286,27 @@ struct lsa_RefDomainList { uint32_t max_size; }; +enum lsa_LookupNamesLevel +#ifndef USE_UINT_ENUMS + { + LSA_LOOKUP_NAMES_ALL=1, + LSA_LOOKUP_NAMES_DOMAINS_ONLY=2, + LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY=3, + LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY=4, + LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY=5, + LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2=6 +} +#else + { __donnot_use_enum_lsa_LookupNamesLevel=0x7FFFFFFF} +#define LSA_LOOKUP_NAMES_ALL ( 1 ) +#define LSA_LOOKUP_NAMES_DOMAINS_ONLY ( 2 ) +#define LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY ( 3 ) +#define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY ( 4 ) +#define LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY ( 5 ) +#define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 ( 6 ) +#endif +; + struct lsa_TranslatedName { enum lsa_SidType sid_type; struct lsa_String name; @@ -464,6 +531,53 @@ struct lsa_TransSidArray3 { struct lsa_TranslatedSid3 *sids;/* [unique,size_is(count)] */ }; +struct lsa_ForestTrustBinaryData { + uint32_t length;/* [range(0 131072)] */ + uint8_t *data;/* [unique,size_is(length)] */ +}; + +struct lsa_ForestTrustDomainInfo { + struct dom_sid2 *domain_sid;/* [unique] */ + struct lsa_StringLarge dns_domain_name; + struct lsa_StringLarge netbios_domain_name; +}; + +union lsa_ForestTrustData { + struct lsa_String top_level_name;/* [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] */ + struct lsa_StringLarge top_level_name_ex;/* [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] */ + struct lsa_ForestTrustDomainInfo domain_info;/* [case(LSA_FOREST_TRUST_DOMAIN_INFO)] */ + struct lsa_ForestTrustBinaryData data;/* [default] */ +}/* [switch_type(uint32)] */; + +enum lsa_ForestTrustRecordType +#ifndef USE_UINT_ENUMS + { + LSA_FOREST_TRUST_TOP_LEVEL_NAME=0, + LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX=1, + LSA_FOREST_TRUST_DOMAIN_INFO=2, + LSA_FOREST_TRUST_RECORD_TYPE_LAST=3 +} +#else + { __donnot_use_enum_lsa_ForestTrustRecordType=0x7FFFFFFF} +#define LSA_FOREST_TRUST_TOP_LEVEL_NAME ( 0 ) +#define LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX ( 1 ) +#define LSA_FOREST_TRUST_DOMAIN_INFO ( 2 ) +#define LSA_FOREST_TRUST_RECORD_TYPE_LAST ( 3 ) +#endif +; + +struct lsa_ForestTrustRecord { + uint32_t flags; + enum lsa_ForestTrustRecordType level; + uint64_t unknown; + union lsa_ForestTrustData forest_trust_data;/* [switch_is(level)] */ +}; + +struct lsa_ForestTrustInformation { + uint32_t count;/* [range(0 4000)] */ + struct lsa_ForestTrustRecord **entries;/* [unique,size_is(count)] */ +}/* [public] */; + struct lsa_Close { struct { @@ -636,7 +750,7 @@ struct lsa_CreateTrustedDomain { struct lsa_EnumTrustDom { struct { struct policy_handle *handle;/* [ref] */ - uint32_t max_size;/* [range(0 1000)] */ + uint32_t max_size; uint32_t *resume_handle;/* [ref] */ } in; @@ -654,7 +768,7 @@ struct lsa_LookupNames { struct policy_handle *handle;/* [ref] */ uint32_t num_names;/* [range(0 1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ - uint16_t level; + enum lsa_LookupNamesLevel level; struct lsa_TransSidArray *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1241,7 +1355,7 @@ struct lsa_LookupNames2 { struct policy_handle *handle;/* [ref] */ uint32_t num_names;/* [range(0 1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ - uint16_t level; + enum lsa_LookupNamesLevel level; uint32_t unknown1; uint32_t unknown2; struct lsa_TransSidArray2 *sids;/* [ref] */ @@ -1335,7 +1449,7 @@ struct lsa_LookupNames3 { struct policy_handle *handle;/* [ref] */ uint32_t num_names;/* [range(0 1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ - uint16_t level; + enum lsa_LookupNamesLevel level; uint32_t unknown1; uint32_t unknown2; struct lsa_TransSidArray3 *sids;/* [ref] */ @@ -1384,8 +1498,15 @@ struct lsa_LSARUNREGISTERAUDITEVENT { }; -struct lsa_LSARQUERYFORESTTRUSTINFORMATION { +struct lsa_lsaRQueryForestTrustInformation { struct { + struct policy_handle *handle;/* [ref] */ + struct lsa_String *trusted_domain_name;/* [ref] */ + uint16_t unknown; + } in; + + struct { + struct lsa_ForestTrustInformation **forest_trust_info;/* [ref] */ NTSTATUS result; } out; @@ -1432,7 +1553,7 @@ struct lsa_LookupNames4 { struct { uint32_t num_names;/* [range(0 1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ - uint16_t level; + enum lsa_LookupNamesLevel level; uint32_t unknown1; uint32_t unknown2; struct lsa_TransSidArray3 *sids;/* [ref] */ diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index eed2a8e0e3..25fa3d2129 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -690,6 +690,34 @@ _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_PolicyAuditPolicy(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_PolicyAuditPolicy(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyAuditPolicy *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r) +{ + const char *val = NULL; + + switch (r) { + case LSA_AUDIT_POLICY_NONE: val = "LSA_AUDIT_POLICY_NONE"; break; + case LSA_AUDIT_POLICY_SUCCESS: val = "LSA_AUDIT_POLICY_SUCCESS"; break; + case LSA_AUDIT_POLICY_FAILURE: val = "LSA_AUDIT_POLICY_FAILURE"; break; + case LSA_AUDIT_POLICY_ALL: val = "LSA_AUDIT_POLICY_ALL"; break; + case LSA_AUDIT_POLICY_CLEAR: val = "LSA_AUDIT_POLICY_CLEAR"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r) { uint32_t cntr_settings_1; @@ -703,7 +731,7 @@ static enum ndr_err_code ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int if (r->settings) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->settings[cntr_settings_1])); + NDR_CHECK(ndr_push_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, r->settings[cntr_settings_1])); } } } @@ -736,7 +764,7 @@ static enum ndr_err_code ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0); for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->settings[cntr_settings_1])); + NDR_CHECK(ndr_pull_lsa_PolicyAuditPolicy(ndr, NDR_SCALARS, &r->settings[cntr_settings_1])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0); @@ -763,7 +791,7 @@ _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *n char *idx_1=NULL; asprintf(&idx_1, "[%d]", cntr_settings_1); if (idx_1) { - ndr_print_uint32(ndr, "settings", r->settings[cntr_settings_1]); + ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]); free(idx_1); } } @@ -1939,6 +1967,35 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_LookupNamesLevel(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupNamesLevel r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_LookupNamesLevel(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupNamesLevel *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r) +{ + const char *val = NULL; + + switch (r) { + case LSA_LOOKUP_NAMES_ALL: val = "LSA_LOOKUP_NAMES_ALL"; break; + case LSA_LOOKUP_NAMES_DOMAINS_ONLY: val = "LSA_LOOKUP_NAMES_DOMAINS_ONLY"; break; + case LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY: val = "LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY"; break; + case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break; + case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break; + case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r) { if (ndr_flags & NDR_SCALARS) { @@ -4027,6 +4084,434 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *na ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_ForestTrustBinaryData(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustBinaryData *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustBinaryData *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + if (r->length < 0 || r->length > 131072) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, r->data); + } else { + r->data = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->data)); + NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); + } + if (r->data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r) +{ + ndr_print_struct(ndr, name, "lsa_ForestTrustBinaryData"); + ndr->depth++; + ndr_print_uint32(ndr, "length", r->length); + ndr_print_ptr(ndr, "data", r->data); + ndr->depth++; + if (r->data) { + ndr_print_array_uint8(ndr, "data", r->data, r->length); + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_lsa_ForestTrustDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustDomainInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->domain_sid) { + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid)); + } + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ForestTrustDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustDomainInfo *r) +{ + uint32_t _ptr_domain_sid; + TALLOC_CTX *_mem_save_domain_sid_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid)); + if (_ptr_domain_sid) { + NDR_PULL_ALLOC(ndr, r->domain_sid); + } else { + r->domain_sid = NULL; + } + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain_name)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_domain_name)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->domain_sid) { + _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0); + } + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain_name)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_domain_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r) +{ + ndr_print_struct(ndr, name, "lsa_ForestTrustDomainInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_sid", r->domain_sid); + ndr->depth++; + if (r->domain_sid) { + ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid); + } + ndr->depth--; + ndr_print_lsa_StringLarge(ndr, "dns_domain_name", &r->dns_domain_name); + ndr_print_lsa_StringLarge(ndr, "netbios_domain_name", &r->netbios_domain_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int ndr_flags, const union lsa_ForestTrustData *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + switch (level) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name)); + break; + + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex)); + break; + + case LSA_FOREST_TRUST_DOMAIN_INFO: + NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info)); + break; + + default: + NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data)); + break; + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name)); + break; + + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex)); + break; + + case LSA_FOREST_TRUST_DOMAIN_INFO: + NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info)); + break; + + default: + NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data)); + break; + + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ForestTrustData(struct ndr_pull *ndr, int ndr_flags, union lsa_ForestTrustData *r) +{ + int level; + uint32_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->top_level_name)); + break; } + + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: { + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex)); + break; } + + case LSA_FOREST_TRUST_DOMAIN_INFO: { + NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info)); + break; } + + default: { + NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data)); + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->top_level_name)); + break; + + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->top_level_name_ex)); + break; + + case LSA_FOREST_TRUST_DOMAIN_INFO: + NDR_CHECK(ndr_pull_lsa_ForestTrustDomainInfo(ndr, NDR_BUFFERS, &r->domain_info)); + break; + + default: + NDR_CHECK(ndr_pull_lsa_ForestTrustBinaryData(ndr, NDR_BUFFERS, &r->data)); + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "lsa_ForestTrustData"); + switch (level) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: + ndr_print_lsa_String(ndr, "top_level_name", &r->top_level_name); + break; + + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: + ndr_print_lsa_StringLarge(ndr, "top_level_name_ex", &r->top_level_name_ex); + break; + + case LSA_FOREST_TRUST_DOMAIN_INFO: + ndr_print_lsa_ForestTrustDomainInfo(ndr, "domain_info", &r->domain_info); + break; + + default: + ndr_print_lsa_ForestTrustBinaryData(ndr, "data", &r->data); + break; + + } +} + +static enum ndr_err_code ndr_push_lsa_ForestTrustRecordType(struct ndr_push *ndr, int ndr_flags, enum lsa_ForestTrustRecordType r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ForestTrustRecordType(struct ndr_pull *ndr, int ndr_flags, enum lsa_ForestTrustRecordType *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r) +{ + const char *val = NULL; + + switch (r) { + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME"; break; + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: val = "LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX"; break; + case LSA_FOREST_TRUST_DOMAIN_INFO: val = "LSA_FOREST_TRUST_DOMAIN_INFO"; break; + case LSA_FOREST_TRUST_RECORD_TYPE_LAST: val = "LSA_FOREST_TRUST_RECORD_TYPE_LAST"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_lsa_ForestTrustRecord(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustRecord *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, r->level)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->forest_trust_data, r->level)); + NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ForestTrustRecord(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustRecord *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_lsa_ForestTrustRecordType(ndr, NDR_SCALARS, &r->level)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->forest_trust_data, r->level)); + NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_SCALARS, &r->forest_trust_data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_ForestTrustData(ndr, NDR_BUFFERS, &r->forest_trust_data)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r) +{ + ndr_print_struct(ndr, name, "lsa_ForestTrustRecord"); + ndr->depth++; + ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_lsa_ForestTrustRecordType(ndr, "level", r->level); + ndr_print_hyper(ndr, "unknown", r->unknown); + ndr_print_set_switch_value(ndr, &r->forest_trust_data, r->level); + ndr_print_lsa_ForestTrustData(ndr, "forest_trust_data", &r->forest_trust_data); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(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_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1])); + } + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + TALLOC_CTX *_mem_save_entries_2; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + if (r->count < 0 || r->count > 4000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries[cntr_entries_1]); + } else { + r->entries[cntr_entries_1] = NULL; + } + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + if (r->entries[cntr_entries_1]) { + _mem_save_entries_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries[cntr_entries_1], 0); + NDR_CHECK(ndr_pull_lsa_ForestTrustRecord(ndr, NDR_SCALARS|NDR_BUFFERS, r->entries[cntr_entries_1])); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_2, 0); + } + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "lsa_ForestTrustInformation"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]); + ndr->depth++; + if (r->entries[cntr_entries_1]) { + ndr_print_lsa_ForestTrustRecord(ndr, "entries", r->entries[cntr_entries_1]); + } + ndr->depth--; + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r) { if (flags & NDR_IN) { @@ -4103,7 +4588,7 @@ _PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int f ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -4117,7 +4602,7 @@ static enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, co return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r) { TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { @@ -4160,7 +4645,7 @@ _PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -4187,7 +4672,7 @@ static enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; @@ -4441,7 +4926,7 @@ _PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *na ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); @@ -4464,7 +4949,7 @@ static enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r) { uint32_t _ptr_system_name; TALLOC_CTX *_mem_save_system_name_0; @@ -4754,7 +5239,7 @@ _PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *nam ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -4777,7 +5262,7 @@ static enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int fl return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sid_0; @@ -4850,7 +5335,7 @@ _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *nam ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -4877,7 +5362,7 @@ static enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; @@ -4966,7 +5451,7 @@ _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -4989,7 +5474,7 @@ static enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_info_0; @@ -5112,9 +5597,6 @@ static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int fla NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); - if (r->in.max_size < 0 || r->in.max_size > 1000) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } NDR_PULL_ALLOC(ndr, r->out.resume_handle); *r->out.resume_handle = *r->in.resume_handle; NDR_PULL_ALLOC(ndr, r->out.domains); @@ -5178,7 +5660,7 @@ _PUBLIC_ void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r) { uint32_t cntr_names_0; if (flags & NDR_IN) { @@ -5198,7 +5680,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flag return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level)); if (r->in.count == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5222,7 +5704,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r) { uint32_t cntr_names_0; uint32_t _ptr_domains; @@ -5263,7 +5745,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flag NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.count); } @@ -5342,7 +5824,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids); ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level); ndr_print_ptr(ndr, "count", r->in.count); ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); @@ -5372,7 +5854,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -5411,7 +5893,7 @@ static enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r) { uint32_t _ptr_domains; TALLOC_CTX *_mem_save_handle_0; @@ -5540,7 +6022,7 @@ _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -5560,7 +6042,7 @@ static enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sec_handle_0; @@ -6349,7 +6831,7 @@ _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, c ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -6369,7 +6851,7 @@ static enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sec_handle_0; @@ -6432,7 +6914,7 @@ _PUBLIC_ void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r) { if (flags & NDR_IN) { if (r->in.sec_handle == NULL) { @@ -6454,7 +6936,7 @@ static enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r) { uint32_t _ptr_new_val; uint32_t _ptr_old_val; @@ -6537,7 +7019,7 @@ _PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, i ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r) { if (flags & NDR_IN) { if (r->in.sec_handle == NULL) { @@ -6583,7 +7065,7 @@ static enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r) { uint32_t _ptr_new_val; uint32_t _ptr_new_mtime; @@ -7824,7 +8306,7 @@ _PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const cha ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); @@ -7850,7 +8332,7 @@ static enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r) { uint32_t _ptr_system_name; TALLOC_CTX *_mem_save_system_name_0; @@ -8985,7 +9467,7 @@ _PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, in ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -9026,7 +9508,7 @@ static enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r) { uint32_t _ptr_domains; TALLOC_CTX *_mem_save_handle_0; @@ -9159,7 +9641,7 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r) { uint32_t cntr_names_0; if (flags & NDR_IN) { @@ -9179,7 +9661,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int fla return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level)); if (r->in.count == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -9205,7 +9687,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r) { uint32_t cntr_names_0; uint32_t _ptr_domains; @@ -9246,7 +9728,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.count); } @@ -9327,7 +9809,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids); ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level); ndr_print_ptr(ndr, "count", r->in.count); ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); @@ -9728,7 +10210,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r) { uint32_t cntr_names_0; if (flags & NDR_IN) { @@ -9748,7 +10230,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int fla return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level)); if (r->in.count == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -9774,7 +10256,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r) { uint32_t cntr_names_0; uint32_t _ptr_domains; @@ -9815,7 +10297,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.count); } @@ -9896,7 +10378,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids); ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level); ndr_print_ptr(ndr, "count", r->in.count); ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); @@ -10092,41 +10574,112 @@ _PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, cons ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr_push *ndr, int flags, const struct lsa_lsaRQueryForestTrustInformation *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + if (r->in.trusted_domain_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown)); } if (flags & NDR_OUT) { + if (r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr_pull *ndr, int flags, struct lsa_lsaRQueryForestTrustInformation *r) { + uint32_t _ptr_forest_trust_info; + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_trusted_domain_name_0; + TALLOC_CTX *_mem_save_forest_trust_info_0; + TALLOC_CTX *_mem_save_forest_trust_info_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name); + } + _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + ZERO_STRUCTP(r->out.forest_trust_info); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + } + _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r) +_PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r) { - ndr_print_struct(ndr, name, "lsa_LSARQUERYFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, name, "lsa_lsaRQueryForestTrustInformation"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "lsa_LSARQUERYFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "in", "lsa_lsaRQueryForestTrustInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name); + ndr->depth++; + ndr_print_lsa_String(ndr, "trusted_domain_name", r->in.trusted_domain_name); + ndr->depth--; + ndr_print_uint16(ndr, "unknown", r->in.unknown); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "lsa_LSARQUERYFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "out", "lsa_lsaRQueryForestTrustInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info); + ndr->depth++; + ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); ndr->depth++; + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } @@ -10215,7 +10768,7 @@ _PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r) { if (flags & NDR_IN) { if (r->in.sids == NULL) { @@ -10252,7 +10805,7 @@ static enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r) { uint32_t _ptr_domains; TALLOC_CTX *_mem_save_sids_0; @@ -10389,7 +10942,7 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_LookupNamesLevel(ndr, NDR_SCALARS, r->in.level)); if (r->in.count == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -10448,7 +11001,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_LookupNamesLevel(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.count); } @@ -10525,7 +11078,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids); ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_LookupNamesLevel(ndr, "level", r->in.level); ndr_print_ptr(ndr, "count", r->in.count); ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); @@ -11307,11 +11860,11 @@ static const struct ndr_interface_call lsarpc_calls[] = { false, }, { - "lsa_LSARQUERYFORESTTRUSTINFORMATION", - sizeof(struct lsa_LSARQUERYFORESTTRUSTINFORMATION), - (ndr_push_flags_fn_t) ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION, - (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION, - (ndr_print_function_t) ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION, + "lsa_lsaRQueryForestTrustInformation", + sizeof(struct lsa_lsaRQueryForestTrustInformation), + (ndr_push_flags_fn_t) ndr_push_lsa_lsaRQueryForestTrustInformation, + (ndr_pull_flags_fn_t) ndr_pull_lsa_lsaRQueryForestTrustInformation, + (ndr_print_function_t) ndr_print_lsa_lsaRQueryForestTrustInformation, false, }, { diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h index dc100297f5..ab4043f2a1 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.h +++ b/source3/librpc/gen_ndr/ndr_lsa.h @@ -194,6 +194,7 @@ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const stru void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r); void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r); void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r); +void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r); void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r); void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r); void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r); @@ -215,6 +216,7 @@ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_Sid void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r); void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r); void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r); +void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *name, enum lsa_LookupNamesLevel r); void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r); void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r); void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r); @@ -246,22 +248,48 @@ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r); void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r); void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r); +void ndr_print_lsa_ForestTrustBinaryData(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustBinaryData *r); +void ndr_print_lsa_ForestTrustDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustDomainInfo *r); +void ndr_print_lsa_ForestTrustData(struct ndr_print *ndr, const char *name, const union lsa_ForestTrustData *r); +void ndr_print_lsa_ForestTrustRecordType(struct ndr_print *ndr, const char *name, enum lsa_ForestTrustRecordType r); +void ndr_print_lsa_ForestTrustRecord(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustRecord *r); +enum ndr_err_code ndr_push_lsa_ForestTrustInformation(struct ndr_push *ndr, int ndr_flags, const struct lsa_ForestTrustInformation *r); +enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *ndr, int ndr_flags, struct lsa_ForestTrustInformation *r); +void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const char *name, const struct lsa_ForestTrustInformation *r); void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r); +enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r); +enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r); void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r); +enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r); +enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r); void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r); void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r); void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r); void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r); +enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r); +enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r); void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r); void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r); void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r); void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r); +enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *r); +enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r); void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r); +enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *r); +enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r); void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r); +enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r); +enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r); void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r); void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r); +enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r); +enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r); void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r); +enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *r); +enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r); void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r); +enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *r); +enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r); void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r); void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r); void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r); @@ -274,8 +302,14 @@ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *nam void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r); void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r); void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r); +enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *r); +enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r); void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r); +enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r); +enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r); void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r); +enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r); +enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r); void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r); void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r); void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r); @@ -290,6 +324,8 @@ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r); void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r); void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r); +enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r); +enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r); void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r); void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r); void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r); @@ -303,7 +339,11 @@ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const cha void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r); void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r); void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r); +enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *r); +enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r); void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r); +enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r); +enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r); void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r); void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r); void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r); @@ -314,14 +354,18 @@ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r); void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r); void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r); +enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r); +enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r); void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r); void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r); void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r); void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r); void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r); -void ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r); +void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct lsa_lsaRQueryForestTrustInformation *r); void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r); void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r); +enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r); +enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r); void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r); void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r); void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r); diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 68dc32cef5..8f8f985650 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -5579,18 +5579,18 @@ static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p) return true; } -static bool api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p) +static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r; + struct lsa_lsaRQueryForestTrustInformation *r; call = &ndr_table_lsarpc.calls[NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct lsa_LSARQUERYFORESTTRUSTINFORMATION); + r = talloc(NULL, struct lsa_lsaRQueryForestTrustInformation); if (r == NULL) { return false; } @@ -5614,10 +5614,17 @@ static bool api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, r); + NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation, r); } - r->out.result = _lsa_LSARQUERYFORESTTRUSTINFORMATION(p, r); + ZERO_STRUCT(r->out); + r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *); + if (r->out.forest_trust_info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _lsa_lsaRQueryForestTrustInformation(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -5626,7 +5633,7 @@ static bool api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, r); + NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, r); } push = ndr_push_init_ctx(r); @@ -6331,7 +6338,7 @@ static struct api_struct api_lsarpc_cmds[] = {"LSA_LSARREGISTERAUDITEVENT", NDR_LSA_LSARREGISTERAUDITEVENT, api_lsa_LSARREGISTERAUDITEVENT}, {"LSA_LSARGENAUDITEVENT", NDR_LSA_LSARGENAUDITEVENT, api_lsa_LSARGENAUDITEVENT}, {"LSA_LSARUNREGISTERAUDITEVENT", NDR_LSA_LSARUNREGISTERAUDITEVENT, api_lsa_LSARUNREGISTERAUDITEVENT}, - {"LSA_LSARQUERYFORESTTRUSTINFORMATION", NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, api_lsa_LSARQUERYFORESTTRUSTINFORMATION}, + {"LSA_LSARQUERYFORESTTRUSTINFORMATION", NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, api_lsa_lsaRQueryForestTrustInformation}, {"LSA_LSARSETFORESTTRUSTINFORMATION", NDR_LSA_LSARSETFORESTTRUSTINFORMATION, api_lsa_LSARSETFORESTTRUSTINFORMATION}, {"LSA_CREDRRENAME", NDR_LSA_CREDRRENAME, api_lsa_CREDRRENAME}, {"LSA_LOOKUPSIDS3", NDR_LSA_LOOKUPSIDS3, api_lsa_LookupSids3}, diff --git a/source3/librpc/gen_ndr/srv_lsa.h b/source3/librpc/gen_ndr/srv_lsa.h index e3decb2862..223ee5e970 100644 --- a/source3/librpc/gen_ndr/srv_lsa.h +++ b/source3/librpc/gen_ndr/srv_lsa.h @@ -74,7 +74,7 @@ NTSTATUS _lsa_CREDRGETSESSIONTYPES(pipes_struct *p, struct lsa_CREDRGETSESSIONTY NTSTATUS _lsa_LSARREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARREGISTERAUDITEVENT *r); NTSTATUS _lsa_LSARGENAUDITEVENT(pipes_struct *p, struct lsa_LSARGENAUDITEVENT *r); NTSTATUS _lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p, struct lsa_LSARUNREGISTERAUDITEVENT *r); -NTSTATUS _lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p, struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r); +NTSTATUS _lsa_lsaRQueryForestTrustInformation(pipes_struct *p, struct lsa_lsaRQueryForestTrustInformation *r); NTSTATUS _lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p, struct lsa_LSARSETFORESTTRUSTINFORMATION *r); NTSTATUS _lsa_CREDRRENAME(pipes_struct *p, struct lsa_CREDRRENAME *r); NTSTATUS _lsa_LookupSids3(pipes_struct *p, struct lsa_LookupSids3 *r); -- cgit From 5e86ac9e6d2eb7ff0f6f8461dcfc230e2d87c42c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Jan 2008 13:00:12 +0100 Subject: idl: Update DFS IDL from Samba 4. (This used to be commit a6677b2e186212f723b24775293682ce5b94952e) --- source3/librpc/gen_ndr/cli_dfs.c | 19 ++ source3/librpc/gen_ndr/cli_dfs.h | 8 + source3/librpc/gen_ndr/dfs.h | 33 ++- source3/librpc/gen_ndr/ndr_dfs.c | 436 ++++++++++++++++++++++++++++++++++++++- source3/librpc/gen_ndr/ndr_dfs.h | 2 + source3/librpc/gen_ndr/srv_dfs.c | 4 + 6 files changed, 498 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_dfs.c b/source3/librpc/gen_ndr/cli_dfs.c index 9078ce7bba..fc00128f3f 100644 --- a/source3/librpc/gen_ndr/cli_dfs.c +++ b/source3/librpc/gen_ndr/cli_dfs.c @@ -789,12 +789,20 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *servername, + const char **server_fullname, + uint8_t *is_root, + uint32_t *ttl, WERROR *werror) { struct dfs_GetDcAddress r; NTSTATUS status; /* In parameters */ + r.in.servername = servername; + r.in.server_fullname = server_fullname; + r.in.is_root = is_root; + r.in.ttl = ttl; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r); @@ -820,6 +828,9 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, } /* Return variables */ + *server_fullname = *r.out.server_fullname; + *is_root = *r.out.is_root; + *ttl = *r.out.ttl; /* Return result */ if (werror) { @@ -831,12 +842,20 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *servername, + const char *server_fullname, + uint32_t flags, + uint32_t ttl, WERROR *werror) { struct dfs_SetDcAddress r; NTSTATUS status; /* In parameters */ + r.in.servername = servername; + r.in.server_fullname = server_fullname; + r.in.flags = flags; + r.in.ttl = ttl; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r); diff --git a/source3/librpc/gen_ndr/cli_dfs.h b/source3/librpc/gen_ndr/cli_dfs.h index cdd0978bb4..d23bb90470 100644 --- a/source3/librpc/gen_ndr/cli_dfs.h +++ b/source3/librpc/gen_ndr/cli_dfs.h @@ -101,9 +101,17 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *servername, + const char **server_fullname, + uint8_t *is_root, + uint32_t *ttl, WERROR *werror); NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *servername, + const char *server_fullname, + uint32_t flags, + uint32_t ttl, WERROR *werror); NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/dfs.h b/source3/librpc/gen_ndr/dfs.h index 89f243b7dd..38e7f93950 100644 --- a/source3/librpc/gen_ndr/dfs.h +++ b/source3/librpc/gen_ndr/dfs.h @@ -32,8 +32,8 @@ struct dfs_Info1 { /* bitmap dfs_VolumeState */ #define DFS_VOLUME_STATE_OK ( 0x1 ) #define DFS_VOLUME_STATE_INCONSISTENT ( 0x2 ) -#define DFS_VOLUME_STATE_OFFLINE ( 0x4 ) -#define DFS_VOLUME_STATE_ONLINE ( 0x8 ) +#define DFS_VOLUME_STATE_OFFLINE ( 0x3 ) +#define DFS_VOLUME_STATE_ONLINE ( 0x4 ) #define DFS_VOLUME_STATE_STANDALONE ( DFS_VOLUME_FLAVOR_STANDALONE ) #define DFS_VOLUME_STATE_AD_BLOB ( DFS_VOLUME_FLAVOR_AD_BLOB ) @@ -238,6 +238,16 @@ struct dfs_EnumArray4 { struct dfs_Info4 *s;/* [unique,size_is(count)] */ }; +struct dfs_EnumArray5 { + uint32_t count; + struct dfs_Info5 *s;/* [unique,size_is(count)] */ +}; + +struct dfs_EnumArray6 { + uint32_t count; + struct dfs_Info6 *s;/* [unique,size_is(count)] */ +}; + struct dfs_EnumArray200 { uint32_t count; struct dfs_Info200 *s;/* [unique,size_is(count)] */ @@ -253,6 +263,8 @@ union dfs_EnumInfo { struct dfs_EnumArray2 *info2;/* [unique,case(2)] */ struct dfs_EnumArray3 *info3;/* [unique,case(3)] */ struct dfs_EnumArray4 *info4;/* [unique,case(4)] */ + struct dfs_EnumArray5 *info5;/* [unique,case(5)] */ + struct dfs_EnumArray6 *info6;/* [unique,case(6)] */ struct dfs_EnumArray200 *info200;/* [unique,case(200)] */ struct dfs_EnumArray300 *info300;/* [unique,case(300)] */ }; @@ -485,6 +497,16 @@ struct dfs_AddStdRootForced { struct dfs_GetDcAddress { struct { + const char *servername;/* [charset(UTF16)] */ + const char **server_fullname;/* [ref,charset(UTF16)] */ + uint8_t *is_root;/* [ref] */ + uint32_t *ttl;/* [ref] */ + } in; + + struct { + const char **server_fullname;/* [ref,charset(UTF16)] */ + uint8_t *is_root;/* [ref] */ + uint32_t *ttl;/* [ref] */ WERROR result; } out; @@ -492,6 +514,13 @@ struct dfs_GetDcAddress { struct dfs_SetDcAddress { + struct { + const char *servername;/* [charset(UTF16)] */ + const char *server_fullname;/* [charset(UTF16)] */ + uint32_t flags; + uint32_t ttl; + } in; + struct { WERROR result; } out; diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index 4b26487a0d..dee32485be 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -2544,6 +2544,180 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth--; } +static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray5"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r) +{ + uint32_t cntr_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->s)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r) +{ + uint32_t _ptr_s; + uint32_t cntr_s_1; + TALLOC_CTX *_mem_save_s_0; + TALLOC_CTX *_mem_save_s_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s)); + if (_ptr_s) { + NDR_PULL_ALLOC(ndr, r->s); + } else { + r->s = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->s) { + _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->s)); + NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s)); + _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->s, 0); + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1])); + } + for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) { + NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0); + } + if (r->s) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r) +{ + uint32_t cntr_s_1; + ndr_print_struct(ndr, name, "dfs_EnumArray6"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "s", r->s); + ndr->depth++; + if (r->s) { + ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count); + ndr->depth++; + for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_s_1); + if (idx_1) { + ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r) { uint32_t cntr_s_1; @@ -2740,6 +2914,14 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); break; + case 5: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); + break; + case 200: NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); break; @@ -2779,6 +2961,18 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla } break; + case 5: + if (r->info5) { + NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + } + break; + + case 6: + if (r->info6) { + NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + } + break; + case 200: if (r->info200) { NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200)); @@ -2806,6 +3000,8 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla TALLOC_CTX *_mem_save_info2_0; TALLOC_CTX *_mem_save_info3_0; TALLOC_CTX *_mem_save_info4_0; + TALLOC_CTX *_mem_save_info5_0; + TALLOC_CTX *_mem_save_info6_0; TALLOC_CTX *_mem_save_info200_0; TALLOC_CTX *_mem_save_info300_0; level = ndr_pull_get_switch_value(ndr, r); @@ -2855,6 +3051,26 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla } break; } + case 5: { + uint32_t _ptr_info5; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5)); + if (_ptr_info5) { + NDR_PULL_ALLOC(ndr, r->info5); + } else { + r->info5 = NULL; + } + break; } + + case 6: { + uint32_t _ptr_info6; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6)); + if (_ptr_info6) { + NDR_PULL_ALLOC(ndr, r->info6); + } else { + r->info6 = NULL; + } + break; } + case 200: { uint32_t _ptr_info200; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200)); @@ -2917,6 +3133,24 @@ static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_fla } break; + case 5: + if (r->info5) { + _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0); + } + break; + + case 6: + if (r->info6) { + _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0); + NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0); + } + break; + case 200: if (r->info200) { _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -2984,6 +3218,24 @@ _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, co ndr->depth--; break; + case 5: + ndr_print_ptr(ndr, "info5", r->info5); + ndr->depth++; + if (r->info5) { + ndr_print_dfs_EnumArray5(ndr, "info5", r->info5); + } + ndr->depth--; + break; + + case 6: + ndr_print_ptr(ndr, "info6", r->info6); + ndr->depth++; + if (r->info6) { + ndr_print_dfs_EnumArray6(ndr, "info6", r->info6); + } + ndr->depth--; + break; + case 200: ndr_print_ptr(ndr, "info200", r->info200); ndr->depth++; @@ -4715,8 +4967,50 @@ _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->in.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.is_root == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root)); + if (r->in.ttl == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl)); } if (flags & NDR_OUT) { + if (r->out.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.server_fullname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->out.is_root == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root)); + if (r->out.ttl == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4724,9 +5018,84 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r) { + uint32_t _ptr_server_fullname; + TALLOC_CTX *_mem_save_server_fullname_0; + TALLOC_CTX *_mem_save_is_root_0; + TALLOC_CTX *_mem_save_ttl_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.server_fullname); + } + _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); + NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); + if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.is_root); + } + _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.ttl); + } + _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.server_fullname); + *r->out.server_fullname = *r->in.server_fullname; + NDR_PULL_ALLOC(ndr, r->out.is_root); + *r->out.is_root = *r->in.is_root; + NDR_PULL_ALLOC(ndr, r->out.ttl); + *r->out.ttl = *r->in.ttl; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.server_fullname); + } + _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); + if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.is_root); + } + _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.ttl); + } + _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -4742,11 +5111,42 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_GetDcAddress"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname); + ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname); + ndr->depth++; + ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "is_root", r->in.is_root); + ndr->depth++; + ndr_print_uint8(ndr, "is_root", *r->in.is_root); + ndr->depth--; + ndr_print_ptr(ndr, "ttl", r->in.ttl); + ndr->depth++; + ndr_print_uint32(ndr, "ttl", *r->in.ttl); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "dfs_GetDcAddress"); ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname); + ndr->depth++; + ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname); + ndr->depth++; + ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "is_root", r->out.is_root); + ndr->depth++; + ndr_print_uint8(ndr, "is_root", *r->out.is_root); + ndr->depth--; + ndr_print_ptr(ndr, "ttl", r->out.ttl); + ndr->depth++; + ndr_print_uint32(ndr, "ttl", *r->out.ttl); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -4756,6 +5156,16 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_charset_length(r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -4766,6 +5176,22 @@ static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername)); + if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname)); + if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -4783,6 +5209,10 @@ _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "dfs_SetDcAddress"); ndr->depth++; + ndr_print_string(ndr, "servername", r->in.servername); + ndr_print_string(ndr, "server_fullname", r->in.server_fullname); + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_uint32(ndr, "ttl", r->in.ttl); ndr->depth--; } if (flags & NDR_OUT) { @@ -5325,10 +5755,12 @@ static const struct ndr_interface_call netdfs_calls[] = { static const char * const netdfs_endpoint_strings[] = { "ncacn_np:[\\pipe\\netdfs]", + "ncacn_ip_tcp:", + "ncalrpc:", }; static const struct ndr_interface_string_array netdfs_endpoints = { - .count = 1, + .count = 3, .names = netdfs_endpoint_strings }; @@ -5337,7 +5769,7 @@ static const char * const netdfs_authservice_strings[] = { }; static const struct ndr_interface_string_array netdfs_authservices = { - .count = 1, + .count = 3, .names = netdfs_authservice_strings }; diff --git a/source3/librpc/gen_ndr/ndr_dfs.h b/source3/librpc/gen_ndr/ndr_dfs.h index e4b00f322a..a7c66f9693 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.h +++ b/source3/librpc/gen_ndr/ndr_dfs.h @@ -95,6 +95,8 @@ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const str void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r); void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r); void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r); +void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r); +void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r); void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r); void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r); void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r); diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 384c2ba940..ad6e0af059 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -1233,6 +1233,10 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r); } + ZERO_STRUCT(r->out); + r->out.server_fullname = r->in.server_fullname; + r->out.is_root = r->in.is_root; + r->out.ttl = r->in.ttl; r->out.result = _dfs_GetDcAddress(p, r); if (p->rng_fault_state) { -- cgit From af3ff75e1f9cc459c1ad4ce22dce8149d01b3eaa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Jan 2008 13:16:27 +0100 Subject: idl: Update initshutdown and echo IDL from Samba 4. (This used to be commit 35d71a40b385a62b8c85ed68e64b6d38d80aeb3c) --- source3/librpc/gen_ndr/initshutdown.h | 4 ++-- source3/librpc/gen_ndr/ndr_echo.c | 18 +++++++++--------- source3/librpc/gen_ndr/ndr_echo.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/initshutdown.h b/source3/librpc/gen_ndr/initshutdown.h index 665d435919..acfe98846f 100644 --- a/source3/librpc/gen_ndr/initshutdown.h +++ b/source3/librpc/gen_ndr/initshutdown.h @@ -11,8 +11,8 @@ struct initshutdown_String_sub { }; struct initshutdown_String { - uint16_t name_len;/* [value(strlen_m(r->name->name)*2)] */ - uint16_t name_size;/* [value(strlen_m_term(r->name->name)*2)] */ + uint16_t name_len;/* [value(strlen_m(name->name)*2)] */ + uint16_t name_size;/* [value(strlen_m_term(name->name)*2)] */ struct initshutdown_String_sub *name;/* [unique] */ }/* [public] */; diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c index 01b1d10fac..29a10220e5 100644 --- a/source3/librpc/gen_ndr/ndr_echo.c +++ b/source3/librpc/gen_ndr/ndr_echo.c @@ -93,7 +93,7 @@ _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, cons ndr->depth--; } -static enum ndr_err_code ndr_push_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r) +static enum ndr_err_code ndr_push_STRUCT_echo_info4(struct ndr_push *ndr, int ndr_flags, const struct echo_info4 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); @@ -104,7 +104,7 @@ static enum ndr_err_code ndr_push_echo_info4(struct ndr_push *ndr, int ndr_flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r) +static enum ndr_err_code ndr_pull_STRUCT_echo_info4(struct ndr_pull *ndr, int ndr_flags, struct echo_info4 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); @@ -115,7 +115,7 @@ static enum ndr_err_code ndr_pull_echo_info4(struct ndr_pull *ndr, int ndr_flags return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r) +_PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r) { ndr_print_struct(ndr, name, "echo_info4"); ndr->depth++; @@ -194,7 +194,7 @@ static enum ndr_err_code ndr_push_echo_info7(struct ndr_push *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1)); - NDR_CHECK(ndr_push_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -206,7 +206,7 @@ static enum ndr_err_code ndr_pull_echo_info7(struct ndr_pull *ndr, int ndr_flags if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1)); - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); } if (ndr_flags & NDR_BUFFERS) { } @@ -218,7 +218,7 @@ _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, cons ndr_print_struct(ndr, name, "echo_info7"); ndr->depth++; ndr_print_uint8(ndr, "v1", r->v1); - ndr_print_echo_info4(ndr, "info4", &r->info4); + ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4); ndr->depth--; } @@ -241,7 +241,7 @@ static enum ndr_err_code ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, break; case 4: - NDR_CHECK(ndr_push_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); break; case 5: @@ -315,7 +315,7 @@ static enum ndr_err_code ndr_pull_echo_Info(struct ndr_pull *ndr, int ndr_flags, break; } case 4: { - NDR_CHECK(ndr_pull_echo_info4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); break; } case 5: { @@ -383,7 +383,7 @@ _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const break; case 4: - ndr_print_echo_info4(ndr, "info4", &r->info4); + ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4); break; case 5: diff --git a/source3/librpc/gen_ndr/ndr_echo.h b/source3/librpc/gen_ndr/ndr_echo.h index 65989ccd1c..7af1c7446b 100644 --- a/source3/librpc/gen_ndr/ndr_echo.h +++ b/source3/librpc/gen_ndr/ndr_echo.h @@ -35,7 +35,7 @@ extern const struct ndr_interface_table ndr_table_rpcecho; void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r); void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r); void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r); -void ndr_print_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r); +void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r); void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r); void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r); void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r); -- cgit From 04a2512b10393015048780b0630c012fac84e32c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Jan 2008 13:56:47 +0100 Subject: idl: Update IDL for eventlog, misc, netlogon and security from Samba 4. (This used to be commit 48288869d314d8c91d07282b5536b231d95db159) --- source3/librpc/gen_ndr/ndr_netlogon.c | 8 ++++---- source3/librpc/gen_ndr/ndr_xattr.c | 1 + source3/librpc/gen_ndr/netlogon.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 081c87fb12..0512f4db65 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -2042,10 +2042,10 @@ static enum ndr_err_code ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_size)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_size)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length)); NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length)); @@ -2080,10 +2080,10 @@ _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char * ndr_print_struct(ndr, name, "netr_PasswordHistory"); ndr->depth++; ndr_print_uint16(ndr, "nt_length", r->nt_length); - ndr_print_uint16(ndr, "nt_size", r->nt_size); + ndr_print_uint16(ndr, "nt_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->nt_length:r->nt_size); ndr_print_uint32(ndr, "nt_flags", r->nt_flags); ndr_print_uint16(ndr, "lm_length", r->lm_length); - ndr_print_uint16(ndr, "lm_size", r->lm_size); + ndr_print_uint16(ndr, "lm_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->lm_length:r->lm_size); ndr_print_uint32(ndr, "lm_flags", r->lm_flags); ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length); ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length); diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c index 29a31a12b2..425ad814bf 100644 --- a/source3/librpc/gen_ndr/ndr_xattr.c +++ b/source3/librpc/gen_ndr/ndr_xattr.c @@ -100,3 +100,4 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons ndr->depth--; ndr->depth--; } + diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index e33818257d..4b97470b6a 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -215,10 +215,10 @@ struct netr_USER_KEY16 { struct netr_PasswordHistory { uint16_t nt_length; - uint16_t nt_size; + uint16_t nt_size;/* [value(nt_length)] */ uint32_t nt_flags; uint16_t lm_length; - uint16_t lm_size; + uint16_t lm_size;/* [value(lm_length)] */ uint32_t lm_flags; uint8_t *nt_history; uint8_t *lm_history; -- cgit From 8c81ce9a6004f1ae2d6f1812d08820d7244598c1 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jan 2008 10:00:37 +0100 Subject: Re-run make idl to regenerate netlogon output. Guenther (This used to be commit b0e86c5b4d375f21f06208dc063adb9d2659d30b) --- source3/librpc/gen_ndr/cli_netlogon.c | 211 ++-- source3/librpc/gen_ndr/cli_netlogon.h | 71 +- source3/librpc/gen_ndr/ndr_netlogon.c | 2130 +++++++++++++++++++++++++++------ source3/librpc/gen_ndr/ndr_netlogon.h | 34 +- source3/librpc/gen_ndr/netlogon.h | 197 ++- source3/librpc/gen_ndr/srv_netlogon.c | 227 ++-- source3/librpc/gen_ndr/srv_netlogon.h | 18 +- 7 files changed, 2277 insertions(+), 611 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index efabf2e08f..414e053dc9 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -46,9 +46,7 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, } /* Return variables */ - if (info && r.out.info) { - *info = *r.out.info; - } + *info = *r.out.info; /* Return result */ if (werror) { @@ -410,9 +408,7 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sequence_num = *r.out.sequence_num; - if (delta_enum_array && r.out.delta_enum_array) { - *delta_enum_array = *r.out.delta_enum_array; - } + *delta_enum_array = *r.out.delta_enum_array; /* Return result */ return r.out.result; @@ -467,9 +463,7 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - if (delta_enum_array && r.out.delta_enum_array) { - *delta_enum_array = *r.out.delta_enum_array; - } + *delta_enum_array = *r.out.delta_enum_array; /* Return result */ return r.out.result; @@ -895,9 +889,7 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - if (delta_enum_array && r.out.delta_enum_array) { - *delta_enum_array = *r.out.delta_enum_array; - } + *delta_enum_array = *r.out.delta_enum_array; /* Return result */ return r.out.result; @@ -949,9 +941,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, /* Return variables */ *return_authenticator = *r.out.return_authenticator; - if (delta_enum_array && r.out.delta_enum_array) { - *delta_enum_array = *r.out.delta_enum_array; - } + *delta_enum_array = *r.out.delta_enum_array; /* Return result */ return r.out.result; @@ -1009,17 +999,20 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct netr_Blob *trusted_domains_blob, WERROR *werror) { - struct netr_NETRENUMERATETRUSTEDDOMAINS r; + struct netr_NetrEnumerateTrustedDomains r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, &r); + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &r); } status = cli_do_rpc_ndr(cli, @@ -1034,7 +1027,7 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, &r); + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1042,6 +1035,7 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, } /* Return variables */ + *trusted_domains_blob = *r.out.trusted_domains_blob; /* Return result */ if (werror) { @@ -1095,9 +1089,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, } /* Return variables */ - if (info && r.out.info) { - *info = *r.out.info; - } + *info = *r.out.info; /* Return result */ if (werror) { @@ -1414,9 +1406,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, } /* Return variables */ - if (info && r.out.info) { - *info = *r.out.info; - } + *info = *r.out.info; /* Return result */ if (werror) { @@ -1575,24 +1565,36 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, return r.out.result; } -NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_netr_ServerPasswordGet(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_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *password, + WERROR *werror) { - struct netr_NETRSERVERPASSWORDGET r; + struct netr_ServerPasswordGet r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.account_name = account_name; + r.in.secure_channel_type = secure_channel_type; + r.in.computer_name = computer_name; + r.in.credential = credential; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRSERVERPASSWORDGET, &r); + NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &r); } status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, &ndr_table_netlogon, - NDR_NETR_NETRSERVERPASSWORDGET, + NDR_NETR_SERVERPASSWORDGET, &r); if (!NT_STATUS_IS_OK(status)) { @@ -1600,7 +1602,7 @@ NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRSERVERPASSWORDGET, &r); + NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1608,6 +1610,8 @@ NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, } /* Return variables */ + *return_authenticator = *r.out.return_authenticator; + *password = *r.out.password; /* Return result */ if (werror) { @@ -1659,17 +1663,24 @@ NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + uint32_t count, + struct netr_DsRAddress *addresses, + struct netr_DsRAddressToSitenamesWCtr **ctr, WERROR *werror) { - struct netr_DSRADDRESSTOSITENAMESW r; + struct netr_DsRAddressToSitenamesW r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.count = count; + r.in.addresses = addresses; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESW, &r); + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r); } status = cli_do_rpc_ndr(cli, @@ -1684,7 +1695,7 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESW, &r); + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1692,6 +1703,7 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, } /* Return variables */ + *ctr = *r.out.ctr; /* Return result */ if (werror) { @@ -1749,9 +1761,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, } /* Return variables */ - if (info && r.out.info) { - *info = *r.out.info; - } + *info = *r.out.info; /* Return result */ if (werror) { @@ -1803,17 +1813,20 @@ NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct netr_DomainTrustList *dom_trust_list, WERROR *werror) { - struct netr_NETRENUMERATETRUSTEDDOMAINSEX r; + struct netr_NetrEnumerateTrustedDomainsEx r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, &r); + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r); } status = cli_do_rpc_ndr(cli, @@ -1828,7 +1841,7 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, &r); + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1836,6 +1849,7 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, } /* Return variables */ + *dom_trust_list = *r.out.dom_trust_list; /* Return result */ if (werror) { @@ -1845,17 +1859,24 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + uint32_t count, + struct netr_DsRAddress *addresses, + struct netr_DsRAddressToSitenamesExWCtr **ctr, WERROR *werror) { - struct netr_DSRADDRESSTOSITENAMESEXW r; + struct netr_DsRAddressToSitenamesExW r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.count = count; + r.in.addresses = addresses; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, &r); + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r); } status = cli_do_rpc_ndr(cli, @@ -1870,7 +1891,7 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, &r); + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1878,6 +1899,7 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, } /* Return variables */ + *ctr = *r.out.ctr; /* Return result */ if (werror) { @@ -1887,17 +1909,20 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct DcSitesCtr *ctr, WERROR *werror) { - struct netr_DSRGETDCSITECOVERAGEW r; + struct netr_DsrGetDcSiteCoverageW r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRGETDCSITECOVERAGEW, &r); + NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &r); } status = cli_do_rpc_ndr(cli, @@ -1912,7 +1937,7 @@ NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRGETDCSITECOVERAGEW, &r); + NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1920,6 +1945,7 @@ NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, } /* Return variables */ + *ctr = *r.out.ctr; /* Return result */ if (werror) { @@ -1987,8 +2013,7 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, - uint32_t *count, - struct netr_DomainTrust **trusts, + struct netr_DomainTrustList **trusts, WERROR *werror) { struct netr_DsrEnumerateDomainTrusts r; @@ -2022,8 +2047,7 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, } /* Return variables */ - *count = *r.out.count; - memcpy(trusts, r.out.trusts, count); + *trusts = *r.out.trusts; /* Return result */ if (werror) { @@ -2075,24 +2099,36 @@ NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_netr_ServerTrustPasswordsGet(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_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *password, + struct samr_Password *password2) { - struct netr_NETRSERVERTRUSTPASSWORDSGET r; + struct netr_ServerTrustPasswordsGet r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.account_name = account_name; + r.in.secure_channel_type = secure_channel_type; + r.in.computer_name = computer_name; + r.in.credential = credential; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, &r); + NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &r); } status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, &ndr_table_netlogon, - NDR_NETR_NETRSERVERTRUSTPASSWORDSGET, + NDR_NETR_SERVERTRUSTPASSWORDSGET, &r); if (!NT_STATUS_IS_OK(status)) { @@ -2100,7 +2136,7 @@ NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, &r); + NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -2108,26 +2144,32 @@ NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, } /* Return variables */ + *return_authenticator = *r.out.return_authenticator; + *password = *r.out.password; + *password2 = *r.out.password2; /* Return result */ - if (werror) { - *werror = r.out.result; - } - - return werror_to_ntstatus(r.out.result); + return r.out.result; } -NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + const char *trusted_domain_name, + uint32_t flags, + struct lsa_ForestTrustInformation **forest_trust_info, WERROR *werror) { - struct netr_DSRGETFORESTTRUSTINFORMATION r; + struct netr_DsRGetForestTrustInformation r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.trusted_domain_name = trusted_domain_name; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, &r); + NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r); } status = cli_do_rpc_ndr(cli, @@ -2142,7 +2184,7 @@ NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, &r); + NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -2150,6 +2192,7 @@ NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } /* Return variables */ + *forest_trust_info = *r.out.forest_trust_info; /* Return result */ if (werror) { @@ -2159,24 +2202,34 @@ NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *server_name, + const char *trusted_domain_name, + struct netr_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + uint32_t flags, + struct lsa_ForestTrustInformation **forest_trust_info, + WERROR *werror) { - struct netr_NETRGETFORESTTRUSTINFORMATION r; + struct netr_GetForestTrustInformation r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.trusted_domain_name = trusted_domain_name; + r.in.credential = credential; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, &r); + NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r); } status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, &ndr_table_netlogon, - NDR_NETR_NETRGETFORESTTRUSTINFORMATION, + NDR_NETR_GETFORESTTRUSTINFORMATION, &r); if (!NT_STATUS_IS_OK(status)) { @@ -2184,7 +2237,7 @@ NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, &r); + NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -2192,6 +2245,8 @@ NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, } /* Return variables */ + *return_authenticator = *r.out.return_authenticator; + *forest_trust_info = *r.out.forest_trust_info; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 9409077d09..30a9645767 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -165,8 +165,10 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror); -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct netr_Blob *trusted_domains_blob, WERROR *werror); NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -233,14 +235,25 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, struct netr_Authenticator credential, struct netr_CryptPassword new_password, struct netr_Authenticator *return_authenticator); -NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); +NTSTATUS rpccli_netr_ServerPasswordGet(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_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *password, + WERROR *werror); NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + uint32_t count, + struct netr_DsRAddress *addresses, + struct netr_DsRAddressToSitenamesWCtr **ctr, WERROR *werror); NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -256,14 +269,22 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct netr_DomainTrustList *dom_trust_list, WERROR *werror); -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + uint32_t count, + struct netr_DsRAddress *addresses, + struct netr_DsRAddressToSitenamesExWCtr **ctr, WERROR *werror); -NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + struct DcSitesCtr *ctr, WERROR *werror); NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -279,21 +300,37 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, - uint32_t *count, - struct netr_DomainTrust **trusts, + struct netr_DomainTrustList **trusts, WERROR *werror); NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); -NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); -NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_ServerTrustPasswordsGet(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_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *password, + struct samr_Password *password2); +NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + const char *trusted_domain_name, + uint32_t flags, + struct lsa_ForestTrustInformation **forest_trust_info, WERROR *werror); -NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); +NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *server_name, + const char *trusted_domain_name, + struct netr_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + uint32_t flags, + struct lsa_ForestTrustInformation **forest_trust_info, + WERROR *werror); NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 0512f4db65..1ceca9d8d4 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -2096,7 +2096,7 @@ static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword)); - NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->lmhistory)); + NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->lmpassword)); @@ -2111,7 +2111,7 @@ static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword)); NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword)); - NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->lmhistory)); + NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->lmpassword)); @@ -2126,7 +2126,7 @@ _PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword); ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword); - ndr_print_netr_PasswordHistory(ndr, "lmhistory", &r->lmhistory); + ndr_print_netr_PasswordHistory(ndr, "history", &r->history); ndr->depth--; } @@ -5942,17 +5942,174 @@ _PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, con } } +static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, r->data); + } else { + r->data = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->data)); + NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); + } + if (r->data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r) +{ + ndr_print_struct(ndr, name, "netr_Blob"); + ndr->depth++; + ndr_print_uint32(ndr, "length", r->length); + ndr_print_ptr(ndr, "data", r->data); + ndr->depth++; + if (r->data) { + ndr_print_array_uint8(ndr, "data", r->data, r->length); + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_DsRGetDCName_flags(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_netr_DsRGetDCName_flags(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_netr_DsRGetDCName_flags(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), "DS_FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_PDC_REQUIRED", DS_PDC_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_BACKGROUND_ONLY", DS_BACKGROUND_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IP_REQUIRED", DS_IP_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_KDC_REQUIRED", DS_KDC_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_AVOID_SELF", DS_AVOID_SELF, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo_AddressType(struct ndr_push *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo_AddressType(struct ndr_pull *ndr, int ndr_flags, enum netr_DsRGetDCNameInfo_AddressType *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r) +{ + const char *val = NULL; + + switch (r) { + case DS_ADDRESS_TYPE_INET: val = "DS_ADDRESS_TYPE_INET"; break; + case DS_ADDRESS_TYPE_NETBIOS: val = "DS_ADDRESS_TYPE_NETBIOS"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_netr_DsR_DcFlags(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_netr_DsR_DcFlags(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_netr_DsR_DcFlags(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), "DS_SERVER_PDC", DS_SERVER_PDC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GC", DS_SERVER_GC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_LDAP", DS_SERVER_LDAP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_DS", DS_SERVER_DS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_KDC", DS_SERVER_KDC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_TIMESERV", DS_SERVER_TIMESERV, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_CLOSEST", DS_SERVER_CLOSEST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST", DS_DNS_FOREST, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address)); - NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->dc_address_type)); + NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, r->dc_address_type)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dc_flags)); + NDR_CHECK(ndr_push_netr_DsR_DcFlags(ndr, NDR_SCALARS, r->dc_flags)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name)); } @@ -6026,7 +6183,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, in } else { r->dc_address = NULL; } - NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->dc_address_type)); + NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo_AddressType(ndr, NDR_SCALARS, &r->dc_address_type)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name)); if (_ptr_domain_name) { @@ -6040,7 +6197,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, in } else { r->forest_name = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dc_flags)); + NDR_CHECK(ndr_pull_netr_DsR_DcFlags(ndr, NDR_SCALARS, &r->dc_flags)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name)); if (_ptr_dc_site_name) { NDR_PULL_ALLOC(ndr, r->dc_site_name); @@ -6148,7 +6305,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char ndr_print_string(ndr, "dc_address", r->dc_address); } ndr->depth--; - ndr_print_int32(ndr, "dc_address_type", r->dc_address_type); + ndr_print_netr_DsRGetDCNameInfo_AddressType(ndr, "dc_address_type", r->dc_address_type); ndr_print_GUID(ndr, "domain_guid", &r->domain_guid); ndr_print_ptr(ndr, "domain_name", r->domain_name); ndr->depth++; @@ -6162,7 +6319,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char ndr_print_string(ndr, "forest_name", r->forest_name); } ndr->depth--; - ndr_print_uint32(ndr, "dc_flags", r->dc_flags); + ndr_print_netr_DsR_DcFlags(ndr, "dc_flags", r->dc_flags); ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name); ndr->depth++; if (r->dc_site_name) { @@ -6178,66 +6335,6 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char ndr->depth--; } -static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->data) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); - } - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r) -{ - uint32_t _ptr_data; - TALLOC_CTX *_mem_save_data_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); - if (_ptr_data) { - NDR_PULL_ALLOC(ndr, r->data); - } else { - r->data = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->data) { - _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->data)); - NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data)); - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data))); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); - } - if (r->data) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length)); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r) -{ - ndr_print_struct(ndr, name, "netr_Blob"); - ndr->depth++; - ndr_print_uint32(ndr, "length", r->length); - ndr_print_ptr(ndr, "data", r->data); - ndr->depth++; - if (r->data) { - ndr_print_array_uint8(ndr, "data", r->data, r->length); - } - ndr->depth--; - ndr->depth--; -} - static enum ndr_err_code ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r) { uint32_t cntr_data_1; @@ -7157,6 +7254,153 @@ _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *na } } +static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesWCtr(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddressToSitenamesWCtr *r) +{ + uint32_t cntr_sitename_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sitename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1])); + } + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesWCtr(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddressToSitenamesWCtr *r) +{ + uint32_t _ptr_sitename; + uint32_t cntr_sitename_1; + TALLOC_CTX *_mem_save_sitename_0; + TALLOC_CTX *_mem_save_sitename_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename)); + if (_ptr_sitename) { + NDR_PULL_ALLOC(ndr, r->sitename); + } else { + r->sitename = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sitename) { + _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename)); + NDR_PULL_ALLOC_N(ndr, r->sitename, ndr_get_array_size(ndr, &r->sitename)); + _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0); + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1])); + } + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0); + } + if (r->sitename) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r) +{ + uint32_t cntr_sitename_1; + ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesWCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "sitename", r->sitename); + ndr->depth++; + if (r->sitename) { + ndr->print(ndr, "%s: ARRAY(%d)", "sitename", r->count); + ndr->depth++; + for (cntr_sitename_1=0;cntr_sitename_1count;cntr_sitename_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_sitename_1); + if (idx_1) { + ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_DsRAddress(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddress *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->buffer) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->size)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_DsRAddress(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddress *r) +{ + uint32_t _ptr_buffer; + TALLOC_CTX *_mem_save_buffer_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer)); + if (_ptr_buffer) { + NDR_PULL_ALLOC(ndr, r->buffer); + } else { + r->buffer = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->buffer) { + _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer)); + NDR_PULL_ALLOC_N(ndr, r->buffer, ndr_get_array_size(ndr, &r->buffer)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, ndr_get_array_size(ndr, &r->buffer))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); + } + if (r->buffer) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffer, r->size)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r) +{ + ndr_print_struct(ndr, name, "netr_DsRAddress"); + ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->buffer); + ndr->depth++; + if (r->buffer) { + ndr_print_array_uint8(ndr, "buffer", r->buffer, r->size); + } + ndr->depth--; + ndr_print_uint32(ndr, "size", r->size); + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -7373,13 +7617,331 @@ _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r) +static enum ndr_err_code ndr_push_netr_DomainTrustList(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustList *r) { - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); - if (r->in.server_name) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + uint32_t cntr_array_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->array)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->array) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) { + NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1])); + } + for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) { + NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_DomainTrustList(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrustList *r) +{ + uint32_t _ptr_array; + uint32_t cntr_array_1; + TALLOC_CTX *_mem_save_array_0; + TALLOC_CTX *_mem_save_array_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array)); + if (_ptr_array) { + NDR_PULL_ALLOC(ndr, r->array); + } else { + r->array = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->array) { + _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->array, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->array)); + NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array)); + _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->array, 0); + for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) { + NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS, &r->array[cntr_array_1])); + } + for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) { + NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_BUFFERS, &r->array[cntr_array_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0); + } + if (r->array) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r) +{ + uint32_t cntr_array_1; + ndr_print_struct(ndr, name, "netr_DomainTrustList"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "array", r->array); + ndr->depth++; + if (r->array) { + ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count); + ndr->depth++; + for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_array_1); + if (idx_1) { + ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExWCtr(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRAddressToSitenamesExWCtr *r) +{ + uint32_t cntr_sitename_1; + uint32_t cntr_subnetname_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->sitename)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->subnetname)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sitename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1])); + } + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1])); + } + } + if (r->subnetname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_subnetname_1 = 0; cntr_subnetname_1 < r->count; cntr_subnetname_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1])); + } + for (cntr_subnetname_1 = 0; cntr_subnetname_1 < r->count; cntr_subnetname_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExWCtr(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRAddressToSitenamesExWCtr *r) +{ + uint32_t _ptr_sitename; + uint32_t cntr_sitename_1; + TALLOC_CTX *_mem_save_sitename_0; + TALLOC_CTX *_mem_save_sitename_1; + uint32_t _ptr_subnetname; + uint32_t cntr_subnetname_1; + TALLOC_CTX *_mem_save_subnetname_0; + TALLOC_CTX *_mem_save_subnetname_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sitename)); + if (_ptr_sitename) { + NDR_PULL_ALLOC(ndr, r->sitename); + } else { + r->sitename = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_subnetname)); + if (_ptr_subnetname) { + NDR_PULL_ALLOC(ndr, r->subnetname); + } else { + r->subnetname = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sitename) { + _mem_save_sitename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->sitename)); + NDR_PULL_ALLOC_N(ndr, r->sitename, ndr_get_array_size(ndr, &r->sitename)); + _mem_save_sitename_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sitename, 0); + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sitename[cntr_sitename_1])); + } + for (cntr_sitename_1 = 0; cntr_sitename_1 < r->count; cntr_sitename_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sitename[cntr_sitename_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sitename_0, 0); + } + if (r->subnetname) { + _mem_save_subnetname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->subnetname)); + NDR_PULL_ALLOC_N(ndr, r->subnetname, ndr_get_array_size(ndr, &r->subnetname)); + _mem_save_subnetname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->subnetname, 0); + for (cntr_subnetname_1 = 0; cntr_subnetname_1 < r->count; cntr_subnetname_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->subnetname[cntr_subnetname_1])); + } + for (cntr_subnetname_1 = 0; cntr_subnetname_1 < r->count; cntr_subnetname_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->subnetname[cntr_subnetname_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subnetname_0, 0); + } + if (r->sitename) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sitename, r->count)); + } + if (r->subnetname) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->subnetname, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r) +{ + uint32_t cntr_sitename_1; + uint32_t cntr_subnetname_1; + ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExWCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "sitename", r->sitename); + ndr->depth++; + if (r->sitename) { + ndr->print(ndr, "%s: ARRAY(%d)", "sitename", r->count); + ndr->depth++; + for (cntr_sitename_1=0;cntr_sitename_1count;cntr_sitename_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_sitename_1); + if (idx_1) { + ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr_print_ptr(ndr, "subnetname", r->subnetname); + ndr->depth++; + if (r->subnetname) { + ndr->print(ndr, "%s: ARRAY(%d)", "subnetname", r->count); + ndr->depth++; + for (cntr_subnetname_1=0;cntr_subnetname_1count;cntr_subnetname_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_subnetname_1); + if (idx_1) { + ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_DcSitesCtr(struct ndr_push *ndr, int ndr_flags, const struct DcSitesCtr *r) +{ + uint32_t cntr_sites_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->sites)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sites) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sites)); + for (cntr_sites_1 = 0; cntr_sites_1 < r->num_sites; cntr_sites_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1])); + } + for (cntr_sites_1 = 0; cntr_sites_1 < r->num_sites; cntr_sites_1++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_DcSitesCtr(struct ndr_pull *ndr, int ndr_flags, struct DcSitesCtr *r) +{ + uint32_t _ptr_sites; + uint32_t cntr_sites_1; + TALLOC_CTX *_mem_save_sites_0; + TALLOC_CTX *_mem_save_sites_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sites)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sites)); + if (_ptr_sites) { + NDR_PULL_ALLOC(ndr, r->sites); + } else { + r->sites = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sites) { + _mem_save_sites_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->sites)); + NDR_PULL_ALLOC_N(ndr, r->sites, ndr_get_array_size(ndr, &r->sites)); + _mem_save_sites_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sites, 0); + for (cntr_sites_1 = 0; cntr_sites_1 < r->num_sites; cntr_sites_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->sites[cntr_sites_1])); + } + for (cntr_sites_1 = 0; cntr_sites_1 < r->num_sites; cntr_sites_1++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->sites[cntr_sites_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sites_0, 0); + } + if (r->sites) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sites, r->num_sites)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r) +{ + uint32_t cntr_sites_1; + ndr_print_struct(ndr, name, "DcSitesCtr"); + ndr->depth++; + ndr_print_uint32(ndr, "num_sites", r->num_sites); + ndr_print_ptr(ndr, "sites", r->sites); + ndr->depth++; + if (r->sites) { + ndr->print(ndr, "%s: ARRAY(%d)", "sites", r->num_sites); + ndr->depth++; + for (cntr_sites_1=0;cntr_sites_1num_sites;cntr_sites_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_sites_1); + if (idx_1) { + ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } @@ -7393,10 +7955,10 @@ static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); - if (r->out.info) { - NDR_CHECK(ndr_push_netr_UasInfo(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_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7405,7 +7967,6 @@ static enum ndr_err_code ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int f static enum ndr_err_code ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogon *r) { uint32_t _ptr_server_name; - uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_info_0; if (flags & NDR_IN) { @@ -7443,20 +8004,17 @@ static enum ndr_err_code ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int f } NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_ALLOC(ndr, r->out.info); + ZERO_STRUCTP(r->out.info); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.info); - } else { - 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_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } + _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_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -7487,9 +8045,7 @@ _PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - if (r->out.info) { - ndr_print_netr_UasInfo(ndr, "info", r->out.info); - } + ndr_print_netr_UasInfo(ndr, "info", r->out.info); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -8449,10 +9005,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->out.sequence_num)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array)); - if (r->out.delta_enum_array) { - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + if (r->out.delta_enum_array == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -8460,7 +9016,6 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r) { - uint32_t _ptr_delta_enum_array; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_sequence_num_0; TALLOC_CTX *_mem_save_delta_enum_array_0; @@ -8502,6 +9057,8 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int *r->out.return_authenticator = *r->in.return_authenticator; NDR_PULL_ALLOC(ndr, r->out.sequence_num); *r->out.sequence_num = *r->in.sequence_num; + NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); + ZERO_STRUCTP(r->out.delta_enum_array); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -8518,18 +9075,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence_num, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->out.sequence_num)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); - if (_ptr_delta_enum_array) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); - } else { - r->out.delta_enum_array = NULL; - } - if (r->out.delta_enum_array) { - _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0); } + _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -8573,9 +9125,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - if (r->out.delta_enum_array) { - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); - } + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -8615,10 +9165,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array)); - if (r->out.delta_enum_array) { - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + if (r->out.delta_enum_array == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -8626,7 +9176,6 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync *r) { - uint32_t _ptr_delta_enum_array; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_sync_context_0; TALLOC_CTX *_mem_save_delta_enum_array_0; @@ -8668,6 +9217,8 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int fl *r->out.return_authenticator = *r->in.return_authenticator; NDR_PULL_ALLOC(ndr, r->out.sync_context); *r->out.sync_context = *r->in.sync_context; + NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); + ZERO_STRUCTP(r->out.delta_enum_array); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -8684,18 +9235,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); - if (_ptr_delta_enum_array) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); - } else { - r->out.delta_enum_array = NULL; - } - if (r->out.delta_enum_array) { - _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0); } + _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -8739,9 +9285,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *nam ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - if (r->out.delta_enum_array) { - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); - } + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -9898,10 +10442,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array)); - if (r->out.delta_enum_array) { - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + if (r->out.delta_enum_array == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9909,7 +10453,6 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r) { - uint32_t _ptr_delta_enum_array; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_sync_context_0; TALLOC_CTX *_mem_save_delta_enum_array_0; @@ -9952,6 +10495,8 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f *r->out.return_authenticator = *r->in.return_authenticator; NDR_PULL_ALLOC(ndr, r->out.sync_context); *r->out.sync_context = *r->in.sync_context; + NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); + ZERO_STRUCTP(r->out.delta_enum_array); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -9968,18 +10513,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); - if (_ptr_delta_enum_array) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); - } else { - r->out.delta_enum_array = NULL; - } - if (r->out.delta_enum_array) { - _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0); } + _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -10024,9 +10564,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - if (r->out.delta_enum_array) { - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); - } + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -10062,10 +10600,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array)); - if (r->out.delta_enum_array) { - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + if (r->out.delta_enum_array == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10074,7 +10612,6 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r) { uint32_t _ptr_change_log_entry; - uint32_t _ptr_delta_enum_array; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_change_log_entry_0; TALLOC_CTX *_mem_save_delta_enum_array_0; @@ -10120,6 +10657,8 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size)); NDR_PULL_ALLOC(ndr, r->out.return_authenticator); *r->out.return_authenticator = *r->in.return_authenticator; + NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); + ZERO_STRUCTP(r->out.delta_enum_array); if (r->in.change_log_entry) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.change_log_entry, r->in.change_log_entry_size)); } @@ -10132,18 +10671,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); - if (_ptr_delta_enum_array) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.delta_enum_array); - } else { - r->out.delta_enum_array = NULL; - } - if (r->out.delta_enum_array) { - _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0); } + _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -10184,9 +10718,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - if (r->out.delta_enum_array) { - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); - } + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -10303,41 +10835,94 @@ _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char * ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r) +static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomains(struct ndr_push *ndr, int flags, const struct netr_NetrEnumerateTrustedDomains *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } if (flags & NDR_OUT) { + if (r->out.trusted_domains_blob == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINS *r) +static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomains(struct ndr_pull *ndr, int flags, struct netr_NetrEnumerateTrustedDomains *r) { + uint32_t _ptr_server_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_trusted_domains_blob_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob); + ZERO_STRUCTP(r->out.trusted_domains_blob); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.trusted_domains_blob); + } + _mem_save_trusted_domains_blob_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.trusted_domains_blob, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusted_domains_blob)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domains_blob_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r) +_PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r) { - ndr_print_struct(ndr, name, "netr_NETRENUMERATETRUSTEDDOMAINS"); + ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomains"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRENUMERATETRUSTEDDOMAINS"); + ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomains"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRENUMERATETRUSTEDDOMAINS"); + ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomains"); + ndr->depth++; + ndr_print_ptr(ndr, "trusted_domains_blob", r->out.trusted_domains_blob); ndr->depth++; + ndr_print_netr_Blob(ndr, "trusted_domains_blob", r->out.trusted_domains_blob); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -10369,13 +10954,13 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int fl if (r->in.site_guid) { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.site_guid)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); - if (r->out.info) { - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10387,7 +10972,6 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_guid; - uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_domain_guid_0; @@ -10456,21 +11040,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.site_guid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.info); + ZERO_STRUCTP(r->out.info); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.info); - } else { - 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } + _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -10510,7 +11091,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam ndr_print_GUID(ndr, "site_guid", r->in.site_guid); } ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -10518,9 +11099,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - if (r->out.info) { - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); - } + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -10948,13 +11527,13 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); - if (r->out.info) { - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10966,7 +11545,6 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_name; - uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_domain_guid_0; @@ -11041,21 +11619,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.info); + ZERO_STRUCTP(r->out.info); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.info); - } else { - 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } + _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -11095,7 +11670,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *n ndr_print_string(ndr, "site_name", r->in.site_name); } ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -11103,9 +11678,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - if (r->out.info) { - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); - } + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -11519,41 +12092,155 @@ _PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const cha ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRSERVERPASSWORDGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERPASSWORDGET *r) +static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordGet *r) { if (flags & NDR_IN) { - } - if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + } + if (flags & NDR_OUT) { + if (r->out.return_authenticator == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + if (r->out.password == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRSERVERPASSWORDGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERPASSWORDGET *r) +static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordGet *r) { + uint32_t _ptr_server_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_credential_0; + TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_password_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name)); + if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name)); + if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + ZERO_STRUCTP(r->out.return_authenticator); + NDR_PULL_ALLOC(ndr, r->out.password); + ZERO_STRUCTP(r->out.password); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + } + _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.password); + } + _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRSERVERPASSWORDGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERPASSWORDGET *r) +_PUBLIC_ void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r) { - ndr_print_struct(ndr, name, "netr_NETRSERVERPASSWORDGET"); + ndr_print_struct(ndr, name, "netr_ServerPasswordGet"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRSERVERPASSWORDGET"); + ndr_print_struct(ndr, "in", "netr_ServerPasswordGet"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_string(ndr, "account_name", r->in.account_name); + ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type); + ndr_print_string(ndr, "computer_name", r->in.computer_name); + ndr_print_ptr(ndr, "credential", r->in.credential); ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRSERVERPASSWORDGET"); + ndr_print_struct(ndr, "out", "netr_ServerPasswordGet"); + ndr->depth++; + ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator); ndr->depth++; + ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator); + ndr->depth--; + ndr_print_ptr(ndr, "password", r->out.password); + ndr->depth++; + ndr_print_samr_Password(ndr, "password", r->out.password); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -11601,41 +12288,160 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const cha ndr->depth--; } -static enum ndr_err_code ndr_push_netr_DSRADDRESSTOSITENAMESW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r) +static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push *ndr, int flags, const struct netr_DsRAddressToSitenamesW *r) { + uint32_t cntr_addresses_1; if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count)); + if (r->in.addresses == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count)); + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1])); + } + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1])); + } } if (flags & NDR_OUT) { + if (r->out.ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_DSRADDRESSTOSITENAMESW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESW *r) +static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *ndr, int flags, struct netr_DsRAddressToSitenamesW *r) { + uint32_t _ptr_server_name; + uint32_t cntr_addresses_1; + uint32_t _ptr_ctr; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_addresses_1; + TALLOC_CTX *_mem_save_ctr_0; + TALLOC_CTX *_mem_save_ctr_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count)); + if (r->in.count < 0 || r->in.count > 32000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC_N(ndr, r->in.addresses, ndr_get_array_size(ndr, &r->in.addresses)); + } + _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0); + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1])); + } + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0); + NDR_PULL_ALLOC(ndr, r->out.ctr); + ZERO_STRUCTP(r->out.ctr); + if (r->in.addresses) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count)); + } } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.ctr); + } + _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ctr)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.ctr); + } + _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r) +_PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r) { - ndr_print_struct(ndr, name, "netr_DSRADDRESSTOSITENAMESW"); + uint32_t cntr_addresses_1; + ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesW"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_DSRADDRESSTOSITENAMESW"); + ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesW"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "count", r->in.count); + ndr_print_ptr(ndr, "addresses", r->in.addresses); + ndr->depth++; + ndr->print(ndr, "%s: ARRAY(%d)", "addresses", r->in.count); ndr->depth++; + for (cntr_addresses_1=0;cntr_addresses_1in.count;cntr_addresses_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_addresses_1); + if (idx_1) { + ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]); + free(idx_1); + } + } + ndr->depth--; + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_DSRADDRESSTOSITENAMESW"); + ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesW"); + ndr->depth++; + ndr_print_ptr(ndr, "ctr", r->out.ctr); ndr->depth++; + ndr_print_ptr(ndr, "ctr", *r->out.ctr); + ndr->depth++; + ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr); + ndr->depth--; + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -11659,7 +12465,7 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client_account, ndr_charset_length(r->in.client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.mask)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.mask)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name)); if (r->in.domain_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16))); @@ -11678,13 +12484,13 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info)); - if (r->out.info) { - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11697,7 +12503,6 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_name; - uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_client_account_0; TALLOC_CTX *_mem_save_domain_name_0; @@ -11743,7 +12548,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client_account, ndr_get_array_length(ndr, &r->in.client_account), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.mask)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.mask)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name)); if (_ptr_domain_name) { NDR_PULL_ALLOC(ndr, r->in.domain_name); @@ -11792,21 +12597,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.info); + ZERO_STRUCTP(r->out.info); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.info); - } else { - 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } + _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -11834,7 +12636,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char * ndr_print_string(ndr, "client_account", r->in.client_account); } ndr->depth--; - ndr_print_uint32(ndr, "mask", r->in.mask); + ndr_print_samr_AcctFlags(ndr, "mask", r->in.mask); ndr_print_ptr(ndr, "domain_name", r->in.domain_name); ndr->depth++; if (r->in.domain_name) { @@ -11853,7 +12655,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char * ndr_print_string(ndr, "site_name", r->in.site_name); } ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_netr_DsRGetDCName_flags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -11861,9 +12663,7 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - if (r->out.info) { - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); - } + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -11912,123 +12712,348 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_prin ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r) +static enum ndr_err_code ndr_push_netr_NetrEnumerateTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } if (flags & NDR_OUT) { + if (r->out.dom_trust_list == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r) +static enum ndr_err_code ndr_pull_netr_NetrEnumerateTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct netr_NetrEnumerateTrustedDomainsEx *r) { + uint32_t _ptr_server_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_dom_trust_list_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_PULL_ALLOC(ndr, r->out.dom_trust_list); + ZERO_STRUCTP(r->out.dom_trust_list); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.dom_trust_list); + } + _mem_save_dom_trust_list_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.dom_trust_list, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.dom_trust_list)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_trust_list_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r) +_PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r) { - ndr_print_struct(ndr, name, "netr_NETRENUMERATETRUSTEDDOMAINSEX"); + ndr_print_struct(ndr, name, "netr_NetrEnumerateTrustedDomainsEx"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRENUMERATETRUSTEDDOMAINSEX"); + ndr_print_struct(ndr, "in", "netr_NetrEnumerateTrustedDomainsEx"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRENUMERATETRUSTEDDOMAINSEX"); + ndr_print_struct(ndr, "out", "netr_NetrEnumerateTrustedDomainsEx"); ndr->depth++; + ndr_print_ptr(ndr, "dom_trust_list", r->out.dom_trust_list); + ndr->depth++; + ndr_print_netr_DomainTrustList(ndr, "dom_trust_list", r->out.dom_trust_list); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; } -static enum ndr_err_code ndr_push_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r) +static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push *ndr, int flags, const struct netr_DsRAddressToSitenamesExW *r) { + uint32_t cntr_addresses_1; if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count)); + if (r->in.addresses == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count)); + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1])); + } + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_push_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1])); + } } if (flags & NDR_OUT) { + if (r->out.ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESEXW *r) +static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull *ndr, int flags, struct netr_DsRAddressToSitenamesExW *r) { + uint32_t _ptr_server_name; + uint32_t cntr_addresses_1; + uint32_t _ptr_ctr; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_addresses_1; + TALLOC_CTX *_mem_save_ctr_0; + TALLOC_CTX *_mem_save_ctr_1; if (flags & NDR_IN) { - } - if (flags & NDR_OUT) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count)); + if (r->in.count < 0 || r->in.count > 32000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC_N(ndr, r->in.addresses, ndr_get_array_size(ndr, &r->in.addresses)); + } + _mem_save_addresses_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.addresses, 0); + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_SCALARS, &r->in.addresses[cntr_addresses_1])); + } + for (cntr_addresses_1 = 0; cntr_addresses_1 < r->in.count; cntr_addresses_1++) { + NDR_CHECK(ndr_pull_netr_DsRAddress(ndr, NDR_BUFFERS, &r->in.addresses[cntr_addresses_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_1, 0); + NDR_PULL_ALLOC(ndr, r->out.ctr); + ZERO_STRUCTP(r->out.ctr); + if (r->in.addresses) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.addresses, r->in.count)); + } + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.ctr); + } + _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ctr)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.ctr); + } + _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r) +_PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r) { - ndr_print_struct(ndr, name, "netr_DSRADDRESSTOSITENAMESEXW"); + uint32_t cntr_addresses_1; + ndr_print_struct(ndr, name, "netr_DsRAddressToSitenamesExW"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_DSRADDRESSTOSITENAMESEXW"); + ndr_print_struct(ndr, "in", "netr_DsRAddressToSitenamesExW"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "count", r->in.count); + ndr_print_ptr(ndr, "addresses", r->in.addresses); + ndr->depth++; + ndr->print(ndr, "%s: ARRAY(%d)", "addresses", r->in.count); ndr->depth++; + for (cntr_addresses_1=0;cntr_addresses_1in.count;cntr_addresses_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_addresses_1); + if (idx_1) { + ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]); + free(idx_1); + } + } + ndr->depth--; + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_DSRADDRESSTOSITENAMESEXW"); + ndr_print_struct(ndr, "out", "netr_DsRAddressToSitenamesExW"); + ndr->depth++; + ndr_print_ptr(ndr, "ctr", r->out.ctr); + ndr->depth++; + ndr_print_ptr(ndr, "ctr", *r->out.ctr); ndr->depth++; + ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr); + ndr->depth--; + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; } -static enum ndr_err_code ndr_push_netr_DSRGETDCSITECOVERAGEW(struct ndr_push *ndr, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r) +static enum ndr_err_code ndr_push_netr_DsrGetDcSiteCoverageW(struct ndr_push *ndr, int flags, const struct netr_DsrGetDcSiteCoverageW *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } if (flags & NDR_OUT) { + if (r->out.ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_DSRGETDCSITECOVERAGEW(struct ndr_pull *ndr, int flags, struct netr_DSRGETDCSITECOVERAGEW *r) +static enum ndr_err_code ndr_pull_netr_DsrGetDcSiteCoverageW(struct ndr_pull *ndr, int flags, struct netr_DsrGetDcSiteCoverageW *r) { + uint32_t _ptr_server_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_ctr_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_PULL_ALLOC(ndr, r->out.ctr); + ZERO_STRUCTP(r->out.ctr); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.ctr); + } + _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_DcSitesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_DSRGETDCSITECOVERAGEW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r) +_PUBLIC_ void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r) { - ndr_print_struct(ndr, name, "netr_DSRGETDCSITECOVERAGEW"); + ndr_print_struct(ndr, name, "netr_DsrGetDcSiteCoverageW"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_DSRGETDCSITECOVERAGEW"); + ndr_print_struct(ndr, "in", "netr_DsrGetDcSiteCoverageW"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_DSRGETDCSITECOVERAGEW"); + ndr_print_struct(ndr, "out", "netr_DsrGetDcSiteCoverageW"); + ndr->depth++; + ndr_print_ptr(ndr, "ctr", r->out.ctr); ndr->depth++; + ndr_print_DcSitesCtr(ndr, "ctr", r->out.ctr); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -12230,7 +13255,6 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags, const struct netr_DsrEnumerateDomainTrusts *r) { - uint32_t cntr_trusts_1; if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); if (r->in.server_name) { @@ -12242,23 +13266,14 @@ static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->in.trust_flags)); } if (flags & NDR_OUT) { - if (r->out.count == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count)); if (r->out.trusts == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); - for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) { - if (r->out.trusts[cntr_trusts_1] == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - } - for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) { - NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts[cntr_trusts_1])); + if (*r->out.trusts == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trusts)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -12268,11 +13283,9 @@ static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull { uint32_t _ptr_server_name; uint32_t _ptr_trusts; - uint32_t cntr_trusts_1; TALLOC_CTX *_mem_save_server_name_0; - TALLOC_CTX *_mem_save_count_0; + TALLOC_CTX *_mem_save_trusts_0; TALLOC_CTX *_mem_save_trusts_1; - TALLOC_CTX *_mem_save_trusts_2; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -12295,49 +13308,31 @@ static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); } NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->in.trust_flags)); - NDR_PULL_ALLOC(ndr, r->out.count); - ZERO_STRUCTP(r->out.count); - NDR_PULL_ALLOC_N(ndr, r->out.trusts, count); - memset(r->out.trusts, 0, count * sizeof(*r->out.trusts)); + NDR_PULL_ALLOC(ndr, r->out.trusts); + ZERO_STRUCTP(r->out.trusts); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.count); + NDR_PULL_ALLOC(ndr, r->out.trusts); } - _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_array_size(ndr, &r->out.trusts)); + _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_trusts)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC_N(ndr, r->out.trusts, ndr_get_array_size(ndr, &r->out.trusts)); + NDR_PULL_ALLOC(ndr, *r->out.trusts); } _mem_save_trusts_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, 0); - for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) { - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_trusts)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.trusts[cntr_trusts_1]); - } - } - for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) { - _mem_save_trusts_2 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts[cntr_trusts_1], LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts[cntr_trusts_1])); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_2, LIBNDR_FLAG_REF_ALLOC); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.trusts, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trusts)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); - if (r->out.trusts) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.trusts, r->out.count)); - } } return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r) { - uint32_t cntr_trusts_1; ndr_print_struct(ndr, name, "netr_DsrEnumerateDomainTrusts"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -12358,25 +13353,11 @@ _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, con if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "netr_DsrEnumerateDomainTrusts"); ndr->depth++; - ndr_print_ptr(ndr, "count", r->out.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->out.count); - ndr->depth--; ndr_print_ptr(ndr, "trusts", r->out.trusts); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "trusts", r->out.count); + ndr_print_ptr(ndr, "trusts", *r->out.trusts); ndr->depth++; - for (cntr_trusts_1=0;cntr_trusts_1out.count;cntr_trusts_1++) { - char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_trusts_1); - if (idx_1) { - ndr_print_ptr(ndr, "trusts", r->out.trusts[cntr_trusts_1]); - ndr->depth++; - ndr_print_netr_DomainTrust(ndr, "trusts", r->out.trusts[cntr_trusts_1]); - ndr->depth--; - free(idx_1); - } - } + ndr_print_netr_DomainTrustList(ndr, "trusts", *r->out.trusts); ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -12426,123 +13407,484 @@ _PUBLIC_ void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r) +static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push *ndr, int flags, const struct netr_ServerTrustPasswordsGet *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + if (r->out.return_authenticator == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + if (r->out.password == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password)); + if (r->out.password2 == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password2)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERTRUSTPASSWORDSGET *r) +static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull *ndr, int flags, struct netr_ServerTrustPasswordsGet *r) { + uint32_t _ptr_server_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_credential_0; + TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_password_0; + TALLOC_CTX *_mem_save_password2_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name)); + if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name)); + if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + ZERO_STRUCTP(r->out.return_authenticator); + NDR_PULL_ALLOC(ndr, r->out.password); + ZERO_STRUCTP(r->out.password); + NDR_PULL_ALLOC(ndr, r->out.password2); + ZERO_STRUCTP(r->out.password2); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + } + _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.password); + } + _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.password2); + } + _mem_save_password2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.password2, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password2_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r) +_PUBLIC_ void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r) { - ndr_print_struct(ndr, name, "netr_NETRSERVERTRUSTPASSWORDSGET"); + ndr_print_struct(ndr, name, "netr_ServerTrustPasswordsGet"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRSERVERTRUSTPASSWORDSGET"); + ndr_print_struct(ndr, "in", "netr_ServerTrustPasswordsGet"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_string(ndr, "account_name", r->in.account_name); + ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type); + ndr_print_string(ndr, "computer_name", r->in.computer_name); + ndr_print_ptr(ndr, "credential", r->in.credential); ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRSERVERTRUSTPASSWORDSGET"); + ndr_print_struct(ndr, "out", "netr_ServerTrustPasswordsGet"); ndr->depth++; - ndr_print_WERROR(ndr, "result", r->out.result); + ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator); + ndr->depth--; + ndr_print_ptr(ndr, "password", r->out.password); + ndr->depth++; + ndr_print_samr_Password(ndr, "password", r->out.password); + ndr->depth--; + ndr_print_ptr(ndr, "password2", r->out.password2); + ndr->depth++; + ndr_print_samr_Password(ndr, "password2", r->out.password2); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; } -static enum ndr_err_code ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_push_netr_DsRGetForestTrustInformation(struct ndr_push *ndr, int flags, const struct netr_DsRGetForestTrustInformation *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.trusted_domain_name)); + if (r->in.trusted_domain_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.trusted_domain_name, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { + if (r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_DSRGETFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_pull *ndr, int flags, struct netr_DsRGetForestTrustInformation *r) { + uint32_t _ptr_server_name; + uint32_t _ptr_trusted_domain_name; + uint32_t _ptr_forest_trust_info; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_trusted_domain_name_0; + TALLOC_CTX *_mem_save_forest_trust_info_0; + TALLOC_CTX *_mem_save_forest_trust_info_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain_name)); + if (_ptr_trusted_domain_name) { + NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name); + } else { + r->in.trusted_domain_name = NULL; + } + if (r->in.trusted_domain_name) { + _mem_save_trusted_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.trusted_domain_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.trusted_domain_name)); + if (ndr_get_array_length(ndr, &r->in.trusted_domain_name) > ndr_get_array_size(ndr, &r->in.trusted_domain_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.trusted_domain_name), ndr_get_array_length(ndr, &r->in.trusted_domain_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.trusted_domain_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.trusted_domain_name, ndr_get_array_length(ndr, &r->in.trusted_domain_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + ZERO_STRUCTP(r->out.forest_trust_info); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + } + _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r) +_PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r) { - ndr_print_struct(ndr, name, "netr_DSRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, name, "netr_DsRGetForestTrustInformation"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_DSRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "in", "netr_DsRGetForestTrustInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name); ndr->depth++; + if (r->in.trusted_domain_name) { + ndr_print_string(ndr, "trusted_domain_name", r->in.trusted_domain_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_DSRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "out", "netr_DsRGetForestTrustInformation"); ndr->depth++; + ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info); + ndr->depth++; + ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); + ndr->depth++; + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + ndr->depth--; + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_push_netr_GetForestTrustInformation(struct ndr_push *ndr, int flags, const struct netr_GetForestTrustInformation *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->in.trusted_domain_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.trusted_domain_name, ndr_charset_length(r->in.trusted_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { + if (r->out.return_authenticator == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + if (r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.forest_trust_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_NETRGETFORESTTRUSTINFORMATION *r) +static enum ndr_err_code ndr_pull_netr_GetForestTrustInformation(struct ndr_pull *ndr, int flags, struct netr_GetForestTrustInformation *r) { + uint32_t _ptr_server_name; + uint32_t _ptr_forest_trust_info; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_credential_0; + TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_forest_trust_info_0; + TALLOC_CTX *_mem_save_forest_trust_info_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.trusted_domain_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.trusted_domain_name)); + if (ndr_get_array_length(ndr, &r->in.trusted_domain_name) > ndr_get_array_size(ndr, &r->in.trusted_domain_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.trusted_domain_name), ndr_get_array_length(ndr, &r->in.trusted_domain_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.trusted_domain_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.trusted_domain_name, ndr_get_array_length(ndr, &r->in.trusted_domain_name), sizeof(uint16_t), CH_UTF16)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + ZERO_STRUCTP(r->out.return_authenticator); + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + ZERO_STRUCTP(r->out.forest_trust_info); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.return_authenticator); + } + _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.forest_trust_info); + } + _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r) +_PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r) { - ndr_print_struct(ndr, name, "netr_NETRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, name, "netr_GetForestTrustInformation"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "in", "netr_GetForestTrustInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "trusted_domain_name", r->in.trusted_domain_name); ndr->depth++; + ndr_print_string(ndr, "trusted_domain_name", r->in.trusted_domain_name); + ndr->depth--; + ndr_print_ptr(ndr, "credential", r->in.credential); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRGETFORESTTRUSTINFORMATION"); + ndr_print_struct(ndr, "out", "netr_GetForestTrustInformation"); ndr->depth++; + ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator); + ndr->depth--; + ndr_print_ptr(ndr, "forest_trust_info", r->out.forest_trust_info); + ndr->depth++; + ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); + ndr->depth++; + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + ndr->depth--; + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -13007,11 +14349,11 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_NETRENUMERATETRUSTEDDOMAINS", - sizeof(struct netr_NETRENUMERATETRUSTEDDOMAINS), - (ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS, - (ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS, + "netr_NetrEnumerateTrustedDomains", + sizeof(struct netr_NetrEnumerateTrustedDomains), + (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomains, + (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomains, + (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomains, false, }, { @@ -13103,11 +14445,11 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_NETRSERVERPASSWORDGET", - sizeof(struct netr_NETRSERVERPASSWORDGET), - (ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERPASSWORDGET, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERPASSWORDGET, - (ndr_print_function_t) ndr_print_netr_NETRSERVERPASSWORDGET, + "netr_ServerPasswordGet", + sizeof(struct netr_ServerPasswordGet), + (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordGet, + (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordGet, + (ndr_print_function_t) ndr_print_netr_ServerPasswordGet, false, }, { @@ -13119,11 +14461,11 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_DSRADDRESSTOSITENAMESW", - sizeof(struct netr_DSRADDRESSTOSITENAMESW), - (ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESW, - (ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESW, - (ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESW, + "netr_DsRAddressToSitenamesW", + sizeof(struct netr_DsRAddressToSitenamesW), + (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesW, + (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesW, + (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesW, false, }, { @@ -13143,27 +14485,27 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_NETRENUMERATETRUSTEDDOMAINSEX", - sizeof(struct netr_NETRENUMERATETRUSTEDDOMAINSEX), - (ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX, - (ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX, + "netr_NetrEnumerateTrustedDomainsEx", + sizeof(struct netr_NetrEnumerateTrustedDomainsEx), + (ndr_push_flags_fn_t) ndr_push_netr_NetrEnumerateTrustedDomainsEx, + (ndr_pull_flags_fn_t) ndr_pull_netr_NetrEnumerateTrustedDomainsEx, + (ndr_print_function_t) ndr_print_netr_NetrEnumerateTrustedDomainsEx, false, }, { - "netr_DSRADDRESSTOSITENAMESEXW", - sizeof(struct netr_DSRADDRESSTOSITENAMESEXW), - (ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESEXW, - (ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESEXW, - (ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESEXW, + "netr_DsRAddressToSitenamesExW", + sizeof(struct netr_DsRAddressToSitenamesExW), + (ndr_push_flags_fn_t) ndr_push_netr_DsRAddressToSitenamesExW, + (ndr_pull_flags_fn_t) ndr_pull_netr_DsRAddressToSitenamesExW, + (ndr_print_function_t) ndr_print_netr_DsRAddressToSitenamesExW, false, }, { - "netr_DSRGETDCSITECOVERAGEW", - sizeof(struct netr_DSRGETDCSITECOVERAGEW), - (ndr_push_flags_fn_t) ndr_push_netr_DSRGETDCSITECOVERAGEW, - (ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETDCSITECOVERAGEW, - (ndr_print_function_t) ndr_print_netr_DSRGETDCSITECOVERAGEW, + "netr_DsrGetDcSiteCoverageW", + sizeof(struct netr_DsrGetDcSiteCoverageW), + (ndr_push_flags_fn_t) ndr_push_netr_DsrGetDcSiteCoverageW, + (ndr_pull_flags_fn_t) ndr_pull_netr_DsrGetDcSiteCoverageW, + (ndr_print_function_t) ndr_print_netr_DsrGetDcSiteCoverageW, false, }, { @@ -13191,27 +14533,27 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_NETRSERVERTRUSTPASSWORDSGET", - sizeof(struct netr_NETRSERVERTRUSTPASSWORDSGET), - (ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET, - (ndr_print_function_t) ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET, + "netr_ServerTrustPasswordsGet", + sizeof(struct netr_ServerTrustPasswordsGet), + (ndr_push_flags_fn_t) ndr_push_netr_ServerTrustPasswordsGet, + (ndr_pull_flags_fn_t) ndr_pull_netr_ServerTrustPasswordsGet, + (ndr_print_function_t) ndr_print_netr_ServerTrustPasswordsGet, false, }, { - "netr_DSRGETFORESTTRUSTINFORMATION", - sizeof(struct netr_DSRGETFORESTTRUSTINFORMATION), - (ndr_push_flags_fn_t) ndr_push_netr_DSRGETFORESTTRUSTINFORMATION, - (ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION, - (ndr_print_function_t) ndr_print_netr_DSRGETFORESTTRUSTINFORMATION, + "netr_DsRGetForestTrustInformation", + sizeof(struct netr_DsRGetForestTrustInformation), + (ndr_push_flags_fn_t) ndr_push_netr_DsRGetForestTrustInformation, + (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetForestTrustInformation, + (ndr_print_function_t) ndr_print_netr_DsRGetForestTrustInformation, false, }, { - "netr_NETRGETFORESTTRUSTINFORMATION", - sizeof(struct netr_NETRGETFORESTTRUSTINFORMATION), - (ndr_push_flags_fn_t) ndr_push_netr_NETRGETFORESTTRUSTINFORMATION, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION, - (ndr_print_function_t) ndr_print_netr_NETRGETFORESTTRUSTINFORMATION, + "netr_GetForestTrustInformation", + sizeof(struct netr_GetForestTrustInformation), + (ndr_push_flags_fn_t) ndr_push_netr_GetForestTrustInformation, + (ndr_pull_flags_fn_t) ndr_pull_netr_GetForestTrustInformation, + (ndr_print_function_t) ndr_print_netr_GetForestTrustInformation, false, }, { diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index 07c96f8c89..c2fd0655d8 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -73,7 +73,7 @@ extern const struct ndr_interface_table ndr_table_netlogon; #define NDR_NETR_SERVERPASSWORDSET2 (0x1e) -#define NDR_NETR_NETRSERVERPASSWORDGET (0x1f) +#define NDR_NETR_SERVERPASSWORDGET (0x1f) #define NDR_NETR_NETRLOGONSENDTOSAM (0x20) @@ -95,11 +95,11 @@ extern const struct ndr_interface_table ndr_table_netlogon; #define NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS (0x29) -#define NDR_NETR_NETRSERVERTRUSTPASSWORDSGET (0x2a) +#define NDR_NETR_SERVERTRUSTPASSWORDSGET (0x2a) #define NDR_NETR_DSRGETFORESTTRUSTINFORMATION (0x2b) -#define NDR_NETR_NETRGETFORESTTRUSTINFORMATION (0x2c) +#define NDR_NETR_GETFORESTTRUSTINFORMATION (0x2c) #define NDR_NETR_LOGONSAMLOGONWITHFLAGS (0x2d) @@ -183,8 +183,11 @@ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, con void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r); void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r); void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r); -void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r); void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r); +void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r); +void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r); void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r); void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r); void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r); @@ -192,10 +195,15 @@ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, con void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r); void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r); void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r); +void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r); +void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r); void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r); void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r); +void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustList *r); +void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesExWCtr *r); +void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, const struct DcSitesCtr *r); void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r); void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r); void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r); @@ -215,7 +223,7 @@ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r); void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r); void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r); -void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r); +void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r); void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r); void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r); void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r); @@ -227,20 +235,20 @@ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r); void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r); void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r); -void ndr_print_netr_NETRSERVERPASSWORDGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERPASSWORDGET *r); +void ndr_print_netr_ServerPasswordGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordGet *r); void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r); -void ndr_print_netr_DSRADDRESSTOSITENAMESW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r); +void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesW *r); void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r); void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r); -void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r); -void ndr_print_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r); -void ndr_print_netr_DSRGETDCSITECOVERAGEW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r); +void ndr_print_netr_NetrEnumerateTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomainsEx *r); +void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRAddressToSitenamesExW *r); +void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r); void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r); void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r); void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r); -void ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r); -void ndr_print_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r); -void ndr_print_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r); +void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r); +void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r); +void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r); void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r); void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r); #endif /* _HEADER_NDR_netlogon */ diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 4b97470b6a..2ced17405d 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -14,6 +14,7 @@ #define NETLOGON_NEG_ARCFOUR ( 0x00000004 ) #define NETLOGON_NEG_128BIT ( 0x00004000 ) #define NETLOGON_NEG_SCHANNEL ( 0x40000000 ) +#define DS_GFTI_UPDATE_TDO ( 0x1 ) ; struct netr_UasInfo { @@ -227,7 +228,7 @@ struct netr_PasswordHistory { struct netr_USER_KEYS2 { struct netr_USER_KEY16 lmpassword; struct netr_USER_KEY16 ntpassword; - struct netr_PasswordHistory lmhistory; + struct netr_PasswordHistory history; }; struct netr_USER_KEY_UNION { @@ -624,10 +625,66 @@ union netr_CONTROL_DATA_INFORMATION { uint32_t debug_level;/* [case(NETLOGON_CONTROL_SET_DBFLAG)] */ }; +struct netr_Blob { + uint32_t length; + uint8_t *data;/* [unique,size_is(length)] */ +}; + +/* bitmap netr_DsRGetDCName_flags */ +#define DS_FORCE_REDISCOVERY ( 0x00000001 ) +#define DS_DIRECTORY_SERVICE_REQUIRED ( 0x00000010 ) +#define DS_DIRECTORY_SERVICE_PREFERRED ( 0x00000020 ) +#define DS_GC_SERVER_REQUIRED ( 0x00000040 ) +#define DS_PDC_REQUIRED ( 0x00000080 ) +#define DS_BACKGROUND_ONLY ( 0x00000100 ) +#define DS_IP_REQUIRED ( 0x00000200 ) +#define DS_KDC_REQUIRED ( 0x00000400 ) +#define DS_TIMESERV_REQUIRED ( 0x00000800 ) +#define DS_WRITABLE_REQUIRED ( 0x00001000 ) +#define DS_GOOD_TIMESERV_PREFERRED ( 0x00002000 ) +#define DS_AVOID_SELF ( 0x00004000 ) +#define DS_ONLY_LDAP_NEEDED ( 0x00008000 ) +#define DS_IS_FLAT_NAME ( 0x00010000 ) +#define DS_IS_DNS_NAME ( 0x00020000 ) +#define DS_RETURN_DNS_NAME ( 0x40000000 ) +#define DS_RETURN_FLAT_NAME ( 0x80000000 ) + +; + +enum netr_DsRGetDCNameInfo_AddressType +#ifndef USE_UINT_ENUMS + { + DS_ADDRESS_TYPE_INET=1, + DS_ADDRESS_TYPE_NETBIOS=2 +} +#else + { __donnot_use_enum_netr_DsRGetDCNameInfo_AddressType=0x7FFFFFFF} +#define DS_ADDRESS_TYPE_INET ( 1 ) +#define DS_ADDRESS_TYPE_NETBIOS ( 2 ) +#endif +; + +/* bitmap netr_DsR_DcFlags */ +#define DS_SERVER_PDC ( 0x00000001 ) +#define DS_SERVER_GC ( 0x00000004 ) +#define DS_SERVER_LDAP ( 0x00000008 ) +#define DS_SERVER_DS ( 0x00000010 ) +#define DS_SERVER_KDC ( 0x00000020 ) +#define DS_SERVER_TIMESERV ( 0x00000040 ) +#define DS_SERVER_CLOSEST ( 0x00000080 ) +#define DS_SERVER_WRITABLE ( 0x00000100 ) +#define DS_SERVER_GOOD_TIMESERV ( 0x00000200 ) +#define DS_SERVER_NDNC ( 0x00000400 ) +#define DS_DNS_CONTROLLER ( 0x20000000 ) +#define DS_DNS_DOMAIN ( 0x40000000 ) +#define DS_DNS_FOREST ( 0x80000000 ) + +; + struct netr_DsRGetDCNameInfo { const char *dc_unc;/* [unique,charset(UTF16)] */ const char *dc_address;/* [unique,charset(UTF16)] */ - int32_t dc_address_type; + enum netr_DsRGetDCNameInfo_AddressType dc_address_type; struct GUID domain_guid; const char *domain_name;/* [unique,charset(UTF16)] */ const char *forest_name;/* [unique,charset(UTF16)] */ @@ -636,11 +693,6 @@ struct netr_DsRGetDCNameInfo { const char *client_site_name;/* [unique,charset(UTF16)] */ }; -struct netr_Blob { - uint32_t length; - uint8_t *data;/* [unique,size_is(length)] */ -}; - struct netr_BinaryString { uint16_t length; uint16_t size; @@ -692,6 +744,16 @@ struct netr_CryptPassword { uint32_t length; }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; +struct netr_DsRAddressToSitenamesWCtr { + uint32_t count; + struct lsa_String *sitename;/* [unique,size_is(count)] */ +}; + +struct netr_DsRAddress { + uint8_t *buffer;/* [unique,size_is(size)] */ + uint32_t size; +}; + /* bitmap netr_TrustFlags */ #define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 ) #define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 ) @@ -741,6 +803,22 @@ struct netr_DomainTrust { struct GUID guid; }; +struct netr_DomainTrustList { + uint32_t count; + struct netr_DomainTrust *array;/* [unique,size_is(count)] */ +}; + +struct netr_DsRAddressToSitenamesExWCtr { + uint32_t count; + struct lsa_String *sitename;/* [unique,size_is(count)] */ + struct lsa_String *subnetname;/* [unique,size_is(count)] */ +}; + +struct DcSitesCtr { + uint32_t num_sites; + struct lsa_String *sites;/* [unique,size_is(num_sites)] */ +}; + struct netr_LogonUasLogon { struct { @@ -750,7 +828,7 @@ struct netr_LogonUasLogon { } in; struct { - struct netr_UasInfo *info;/* [unique] */ + struct netr_UasInfo *info;/* [ref] */ WERROR result; } out; @@ -873,7 +951,7 @@ struct netr_DatabaseDeltas { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique] */ + struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ uint64_t *sequence_num;/* [ref] */ NTSTATUS result; @@ -894,7 +972,7 @@ struct netr_DatabaseSync { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique] */ + struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ uint32_t *sync_context;/* [ref] */ NTSTATUS result; @@ -1043,7 +1121,7 @@ struct netr_DatabaseSync2 { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique] */ + struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ uint32_t *sync_context;/* [ref] */ NTSTATUS result; @@ -1063,7 +1141,7 @@ struct netr_DatabaseRedo { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique] */ + struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ NTSTATUS result; } out; @@ -1087,8 +1165,13 @@ struct netr_LogonControl2Ex { }; -struct netr_NETRENUMERATETRUSTEDDOMAINS { +struct netr_NetrEnumerateTrustedDomains { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + } in; + + struct { + struct netr_Blob *trusted_domains_blob;/* [ref] */ WERROR result; } out; @@ -1105,7 +1188,7 @@ struct netr_DsRGetDCName { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [unique] */ + struct netr_DsRGetDCNameInfo *info;/* [ref] */ WERROR result; } out; @@ -1182,7 +1265,7 @@ struct netr_DsRGetDCNameEx { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [unique] */ + struct netr_DsRGetDCNameInfo *info;/* [ref] */ WERROR result; } out; @@ -1239,8 +1322,18 @@ struct netr_ServerPasswordSet2 { }; -struct netr_NETRSERVERPASSWORDGET { +struct netr_ServerPasswordGet { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + const char *account_name;/* [charset(UTF16)] */ + enum netr_SchannelType secure_channel_type; + const char *computer_name;/* [charset(UTF16)] */ + struct netr_Authenticator *credential;/* [ref] */ + } in; + + struct { + struct netr_Authenticator *return_authenticator;/* [ref] */ + struct samr_Password *password;/* [ref] */ WERROR result; } out; @@ -1255,8 +1348,15 @@ struct netr_NETRLOGONSENDTOSAM { }; -struct netr_DSRADDRESSTOSITENAMESW { +struct netr_DsRAddressToSitenamesW { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + uint32_t count;/* [range(0 32000)] */ + struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */ + } in; + + struct { + struct netr_DsRAddressToSitenamesWCtr **ctr;/* [ref] */ WERROR result; } out; @@ -1275,7 +1375,7 @@ struct netr_DsRGetDCNameEx2 { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [unique] */ + struct netr_DsRGetDCNameInfo *info;/* [ref] */ WERROR result; } out; @@ -1290,24 +1390,41 @@ struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN { }; -struct netr_NETRENUMERATETRUSTEDDOMAINSEX { +struct netr_NetrEnumerateTrustedDomainsEx { + struct { + const char *server_name;/* [unique,charset(UTF16)] */ + } in; + struct { + struct netr_DomainTrustList *dom_trust_list;/* [ref] */ WERROR result; } out; }; -struct netr_DSRADDRESSTOSITENAMESEXW { +struct netr_DsRAddressToSitenamesExW { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + uint32_t count;/* [range(0 32000)] */ + struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */ + } in; + + struct { + struct netr_DsRAddressToSitenamesExWCtr **ctr;/* [ref] */ WERROR result; } out; }; -struct netr_DSRGETDCSITECOVERAGEW { +struct netr_DsrGetDcSiteCoverageW { + struct { + const char *server_name;/* [unique,charset(UTF16)] */ + } in; + struct { + struct DcSitesCtr *ctr;/* [ref] */ WERROR result; } out; @@ -1341,8 +1458,7 @@ struct netr_DsrEnumerateDomainTrusts { } in; struct { - uint32_t *count;/* [ref] */ - struct netr_DomainTrust **trusts;/* [ref,size_is(count)] */ + struct netr_DomainTrustList **trusts;/* [ref] */ WERROR result; } out; @@ -1357,24 +1473,51 @@ struct netr_DSRDEREGISTERDNSHOSTRECORDS { }; -struct netr_NETRSERVERTRUSTPASSWORDSGET { +struct netr_ServerTrustPasswordsGet { struct { - WERROR result; + const char *server_name;/* [unique,charset(UTF16)] */ + const char *account_name;/* [charset(UTF16)] */ + enum netr_SchannelType secure_channel_type; + const char *computer_name;/* [charset(UTF16)] */ + struct netr_Authenticator *credential;/* [ref] */ + } in; + + struct { + struct netr_Authenticator *return_authenticator;/* [ref] */ + struct samr_Password *password;/* [ref] */ + struct samr_Password *password2;/* [ref] */ + NTSTATUS result; } out; }; -struct netr_DSRGETFORESTTRUSTINFORMATION { +struct netr_DsRGetForestTrustInformation { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + const char *trusted_domain_name;/* [unique,charset(UTF16)] */ + uint32_t flags; + } in; + + struct { + struct lsa_ForestTrustInformation **forest_trust_info;/* [ref] */ WERROR result; } out; }; -struct netr_NETRGETFORESTTRUSTINFORMATION { +struct netr_GetForestTrustInformation { + struct { + const char *server_name;/* [unique,charset(UTF16)] */ + const char *trusted_domain_name;/* [ref,charset(UTF16)] */ + struct netr_Authenticator *credential;/* [ref] */ + uint32_t flags; + } in; + struct { + struct netr_Authenticator *return_authenticator;/* [ref] */ + struct lsa_ForestTrustInformation **forest_trust_info;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 163de46ca8..421014e829 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -1560,18 +1560,18 @@ static bool api_netr_LogonControl2Ex(pipes_struct *p) return true; } -static bool api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p) +static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRENUMERATETRUSTEDDOMAINS *r; + struct netr_NetrEnumerateTrustedDomains *r; call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINS]; - r = talloc(NULL, struct netr_NETRENUMERATETRUSTEDDOMAINS); + r = talloc(NULL, struct netr_NetrEnumerateTrustedDomains); if (r == NULL) { return false; } @@ -1595,10 +1595,17 @@ static bool api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, r); + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, r); } - r->out.result = _netr_NETRENUMERATETRUSTEDDOMAINS(p, r); + ZERO_STRUCT(r->out); + r->out.trusted_domains_blob = talloc_zero(r, struct netr_Blob); + if (r->out.trusted_domains_blob == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_NetrEnumerateTrustedDomains(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1607,7 +1614,7 @@ static bool api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, r); + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, r); } push = ndr_push_init_ctx(r); @@ -2481,18 +2488,18 @@ static bool api_netr_ServerPasswordSet2(pipes_struct *p) return true; } -static bool api_netr_NETRSERVERPASSWORDGET(pipes_struct *p) +static bool api_netr_ServerPasswordGet(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRSERVERPASSWORDGET *r; + struct netr_ServerPasswordGet *r; - call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERPASSWORDGET]; + call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDGET]; - r = talloc(NULL, struct netr_NETRSERVERPASSWORDGET); + r = talloc(NULL, struct netr_ServerPasswordGet); if (r == NULL) { return false; } @@ -2516,10 +2523,23 @@ static bool api_netr_NETRSERVERPASSWORDGET(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRSERVERPASSWORDGET, r); + NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, r); + } + + ZERO_STRUCT(r->out); + r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator); + if (r->out.return_authenticator == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_NETRSERVERPASSWORDGET(p, r); + r->out.password = talloc_zero(r, struct samr_Password); + if (r->out.password == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_ServerPasswordGet(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2528,7 +2548,7 @@ static bool api_netr_NETRSERVERPASSWORDGET(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRSERVERPASSWORDGET, r); + NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, r); } push = ndr_push_init_ctx(r); @@ -2627,18 +2647,18 @@ static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p) return true; } -static bool api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p) +static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_DSRADDRESSTOSITENAMESW *r; + struct netr_DsRAddressToSitenamesW *r; call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESW]; - r = talloc(NULL, struct netr_DSRADDRESSTOSITENAMESW); + r = talloc(NULL, struct netr_DsRAddressToSitenamesW); if (r == NULL) { return false; } @@ -2662,10 +2682,17 @@ static bool api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESW, r); + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, r); + } + + ZERO_STRUCT(r->out); + r->out.ctr = talloc_zero(r, struct netr_DsRAddressToSitenamesWCtr *); + if (r->out.ctr == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_DSRADDRESSTOSITENAMESW(p, r); + r->out.result = _netr_DsRAddressToSitenamesW(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2674,7 +2701,7 @@ static bool api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESW, r); + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, r); } push = ndr_push_init_ctx(r); @@ -2853,18 +2880,18 @@ static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p) return true; } -static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p) +static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r; + struct netr_NetrEnumerateTrustedDomainsEx *r; call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX]; - r = talloc(NULL, struct netr_NETRENUMERATETRUSTEDDOMAINSEX); + r = talloc(NULL, struct netr_NetrEnumerateTrustedDomainsEx); if (r == NULL) { return false; } @@ -2888,10 +2915,17 @@ static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, r); + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r); } - r->out.result = _netr_NETRENUMERATETRUSTEDDOMAINSEX(p, r); + ZERO_STRUCT(r->out); + r->out.dom_trust_list = talloc_zero(r, struct netr_DomainTrustList); + if (r->out.dom_trust_list == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_NetrEnumerateTrustedDomainsEx(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2900,7 +2934,7 @@ static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, r); + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r); } push = ndr_push_init_ctx(r); @@ -2926,18 +2960,18 @@ static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p) return true; } -static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p) +static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_DSRADDRESSTOSITENAMESEXW *r; + struct netr_DsRAddressToSitenamesExW *r; call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESEXW]; - r = talloc(NULL, struct netr_DSRADDRESSTOSITENAMESEXW); + r = talloc(NULL, struct netr_DsRAddressToSitenamesExW); if (r == NULL) { return false; } @@ -2961,10 +2995,17 @@ static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, r); + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, r); + } + + ZERO_STRUCT(r->out); + r->out.ctr = talloc_zero(r, struct netr_DsRAddressToSitenamesExWCtr *); + if (r->out.ctr == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_DSRADDRESSTOSITENAMESEXW(p, r); + r->out.result = _netr_DsRAddressToSitenamesExW(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2973,7 +3014,7 @@ static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, r); + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, r); } push = ndr_push_init_ctx(r); @@ -2999,18 +3040,18 @@ static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p) return true; } -static bool api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p) +static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_DSRGETDCSITECOVERAGEW *r; + struct netr_DsrGetDcSiteCoverageW *r; call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCSITECOVERAGEW]; - r = talloc(NULL, struct netr_DSRGETDCSITECOVERAGEW); + r = talloc(NULL, struct netr_DsrGetDcSiteCoverageW); if (r == NULL) { return false; } @@ -3034,10 +3075,17 @@ static bool api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRGETDCSITECOVERAGEW, r); + NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, r); + } + + ZERO_STRUCT(r->out); + r->out.ctr = talloc_zero(r, struct DcSitesCtr); + if (r->out.ctr == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_DSRGETDCSITECOVERAGEW(p, r); + r->out.result = _netr_DsrGetDcSiteCoverageW(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3046,7 +3094,7 @@ static bool api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRGETDCSITECOVERAGEW, r); + NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, r); } push = ndr_push_init_ctx(r); @@ -3198,13 +3246,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.count = talloc_zero(r, uint32_t); - if (r->out.count == NULL) { - talloc_free(r); - return false; - } - - r->out.trusts = talloc_zero_array(r, struct netr_DomainTrust *, r->out.count); + r->out.trusts = talloc_zero(r, struct netr_DomainTrustList *); if (r->out.trusts == NULL) { talloc_free(r); return false; @@ -3318,18 +3360,18 @@ static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p) return true; } -static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p) +static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRSERVERTRUSTPASSWORDSGET *r; + struct netr_ServerTrustPasswordsGet *r; - call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERTRUSTPASSWORDSGET]; + call = &ndr_table_netlogon.calls[NDR_NETR_SERVERTRUSTPASSWORDSGET]; - r = talloc(NULL, struct netr_NETRSERVERTRUSTPASSWORDSGET); + r = talloc(NULL, struct netr_ServerTrustPasswordsGet); if (r == NULL) { return false; } @@ -3353,10 +3395,29 @@ static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, r); + NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, r); + } + + ZERO_STRUCT(r->out); + r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator); + if (r->out.return_authenticator == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_NETRSERVERTRUSTPASSWORDSGET(p, r); + r->out.password = talloc_zero(r, struct samr_Password); + if (r->out.password == NULL) { + talloc_free(r); + return false; + } + + r->out.password2 = talloc_zero(r, struct samr_Password); + if (r->out.password2 == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_ServerTrustPasswordsGet(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3365,7 +3426,7 @@ static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, r); + NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, r); } push = ndr_push_init_ctx(r); @@ -3391,18 +3452,18 @@ static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p) return true; } -static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p) +static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_DSRGETFORESTTRUSTINFORMATION *r; + struct netr_DsRGetForestTrustInformation *r; call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct netr_DSRGETFORESTTRUSTINFORMATION); + r = talloc(NULL, struct netr_DsRGetForestTrustInformation); if (r == NULL) { return false; } @@ -3426,10 +3487,17 @@ static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, r); + NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, r); } - r->out.result = _netr_DSRGETFORESTTRUSTINFORMATION(p, r); + ZERO_STRUCT(r->out); + r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *); + if (r->out.forest_trust_info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_DsRGetForestTrustInformation(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3438,7 +3506,7 @@ static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, r); + NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, r); } push = ndr_push_init_ctx(r); @@ -3464,18 +3532,18 @@ static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p) return true; } -static bool api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p) +static bool api_netr_GetForestTrustInformation(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRGETFORESTTRUSTINFORMATION *r; + struct netr_GetForestTrustInformation *r; - call = &ndr_table_netlogon.calls[NDR_NETR_NETRGETFORESTTRUSTINFORMATION]; + call = &ndr_table_netlogon.calls[NDR_NETR_GETFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct netr_NETRGETFORESTTRUSTINFORMATION); + r = talloc(NULL, struct netr_GetForestTrustInformation); if (r == NULL) { return false; } @@ -3499,10 +3567,23 @@ static bool api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, r); + NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, r); + } + + ZERO_STRUCT(r->out); + r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator); + if (r->out.return_authenticator == NULL) { + talloc_free(r); + return false; + } + + r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *); + if (r->out.forest_trust_info == NULL) { + talloc_free(r); + return false; } - r->out.result = _netr_NETRGETFORESTTRUSTINFORMATION(p, r); + r->out.result = _netr_GetForestTrustInformation(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3511,7 +3592,7 @@ static bool api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, r); + NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, r); } push = ndr_push_init_ctx(r); @@ -3721,7 +3802,7 @@ static struct api_struct api_netlogon_cmds[] = {"NETR_DATABASESYNC2", NDR_NETR_DATABASESYNC2, api_netr_DatabaseSync2}, {"NETR_DATABASEREDO", NDR_NETR_DATABASEREDO, api_netr_DatabaseRedo}, {"NETR_LOGONCONTROL2EX", NDR_NETR_LOGONCONTROL2EX, api_netr_LogonControl2Ex}, - {"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NETRENUMERATETRUSTEDDOMAINS}, + {"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NetrEnumerateTrustedDomains}, {"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME, api_netr_DsRGetDCName}, {"NETR_NETRLOGONDUMMYROUTINE1", NDR_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1}, {"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS}, @@ -3733,20 +3814,20 @@ static struct api_struct api_netlogon_cmds[] = {"NETR_DSRGETSITENAME", NDR_NETR_DSRGETSITENAME, api_netr_DsRGetSiteName}, {"NETR_LOGONGETDOMAININFO", NDR_NETR_LOGONGETDOMAININFO, api_netr_LogonGetDomainInfo}, {"NETR_SERVERPASSWORDSET2", NDR_NETR_SERVERPASSWORDSET2, api_netr_ServerPasswordSet2}, - {"NETR_NETRSERVERPASSWORDGET", NDR_NETR_NETRSERVERPASSWORDGET, api_netr_NETRSERVERPASSWORDGET}, + {"NETR_SERVERPASSWORDGET", NDR_NETR_SERVERPASSWORDGET, api_netr_ServerPasswordGet}, {"NETR_NETRLOGONSENDTOSAM", NDR_NETR_NETRLOGONSENDTOSAM, api_netr_NETRLOGONSENDTOSAM}, - {"NETR_DSRADDRESSTOSITENAMESW", NDR_NETR_DSRADDRESSTOSITENAMESW, api_netr_DSRADDRESSTOSITENAMESW}, + {"NETR_DSRADDRESSTOSITENAMESW", NDR_NETR_DSRADDRESSTOSITENAMESW, api_netr_DsRAddressToSitenamesW}, {"NETR_DSRGETDCNAMEEX2", NDR_NETR_DSRGETDCNAMEEX2, api_netr_DsRGetDCNameEx2}, {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN}, - {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, api_netr_NETRENUMERATETRUSTEDDOMAINSEX}, - {"NETR_DSRADDRESSTOSITENAMESEXW", NDR_NETR_DSRADDRESSTOSITENAMESEXW, api_netr_DSRADDRESSTOSITENAMESEXW}, - {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW, api_netr_DSRGETDCSITECOVERAGEW}, + {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, api_netr_NetrEnumerateTrustedDomainsEx}, + {"NETR_DSRADDRESSTOSITENAMESEXW", NDR_NETR_DSRADDRESSTOSITENAMESEXW, api_netr_DsRAddressToSitenamesExW}, + {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW, api_netr_DsrGetDcSiteCoverageW}, {"NETR_LOGONSAMLOGONEX", NDR_NETR_LOGONSAMLOGONEX, api_netr_LogonSamLogonEx}, {"NETR_DSRENUMERATEDOMAINTRUSTS", NDR_NETR_DSRENUMERATEDOMAINTRUSTS, api_netr_DsrEnumerateDomainTrusts}, {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DSRDEREGISTERDNSHOSTRECORDS}, - {"NETR_NETRSERVERTRUSTPASSWORDSGET", NDR_NETR_NETRSERVERTRUSTPASSWORDSGET, api_netr_NETRSERVERTRUSTPASSWORDSGET}, - {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DSRGETFORESTTRUSTINFORMATION}, - {"NETR_NETRGETFORESTTRUSTINFORMATION", NDR_NETR_NETRGETFORESTTRUSTINFORMATION, api_netr_NETRGETFORESTTRUSTINFORMATION}, + {"NETR_SERVERTRUSTPASSWORDSGET", NDR_NETR_SERVERTRUSTPASSWORDSGET, api_netr_ServerTrustPasswordsGet}, + {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DsRGetForestTrustInformation}, + {"NETR_GETFORESTTRUSTINFORMATION", NDR_NETR_GETFORESTTRUSTINFORMATION, api_netr_GetForestTrustInformation}, {"NETR_LOGONSAMLOGONWITHFLAGS", NDR_NETR_LOGONSAMLOGONWITHFLAGS, api_netr_LogonSamLogonWithFlags}, {"NETR_NETRSERVERGETTRUSTINFO", NDR_NETR_NETRSERVERGETTRUSTINFO, api_netr_NETRSERVERGETTRUSTINFO}, }; diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h index 8350f437cd..dc91cf5c0c 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.h +++ b/source3/librpc/gen_ndr/srv_netlogon.h @@ -20,7 +20,7 @@ NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p, struct netr_ServerAuthentica NTSTATUS _netr_DatabaseSync2(pipes_struct *p, struct netr_DatabaseSync2 *r); NTSTATUS _netr_DatabaseRedo(pipes_struct *p, struct netr_DatabaseRedo *r); WERROR _netr_LogonControl2Ex(pipes_struct *p, struct netr_LogonControl2Ex *r); -WERROR _netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p, struct netr_NETRENUMERATETRUSTEDDOMAINS *r); +WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p, struct netr_NetrEnumerateTrustedDomains *r); WERROR _netr_DsRGetDCName(pipes_struct *p, struct netr_DsRGetDCName *r); WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p, struct netr_NETRLOGONDUMMYROUTINE1 *r); WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p, struct netr_NETRLOGONSETSERVICEBITS *r); @@ -32,20 +32,20 @@ WERROR _netr_DsRGetDCNameEx(pipes_struct *p, struct netr_DsRGetDCNameEx *r); WERROR _netr_DsRGetSiteName(pipes_struct *p, struct netr_DsRGetSiteName *r); NTSTATUS _netr_LogonGetDomainInfo(pipes_struct *p, struct netr_LogonGetDomainInfo *r); NTSTATUS _netr_ServerPasswordSet2(pipes_struct *p, struct netr_ServerPasswordSet2 *r); -WERROR _netr_NETRSERVERPASSWORDGET(pipes_struct *p, struct netr_NETRSERVERPASSWORDGET *r); +WERROR _netr_ServerPasswordGet(pipes_struct *p, struct netr_ServerPasswordGet *r); WERROR _netr_NETRLOGONSENDTOSAM(pipes_struct *p, struct netr_NETRLOGONSENDTOSAM *r); -WERROR _netr_DSRADDRESSTOSITENAMESW(pipes_struct *p, struct netr_DSRADDRESSTOSITENAMESW *r); +WERROR _netr_DsRAddressToSitenamesW(pipes_struct *p, struct netr_DsRAddressToSitenamesW *r); WERROR _netr_DsRGetDCNameEx2(pipes_struct *p, struct netr_DsRGetDCNameEx2 *r); WERROR _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r); -WERROR _netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p, struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r); -WERROR _netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p, struct netr_DSRADDRESSTOSITENAMESEXW *r); -WERROR _netr_DSRGETDCSITECOVERAGEW(pipes_struct *p, struct netr_DSRGETDCSITECOVERAGEW *r); +WERROR _netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p, struct netr_NetrEnumerateTrustedDomainsEx *r); +WERROR _netr_DsRAddressToSitenamesExW(pipes_struct *p, struct netr_DsRAddressToSitenamesExW *r); +WERROR _netr_DsrGetDcSiteCoverageW(pipes_struct *p, struct netr_DsrGetDcSiteCoverageW *r); NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p, struct netr_LogonSamLogonEx *r); WERROR _netr_DsrEnumerateDomainTrusts(pipes_struct *p, struct netr_DsrEnumerateDomainTrusts *r); WERROR _netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r); -WERROR _netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p, struct netr_NETRSERVERTRUSTPASSWORDSGET *r); -WERROR _netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p, struct netr_DSRGETFORESTTRUSTINFORMATION *r); -WERROR _netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p, struct netr_NETRGETFORESTTRUSTINFORMATION *r); +NTSTATUS _netr_ServerTrustPasswordsGet(pipes_struct *p, struct netr_ServerTrustPasswordsGet *r); +WERROR _netr_DsRGetForestTrustInformation(pipes_struct *p, struct netr_DsRGetForestTrustInformation *r); +WERROR _netr_GetForestTrustInformation(pipes_struct *p, struct netr_GetForestTrustInformation *r); NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p, struct netr_LogonSamLogonWithFlags *r); WERROR _netr_NETRSERVERGETTRUSTINFO(pipes_struct *p, struct netr_NETRSERVERGETTRUSTINFO *r); void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns); -- cgit From 101f275b988185ed3e47bc8061483a781c4d47c9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jan 2008 10:11:28 +0100 Subject: Use pidl generated data from misc.idl. Guenther (This used to be commit 5d8e5cbc3b3ddd1c5788d66f252e4801739243bb) --- source3/librpc/gen_ndr/misc.h | 73 +++++++++++++++ source3/librpc/gen_ndr/ndr_misc.c | 185 ++++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_misc.h | 30 ++++++- 3 files changed, 287 insertions(+), 1 deletion(-) create mode 100644 source3/librpc/gen_ndr/misc.h create mode 100644 source3/librpc/gen_ndr/ndr_misc.c (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/misc.h b/source3/librpc/gen_ndr/misc.h new file mode 100644 index 0000000000..4fa7415db7 --- /dev/null +++ b/source3/librpc/gen_ndr/misc.h @@ -0,0 +1,73 @@ +/* header auto-generated by pidl */ + +#include + +#ifndef _HEADER_misc +#define _HEADER_misc + +struct GUID { + uint32_t time_low; + uint16_t time_mid; + uint16_t time_hi_and_version; + uint8_t clock_seq[2]; + uint8_t node[6]; +}/* [noprint,gensize,public,noejs] */; + +struct ndr_syntax_id { + struct GUID uuid; + uint32_t if_version; +}/* [public] */; + +struct policy_handle { + uint32_t handle_type; + struct GUID uuid; +}/* [public] */; + +enum netr_SchannelType +#ifndef USE_UINT_ENUMS + { + SEC_CHAN_WKSTA=2, + SEC_CHAN_DOMAIN=4, + SEC_CHAN_BDC=6 +} +#else + { __donnot_use_enum_netr_SchannelType=0x7FFFFFFF} +#define SEC_CHAN_WKSTA ( 2 ) +#define SEC_CHAN_DOMAIN ( 4 ) +#define SEC_CHAN_BDC ( 6 ) +#endif +; + +enum netr_SamDatabaseID +#ifndef USE_UINT_ENUMS + { + SAM_DATABASE_DOMAIN=0, + SAM_DATABASE_BUILTIN=1, + SAM_DATABASE_PRIVS=2 +} +#else + { __donnot_use_enum_netr_SamDatabaseID=0x7FFFFFFF} +#define SAM_DATABASE_DOMAIN ( 0 ) +#define SAM_DATABASE_BUILTIN ( 1 ) +#define SAM_DATABASE_PRIVS ( 2 ) +#endif +; + +enum samr_RejectReason +#ifndef USE_UINT_ENUMS + { + SAMR_REJECT_OTHER=0, + SAMR_REJECT_TOO_SHORT=1, + SAMR_REJECT_IN_HISTORY=2, + SAMR_REJECT_COMPLEXITY=5 +} +#else + { __donnot_use_enum_samr_RejectReason=0x7FFFFFFF} +#define SAMR_REJECT_OTHER ( 0 ) +#define SAMR_REJECT_TOO_SHORT ( 1 ) +#define SAMR_REJECT_IN_HISTORY ( 2 ) +#define SAMR_REJECT_COMPLEXITY ( 5 ) +#endif +; + +#endif /* _HEADER_misc */ diff --git a/source3/librpc/gen_ndr/ndr_misc.c b/source3/librpc/gen_ndr/ndr_misc.c new file mode 100644 index 0000000000..56105d499f --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_misc.c @@ -0,0 +1,185 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_misc.h" + +_PUBLIC_ enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time_low)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_mid)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_hi_and_version)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->node, 6)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time_low)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_mid)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_hi_and_version)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->node, 6)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ size_t ndr_size_GUID(const struct GUID *r, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_GUID); +} + +_PUBLIC_ enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->if_version)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->if_version)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r) +{ + ndr_print_struct(ndr, name, "ndr_syntax_id"); + ndr->depth++; + ndr_print_GUID(ndr, "uuid", &r->uuid); + ndr_print_uint32(ndr, "if_version", r->if_version); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->handle_type)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->handle_type)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r) +{ + ndr_print_struct(ndr, name, "policy_handle"); + ndr->depth++; + ndr_print_uint32(ndr, "handle_type", r->handle_type); + ndr_print_GUID(ndr, "uuid", &r->uuid); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r) +{ + const char *val = NULL; + + switch (r) { + case SEC_CHAN_WKSTA: val = "SEC_CHAN_WKSTA"; break; + case SEC_CHAN_DOMAIN: val = "SEC_CHAN_DOMAIN"; break; + case SEC_CHAN_BDC: val = "SEC_CHAN_BDC"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r) +{ + const char *val = NULL; + + switch (r) { + case SAM_DATABASE_DOMAIN: val = "SAM_DATABASE_DOMAIN"; break; + case SAM_DATABASE_BUILTIN: val = "SAM_DATABASE_BUILTIN"; break; + case SAM_DATABASE_PRIVS: val = "SAM_DATABASE_PRIVS"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r) +{ + const char *val = NULL; + + switch (r) { + case SAMR_REJECT_OTHER: val = "SAMR_REJECT_OTHER"; break; + case SAMR_REJECT_TOO_SHORT: val = "SAMR_REJECT_TOO_SHORT"; break; + case SAMR_REJECT_IN_HISTORY: val = "SAMR_REJECT_IN_HISTORY"; break; + case SAMR_REJECT_COMPLEXITY: val = "SAMR_REJECT_COMPLEXITY"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + diff --git a/source3/librpc/gen_ndr/ndr_misc.h b/source3/librpc/gen_ndr/ndr_misc.h index d43a7d8b4a..a15a781367 100644 --- a/source3/librpc/gen_ndr/ndr_misc.h +++ b/source3/librpc/gen_ndr/ndr_misc.h @@ -1 +1,29 @@ -#include "ndr/ndr_misc.h" +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/misc.h" + +#ifndef _HEADER_NDR_misc +#define _HEADER_NDR_misc + +#define NDR_MISC_CALL_COUNT (0) +enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r); +enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r); +void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *r); +size_t ndr_size_GUID(const struct GUID *r, int flags); +enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r); +enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r); +void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r); +enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r); +enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r); +void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r); +enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r); +enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r); +void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r); +enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r); +enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r); +void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r); +enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r); +enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r); +void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r); +#endif /* _HEADER_NDR_misc */ -- cgit From 7faee16966d82266046c1267b9d8c20614e73b5f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jan 2008 10:15:30 +0100 Subject: Re-run make idl to generate SAMR output. Guenther (This used to be commit b4c1904022cd34c239f163d49d5a13925d238cda) --- source3/librpc/gen_ndr/cli_samr.c | 3030 +++++++++ source3/librpc/gen_ndr/cli_samr.h | 389 ++ source3/librpc/gen_ndr/ndr_samr.c | 12290 ++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_samr.h | 340 + source3/librpc/gen_ndr/samr.h | 1754 +++++ source3/librpc/gen_ndr/srv_samr.c | 5482 ++++++++++++++++ source3/librpc/gen_ndr/srv_samr.h | 74 + 7 files changed, 23359 insertions(+) create mode 100644 source3/librpc/gen_ndr/cli_samr.c create mode 100644 source3/librpc/gen_ndr/cli_samr.h create mode 100644 source3/librpc/gen_ndr/ndr_samr.c create mode 100644 source3/librpc/gen_ndr/ndr_samr.h create mode 100644 source3/librpc/gen_ndr/samr.h create mode 100644 source3/librpc/gen_ndr/srv_samr.c create mode 100644 source3/librpc/gen_ndr/srv_samr.h (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c new file mode 100644 index 0000000000..99e7e45b02 --- /dev/null +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -0,0 +1,3030 @@ +/* + * Unix SMB/CIFS implementation. + * client auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/cli_samr.h" + +NTSTATUS rpccli_samr_Connect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + uint16_t *system_name, + uint32_t access_mask, + struct policy_handle *connect_handle) +{ + struct samr_Connect r; + NTSTATUS status; + + /* In parameters */ + r.in.system_name = system_name; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CONNECT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *connect_handle = *r.out.connect_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Close(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + struct samr_Close r; + NTSTATUS status; + + /* In parameters */ + r.in.handle = handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Close, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CLOSE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Close, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *handle = *r.out.handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetSecurity(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf) +{ + struct samr_SetSecurity r; + NTSTATUS status; + + /* In parameters */ + r.in.handle = handle; + r.in.sec_info = sec_info; + r.in.sdbuf = sdbuf; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetSecurity, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETSECURITY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetSecurity, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf) +{ + struct samr_QuerySecurity r; + NTSTATUS status; + + /* In parameters */ + r.in.handle = handle; + r.in.sec_info = sec_info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QuerySecurity, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYSECURITY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QuerySecurity, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sdbuf = *r.out.sdbuf; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle) +{ + struct samr_Shutdown r; + NTSTATUS status; + + /* In parameters */ + r.in.connect_handle = connect_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Shutdown, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SHUTDOWN, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Shutdown, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + struct lsa_String *domain_name, + struct dom_sid2 *sid) +{ + struct samr_LookupDomain r; + NTSTATUS status; + + /* In parameters */ + r.in.connect_handle = connect_handle; + r.in.domain_name = domain_name; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupDomain, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_LOOKUPDOMAIN, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupDomain, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sid = *r.out.sid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t *resume_handle, + uint32_t buf_size, + struct samr_SamArray *sam, + uint32_t *num_entries) +{ + struct samr_EnumDomains r; + NTSTATUS status; + + /* In parameters */ + r.in.connect_handle = connect_handle; + r.in.resume_handle = resume_handle; + r.in.buf_size = buf_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomains, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ENUMDOMAINS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomains, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *resume_handle = *r.out.resume_handle; + *sam = *r.out.sam; + *num_entries = *r.out.num_entries; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t access_mask, + struct dom_sid2 *sid, + struct policy_handle *domain_handle) +{ + struct samr_OpenDomain r; + NTSTATUS status; + + /* In parameters */ + r.in.connect_handle = connect_handle; + r.in.access_mask = access_mask; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenDomain, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_OPENDOMAIN, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenDomain, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *domain_handle = *r.out.domain_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info) +{ + struct samr_QueryDomainInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYDOMAININFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info) +{ + struct samr_SetDomainInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.info = info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDomainInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETDOMAININFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *name, + uint32_t access_mask, + struct policy_handle *group_handle, + uint32_t *rid) +{ + struct samr_CreateDomainGroup r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.name = name; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomainGroup, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CREATEDOMAINGROUP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *group_handle = *r.out.group_handle; + *rid = *r.out.rid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t max_size, + struct samr_SamArray *sam, + uint32_t *num_entries) +{ + struct samr_EnumDomainGroups r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.resume_handle = resume_handle; + r.in.max_size = max_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainGroups, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ENUMDOMAINGROUPS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *resume_handle = *r.out.resume_handle; + *sam = *r.out.sam; + *num_entries = *r.out.num_entries; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *account_name, + uint32_t access_mask, + struct policy_handle *user_handle, + uint32_t *rid) +{ + struct samr_CreateUser r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.account_name = account_name; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CREATEUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *user_handle = *r.out.user_handle; + *rid = *r.out.rid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t acct_flags, + uint32_t max_size, + struct samr_SamArray *sam, + uint32_t *num_entries) +{ + struct samr_EnumDomainUsers r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.resume_handle = resume_handle; + r.in.acct_flags = acct_flags; + r.in.max_size = max_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainUsers, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ENUMDOMAINUSERS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *resume_handle = *r.out.resume_handle; + *sam = *r.out.sam; + *num_entries = *r.out.num_entries; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *alias_name, + uint32_t access_mask, + struct policy_handle *alias_handle, + uint32_t *rid) +{ + struct samr_CreateDomAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.alias_name = alias_name; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CREATEDOMALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *alias_handle = *r.out.alias_handle; + *rid = *r.out.rid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t acct_flags, + struct samr_SamArray *sam, + uint32_t *num_entries) +{ + struct samr_EnumDomainAliases r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.resume_handle = resume_handle; + r.in.acct_flags = acct_flags; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainAliases, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ENUMDOMAINALIASES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *resume_handle = *r.out.resume_handle; + *sam = *r.out.sam; + *num_entries = *r.out.num_entries; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetAliasMembership(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_SidArray *sids, + struct samr_Ids *rids) +{ + struct samr_GetAliasMembership r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.sids = sids; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetAliasMembership, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETALIASMEMBERSHIP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetAliasMembership, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rids = *r.out.rids; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_LookupNames(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t num_names, + struct lsa_String *names, + struct samr_Ids *rids, + struct samr_Ids *types) +{ + struct samr_LookupNames r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.num_names = num_names; + r.in.names = names; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupNames, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_LOOKUPNAMES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupNames, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rids = *r.out.rids; + *types = *r.out.types; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_LookupRids(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t num_rids, + uint32_t *rids, + struct lsa_Strings *names, + struct samr_Ids *types) +{ + struct samr_LookupRids r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.num_rids = num_rids; + r.in.rids = rids; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupRids, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_LOOKUPRIDS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupRids, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *names = *r.out.names; + *types = *r.out.types; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_OpenGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *group_handle) +{ + struct samr_OpenGroup r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.access_mask = access_mask; + r.in.rid = rid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenGroup, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_OPENGROUP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenGroup, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *group_handle = *r.out.group_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + enum samr_GroupInfoEnum level, + union samr_GroupInfo *info) +{ + struct samr_QueryGroupInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYGROUPINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryGroupInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetGroupInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + enum samr_GroupInfoEnum level, + union samr_GroupInfo *info) +{ + struct samr_SetGroupInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + r.in.level = level; + r.in.info = info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetGroupInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETGROUPINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_AddGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t rid, + uint32_t flags) +{ + struct samr_AddGroupMember r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + r.in.rid = rid; + r.in.flags = flags; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddGroupMember, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ADDGROUPMEMBER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddGroupMember, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_DeleteDomainGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle) +{ + struct samr_DeleteDomainGroup r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomainGroup, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_DELETEDOMAINGROUP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *group_handle = *r.out.group_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t rid) +{ + struct samr_DeleteGroupMember r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + r.in.rid = rid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteGroupMember, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_DELETEGROUPMEMBER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + struct samr_RidTypeArray *rids) +{ + struct samr_QueryGroupMember r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupMember, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYGROUPMEMBER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryGroupMember, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rids = *r.out.rids; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t unknown1, + uint32_t unknown2) +{ + struct samr_SetMemberAttributesOfGroup r; + NTSTATUS status; + + /* In parameters */ + r.in.group_handle = group_handle; + r.in.unknown1 = unknown1; + r.in.unknown2 = unknown2; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetMemberAttributesOfGroup, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_OpenAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *alias_handle) +{ + struct samr_OpenAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.access_mask = access_mask; + r.in.rid = rid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_OPENALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *alias_handle = *r.out.alias_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + enum samr_AliasInfoEnum level, + union samr_AliasInfo *info) +{ + struct samr_QueryAliasInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryAliasInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYALIASINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryAliasInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetAliasInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + enum samr_AliasInfoEnum level, + union samr_AliasInfo *info) +{ + struct samr_SetAliasInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.level = level; + r.in.info = info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetAliasInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETALIASINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_DeleteDomAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle) +{ + struct samr_DeleteDomAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_DELETEDOMALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *alias_handle = *r.out.alias_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_AddAliasMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct dom_sid2 *sid) +{ + struct samr_AddAliasMember r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddAliasMember, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ADDALIASMEMBER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddAliasMember, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_DeleteAliasMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct dom_sid2 *sid) +{ + struct samr_DeleteAliasMember r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteAliasMember, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_DELETEALIASMEMBER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetMembersInAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids) +{ + struct samr_GetMembersInAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetMembersInAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETMEMBERSINALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetMembersInAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sids = *r.out.sids; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_OpenUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *user_handle) +{ + struct samr_OpenUser r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.access_mask = access_mask; + r.in.rid = rid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_OPENUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *user_handle = *r.out.user_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle) +{ + struct samr_DeleteUser r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_DELETEUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *user_handle = *r.out.user_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info) +{ + struct samr_QueryUserInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYUSERINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info) +{ + struct samr_SetUserInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + r.in.level = level; + r.in.info = info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETUSERINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint8_t lm_present, + struct samr_Password *old_lm_crypted, + struct samr_Password *new_lm_crypted, + uint8_t nt_present, + struct samr_Password *old_nt_crypted, + struct samr_Password *new_nt_crypted, + uint8_t cross1_present, + struct samr_Password *nt_cross, + uint8_t cross2_present, + struct samr_Password *lm_cross) +{ + struct samr_ChangePasswordUser r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + r.in.lm_present = lm_present; + r.in.old_lm_crypted = old_lm_crypted; + r.in.new_lm_crypted = new_lm_crypted; + r.in.nt_present = nt_present; + r.in.old_nt_crypted = old_nt_crypted; + r.in.new_nt_crypted = new_nt_crypted; + r.in.cross1_present = cross1_present; + r.in.nt_cross = nt_cross; + r.in.cross2_present = cross2_present; + r.in.lm_cross = lm_cross; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CHANGEPASSWORDUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + struct samr_RidWithAttributeArray *rids) +{ + struct samr_GetGroupsForUser r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetGroupsForUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETGROUPSFORUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetGroupsForUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rids = *r.out.rids; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info) +{ + struct samr_QueryDisplayInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.start_idx = start_idx; + r.in.max_entries = max_entries; + r.in.buf_size = buf_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYDISPLAYINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *total_size = *r.out.total_size; + *returned_size = *r.out.returned_size; + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + struct lsa_String name, + uint32_t *idx) +{ + struct samr_GetDisplayEnumerationIndex r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.name = name; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETDISPLAYENUMERATIONINDEX, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *idx = *r.out.idx; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle) +{ + struct samr_TestPrivateFunctionsDomain r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsDomain, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_TestPrivateFunctionsUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle) +{ + struct samr_TestPrivateFunctionsUser r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsUser, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_TESTPRIVATEFUNCTIONSUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetUserPwInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + struct samr_PwInfo *info) +{ + struct samr_GetUserPwInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetUserPwInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETUSERPWINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetUserPwInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct dom_sid2 *sid) +{ + struct samr_RemoveMemberFromForeignDomain r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMemberFromForeignDomain, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info) +{ + struct samr_QueryDomainInfo2 r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYDOMAININFO2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info) +{ + struct samr_QueryUserInfo2 r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYUSERINFO2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info) +{ + struct samr_QueryDisplayInfo2 r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.start_idx = start_idx; + r.in.max_entries = max_entries; + r.in.buf_size = buf_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYDISPLAYINFO2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *total_size = *r.out.total_size; + *returned_size = *r.out.returned_size; + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + struct lsa_String name, + uint32_t *idx) +{ + struct samr_GetDisplayEnumerationIndex2 r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.name = name; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETDISPLAYENUMERATIONINDEX2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *idx = *r.out.idx; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *account_name, + uint32_t acct_flags, + uint32_t access_mask, + struct policy_handle *user_handle, + uint32_t *access_granted, + uint32_t *rid) +{ + struct samr_CreateUser2 r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.account_name = account_name; + r.in.acct_flags = acct_flags; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CREATEUSER2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *user_handle = *r.out.user_handle; + *access_granted = *r.out.access_granted; + *rid = *r.out.rid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info) +{ + struct samr_QueryDisplayInfo3 r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.level = level; + r.in.start_idx = start_idx; + r.in.max_entries = max_entries; + r.in.buf_size = buf_size; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo3, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_QUERYDISPLAYINFO3, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo3, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *total_size = *r.out.total_size; + *returned_size = *r.out.returned_size; + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_AddMultipleMembersToAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids) +{ + struct samr_AddMultipleMembersToAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.sids = sids; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddMultipleMembersToAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids) +{ + struct samr_RemoveMultipleMembersFromAlias r; + NTSTATUS status; + + /* In parameters */ + r.in.alias_handle = alias_handle; + r.in.sids = sids; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMultipleMembersFromAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_OemChangePasswordUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_AsciiString *server, + struct lsa_AsciiString *account, + struct samr_CryptPassword *password, + struct samr_Password *hash) +{ + struct samr_OemChangePasswordUser2 r; + NTSTATUS status; + + /* In parameters */ + r.in.server = server; + r.in.account = account; + r.in.password = password; + r.in.hash = hash; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OemChangePasswordUser2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_OEMCHANGEPASSWORDUSER2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *server, + struct lsa_String *account, + struct samr_CryptPassword *nt_password, + struct samr_Password *nt_verifier, + uint8_t lm_change, + struct samr_CryptPassword *lm_password, + struct samr_Password *lm_verifier) +{ + struct samr_ChangePasswordUser2 r; + NTSTATUS status; + + /* In parameters */ + r.in.server = server; + r.in.account = account; + r.in.nt_password = nt_password; + r.in.nt_verifier = nt_verifier; + r.in.lm_change = lm_change; + r.in.lm_password = lm_password; + r.in.lm_verifier = lm_verifier; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CHANGEPASSWORDUSER2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetDomPwInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *domain_name, + struct samr_PwInfo *info) +{ + struct samr_GetDomPwInfo r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_name = domain_name; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDomPwInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETDOMPWINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDomPwInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t access_mask, + struct policy_handle *connect_handle) +{ + struct samr_Connect2 r; + NTSTATUS status; + + /* In parameters */ + r.in.system_name = system_name; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CONNECT2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *connect_handle = *r.out.connect_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info) +{ + struct samr_SetUserInfo2 r; + NTSTATUS status; + + /* In parameters */ + r.in.user_handle = user_handle; + r.in.level = level; + r.in.info = info; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo2, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETUSERINFO2, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t unknown1, + uint32_t unknown2, + uint32_t unknown3) +{ + struct samr_SetBootKeyInformation r; + NTSTATUS status; + + /* In parameters */ + r.in.connect_handle = connect_handle; + r.in.unknown1 = unknown1; + r.in.unknown2 = unknown2; + r.in.unknown3 = unknown3; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetBootKeyInformation, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETBOOTKEYINFORMATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_GetBootKeyInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *unknown) +{ + struct samr_GetBootKeyInformation r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetBootKeyInformation, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_GETBOOTKEYINFORMATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *unknown = *r.out.unknown; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t unknown, + uint32_t access_mask, + struct policy_handle *connect_handle) +{ + struct samr_Connect3 r; + NTSTATUS status; + + /* In parameters */ + r.in.system_name = system_name; + r.in.unknown = unknown; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect3, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CONNECT3, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect3, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *connect_handle = *r.out.connect_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t unknown, + uint32_t access_mask, + struct policy_handle *connect_handle) +{ + struct samr_Connect4 r; + NTSTATUS status; + + /* In parameters */ + r.in.system_name = system_name; + r.in.unknown = unknown; + r.in.access_mask = access_mask; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect4, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CONNECT4, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect4, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *connect_handle = *r.out.connect_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *server, + struct lsa_String *account, + struct samr_CryptPassword *nt_password, + struct samr_Password *nt_verifier, + uint8_t lm_change, + struct samr_CryptPassword *lm_password, + struct samr_Password *lm_verifier, + struct samr_CryptPassword *password3, + struct samr_DomInfo1 *dominfo, + struct samr_ChangeReject *reject) +{ + struct samr_ChangePasswordUser3 r; + NTSTATUS status; + + /* In parameters */ + r.in.server = server; + r.in.account = account; + r.in.nt_password = nt_password; + r.in.nt_verifier = nt_verifier; + r.in.lm_change = lm_change; + r.in.lm_password = lm_password; + r.in.lm_verifier = lm_verifier; + r.in.password3 = password3; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser3, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CHANGEPASSWORDUSER3, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *dominfo = *r.out.dominfo; + *reject = *r.out.reject; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t access_mask, + uint32_t level_in, + union samr_ConnectInfo *info_in, + uint32_t *level_out, + union samr_ConnectInfo *info_out, + struct policy_handle *connect_handle) +{ + struct samr_Connect5 r; + NTSTATUS status; + + /* In parameters */ + r.in.system_name = system_name; + r.in.access_mask = access_mask; + r.in.level_in = level_in; + r.in.info_in = info_in; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect5, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_CONNECT5, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect5, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *level_out = *r.out.level_out; + *info_out = *r.out.info_out; + *connect_handle = *r.out.connect_handle; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t rid, + struct dom_sid2 *sid) +{ + struct samr_RidToSid r; + NTSTATUS status; + + /* In parameters */ + r.in.domain_handle = domain_handle; + r.in.rid = rid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RidToSid, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_RIDTOSID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RidToSid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sid = *r.out.sid; + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *name, + uint32_t unknown, + struct samr_Password *hash) +{ + struct samr_SetDsrmPassword r; + NTSTATUS status; + + /* In parameters */ + r.in.name = name; + r.in.unknown = unknown; + r.in.hash = hash; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDsrmPassword, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_SETDSRMPASSWORD, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return r.out.result; +} + +NTSTATUS rpccli_samr_ValidatePassword(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + enum samr_ValidatePasswordLevel level, + union samr_ValidatePasswordReq req, + union samr_ValidatePasswordRep *rep) +{ + struct samr_ValidatePassword r; + NTSTATUS status; + + /* In parameters */ + r.in.level = level; + r.in.req = req; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ValidatePassword, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_SAMR, + &ndr_table_samr, + NDR_SAMR_VALIDATEPASSWORD, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ValidatePassword, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rep = *r.out.rep; + + /* Return result */ + return r.out.result; +} + diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h new file mode 100644 index 0000000000..23f2d1f1b6 --- /dev/null +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -0,0 +1,389 @@ +#include "librpc/gen_ndr/ndr_samr.h" +#ifndef __CLI_SAMR__ +#define __CLI_SAMR__ +NTSTATUS rpccli_samr_Connect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + uint16_t *system_name, + uint32_t access_mask, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_Close(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle); +NTSTATUS rpccli_samr_SetSecurity(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf); +NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf); +NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + struct lsa_String *domain_name, + struct dom_sid2 *sid); +NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t *resume_handle, + uint32_t buf_size, + struct samr_SamArray *sam, + uint32_t *num_entries); +NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t access_mask, + struct dom_sid2 *sid, + struct policy_handle *domain_handle); +NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info); +NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info); +NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *name, + uint32_t access_mask, + struct policy_handle *group_handle, + uint32_t *rid); +NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t max_size, + struct samr_SamArray *sam, + uint32_t *num_entries); +NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *account_name, + uint32_t access_mask, + struct policy_handle *user_handle, + uint32_t *rid); +NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t acct_flags, + uint32_t max_size, + struct samr_SamArray *sam, + uint32_t *num_entries); +NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *alias_name, + uint32_t access_mask, + struct policy_handle *alias_handle, + uint32_t *rid); +NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *resume_handle, + uint32_t acct_flags, + struct samr_SamArray *sam, + uint32_t *num_entries); +NTSTATUS rpccli_samr_GetAliasMembership(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_SidArray *sids, + struct samr_Ids *rids); +NTSTATUS rpccli_samr_LookupNames(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t num_names, + struct lsa_String *names, + struct samr_Ids *rids, + struct samr_Ids *types); +NTSTATUS rpccli_samr_LookupRids(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t num_rids, + uint32_t *rids, + struct lsa_Strings *names, + struct samr_Ids *types); +NTSTATUS rpccli_samr_OpenGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *group_handle); +NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + enum samr_GroupInfoEnum level, + union samr_GroupInfo *info); +NTSTATUS rpccli_samr_SetGroupInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + enum samr_GroupInfoEnum level, + union samr_GroupInfo *info); +NTSTATUS rpccli_samr_AddGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t rid, + uint32_t flags); +NTSTATUS rpccli_samr_DeleteDomainGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle); +NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t rid); +NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + struct samr_RidTypeArray *rids); +NTSTATUS rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *group_handle, + uint32_t unknown1, + uint32_t unknown2); +NTSTATUS rpccli_samr_OpenAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *alias_handle); +NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + enum samr_AliasInfoEnum level, + union samr_AliasInfo *info); +NTSTATUS rpccli_samr_SetAliasInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + enum samr_AliasInfoEnum level, + union samr_AliasInfo *info); +NTSTATUS rpccli_samr_DeleteDomAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle); +NTSTATUS rpccli_samr_AddAliasMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct dom_sid2 *sid); +NTSTATUS rpccli_samr_DeleteAliasMember(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct dom_sid2 *sid); +NTSTATUS rpccli_samr_GetMembersInAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids); +NTSTATUS rpccli_samr_OpenUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t access_mask, + uint32_t rid, + struct policy_handle *user_handle); +NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle); +NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info); +NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info); +NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint8_t lm_present, + struct samr_Password *old_lm_crypted, + struct samr_Password *new_lm_crypted, + uint8_t nt_present, + struct samr_Password *old_nt_crypted, + struct samr_Password *new_nt_crypted, + uint8_t cross1_present, + struct samr_Password *nt_cross, + uint8_t cross2_present, + struct samr_Password *lm_cross); +NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + struct samr_RidWithAttributeArray *rids); +NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info); +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + struct lsa_String name, + uint32_t *idx); +NTSTATUS rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle); +NTSTATUS rpccli_samr_TestPrivateFunctionsUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle); +NTSTATUS rpccli_samr_GetUserPwInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + struct samr_PwInfo *info); +NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct dom_sid2 *sid); +NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + union samr_DomainInfo *info); +NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info); +NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info); +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + struct lsa_String name, + uint32_t *idx); +NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + struct lsa_String *account_name, + uint32_t acct_flags, + uint32_t access_mask, + struct policy_handle *user_handle, + uint32_t *access_granted, + uint32_t *rid); +NTSTATUS rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint16_t level, + uint32_t start_idx, + uint32_t max_entries, + uint32_t buf_size, + uint32_t *total_size, + uint32_t *returned_size, + union samr_DispInfo *info); +NTSTATUS rpccli_samr_AddMultipleMembersToAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids); +NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *alias_handle, + struct lsa_SidArray *sids); +NTSTATUS rpccli_samr_OemChangePasswordUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_AsciiString *server, + struct lsa_AsciiString *account, + struct samr_CryptPassword *password, + struct samr_Password *hash); +NTSTATUS rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *server, + struct lsa_String *account, + struct samr_CryptPassword *nt_password, + struct samr_Password *nt_verifier, + uint8_t lm_change, + struct samr_CryptPassword *lm_password, + struct samr_Password *lm_verifier); +NTSTATUS rpccli_samr_GetDomPwInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *domain_name, + struct samr_PwInfo *info); +NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t access_mask, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *user_handle, + uint16_t level, + union samr_UserInfo *info); +NTSTATUS rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *connect_handle, + uint32_t unknown1, + uint32_t unknown2, + uint32_t unknown3); +NTSTATUS rpccli_samr_GetBootKeyInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t *unknown); +NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t unknown, + uint32_t access_mask, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t unknown, + uint32_t access_mask, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *server, + struct lsa_String *account, + struct samr_CryptPassword *nt_password, + struct samr_Password *nt_verifier, + uint8_t lm_change, + struct samr_CryptPassword *lm_password, + struct samr_Password *lm_verifier, + struct samr_CryptPassword *password3, + struct samr_DomInfo1 *dominfo, + struct samr_ChangeReject *reject); +NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *system_name, + uint32_t access_mask, + uint32_t level_in, + union samr_ConnectInfo *info_in, + uint32_t *level_out, + union samr_ConnectInfo *info_out, + struct policy_handle *connect_handle); +NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *domain_handle, + uint32_t rid, + struct dom_sid2 *sid); +NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct lsa_String *name, + uint32_t unknown, + struct samr_Password *hash); +NTSTATUS rpccli_samr_ValidatePassword(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + enum samr_ValidatePasswordLevel level, + union samr_ValidatePasswordReq req, + union samr_ValidatePasswordRep *rep); +#endif /* __CLI_SAMR__ */ diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c new file mode 100644 index 0000000000..f407fcf954 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -0,0 +1,12290 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_samr.h" + +#include "librpc/gen_ndr/ndr_misc.h" +#include "librpc/gen_ndr/ndr_lsa.h" +#include "librpc/gen_ndr/ndr_security.h" +_PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_AcctFlags(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_samr_AcctFlags(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), "ACB_DISABLED", ACB_DISABLED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_HOMDIRREQ", ACB_HOMDIRREQ, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOTREQ", ACB_PWNOTREQ, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TEMPDUP", ACB_TEMPDUP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NORMAL", ACB_NORMAL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_MNS", ACB_MNS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DOMTRUST", ACB_DOMTRUST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_WSTRUST", ACB_WSTRUST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SVRTRUST", ACB_SVRTRUST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PWNOEXP", ACB_PWNOEXP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_AUTOLOCK", ACB_AUTOLOCK, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_ENC_TXT_PWD_ALLOWED", ACB_ENC_TXT_PWD_ALLOWED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_SMARTCARD_REQUIRED", ACB_SMARTCARD_REQUIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_TRUSTED_FOR_DELEGATION", ACB_TRUSTED_FOR_DELEGATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NOT_DELEGATED", ACB_NOT_DELEGATED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_USE_DES_KEY_ONLY", ACB_USE_DES_KEY_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_DONT_REQUIRE_PREAUTH", ACB_DONT_REQUIRE_PREAUTH, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_PW_EXPIRED", ACB_PW_EXPIRED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ACB_NO_AUTH_DATA_REQD", ACB_NO_AUTH_DATA_REQD, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ConnectAccessMask(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_samr_ConnectAccessMask(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_samr_ConnectAccessMask(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), "SAMR_ACCESS_CONNECT_TO_SERVER", SAMR_ACCESS_CONNECT_TO_SERVER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_SHUTDOWN_SERVER", SAMR_ACCESS_SHUTDOWN_SERVER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_INITIALIZE_SERVER", SAMR_ACCESS_INITIALIZE_SERVER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_CREATE_DOMAIN", SAMR_ACCESS_CREATE_DOMAIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_ENUM_DOMAINS", SAMR_ACCESS_ENUM_DOMAINS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ACCESS_OPEN_DOMAIN", SAMR_ACCESS_OPEN_DOMAIN, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserAccessMask(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_samr_UserAccessMask(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_samr_UserAccessMask(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), "USER_ACCESS_GET_NAME_ETC", USER_ACCESS_GET_NAME_ETC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_LOCALE", USER_ACCESS_GET_LOCALE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_LOC_COM", USER_ACCESS_SET_LOC_COM, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_LOGONINFO", USER_ACCESS_GET_LOGONINFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_ATTRIBUTES", USER_ACCESS_GET_ATTRIBUTES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_ATTRIBUTES", USER_ACCESS_SET_ATTRIBUTES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_CHANGE_PASSWORD", USER_ACCESS_CHANGE_PASSWORD, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_PASSWORD", USER_ACCESS_SET_PASSWORD, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_GROUPS", USER_ACCESS_GET_GROUPS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_GROUP_MEMBERSHIP", USER_ACCESS_GET_GROUP_MEMBERSHIP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomainAccessMask(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_samr_DomainAccessMask(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_samr_DomainAccessMask(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), "DOMAIN_ACCESS_LOOKUP_INFO_1", DOMAIN_ACCESS_LOOKUP_INFO_1, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_1", DOMAIN_ACCESS_SET_INFO_1, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_LOOKUP_INFO_2", DOMAIN_ACCESS_LOOKUP_INFO_2, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_2", DOMAIN_ACCESS_SET_INFO_2, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_USER", DOMAIN_ACCESS_CREATE_USER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_GROUP", DOMAIN_ACCESS_CREATE_GROUP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_ALIAS", DOMAIN_ACCESS_CREATE_ALIAS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_LOOKUP_ALIAS", DOMAIN_ACCESS_LOOKUP_ALIAS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_ENUM_ACCOUNTS", DOMAIN_ACCESS_ENUM_ACCOUNTS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_OPEN_ACCOUNT", DOMAIN_ACCESS_OPEN_ACCOUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_3", DOMAIN_ACCESS_SET_INFO_3, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GroupAccessMask(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_samr_GroupAccessMask(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_samr_GroupAccessMask(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), "GROUP_ACCESS_LOOKUP_INFO", GROUP_ACCESS_LOOKUP_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_SET_INFO", GROUP_ACCESS_SET_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_ADD_MEMBER", GROUP_ACCESS_ADD_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_REMOVE_MEMBER", GROUP_ACCESS_REMOVE_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_GET_MEMBERS", GROUP_ACCESS_GET_MEMBERS, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AliasAccessMask(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_samr_AliasAccessMask(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_samr_AliasAccessMask(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), "ALIAS_ACCESS_ADD_MEMBER", ALIAS_ACCESS_ADD_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_REMOVE_MEMBER", ALIAS_ACCESS_REMOVE_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_GET_MEMBERS", ALIAS_ACCESS_GET_MEMBERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_LOOKUP_INFO", ALIAS_ACCESS_LOOKUP_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_SET_INFO", ALIAS_ACCESS_SET_INFO, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SamEntry(struct ndr_push *ndr, int ndr_flags, const struct samr_SamEntry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + } + 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_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r) +{ + ndr_print_struct(ndr, name, "samr_SamEntry"); + ndr->depth++; + ndr_print_uint32(ndr, "idx", r->idx); + ndr_print_lsa_String(ndr, "name", &r->name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_flags, const struct samr_SamArray *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "samr_SamArray"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Role(struct ndr_pull *ndr, int ndr_flags, enum samr_Role *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r) +{ + const char *val = NULL; + + switch (r) { + case SAMR_ROLE_STANDALONE: val = "SAMR_ROLE_STANDALONE"; break; + case SAMR_ROLE_DOMAIN_MEMBER: val = "SAMR_ROLE_DOMAIN_MEMBER"; break; + case SAMR_ROLE_DOMAIN_BDC: val = "SAMR_ROLE_DOMAIN_BDC"; break; + case SAMR_ROLE_DOMAIN_PDC: val = "SAMR_ROLE_DOMAIN_PDC"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(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_samr_PasswordProperties(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), "DOMAIN_PASSWORD_COMPLEX", DOMAIN_PASSWORD_COMPLEX, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_ANON_CHANGE", DOMAIN_PASSWORD_NO_ANON_CHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_NO_CLEAR_CHANGE", DOMAIN_PASSWORD_NO_CLEAR_CHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_LOCKOUT_ADMINS", DOMAIN_PASSWORD_LOCKOUT_ADMINS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_PASSWORD_STORE_CLEARTEXT", DOMAIN_PASSWORD_STORE_CLEARTEXT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_REFUSE_PASSWORD_CHANGE", DOMAIN_REFUSE_PASSWORD_CHANGE, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length)); + NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties)); + NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age)); + NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length)); + NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties)); + NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age)); + NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo1"); + ndr->depth++; + ndr_print_uint16(ndr, "min_password_length", r->min_password_length); + ndr_print_uint16(ndr, "password_history_length", r->password_history_length); + ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties); + ndr_print_dlong(ndr, "max_password_age", r->max_password_age); + ndr_print_dlong(ndr, "min_password_age", r->min_password_age); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_groups)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_groups)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo2"); + ndr->depth++; + ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time); + ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr_print_lsa_String(ndr, "domain_name", &r->domain_name); + ndr_print_lsa_String(ndr, "primary", &r->primary); + ndr_print_udlong(ndr, "sequence_num", r->sequence_num); + ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr_print_samr_Role(ndr, "role", r->role); + ndr_print_uint32(ndr, "unknown3", r->unknown3); + ndr_print_uint32(ndr, "num_users", r->num_users); + ndr_print_uint32(ndr, "num_groups", r->num_groups); + ndr_print_uint32(ndr, "num_aliases", r->num_aliases); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo3"); + ndr->depth++; + ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo4 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo4"); + ndr->depth++; + ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo5 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo5"); + ndr->depth++; + ndr_print_lsa_String(ndr, "domain_name", &r->domain_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo6 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo6"); + ndr->depth++; + ndr_print_lsa_String(ndr, "primary", &r->primary); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo7"); + ndr->depth++; + ndr_print_samr_Role(ndr, "role", r->role); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo8 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo8"); + ndr->depth++; + ndr_print_hyper(ndr, "sequence_num", r->sequence_num); + ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo9 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo9"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown", r->unknown); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo11 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo11"); + ndr->depth++; + ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); + ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration); + ndr_print_hyper(ndr, "lockout_window", r->lockout_window); + ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo12 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo12"); + ndr->depth++; + ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration); + ndr_print_hyper(ndr, "lockout_window", r->lockout_window); + ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo13 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sequence_num)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sequence_num)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r) +{ + ndr_print_struct(ndr, name, "samr_DomInfo13"); + ndr->depth++; + ndr_print_hyper(ndr, "sequence_num", r->sequence_num); + ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time); + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DomainInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6)); + break; + + case 7: + NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7)); + break; + + case 8: + NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8)); + break; + + case 9: + NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); + break; + + case 11: + NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); + break; + + case 12: + NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12)); + break; + + case 13: + NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + break; + + case 2: + NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + break; + + case 4: + NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6)); + break; + + case 7: + break; + + case 8: + break; + + case 9: + break; + + case 11: + NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); + break; + + case 12: + break; + + case 13: + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DomainInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3)); + break; } + + case 4: { + NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); + break; } + + case 5: { + NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5)); + break; } + + case 6: { + NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6)); + break; } + + case 7: { + NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7)); + break; } + + case 8: { + NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8)); + break; } + + case 9: { + NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); + break; } + + case 11: { + NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); + break; } + + case 12: { + NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12)); + break; } + + case 13: { + NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + break; + + case 2: + NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + break; + + case 4: + NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6)); + break; + + case 7: + break; + + case 8: + break; + + case 9: + break; + + case 11: + NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); + break; + + case 12: + break; + + case 13: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_DomainInfo"); + switch (level) { + case 1: + ndr_print_samr_DomInfo1(ndr, "info1", &r->info1); + break; + + case 2: + ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); + break; + + case 3: + ndr_print_samr_DomInfo3(ndr, "info3", &r->info3); + break; + + case 4: + ndr_print_samr_DomInfo4(ndr, "info4", &r->info4); + break; + + case 5: + ndr_print_samr_DomInfo5(ndr, "info5", &r->info5); + break; + + case 6: + ndr_print_samr_DomInfo6(ndr, "info6", &r->info6); + break; + + case 7: + ndr_print_samr_DomInfo7(ndr, "info7", &r->info7); + break; + + case 8: + ndr_print_samr_DomInfo8(ndr, "info8", &r->info8); + break; + + case 9: + ndr_print_samr_DomInfo9(ndr, "info9", &r->info9); + break; + + case 11: + ndr_print_samr_DomInfo11(ndr, "info11", &r->info11); + break; + + case 12: + ndr_print_samr_DomInfo12(ndr, "info12", &r->info12); + break; + + case 13: + ndr_print_samr_DomInfo13(ndr, "info13", &r->info13); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags, const struct samr_Ids *r) +{ + uint32_t cntr_ids_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->ids)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->ids) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ids[cntr_ids_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r) +{ + uint32_t _ptr_ids; + uint32_t cntr_ids_1; + TALLOC_CTX *_mem_save_ids_0; + TALLOC_CTX *_mem_save_ids_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + if (r->count < 0 || r->count > 1024) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ids)); + if (_ptr_ids) { + NDR_PULL_ALLOC(ndr, r->ids); + } else { + r->ids = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->ids) { + _mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->ids)); + NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids)); + _mem_save_ids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0); + for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ids[cntr_ids_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_0, 0); + } + if (r->ids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ids, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r) +{ + uint32_t cntr_ids_1; + ndr_print_struct(ndr, name, "samr_Ids"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "ids", r->ids); + ndr->depth++; + if (r->ids) { + ndr->print(ndr, "%s: ARRAY(%d)", "ids", r->count); + ndr->depth++; + for (cntr_ids_1=0;cntr_ids_1count;cntr_ids_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_ids_1); + if (idx_1) { + ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_GroupAttrs(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_samr_GroupAttrs(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), "SE_GROUP_MANDATORY", SE_GROUP_MANDATORY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED_BY_DEFAULT", SE_GROUP_ENABLED_BY_DEFAULT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_ENABLED", SE_GROUP_ENABLED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_OWNER", SE_GROUP_OWNER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_USE_FOR_DENY_ONLY", SE_GROUP_USE_FOR_DENY_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_RESOURCE", SE_GROUP_RESOURCE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SE_GROUP_LOGON_ID", SE_GROUP_LOGON_ID, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GroupInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAll *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r) +{ + ndr_print_struct(ndr, name, "samr_GroupInfoAll"); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", &r->name); + ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes); + ndr_print_uint32(ndr, "num_members", r->num_members); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GroupInfoAttributes(struct ndr_push *ndr, int ndr_flags, const struct samr_GroupInfoAttributes *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GroupInfoAttributes(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAttributes *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r) +{ + ndr_print_struct(ndr, name, "samr_GroupInfoAttributes"); + ndr->depth++; + ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GroupInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_GroupInfoEnum r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GroupInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_GroupInfoEnum *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r) +{ + const char *val = NULL; + + switch (r) { + case GROUPINFOALL: val = "GROUPINFOALL"; break; + case GROUPINFONAME: val = "GROUPINFONAME"; break; + case GROUPINFOATTRIBUTES: val = "GROUPINFOATTRIBUTES"; break; + case GROUPINFODESCRIPTION: val = "GROUPINFODESCRIPTION"; break; + case GROUPINFOALL2: val = "GROUPINFOALL2"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_flags, const union samr_GroupInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level)); + switch (level) { + case GROUPINFOALL: + NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); + break; + + case GROUPINFONAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + break; + + case GROUPINFOATTRIBUTES: + NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes)); + break; + + case GROUPINFODESCRIPTION: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + break; + + case GROUPINFOALL2: + NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case GROUPINFOALL: + NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all)); + break; + + case GROUPINFONAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); + break; + + case GROUPINFOATTRIBUTES: + break; + + case GROUPINFODESCRIPTION: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + break; + + case GROUPINFOALL2: + NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, union samr_GroupInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case GROUPINFOALL: { + NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); + break; } + + case GROUPINFONAME: { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + break; } + + case GROUPINFOATTRIBUTES: { + NDR_CHECK(ndr_pull_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes)); + break; } + + case GROUPINFODESCRIPTION: { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + break; } + + case GROUPINFOALL2: { + NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case GROUPINFOALL: + NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all)); + break; + + case GROUPINFONAME: + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); + break; + + case GROUPINFOATTRIBUTES: + break; + + case GROUPINFODESCRIPTION: + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + break; + + case GROUPINFOALL2: + NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all2)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_GroupInfo"); + switch (level) { + case GROUPINFOALL: + ndr_print_samr_GroupInfoAll(ndr, "all", &r->all); + break; + + case GROUPINFONAME: + ndr_print_lsa_String(ndr, "name", &r->name); + break; + + case GROUPINFOATTRIBUTES: + ndr_print_samr_GroupInfoAttributes(ndr, "attributes", &r->attributes); + break; + + case GROUPINFODESCRIPTION: + ndr_print_lsa_String(ndr, "description", &r->description); + break; + + case GROUPINFOALL2: + ndr_print_samr_GroupInfoAll(ndr, "all2", &r->all2); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidTypeArray *r) +{ + uint32_t cntr_rids_1; + uint32_t cntr_types_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->types)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->rids) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1])); + } + } + if (r->types) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->types[cntr_types_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidTypeArray *r) +{ + uint32_t _ptr_rids; + uint32_t cntr_rids_1; + TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_rids_1; + uint32_t _ptr_types; + uint32_t cntr_types_1; + TALLOC_CTX *_mem_save_types_0; + TALLOC_CTX *_mem_save_types_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids)); + if (_ptr_rids) { + NDR_PULL_ALLOC(ndr, r->rids); + } else { + r->rids = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_types)); + if (_ptr_types) { + NDR_PULL_ALLOC(ndr, r->types); + } else { + r->types = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->rids) { + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->rids)); + NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids)); + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0); + for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0); + } + if (r->types) { + _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->types, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->types)); + NDR_PULL_ALLOC_N(ndr, r->types, ndr_get_array_size(ndr, &r->types)); + _mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->types, 0); + for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->types[cntr_types_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0); + } + if (r->rids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count)); + } + if (r->types) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r) +{ + uint32_t cntr_rids_1; + uint32_t cntr_types_1; + ndr_print_struct(ndr, name, "samr_RidTypeArray"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "rids", r->rids); + ndr->depth++; + if (r->rids) { + ndr->print(ndr, "%s: ARRAY(%d)", "rids", r->count); + ndr->depth++; + for (cntr_rids_1=0;cntr_rids_1count;cntr_rids_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_rids_1); + if (idx_1) { + ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr_print_ptr(ndr, "types", r->types); + ndr->depth++; + if (r->types) { + ndr->print(ndr, "%s: ARRAY(%d)", "types", r->count); + ndr->depth++; + for (cntr_types_1=0;cntr_types_1count;cntr_types_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_types_1); + if (idx_1) { + ndr_print_uint32(ndr, "types", r->types[cntr_types_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AliasInfoAll(struct ndr_push *ndr, int ndr_flags, const struct samr_AliasInfoAll *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_members)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r) +{ + ndr_print_struct(ndr, name, "samr_AliasInfoAll"); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", &r->name); + ndr_print_uint32(ndr, "num_members", r->num_members); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AliasInfoEnum(struct ndr_push *ndr, int ndr_flags, enum samr_AliasInfoEnum r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AliasInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum samr_AliasInfoEnum *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r) +{ + const char *val = NULL; + + switch (r) { + case ALIASINFOALL: val = "ALIASINFOALL"; break; + case ALIASINFONAME: val = "ALIASINFONAME"; break; + case ALIASINFODESCRIPTION: val = "ALIASINFODESCRIPTION"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_flags, const union samr_AliasInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level)); + switch (level) { + case ALIASINFOALL: + NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); + break; + + case ALIASINFONAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); + break; + + case ALIASINFODESCRIPTION: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case ALIASINFOALL: + NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all)); + break; + + case ALIASINFONAME: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name)); + break; + + case ALIASINFODESCRIPTION: + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, union samr_AliasInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case ALIASINFOALL: { + NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); + break; } + + case ALIASINFONAME: { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name)); + break; } + + case ALIASINFODESCRIPTION: { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case ALIASINFOALL: + NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all)); + break; + + case ALIASINFONAME: + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name)); + break; + + case ALIASINFODESCRIPTION: + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_AliasInfo"); + switch (level) { + case ALIASINFOALL: + ndr_print_samr_AliasInfoAll(ndr, "all", &r->all); + break; + + case ALIASINFONAME: + ndr_print_lsa_String(ndr, "name", &r->name); + break; + + case ALIASINFODESCRIPTION: + ndr_print_lsa_String(ndr, "description", &r->description); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo1"); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr_print_uint32(ndr, "primary_gid", r->primary_gid); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo2"); + ndr->depth++; + ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr_print_lsa_String(ndr, "unknown", &r->unknown); + ndr_print_uint16(ndr, "country_code", r->country_code); + ndr_print_uint16(ndr, "code_page", r->code_page); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->units_per_week)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->bits)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->bits) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1260)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->units_per_week / 8)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->bits, r->units_per_week / 8)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r) +{ + uint32_t _ptr_bits; + TALLOC_CTX *_mem_save_bits_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->units_per_week)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bits)); + if (_ptr_bits) { + NDR_PULL_ALLOC(ndr, r->bits); + } else { + r->bits = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->bits) { + _mem_save_bits_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->bits, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->bits)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->bits)); + if (ndr_get_array_length(ndr, &r->bits) > ndr_get_array_size(ndr, &r->bits)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->bits), ndr_get_array_length(ndr, &r->bits)); + } + NDR_PULL_ALLOC_N(ndr, r->bits, ndr_get_array_size(ndr, &r->bits)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, ndr_get_array_length(ndr, &r->bits))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bits_0, 0); + } + if (r->bits) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bits, 1260)); + } + if (r->bits) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bits, r->units_per_week / 8)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r) +{ + ndr_print_struct(ndr, name, "samr_LogonHours"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_uint16(ndr, "units_per_week", r->units_per_week); + ndr_print_ptr(ndr, "bits", r->bits); + ndr->depth++; + if (r->bits) { + ndr_print_array_uint8(ndr, "bits", r->bits, r->units_per_week / 8); + } + ndr->depth--; + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo3"); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_uint32(ndr, "primary_gid", r->primary_gid); + ndr_print_lsa_String(ndr, "home_directory", &r->home_directory); + ndr_print_lsa_String(ndr, "home_drive", &r->home_drive); + ndr_print_lsa_String(ndr, "logon_script", &r->logon_script); + ndr_print_lsa_String(ndr, "profile_path", &r->profile_path); + ndr_print_lsa_String(ndr, "workstations", &r->workstations); + ndr_print_NTTIME(ndr, "last_logon", r->last_logon); + ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); + ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change); + ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change); + ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change); + ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours); + ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count); + ndr_print_uint16(ndr, "logon_count", r->logon_count); + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo4 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo4"); + ndr->depth++; + ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo5 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo5"); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_uint32(ndr, "primary_gid", r->primary_gid); + ndr_print_lsa_String(ndr, "home_directory", &r->home_directory); + ndr_print_lsa_String(ndr, "home_drive", &r->home_drive); + ndr_print_lsa_String(ndr, "logon_script", &r->logon_script); + ndr_print_lsa_String(ndr, "profile_path", &r->profile_path); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr_print_lsa_String(ndr, "workstations", &r->workstations); + ndr_print_NTTIME(ndr, "last_logon", r->last_logon); + ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); + ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours); + ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count); + ndr_print_uint16(ndr, "logon_count", r->logon_count); + ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change); + ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo6 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo6"); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo7"); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo8 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo8"); + ndr->depth++; + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo9 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo9"); + ndr->depth++; + ndr_print_uint32(ndr, "primary_gid", r->primary_gid); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo10 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo10"); + ndr->depth++; + ndr_print_lsa_String(ndr, "home_directory", &r->home_directory); + ndr_print_lsa_String(ndr, "home_drive", &r->home_drive); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo11 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo11"); + ndr->depth++; + ndr_print_lsa_String(ndr, "logon_script", &r->logon_script); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo12 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo12"); + ndr->depth++; + ndr_print_lsa_String(ndr, "profile_path", &r->profile_path); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo13 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo13"); + ndr->depth++; + ndr_print_lsa_String(ndr, "description", &r->description); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo14 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo14"); + ndr->depth++; + ndr_print_lsa_String(ndr, "workstations", &r->workstations); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo16 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo16"); + ndr->depth++; + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo17 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo17"); + ndr->depth++; + ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->parameters)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->parameters)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->parameters)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->parameters)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo20"); + ndr->depth++; + ndr_print_lsa_String(ndr, "parameters", &r->parameters); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_FieldsPresent(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_samr_FieldsPresent(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_samr_FieldsPresent(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), "SAMR_FIELD_ACCOUNT_NAME", SAMR_FIELD_ACCOUNT_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FULL_NAME", SAMR_FIELD_FULL_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_RID", SAMR_FIELD_RID, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIMARY_GID", SAMR_FIELD_PRIMARY_GID, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_DESCRIPTION", SAMR_FIELD_DESCRIPTION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COMMENT", SAMR_FIELD_COMMENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DIRECTORY", SAMR_FIELD_HOME_DIRECTORY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_HOME_DRIVE", SAMR_FIELD_HOME_DRIVE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_SCRIPT", SAMR_FIELD_LOGON_SCRIPT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PROFILE_PATH", SAMR_FIELD_PROFILE_PATH, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_WORKSTATIONS", SAMR_FIELD_WORKSTATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGON", SAMR_FIELD_LAST_LOGON, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_LOGOFF", SAMR_FIELD_LAST_LOGOFF, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LOGON_HOURS", SAMR_FIELD_LOGON_HOURS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_BAD_PWD_COUNT", SAMR_FIELD_BAD_PWD_COUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_NUM_LOGONS", SAMR_FIELD_NUM_LOGONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ALLOW_PWD_CHANGE", SAMR_FIELD_ALLOW_PWD_CHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_FORCE_PWD_CHANGE", SAMR_FIELD_FORCE_PWD_CHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_LAST_PWD_CHANGE", SAMR_FIELD_LAST_PWD_CHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_EXPIRY", SAMR_FIELD_ACCT_EXPIRY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_ACCT_FLAGS", SAMR_FIELD_ACCT_FLAGS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PARAMETERS", SAMR_FIELD_PARAMETERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_COUNTRY_CODE", SAMR_FIELD_COUNTRY_CODE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_CODE_PAGE", SAMR_FIELD_CODE_PAGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PASSWORD", SAMR_FIELD_PASSWORD, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PASSWORD2", SAMR_FIELD_PASSWORD2, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_PRIVATE_DATA", SAMR_FIELD_PRIVATE_DATA, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_EXPIRED_FLAG", SAMR_FIELD_EXPIRED_FLAG, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_SEC_DESC", SAMR_FIELD_SEC_DESC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_FIELD_OWF_PWD", SAMR_FIELD_OWF_PWD, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo21 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->parameters)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_samr_FieldsPresent(ndr, NDR_SCALARS, r->fields_present)); + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_set)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_set)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->unknown4)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->parameters)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3)); + if (r->buffer) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_count)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_count)); + } + NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r) +{ + uint32_t _ptr_buffer; + TALLOC_CTX *_mem_save_buffer_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->parameters)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer)); + if (_ptr_buffer) { + NDR_PULL_ALLOC(ndr, r->buffer); + } else { + r->buffer = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_samr_FieldsPresent(ndr, NDR_SCALARS, &r->fields_present)); + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_set)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_set)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unknown4)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->parameters)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3)); + if (r->buffer) { + _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer)); + NDR_PULL_ALLOC_N(ndr, r->buffer, ndr_get_array_size(ndr, &r->buffer)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, ndr_get_array_size(ndr, &r->buffer))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); + } + NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours)); + if (r->buffer) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffer, r->buf_count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo21"); + ndr->depth++; + ndr_print_NTTIME(ndr, "last_logon", r->last_logon); + ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); + ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change); + ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); + ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change); + ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change); + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr_print_lsa_String(ndr, "home_directory", &r->home_directory); + ndr_print_lsa_String(ndr, "home_drive", &r->home_drive); + ndr_print_lsa_String(ndr, "logon_script", &r->logon_script); + ndr_print_lsa_String(ndr, "profile_path", &r->profile_path); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr_print_lsa_String(ndr, "workstations", &r->workstations); + ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr_print_lsa_String(ndr, "parameters", &r->parameters); + ndr_print_lsa_String(ndr, "unknown1", &r->unknown1); + ndr_print_lsa_String(ndr, "unknown2", &r->unknown2); + ndr_print_lsa_String(ndr, "unknown3", &r->unknown3); + ndr_print_uint32(ndr, "buf_count", r->buf_count); + ndr_print_ptr(ndr, "buffer", r->buffer); + ndr->depth++; + if (r->buffer) { + ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count); + } + ndr->depth--; + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_uint32(ndr, "primary_gid", r->primary_gid); + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr_print_samr_FieldsPresent(ndr, "fields_present", r->fields_present); + ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours); + ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count); + ndr_print_uint16(ndr, "logon_count", r->logon_count); + ndr_print_uint16(ndr, "country_code", r->country_code); + ndr_print_uint16(ndr, "code_page", r->code_page); + ndr_print_uint8(ndr, "nt_password_set", r->nt_password_set); + ndr_print_uint8(ndr, "lm_password_set", r->lm_password_set); + ndr_print_uint8(ndr, "password_expired", r->password_expired); + ndr_print_uint8(ndr, "unknown4", r->unknown4); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 516)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 516)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r) +{ + ndr_print_struct(ndr, name, "samr_CryptPassword"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_array_uint8(ndr, "data", r->data, 516); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_samr_UserInfo23(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo23 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo23(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo23 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo23"); + ndr->depth++; + ndr_print_samr_UserInfo21(ndr, "info", &r->info); + ndr_print_samr_CryptPassword(ndr, "password", &r->password); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo24 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pw_len)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo24 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pw_len)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo24"); + ndr->depth++; + ndr_print_samr_CryptPassword(ndr, "password", &r->password); + ndr_print_uint8(ndr, "pw_len", r->pw_len); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPasswordEx *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 532)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPasswordEx *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 532)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r) +{ + ndr_print_struct(ndr, name, "samr_CryptPasswordEx"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_array_uint8(ndr, "data", r->data, 532); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_samr_UserInfo25(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo25 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo25(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo25 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo25"); + ndr->depth++; + ndr_print_samr_UserInfo21(ndr, "info", &r->info); + ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo26 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pw_len)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo26 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pw_len)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo26"); + ndr->depth++; + ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password); + ndr_print_uint8(ndr, "pw_len", r->pw_len); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, const union samr_UserInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); + break; + + case 7: + NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); + break; + + case 8: + NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); + break; + + case 9: + NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); + break; + + case 10: + NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); + break; + + case 11: + NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); + break; + + case 12: + NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); + break; + + case 13: + NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); + break; + + case 14: + NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); + break; + + case 16: + NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); + break; + + case 17: + NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); + break; + + case 20: + NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); + break; + + case 21: + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); + break; + + case 23: + NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23)); + break; + + case 24: + NDR_CHECK(ndr_push_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24)); + break; + + case 25: + NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25)); + break; + + case 26: + NDR_CHECK(ndr_push_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); + break; + + case 7: + NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); + break; + + case 8: + NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); + break; + + case 9: + break; + + case 10: + NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); + break; + + case 11: + NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); + break; + + case 12: + NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); + break; + + case 13: + NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); + break; + + case 14: + NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); + break; + + case 16: + break; + + case 17: + break; + + case 20: + NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); + break; + + case 21: + NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); + break; + + case 23: + NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23)); + break; + + case 24: + break; + + case 25: + NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25)); + break; + + case 26: + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, union samr_UserInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); + break; } + + case 4: { + NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); + break; } + + case 5: { + NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); + break; } + + case 6: { + NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); + break; } + + case 7: { + NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); + break; } + + case 8: { + NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); + break; } + + case 9: { + NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); + break; } + + case 10: { + NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); + break; } + + case 11: { + NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); + break; } + + case 12: { + NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); + break; } + + case 13: { + NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); + break; } + + case 14: { + NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); + break; } + + case 16: { + NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); + break; } + + case 17: { + NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); + break; } + + case 20: { + NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); + break; } + + case 21: { + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); + break; } + + case 23: { + NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23)); + break; } + + case 24: { + NDR_CHECK(ndr_pull_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24)); + break; } + + case 25: { + NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25)); + break; } + + case 26: { + NDR_CHECK(ndr_pull_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); + break; + + case 6: + NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); + break; + + case 7: + NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); + break; + + case 8: + NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); + break; + + case 9: + break; + + case 10: + NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); + break; + + case 11: + NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); + break; + + case 12: + NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); + break; + + case 13: + NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); + break; + + case 14: + NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); + break; + + case 16: + break; + + case 17: + break; + + case 20: + NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); + break; + + case 21: + NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); + break; + + case 23: + NDR_CHECK(ndr_pull_samr_UserInfo23(ndr, NDR_BUFFERS, &r->info23)); + break; + + case 24: + break; + + case 25: + NDR_CHECK(ndr_pull_samr_UserInfo25(ndr, NDR_BUFFERS, &r->info25)); + break; + + case 26: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_UserInfo"); + switch (level) { + case 1: + ndr_print_samr_UserInfo1(ndr, "info1", &r->info1); + break; + + case 2: + ndr_print_samr_UserInfo2(ndr, "info2", &r->info2); + break; + + case 3: + ndr_print_samr_UserInfo3(ndr, "info3", &r->info3); + break; + + case 4: + ndr_print_samr_UserInfo4(ndr, "info4", &r->info4); + break; + + case 5: + ndr_print_samr_UserInfo5(ndr, "info5", &r->info5); + break; + + case 6: + ndr_print_samr_UserInfo6(ndr, "info6", &r->info6); + break; + + case 7: + ndr_print_samr_UserInfo7(ndr, "info7", &r->info7); + break; + + case 8: + ndr_print_samr_UserInfo8(ndr, "info8", &r->info8); + break; + + case 9: + ndr_print_samr_UserInfo9(ndr, "info9", &r->info9); + break; + + case 10: + ndr_print_samr_UserInfo10(ndr, "info10", &r->info10); + break; + + case 11: + ndr_print_samr_UserInfo11(ndr, "info11", &r->info11); + break; + + case 12: + ndr_print_samr_UserInfo12(ndr, "info12", &r->info12); + break; + + case 13: + ndr_print_samr_UserInfo13(ndr, "info13", &r->info13); + break; + + case 14: + ndr_print_samr_UserInfo14(ndr, "info14", &r->info14); + break; + + case 16: + ndr_print_samr_UserInfo16(ndr, "info16", &r->info16); + break; + + case 17: + ndr_print_samr_UserInfo17(ndr, "info17", &r->info17); + break; + + case 20: + ndr_print_samr_UserInfo20(ndr, "info20", &r->info20); + break; + + case 21: + ndr_print_samr_UserInfo21(ndr, "info21", &r->info21); + break; + + case 23: + ndr_print_samr_UserInfo23(ndr, "info23", &r->info23); + break; + + case 24: + ndr_print_samr_UserInfo24(ndr, "info24", &r->info24); + break; + + case 25: + ndr_print_samr_UserInfo25(ndr, "info25", &r->info25); + break; + + case 26: + ndr_print_samr_UserInfo26(ndr, "info26", &r->info26); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r) +{ + ndr_print_struct(ndr, name, "samr_Password"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_array_uint8(ndr, "hash", r->hash, 16); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r) +{ + ndr_print_struct(ndr, name, "samr_RidWithAttribute"); + ndr->depth++; + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r) +{ + uint32_t cntr_rids_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->rids) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) { + NDR_CHECK(ndr_push_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r) +{ + uint32_t _ptr_rids; + uint32_t cntr_rids_1; + TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_rids_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids)); + if (_ptr_rids) { + NDR_PULL_ALLOC(ndr, r->rids); + } else { + r->rids = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->rids) { + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->rids)); + NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids)); + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0); + for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) { + NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0); + } + if (r->rids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r) +{ + uint32_t cntr_rids_1; + ndr_print_struct(ndr, name, "samr_RidWithAttributeArray"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "rids", r->rids); + ndr->depth++; + if (r->rids) { + ndr->print(ndr, "%s: ARRAY(%d)", "rids", r->count); + ndr->depth++; + for (cntr_rids_1=0;cntr_rids_1count;cntr_rids_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_rids_1); + if (idx_1) { + ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispEntryGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryGeneral *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispEntryGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryGeneral *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r) +{ + ndr_print_struct(ndr, name, "samr_DispEntryGeneral"); + ndr->depth++; + ndr_print_uint32(ndr, "idx", r->idx); + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr_print_lsa_String(ndr, "full_name", &r->full_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoGeneral *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoGeneral *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "samr_DispInfoGeneral"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispEntryFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFull *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispEntryFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFull *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r) +{ + ndr_print_struct(ndr, name, "samr_DispEntryFull"); + ndr->depth++; + ndr_print_uint32(ndr, "idx", r->idx); + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags); + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFull *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFull *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "samr_DispInfoFull"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispEntryFullGroup(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryFullGroup *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); + NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->acct_flags)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispEntryFullGroup(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryFullGroup *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); + NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->acct_flags)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r) +{ + ndr_print_struct(ndr, name, "samr_DispEntryFullGroup"); + ndr->depth++; + ndr_print_uint32(ndr, "idx", r->idx); + ndr_print_uint32(ndr, "rid", r->rid); + ndr_print_samr_GroupAttrs(ndr, "acct_flags", r->acct_flags); + ndr_print_lsa_String(ndr, "account_name", &r->account_name); + ndr_print_lsa_String(ndr, "description", &r->description); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoFullGroups *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFullGroups *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "samr_DispInfoFullGroups"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispEntryAscii *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); + NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispEntryAscii *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); + NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r) +{ + ndr_print_struct(ndr, name, "samr_DispEntryAscii"); + ndr->depth++; + ndr_print_uint32(ndr, "idx", r->idx); + ndr_print_lsa_AsciiString(ndr, "account_name", &r->account_name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int ndr_flags, const struct samr_DispInfoAscii *r) +{ + uint32_t cntr_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->entries)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_push_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoAscii *r) +{ + uint32_t _ptr_entries; + uint32_t cntr_entries_1; + TALLOC_CTX *_mem_save_entries_0; + TALLOC_CTX *_mem_save_entries_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries)); + if (_ptr_entries) { + NDR_PULL_ALLOC(ndr, r->entries); + } else { + r->entries = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->entries) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries)); + _mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1])); + } + for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) { + NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (r->entries) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->entries, r->count)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r) +{ + uint32_t cntr_entries_1; + ndr_print_struct(ndr, name, "samr_DispInfoAscii"); + ndr->depth++; + ndr_print_uint32(ndr, "count", r->count); + ndr_print_ptr(ndr, "entries", r->entries); + ndr->depth++; + if (r->entries) { + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->count); + ndr->depth++; + for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_entries_1); + if (idx_1) { + ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_flags, const union samr_DispInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DispInfo(struct ndr_pull *ndr, int ndr_flags, union samr_DispInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3)); + break; } + + case 4: { + NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4)); + break; } + + case 5: { + NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_samr_DispInfoGeneral(ndr, NDR_BUFFERS, &r->info1)); + break; + + case 2: + NDR_CHECK(ndr_pull_samr_DispInfoFull(ndr, NDR_BUFFERS, &r->info2)); + break; + + case 3: + NDR_CHECK(ndr_pull_samr_DispInfoFullGroups(ndr, NDR_BUFFERS, &r->info3)); + break; + + case 4: + NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info4)); + break; + + case 5: + NDR_CHECK(ndr_pull_samr_DispInfoAscii(ndr, NDR_BUFFERS, &r->info5)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_DispInfo"); + switch (level) { + case 1: + ndr_print_samr_DispInfoGeneral(ndr, "info1", &r->info1); + break; + + case 2: + ndr_print_samr_DispInfoFull(ndr, "info2", &r->info2); + break; + + case 3: + ndr_print_samr_DispInfoFullGroups(ndr, "info3", &r->info3); + break; + + case 4: + ndr_print_samr_DispInfoAscii(ndr, "info4", &r->info4); + break; + + case 5: + ndr_print_samr_DispInfoAscii(ndr, "info5", &r->info5); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_PwInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_PwInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length)); + NDR_CHECK(ndr_push_samr_PasswordProperties(ndr, NDR_SCALARS, r->password_properties)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_PwInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_PwInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length)); + NDR_CHECK(ndr_pull_samr_PasswordProperties(ndr, NDR_SCALARS, &r->password_properties)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r) +{ + ndr_print_struct(ndr, name, "samr_PwInfo"); + ndr->depth++; + ndr_print_uint16(ndr, "min_password_length", r->min_password_length); + ndr_print_samr_PasswordProperties(ndr, "password_properties", r->password_properties); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_samr_RejectReason(ndr, NDR_SCALARS, r->reason)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ChangeReject(struct ndr_pull *ndr, int ndr_flags, struct samr_ChangeReject *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_samr_RejectReason(ndr, NDR_SCALARS, &r->reason)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r) +{ + ndr_print_struct(ndr, name, "samr_ChangeReject"); + ndr->depth++; + ndr_print_samr_RejectReason(ndr, "reason", r->reason); + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_ConnectInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_ConnectInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r) +{ + ndr_print_struct(ndr, name, "samr_ConnectInfo1"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_uint32(ndr, "unknown2", r->unknown2); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr_flags, const union samr_ConnectInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ConnectInfo(struct ndr_pull *ndr, int ndr_flags, union samr_ConnectInfo *r) +{ + int level; + uint32_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_ConnectInfo"); + switch (level) { + case 1: + ndr_print_samr_ConnectInfo1(ndr, "info1", &r->info1); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_ValidateFieldsPresent(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_samr_ValidateFieldsPresent(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_samr_ValidateFieldsPresent(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), "SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET", SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME", SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_LOCKOUT_TIME", SAMR_VALIDATE_FIELD_LOCKOUT_TIME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT", SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_VALIDATE_FIELD_PASSWORD_HISTORY", SAMR_VALIDATE_FIELD_PASSWORD_HISTORY, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordLevel(struct ndr_push *ndr, int ndr_flags, enum samr_ValidatePasswordLevel r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidatePasswordLevel *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r) +{ + const char *val = NULL; + + switch (r) { + case NetValidateAuthentication: val = "NetValidateAuthentication"; break; + case NetValidatePasswordChange: val = "NetValidatePasswordChange"; break; + case NetValidatePasswordReset: val = "NetValidatePasswordReset"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_samr_ValidationStatus(struct ndr_push *ndr, int ndr_flags, enum samr_ValidationStatus r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidationStatus(struct ndr_pull *ndr, int ndr_flags, enum samr_ValidationStatus *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r) +{ + const char *val = NULL; + + switch (r) { + case SAMR_VALIDATION_STATUS_SUCCESS: val = "SAMR_VALIDATION_STATUS_SUCCESS"; break; + case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = "SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE"; break; + case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = "SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT"; break; + case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = "SAMR_VALIDATION_STATUS_BAD_PASSWORD"; break; + case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = "SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT"; break; + case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = "SAMR_VALIDATION_STATUS_PWD_TOO_SHORT"; break; + case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = "SAMR_VALIDATION_STATUS_PWD_TOO_LONG"; break; + case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = "SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH"; break; + case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = "SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidationBlob *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidationBlob *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, r->data); + } else { + r->data = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->data) { + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->data, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->data)); + NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0); + } + if (r->data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r) +{ + ndr_print_struct(ndr, name, "samr_ValidationBlob"); + ndr->depth++; + ndr_print_uint32(ndr, "length", r->length); + ndr_print_ptr(ndr, "data", r->data); + ndr->depth++; + if (r->data) { + ndr_print_array_uint8(ndr, "data", r->data, r->length); + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordInfo *r) +{ + uint32_t cntr_pwd_history_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, r->fields_present)); + NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_password_change)); + NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->bad_password_time)); + NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->lockout_time)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pwd_count)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->pwd_history)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->pwd_history) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwd_history_len)); + for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) { + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1])); + } + for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) { + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordInfo *r) +{ + uint32_t _ptr_pwd_history; + uint32_t cntr_pwd_history_1; + TALLOC_CTX *_mem_save_pwd_history_0; + TALLOC_CTX *_mem_save_pwd_history_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_ValidateFieldsPresent(ndr, NDR_SCALARS, &r->fields_present)); + NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_password_change)); + NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->bad_password_time)); + NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->lockout_time)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pwd_count)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwd_history_len)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pwd_history)); + if (_ptr_pwd_history) { + NDR_PULL_ALLOC(ndr, r->pwd_history); + } else { + r->pwd_history = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->pwd_history) { + _mem_save_pwd_history_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->pwd_history)); + NDR_PULL_ALLOC_N(ndr, r->pwd_history, ndr_get_array_size(ndr, &r->pwd_history)); + _mem_save_pwd_history_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0); + for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) { + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1])); + } + for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) { + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_0, 0); + } + if (r->pwd_history) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pwd_history, r->pwd_history_len)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r) +{ + uint32_t cntr_pwd_history_1; + ndr_print_struct(ndr, name, "samr_ValidatePasswordInfo"); + ndr->depth++; + ndr_print_samr_ValidateFieldsPresent(ndr, "fields_present", r->fields_present); + ndr_print_NTTIME_hyper(ndr, "last_password_change", r->last_password_change); + ndr_print_NTTIME_hyper(ndr, "bad_password_time", r->bad_password_time); + ndr_print_NTTIME_hyper(ndr, "lockout_time", r->lockout_time); + ndr_print_uint32(ndr, "bad_pwd_count", r->bad_pwd_count); + ndr_print_uint32(ndr, "pwd_history_len", r->pwd_history_len); + ndr_print_ptr(ndr, "pwd_history", r->pwd_history); + ndr->depth++; + if (r->pwd_history) { + ndr->print(ndr, "%s: ARRAY(%d)", "pwd_history", r->pwd_history_len); + ndr->depth++; + for (cntr_pwd_history_1=0;cntr_pwd_history_1pwd_history_len;cntr_pwd_history_1++) { + char *idx_1=NULL; + asprintf(&idx_1, "[%d]", cntr_pwd_history_1); + if (idx_1) { + ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordRepCtr(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordRepCtr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_samr_ValidationStatus(ndr, NDR_SCALARS, r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordRepCtr(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordRepCtr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_samr_ValidationStatus(ndr, NDR_SCALARS, &r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r) +{ + ndr_print_struct(ndr, name, "samr_ValidatePasswordRepCtr"); + ndr->depth++; + ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info); + ndr_print_samr_ValidationStatus(ndr, "status", r->status); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordRep *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordRep(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordRep *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr1)); + break; + + case 2: + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr2)); + break; + + case 3: + NDR_CHECK(ndr_pull_samr_ValidatePasswordRepCtr(ndr, NDR_BUFFERS, &r->ctr3)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_ValidatePasswordRep"); + switch (level) { + case 1: + ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr1", &r->ctr1); + break; + + case 2: + ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr2", &r->ctr2); + break; + + case 3: + ndr_print_samr_ValidatePasswordRepCtr(ndr, "ctr3", &r->ctr3); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordReq3(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pwd_must_change_at_next_logon)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->clear_lockout)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account)); + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq3(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq3 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pwd_must_change_at_next_logon)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->clear_lockout)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account)); + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r) +{ + ndr_print_struct(ndr, name, "samr_ValidatePasswordReq3"); + ndr->depth++; + ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info); + ndr_print_lsa_StringLarge(ndr, "password", &r->password); + ndr_print_lsa_StringLarge(ndr, "account", &r->account); + ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash); + ndr_print_uint8(ndr, "pwd_must_change_at_next_logon", r->pwd_must_change_at_next_logon); + ndr_print_uint8(ndr, "clear_lockout", r->clear_lockout); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordReq2(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account)); + NDR_CHECK(ndr_push_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq2(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->password)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->account)); + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->hash)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->password)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->account)); + NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->hash)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r) +{ + ndr_print_struct(ndr, name, "samr_ValidatePasswordReq2"); + ndr->depth++; + ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info); + ndr_print_lsa_StringLarge(ndr, "password", &r->password); + ndr_print_lsa_StringLarge(ndr, "account", &r->account); + ndr_print_samr_ValidationBlob(ndr, "hash", &r->hash); + ndr_print_uint8(ndr, "password_matched", r->password_matched); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordReq1(struct ndr_push *ndr, int ndr_flags, const struct samr_ValidatePasswordReq1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_matched)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq1(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordReq1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_SCALARS, &r->info)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_matched)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_ValidatePasswordInfo(ndr, NDR_BUFFERS, &r->info)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r) +{ + ndr_print_struct(ndr, name, "samr_ValidatePasswordReq1"); + ndr->depth++; + ndr_print_samr_ValidatePasswordInfo(ndr, "info", &r->info); + ndr_print_uint8(ndr, "password_matched", r->password_matched); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, int ndr_flags, const union samr_ValidatePasswordReq *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1)); + break; + + case 2: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2)); + break; + + case 3: + NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePasswordReq(struct ndr_pull *ndr, int ndr_flags, union samr_ValidatePasswordReq *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2)); + break; } + + case 3: { + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq1(ndr, NDR_BUFFERS, &r->req1)); + break; + + case 2: + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq2(ndr, NDR_BUFFERS, &r->req2)); + break; + + case 3: + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq3(ndr, NDR_BUFFERS, &r->req3)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "samr_ValidatePasswordReq"); + switch (level) { + case 1: + ndr_print_samr_ValidatePasswordReq1(ndr, "req1", &r->req1); + break; + + case 2: + ndr_print_samr_ValidatePasswordReq2(ndr, "req2", &r->req2); + break; + + case 3: + ndr_print_samr_ValidatePasswordReq3(ndr, "req3", &r->req3); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_samr_Connect(struct ndr_push *ndr, int flags, const struct samr_Connect *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); + if (r->in.system_name) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name)); + } + NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Connect(struct ndr_pull *ndr, int flags, struct samr_Connect *r) +{ + uint32_t _ptr_system_name; + TALLOC_CTX *_mem_save_system_name_0; + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name)); + if (_ptr_system_name) { + NDR_PULL_ALLOC(ndr, r->in.system_name); + } else { + r->in.system_name = NULL; + } + if (r->in.system_name) { + _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); + } + NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + ZERO_STRUCTP(r->out.connect_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r) +{ + ndr_print_struct(ndr, name, "samr_Connect"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Connect"); + ndr->depth++; + ndr_print_ptr(ndr, "system_name", r->in.system_name); + ndr->depth++; + if (r->in.system_name) { + ndr_print_uint16(ndr, "system_name", *r->in.system_name); + } + ndr->depth--; + ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Connect"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r) +{ + if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + } + if (flags & NDR_OUT) { + if (r->out.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r) +{ + TALLOC_CTX *_mem_save_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.handle); + *r->out.handle = *r->in.handle; + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r) +{ + ndr_print_struct(ndr, name, "samr_Close"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Close"); + ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Close"); + ndr->depth++; + ndr_print_ptr(ndr, "handle", r->out.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->out.handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetSecurity(struct ndr_push *ndr, int flags, const struct samr_SetSecurity *r) +{ + if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info)); + if (r->in.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, int flags, struct samr_SetSecurity *r) +{ + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_sdbuf_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sdbuf); + } + _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r) +{ + ndr_print_struct(ndr, name, "samr_SetSecurity"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetSecurity"); + ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info); + ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetSecurity"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int flags, const struct samr_QuerySecurity *r) +{ + if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info)); + } + if (flags & NDR_OUT) { + if (r->out.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r) +{ + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_sdbuf_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info)); + NDR_PULL_ALLOC(ndr, r->out.sdbuf); + ZERO_STRUCTP(r->out.sdbuf); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sdbuf); + } + _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r) +{ + ndr_print_struct(ndr, name, "samr_QuerySecurity"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QuerySecurity"); + ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QuerySecurity"); + ndr->depth++; + ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_Shutdown(struct ndr_push *ndr, int flags, const struct samr_Shutdown *r) +{ + if (flags & NDR_IN) { + if (r->in.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Shutdown(struct ndr_pull *ndr, int flags, struct samr_Shutdown *r) +{ + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r) +{ + ndr_print_struct(ndr, name, "samr_Shutdown"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Shutdown"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Shutdown"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int flags, const struct samr_LookupDomain *r) +{ + if (flags & NDR_IN) { + if (r->in.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + if (r->in.domain_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name)); + } + if (flags & NDR_OUT) { + if (r->out.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r) +{ + TALLOC_CTX *_mem_save_connect_handle_0; + TALLOC_CTX *_mem_save_domain_name_0; + TALLOC_CTX *_mem_save_sid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_name); + } + _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.sid); + ZERO_STRUCTP(r->out.sid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r) +{ + ndr_print_struct(ndr, name, "samr_LookupDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_LookupDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle); + ndr->depth--; + ndr_print_ptr(ndr, "domain_name", r->in.domain_name); + ndr->depth++; + ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_LookupDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "sid", r->out.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->out.sid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int flags, const struct samr_EnumDomains *r) +{ + if (flags & NDR_IN) { + if (r->in.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + if (r->in.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); + } + if (flags & NDR_OUT) { + if (r->out.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); + if (r->out.sam == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + if (r->out.num_entries == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r) +{ + TALLOC_CTX *_mem_save_connect_handle_0; + TALLOC_CTX *_mem_save_resume_handle_0; + TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_num_entries_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + *r->out.resume_handle = *r->in.resume_handle; + NDR_PULL_ALLOC(ndr, r->out.sam); + ZERO_STRUCTP(r->out.sam); + NDR_PULL_ALLOC(ndr, r->out.num_entries); + ZERO_STRUCTP(r->out.num_entries); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sam); + } + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.num_entries); + } + _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r) +{ + ndr_print_struct(ndr, name, "samr_EnumDomains"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_EnumDomains"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle); + ndr->depth--; + ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); + ndr->depth--; + ndr_print_uint32(ndr, "buf_size", r->in.buf_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_EnumDomains"); + ndr->depth++; + ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sam", r->out.sam); + ndr->depth++; + ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr->depth--; + ndr_print_ptr(ndr, "num_entries", r->out.num_entries); + ndr->depth++; + ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r) +{ + if (flags & NDR_IN) { + if (r->in.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_CHECK(ndr_push_samr_DomainAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + if (r->in.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + } + if (flags & NDR_OUT) { + if (r->out.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r) +{ + TALLOC_CTX *_mem_save_connect_handle_0; + TALLOC_CTX *_mem_save_sid_0; + TALLOC_CTX *_mem_save_domain_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_DomainAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.domain_handle); + ZERO_STRUCTP(r->out.domain_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r) +{ + ndr_print_struct(ndr, name, "samr_OpenDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_OpenDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle); + ndr->depth--; + ndr_print_samr_DomainAccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_ptr(ndr, "sid", r->in.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->in.sid); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_OpenDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r) +{ + ndr_print_struct(ndr, name, "samr_QueryDomainInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryDomainInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryDomainInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetDomainInfo(struct ndr_push *ndr, int flags, const struct samr_SetDomainInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetDomainInfo(struct ndr_pull *ndr, int flags, struct samr_SetDomainInfo *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r) +{ + ndr_print_struct(ndr, name, "samr_SetDomainInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetDomainInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetDomainInfo"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_CreateDomainGroup(struct ndr_push *ndr, int flags, const struct samr_CreateDomainGroup *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + if (r->out.rid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_CreateDomainGroup(struct ndr_pull *ndr, int flags, struct samr_CreateDomainGroup *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_name_0; + TALLOC_CTX *_mem_save_group_handle_0; + TALLOC_CTX *_mem_save_rid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.name); + } + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.group_handle); + ZERO_STRUCTP(r->out.group_handle); + NDR_PULL_ALLOC(ndr, r->out.rid); + ZERO_STRUCTP(r->out.rid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rid); + } + _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r) +{ + ndr_print_struct(ndr, name, "samr_CreateDomainGroup"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_CreateDomainGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", r->in.name); + ndr->depth--; + ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_CreateDomainGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->out.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle); + ndr->depth--; + ndr_print_ptr(ndr, "rid", r->out.rid); + ndr->depth++; + ndr_print_uint32(ndr, "rid", *r->out.rid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, int flags, const struct samr_EnumDomainGroups *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size)); + } + if (flags & NDR_OUT) { + if (r->out.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); + if (r->out.sam == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + if (r->out.num_entries == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, int flags, struct samr_EnumDomainGroups *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_resume_handle_0; + TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_num_entries_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + *r->out.resume_handle = *r->in.resume_handle; + NDR_PULL_ALLOC(ndr, r->out.sam); + ZERO_STRUCTP(r->out.sam); + NDR_PULL_ALLOC(ndr, r->out.num_entries); + ZERO_STRUCTP(r->out.num_entries); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sam); + } + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.num_entries); + } + _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r) +{ + ndr_print_struct(ndr, name, "samr_EnumDomainGroups"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_EnumDomainGroups"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); + ndr->depth--; + ndr_print_uint32(ndr, "max_size", r->in.max_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_EnumDomainGroups"); + ndr->depth++; + ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sam", r->out.sam); + ndr->depth++; + ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr->depth--; + ndr_print_ptr(ndr, "num_entries", r->out.num_entries); + ndr->depth++; + ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_CreateUser(struct ndr_push *ndr, int flags, const struct samr_CreateUser *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.account_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); + NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + if (r->out.rid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_CreateUser(struct ndr_pull *ndr, int flags, struct samr_CreateUser *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_account_name_0; + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_rid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account_name); + } + _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.user_handle); + ZERO_STRUCTP(r->out.user_handle); + NDR_PULL_ALLOC(ndr, r->out.rid); + ZERO_STRUCTP(r->out.rid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rid); + } + _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r) +{ + ndr_print_struct(ndr, name, "samr_CreateUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_CreateUser"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "account_name", r->in.account_name); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", r->in.account_name); + ndr->depth--; + ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_CreateUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->out.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle); + ndr->depth--; + ndr_print_ptr(ndr, "rid", r->out.rid); + ndr->depth++; + ndr_print_uint32(ndr, "rid", *r->out.rid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int flags, const struct samr_EnumDomainUsers *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size)); + } + if (flags & NDR_OUT) { + if (r->out.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); + if (r->out.sam == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + if (r->out.num_entries == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int flags, struct samr_EnumDomainUsers *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_resume_handle_0; + TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_num_entries_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + *r->out.resume_handle = *r->in.resume_handle; + NDR_PULL_ALLOC(ndr, r->out.sam); + ZERO_STRUCTP(r->out.sam); + NDR_PULL_ALLOC(ndr, r->out.num_entries); + ZERO_STRUCTP(r->out.num_entries); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sam); + } + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.num_entries); + } + _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r) +{ + ndr_print_struct(ndr, name, "samr_EnumDomainUsers"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_EnumDomainUsers"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); + ndr->depth--; + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags); + ndr_print_uint32(ndr, "max_size", r->in.max_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_EnumDomainUsers"); + ndr->depth++; + ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sam", r->out.sam); + ndr->depth++; + ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr->depth--; + ndr_print_ptr(ndr, "num_entries", r->out.num_entries); + ndr->depth++; + ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_CreateDomAlias(struct ndr_push *ndr, int flags, const struct samr_CreateDomAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.alias_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name)); + NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + if (r->out.rid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_CreateDomAlias(struct ndr_pull *ndr, int flags, struct samr_CreateDomAlias *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_alias_name_0; + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_rid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_name); + } + _mem_save_alias_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.alias_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + ZERO_STRUCTP(r->out.alias_handle); + NDR_PULL_ALLOC(ndr, r->out.rid); + ZERO_STRUCTP(r->out.rid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rid); + } + _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r) +{ + ndr_print_struct(ndr, name, "samr_CreateDomAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_CreateDomAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "alias_name", r->in.alias_name); + ndr->depth++; + ndr_print_lsa_String(ndr, "alias_name", r->in.alias_name); + ndr->depth--; + ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_CreateDomAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle); + ndr->depth--; + ndr_print_ptr(ndr, "rid", r->out.rid); + ndr->depth++; + ndr_print_uint32(ndr, "rid", *r->out.rid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, int flags, const struct samr_EnumDomainAliases *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags)); + } + if (flags & NDR_OUT) { + if (r->out.resume_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); + if (r->out.sam == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + if (r->out.num_entries == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_entries)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, int flags, struct samr_EnumDomainAliases *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_resume_handle_0; + TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_num_entries_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags)); + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + *r->out.resume_handle = *r->in.resume_handle; + NDR_PULL_ALLOC(ndr, r->out.sam); + ZERO_STRUCTP(r->out.sam); + NDR_PULL_ALLOC(ndr, r->out.num_entries); + ZERO_STRUCTP(r->out.num_entries); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.resume_handle); + } + _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sam); + } + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.num_entries); + } + _mem_save_num_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.num_entries, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_entries)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_entries_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r) +{ + ndr_print_struct(ndr, name, "samr_EnumDomainAliases"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_EnumDomainAliases"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); + ndr->depth--; + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_EnumDomainAliases"); + ndr->depth++; + ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); + ndr->depth++; + ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sam", r->out.sam); + ndr->depth++; + ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr->depth--; + ndr_print_ptr(ndr, "num_entries", r->out.num_entries); + ndr->depth++; + ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, int flags, const struct samr_GetAliasMembership *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.sids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + } + if (flags & NDR_OUT) { + if (r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, int flags, struct samr_GetAliasMembership *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_sids_0; + TALLOC_CTX *_mem_save_rids_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sids); + } + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.rids); + ZERO_STRUCTP(r->out.rids); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rids); + } + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r) +{ + ndr_print_struct(ndr, name, "samr_GetAliasMembership"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetAliasMembership"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sids", r->in.sids); + ndr->depth++; + ndr_print_lsa_SidArray(ndr, "sids", r->in.sids); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetAliasMembership"); + ndr->depth++; + ndr_print_ptr(ndr, "rids", r->out.rids); + ndr->depth++; + ndr_print_samr_Ids(ndr, "rids", r->out.rids); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r) +{ + uint32_t cntr_names_0; + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1000)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names)); + for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0])); + } + for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0])); + } + } + if (flags & NDR_OUT) { + if (r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + if (r->out.types == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r) +{ + uint32_t cntr_names_0; + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_names_0; + TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_types_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names)); + if (r->in.num_names < 0 || r->in.num_names > 1000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.names)); + if (ndr_get_array_length(ndr, &r->in.names) > ndr_get_array_size(ndr, &r->in.names)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.names), ndr_get_array_length(ndr, &r->in.names)); + } + NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names)); + _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0); + for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0])); + } + for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0); + NDR_PULL_ALLOC(ndr, r->out.rids); + ZERO_STRUCTP(r->out.rids); + NDR_PULL_ALLOC(ndr, r->out.types); + ZERO_STRUCTP(r->out.types); + if (r->in.names) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, 1000)); + } + if (r->in.names) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.names, r->in.num_names)); + } + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rids); + } + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.types); + } + _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r) +{ + uint32_t cntr_names_0; + ndr_print_struct(ndr, name, "samr_LookupNames"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_LookupNames"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint32(ndr, "num_names", r->in.num_names); + ndr->print(ndr, "%s: ARRAY(%d)", "names", r->in.num_names); + ndr->depth++; + for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_names_0); + if (idx_0) { + ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_LookupNames"); + ndr->depth++; + ndr_print_ptr(ndr, "rids", r->out.rids); + ndr->depth++; + ndr_print_samr_Ids(ndr, "rids", r->out.rids); + ndr->depth--; + ndr_print_ptr(ndr, "types", r->out.types); + ndr->depth++; + ndr_print_samr_Ids(ndr, "types", r->out.types); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_LookupRids(struct ndr_push *ndr, int flags, const struct samr_LookupRids *r) +{ + uint32_t cntr_rids_0; + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_rids)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1000)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_rids)); + for (cntr_rids_0 = 0; cntr_rids_0 < r->in.num_rids; cntr_rids_0++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rids[cntr_rids_0])); + } + } + if (flags & NDR_OUT) { + if (r->out.names == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names)); + if (r->out.types == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flags, struct samr_LookupRids *r) +{ + uint32_t cntr_rids_0; + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_names_0; + TALLOC_CTX *_mem_save_types_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_rids)); + if (r->in.num_rids < 0 || r->in.num_rids > 1000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rids)); + if (ndr_get_array_length(ndr, &r->in.rids) > ndr_get_array_size(ndr, &r->in.rids)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rids), ndr_get_array_length(ndr, &r->in.rids)); + } + NDR_PULL_ALLOC_N(ndr, r->in.rids, ndr_get_array_size(ndr, &r->in.rids)); + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, 0); + for (cntr_rids_0 = 0; cntr_rids_0 < r->in.num_rids; cntr_rids_0++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rids[cntr_rids_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0); + NDR_PULL_ALLOC(ndr, r->out.names); + ZERO_STRUCTP(r->out.names); + NDR_PULL_ALLOC(ndr, r->out.types); + ZERO_STRUCTP(r->out.types); + if (r->in.rids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.rids, 1000)); + } + if (r->in.rids) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.rids, r->in.num_rids)); + } + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.names); + } + _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_Strings(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.types); + } + _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.types, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.types)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r) +{ + uint32_t cntr_rids_0; + ndr_print_struct(ndr, name, "samr_LookupRids"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_LookupRids"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint32(ndr, "num_rids", r->in.num_rids); + ndr->print(ndr, "%s: ARRAY(%d)", "rids", r->in.num_rids); + ndr->depth++; + for (cntr_rids_0=0;cntr_rids_0in.num_rids;cntr_rids_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_rids_0); + if (idx_0) { + ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_LookupRids"); + ndr->depth++; + ndr_print_ptr(ndr, "names", r->out.names); + ndr->depth++; + ndr_print_lsa_Strings(ndr, "names", r->out.names); + ndr->depth--; + ndr_print_ptr(ndr, "types", r->out.types); + ndr->depth++; + ndr_print_samr_Ids(ndr, "types", r->out.types); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_OpenGroup(struct ndr_push *ndr, int flags, const struct samr_OpenGroup *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_samr_GroupAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + } + if (flags & NDR_OUT) { + if (r->out.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, int flags, struct samr_OpenGroup *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_group_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_GroupAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + NDR_PULL_ALLOC(ndr, r->out.group_handle); + ZERO_STRUCTP(r->out.group_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r) +{ + ndr_print_struct(ndr, name, "samr_OpenGroup"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_OpenGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_samr_GroupAccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_OpenGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->out.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int flags, const struct samr_QueryGroupInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int flags, struct samr_QueryGroupInfo *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_GroupInfoEnum(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r) +{ + ndr_print_struct(ndr, name, "samr_QueryGroupInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryGroupInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryGroupInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_GroupInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetGroupInfo(struct ndr_push *ndr, int flags, const struct samr_SetGroupInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetGroupInfo(struct ndr_pull *ndr, int flags, struct samr_SetGroupInfo *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_GroupInfoEnum(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r) +{ + ndr_print_struct(ndr, name, "samr_SetGroupInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetGroupInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr_print_samr_GroupInfoEnum(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_samr_GroupInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetGroupInfo"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AddGroupMember(struct ndr_push *ndr, int flags, const struct samr_AddGroupMember *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AddGroupMember(struct ndr_pull *ndr, int flags, struct samr_AddGroupMember *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r) +{ + ndr_print_struct(ndr, name, "samr_AddGroupMember"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_AddGroupMember"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr_print_uint32(ndr, "flags", r->in.flags); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_AddGroupMember"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DeleteDomainGroup(struct ndr_push *ndr, int flags, const struct samr_DeleteDomainGroup *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + } + if (flags & NDR_OUT) { + if (r->out.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DeleteDomainGroup(struct ndr_pull *ndr, int flags, struct samr_DeleteDomainGroup *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.group_handle); + *r->out.group_handle = *r->in.group_handle; + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r) +{ + ndr_print_struct(ndr, name, "samr_DeleteDomainGroup"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_DeleteDomainGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_DeleteDomainGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->out.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->out.group_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DeleteGroupMember(struct ndr_push *ndr, int flags, const struct samr_DeleteGroupMember *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DeleteGroupMember(struct ndr_pull *ndr, int flags, struct samr_DeleteGroupMember *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r) +{ + ndr_print_struct(ndr, name, "samr_DeleteGroupMember"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_DeleteGroupMember"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_DeleteGroupMember"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, int flags, const struct samr_QueryGroupMember *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + } + if (flags & NDR_OUT) { + if (r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + TALLOC_CTX *_mem_save_rids_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.rids); + ZERO_STRUCTP(r->out.rids); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rids); + } + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r) +{ + ndr_print_struct(ndr, name, "samr_QueryGroupMember"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryGroupMember"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryGroupMember"); + ndr->depth++; + ndr_print_ptr(ndr, "rids", r->out.rids); + ndr->depth++; + ndr_print_samr_RidTypeArray(ndr, "rids", r->out.rids); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetMemberAttributesOfGroup(struct ndr_push *ndr, int flags, const struct samr_SetMemberAttributesOfGroup *r) +{ + if (flags & NDR_IN) { + if (r->in.group_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetMemberAttributesOfGroup(struct ndr_pull *ndr, int flags, struct samr_SetMemberAttributesOfGroup *r) +{ + TALLOC_CTX *_mem_save_group_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.group_handle); + } + _mem_save_group_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.group_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.group_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r) +{ + ndr_print_struct(ndr, name, "samr_SetMemberAttributesOfGroup"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetMemberAttributesOfGroup"); + ndr->depth++; + ndr_print_ptr(ndr, "group_handle", r->in.group_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "group_handle", r->in.group_handle); + ndr->depth--; + ndr_print_uint32(ndr, "unknown1", r->in.unknown1); + ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetMemberAttributesOfGroup"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_OpenAlias(struct ndr_push *ndr, int flags, const struct samr_OpenAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_samr_AliasAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + } + if (flags & NDR_OUT) { + if (r->out.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, int flags, struct samr_OpenAlias *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_alias_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AliasAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + ZERO_STRUCTP(r->out.alias_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r) +{ + ndr_print_struct(ndr, name, "samr_OpenAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_OpenAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_samr_AliasAccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_OpenAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int flags, const struct samr_QueryAliasInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int flags, struct samr_QueryAliasInfo *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AliasInfoEnum(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r) +{ + ndr_print_struct(ndr, name, "samr_QueryAliasInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryAliasInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryAliasInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_AliasInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetAliasInfo(struct ndr_push *ndr, int flags, const struct samr_SetAliasInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetAliasInfo(struct ndr_pull *ndr, int flags, struct samr_SetAliasInfo *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AliasInfoEnum(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r) +{ + ndr_print_struct(ndr, name, "samr_SetAliasInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetAliasInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_samr_AliasInfoEnum(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_samr_AliasInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetAliasInfo"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DeleteDomAlias(struct ndr_push *ndr, int flags, const struct samr_DeleteDomAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + } + if (flags & NDR_OUT) { + if (r->out.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DeleteDomAlias(struct ndr_pull *ndr, int flags, struct samr_DeleteDomAlias *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + *r->out.alias_handle = *r->in.alias_handle; + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r) +{ + ndr_print_struct(ndr, name, "samr_DeleteDomAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_DeleteDomAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_DeleteDomAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->out.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->out.alias_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AddAliasMember(struct ndr_push *ndr, int flags, const struct samr_AddAliasMember *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + if (r->in.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AddAliasMember(struct ndr_pull *ndr, int flags, struct samr_AddAliasMember *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_sid_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r) +{ + ndr_print_struct(ndr, name, "samr_AddAliasMember"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_AddAliasMember"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sid", r->in.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->in.sid); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_AddAliasMember"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DeleteAliasMember(struct ndr_push *ndr, int flags, const struct samr_DeleteAliasMember *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + if (r->in.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DeleteAliasMember(struct ndr_pull *ndr, int flags, struct samr_DeleteAliasMember *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_sid_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r) +{ + ndr_print_struct(ndr, name, "samr_DeleteAliasMember"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_DeleteAliasMember"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sid", r->in.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->in.sid); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_DeleteAliasMember"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetMembersInAlias(struct ndr_push *ndr, int flags, const struct samr_GetMembersInAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + } + if (flags & NDR_OUT) { + if (r->out.sids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetMembersInAlias(struct ndr_pull *ndr, int flags, struct samr_GetMembersInAlias *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_sids_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.sids); + ZERO_STRUCTP(r->out.sids); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sids); + } + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r) +{ + ndr_print_struct(ndr, name, "samr_GetMembersInAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetMembersInAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetMembersInAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "sids", r->out.sids); + ndr->depth++; + ndr_print_lsa_SidArray(ndr, "sids", r->out.sids); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + } + if (flags & NDR_OUT) { + if (r->out.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_user_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + NDR_PULL_ALLOC(ndr, r->out.user_handle); + ZERO_STRUCTP(r->out.user_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r) +{ + ndr_print_struct(ndr, name, "samr_OpenUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_OpenUser"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_OpenUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->out.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_DeleteUser(struct ndr_push *ndr, int flags, const struct samr_DeleteUser *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + } + if (flags & NDR_OUT) { + if (r->out.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_DeleteUser(struct ndr_pull *ndr, int flags, struct samr_DeleteUser *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.user_handle); + *r->out.user_handle = *r->in.user_handle; + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r) +{ + ndr_print_struct(ndr, name, "samr_DeleteUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_DeleteUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_DeleteUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->out.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r) +{ + ndr_print_struct(ndr, name, "samr_QueryUserInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryUserInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryUserInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_UserInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r) +{ + ndr_print_struct(ndr, name, "samr_SetUserInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetUserInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_samr_UserInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetUserInfo"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ChangePasswordUser(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_present)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_lm_crypted)); + if (r->in.old_lm_crypted) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_lm_crypted)); + if (r->in.new_lm_crypted) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted)); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.nt_present)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_nt_crypted)); + if (r->in.old_nt_crypted) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_nt_crypted)); + if (r->in.new_nt_crypted) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted)); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross1_present)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_cross)); + if (r->in.nt_cross) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross)); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.cross2_present)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_cross)); + if (r->in.lm_cross) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ChangePasswordUser(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser *r) +{ + uint32_t _ptr_old_lm_crypted; + uint32_t _ptr_new_lm_crypted; + uint32_t _ptr_old_nt_crypted; + uint32_t _ptr_new_nt_crypted; + uint32_t _ptr_nt_cross; + uint32_t _ptr_lm_cross; + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_old_lm_crypted_0; + TALLOC_CTX *_mem_save_new_lm_crypted_0; + TALLOC_CTX *_mem_save_old_nt_crypted_0; + TALLOC_CTX *_mem_save_new_nt_crypted_0; + TALLOC_CTX *_mem_save_nt_cross_0; + TALLOC_CTX *_mem_save_lm_cross_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_present)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_lm_crypted)); + if (_ptr_old_lm_crypted) { + NDR_PULL_ALLOC(ndr, r->in.old_lm_crypted); + } else { + r->in.old_lm_crypted = NULL; + } + if (r->in.old_lm_crypted) { + _mem_save_old_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.old_lm_crypted, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_lm_crypted)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_lm_crypted_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_lm_crypted)); + if (_ptr_new_lm_crypted) { + NDR_PULL_ALLOC(ndr, r->in.new_lm_crypted); + } else { + r->in.new_lm_crypted = NULL; + } + if (r->in.new_lm_crypted) { + _mem_save_new_lm_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.new_lm_crypted, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_lm_crypted)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_lm_crypted_0, 0); + } + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.nt_present)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_nt_crypted)); + if (_ptr_old_nt_crypted) { + NDR_PULL_ALLOC(ndr, r->in.old_nt_crypted); + } else { + r->in.old_nt_crypted = NULL; + } + if (r->in.old_nt_crypted) { + _mem_save_old_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.old_nt_crypted, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.old_nt_crypted)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_nt_crypted_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_nt_crypted)); + if (_ptr_new_nt_crypted) { + NDR_PULL_ALLOC(ndr, r->in.new_nt_crypted); + } else { + r->in.new_nt_crypted = NULL; + } + if (r->in.new_nt_crypted) { + _mem_save_new_nt_crypted_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.new_nt_crypted, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_nt_crypted)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_nt_crypted_0, 0); + } + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross1_present)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_cross)); + if (_ptr_nt_cross) { + NDR_PULL_ALLOC(ndr, r->in.nt_cross); + } else { + r->in.nt_cross = NULL; + } + if (r->in.nt_cross) { + _mem_save_nt_cross_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_cross, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_cross)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_cross_0, 0); + } + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.cross2_present)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_cross)); + if (_ptr_lm_cross) { + NDR_PULL_ALLOC(ndr, r->in.lm_cross); + } else { + r->in.lm_cross = NULL; + } + if (r->in.lm_cross) { + _mem_save_lm_cross_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_cross, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_cross)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_cross_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r) +{ + ndr_print_struct(ndr, name, "samr_ChangePasswordUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_ChangePasswordUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr_print_uint8(ndr, "lm_present", r->in.lm_present); + ndr_print_ptr(ndr, "old_lm_crypted", r->in.old_lm_crypted); + ndr->depth++; + if (r->in.old_lm_crypted) { + ndr_print_samr_Password(ndr, "old_lm_crypted", r->in.old_lm_crypted); + } + ndr->depth--; + ndr_print_ptr(ndr, "new_lm_crypted", r->in.new_lm_crypted); + ndr->depth++; + if (r->in.new_lm_crypted) { + ndr_print_samr_Password(ndr, "new_lm_crypted", r->in.new_lm_crypted); + } + ndr->depth--; + ndr_print_uint8(ndr, "nt_present", r->in.nt_present); + ndr_print_ptr(ndr, "old_nt_crypted", r->in.old_nt_crypted); + ndr->depth++; + if (r->in.old_nt_crypted) { + ndr_print_samr_Password(ndr, "old_nt_crypted", r->in.old_nt_crypted); + } + ndr->depth--; + ndr_print_ptr(ndr, "new_nt_crypted", r->in.new_nt_crypted); + ndr->depth++; + if (r->in.new_nt_crypted) { + ndr_print_samr_Password(ndr, "new_nt_crypted", r->in.new_nt_crypted); + } + ndr->depth--; + ndr_print_uint8(ndr, "cross1_present", r->in.cross1_present); + ndr_print_ptr(ndr, "nt_cross", r->in.nt_cross); + ndr->depth++; + if (r->in.nt_cross) { + ndr_print_samr_Password(ndr, "nt_cross", r->in.nt_cross); + } + ndr->depth--; + ndr_print_uint8(ndr, "cross2_present", r->in.cross2_present); + ndr_print_ptr(ndr, "lm_cross", r->in.lm_cross); + ndr->depth++; + if (r->in.lm_cross) { + ndr_print_samr_Password(ndr, "lm_cross", r->in.lm_cross); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_ChangePasswordUser"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, int flags, const struct samr_GetGroupsForUser *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + } + if (flags & NDR_OUT) { + if (r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, int flags, struct samr_GetGroupsForUser *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_rids_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.rids); + ZERO_STRUCTP(r->out.rids); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rids); + } + _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r) +{ + ndr_print_struct(ndr, name, "samr_GetGroupsForUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetGroupsForUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetGroupsForUser"); + ndr->depth++; + ndr_print_ptr(ndr, "rids", r->out.rids); + ndr->depth++; + ndr_print_samr_RidWithAttributeArray(ndr, "rids", r->out.rids); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryDisplayInfo(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); + } + if (flags & NDR_OUT) { + if (r->out.total_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size)); + if (r->out.returned_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size)); + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_total_size_0; + TALLOC_CTX *_mem_save_returned_size_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); + NDR_PULL_ALLOC(ndr, r->out.total_size); + ZERO_STRUCTP(r->out.total_size); + NDR_PULL_ALLOC(ndr, r->out.returned_size); + ZERO_STRUCTP(r->out.returned_size); + 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.total_size); + } + _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.returned_size); + } + _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC); + 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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r) +{ + ndr_print_struct(ndr, name, "samr_QueryDisplayInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "start_idx", r->in.start_idx); + ndr_print_uint32(ndr, "max_entries", r->in.max_entries); + ndr_print_uint32(ndr, "buf_size", r->in.buf_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "total_size", r->out.total_size); + ndr->depth++; + ndr_print_uint32(ndr, "total_size", *r->out.total_size); + ndr->depth--; + ndr_print_ptr(ndr, "returned_size", r->out.returned_size); + ndr->depth++; + ndr_print_uint32(ndr, "returned_size", *r->out.returned_size); + ndr->depth--; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_DispInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + } + if (flags & NDR_OUT) { + if (r->out.idx == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_idx_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + NDR_PULL_ALLOC(ndr, r->out.idx); + ZERO_STRUCTP(r->out.idx); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.idx); + } + _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r) +{ + ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_String(ndr, "name", &r->in.name); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex"); + ndr->depth++; + ndr_print_ptr(ndr, "idx", r->out.idx); + ndr->depth++; + ndr_print_uint32(ndr, "idx", *r->out.idx); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsDomain(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsDomain *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsDomain(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsDomain *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r) +{ + ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsDomain"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_TestPrivateFunctionsUser(struct ndr_push *ndr, int flags, const struct samr_TestPrivateFunctionsUser *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_TestPrivateFunctionsUser(struct ndr_pull *ndr, int flags, struct samr_TestPrivateFunctionsUser *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r) +{ + ndr_print_struct(ndr, name, "samr_TestPrivateFunctionsUser"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_TestPrivateFunctionsUser"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_TestPrivateFunctionsUser"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + 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_samr_PwInfo(ndr, NDR_SCALARS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r) +{ + ndr_print_struct(ndr, name, "samr_GetUserPwInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetUserPwInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetUserPwInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_samr_PwInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_RemoveMemberFromForeignDomain(struct ndr_push *ndr, int flags, const struct samr_RemoveMemberFromForeignDomain *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_RemoveMemberFromForeignDomain(struct ndr_pull *ndr, int flags, struct samr_RemoveMemberFromForeignDomain *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_sid_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r) +{ + ndr_print_struct(ndr, name, "samr_RemoveMemberFromForeignDomain"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_RemoveMemberFromForeignDomain"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sid", r->in.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->in.sid); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_RemoveMemberFromForeignDomain"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDomainInfo2 *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_QueryDomainInfo2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryDomainInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryDomainInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryUserInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo2 *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryUserInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo2 *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_QueryUserInfo2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryUserInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryUserInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_UserInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryDisplayInfo2(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo2 *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); + } + if (flags & NDR_OUT) { + if (r->out.total_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size)); + if (r->out.returned_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size)); + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo2 *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_total_size_0; + TALLOC_CTX *_mem_save_returned_size_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); + NDR_PULL_ALLOC(ndr, r->out.total_size); + ZERO_STRUCTP(r->out.total_size); + NDR_PULL_ALLOC(ndr, r->out.returned_size); + ZERO_STRUCTP(r->out.returned_size); + 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.total_size); + } + _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.returned_size); + } + _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC); + 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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_QueryDisplayInfo2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "start_idx", r->in.start_idx); + ndr_print_uint32(ndr, "max_entries", r->in.max_entries); + ndr_print_uint32(ndr, "buf_size", r->in.buf_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "total_size", r->out.total_size); + ndr->depth++; + ndr_print_uint32(ndr, "total_size", *r->out.total_size); + ndr->depth--; + ndr_print_ptr(ndr, "returned_size", r->out.returned_size); + ndr->depth++; + ndr_print_uint32(ndr, "returned_size", *r->out.returned_size); + ndr->depth--; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_DispInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_push *ndr, int flags, const struct samr_GetDisplayEnumerationIndex2 *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + } + if (flags & NDR_OUT) { + if (r->out.idx == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.idx)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex2 *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_idx_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + NDR_PULL_ALLOC(ndr, r->out.idx); + ZERO_STRUCTP(r->out.idx); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.idx); + } + _mem_save_idx_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.idx, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.idx)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_idx_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r) +{ + ndr_print_struct(ndr, name, "samr_GetDisplayEnumerationIndex2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetDisplayEnumerationIndex2"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_lsa_String(ndr, "name", &r->in.name); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetDisplayEnumerationIndex2"); + ndr->depth++; + ndr_print_ptr(ndr, "idx", r->out.idx); + ndr->depth++; + ndr_print_uint32(ndr, "idx", *r->out.idx); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_CreateUser2(struct ndr_push *ndr, int flags, const struct samr_CreateUser2 *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + if (r->in.account_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); + NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags)); + NDR_CHECK(ndr_push_samr_UserAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + if (r->out.access_granted == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_granted)); + if (r->out.rid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_CreateUser2(struct ndr_pull *ndr, int flags, struct samr_CreateUser2 *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_account_name_0; + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_access_granted_0; + TALLOC_CTX *_mem_save_rid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account_name); + } + _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags)); + NDR_CHECK(ndr_pull_samr_UserAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.user_handle); + ZERO_STRUCTP(r->out.user_handle); + NDR_PULL_ALLOC(ndr, r->out.access_granted); + ZERO_STRUCTP(r->out.access_granted); + NDR_PULL_ALLOC(ndr, r->out.rid); + ZERO_STRUCTP(r->out.rid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.access_granted); + } + _mem_save_access_granted_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.access_granted, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_granted)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_granted_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rid); + } + _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r) +{ + ndr_print_struct(ndr, name, "samr_CreateUser2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_CreateUser2"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_ptr(ndr, "account_name", r->in.account_name); + ndr->depth++; + ndr_print_lsa_String(ndr, "account_name", r->in.account_name); + ndr->depth--; + ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags); + ndr_print_samr_UserAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_CreateUser2"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->out.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->out.user_handle); + ndr->depth--; + ndr_print_ptr(ndr, "access_granted", r->out.access_granted); + ndr->depth++; + ndr_print_uint32(ndr, "access_granted", *r->out.access_granted); + ndr->depth--; + ndr_print_ptr(ndr, "rid", r->out.rid); + ndr->depth++; + ndr_print_uint32(ndr, "rid", *r->out.rid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_QueryDisplayInfo3(struct ndr_push *ndr, int flags, const struct samr_QueryDisplayInfo3 *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start_idx)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_entries)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); + } + if (flags & NDR_OUT) { + if (r->out.total_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_size)); + if (r->out.returned_size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.returned_size)); + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_QueryDisplayInfo3(struct ndr_pull *ndr, int flags, struct samr_QueryDisplayInfo3 *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_total_size_0; + TALLOC_CTX *_mem_save_returned_size_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start_idx)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_entries)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); + NDR_PULL_ALLOC(ndr, r->out.total_size); + ZERO_STRUCTP(r->out.total_size); + NDR_PULL_ALLOC(ndr, r->out.returned_size); + ZERO_STRUCTP(r->out.returned_size); + 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.total_size); + } + _mem_save_total_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.total_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_size_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.returned_size); + } + _mem_save_returned_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.returned_size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_size_0, LIBNDR_FLAG_REF_ALLOC); + 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_set_switch_value(ndr, r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DispInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r) +{ + ndr_print_struct(ndr, name, "samr_QueryDisplayInfo3"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_QueryDisplayInfo3"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_uint32(ndr, "start_idx", r->in.start_idx); + ndr_print_uint32(ndr, "max_entries", r->in.max_entries); + ndr_print_uint32(ndr, "buf_size", r->in.buf_size); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_QueryDisplayInfo3"); + ndr->depth++; + ndr_print_ptr(ndr, "total_size", r->out.total_size); + ndr->depth++; + ndr_print_uint32(ndr, "total_size", *r->out.total_size); + ndr->depth--; + ndr_print_ptr(ndr, "returned_size", r->out.returned_size); + ndr->depth++; + ndr_print_uint32(ndr, "returned_size", *r->out.returned_size); + ndr->depth--; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_samr_DispInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_AddMultipleMembersToAlias(struct ndr_push *ndr, int flags, const struct samr_AddMultipleMembersToAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + if (r->in.sids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_AddMultipleMembersToAlias(struct ndr_pull *ndr, int flags, struct samr_AddMultipleMembersToAlias *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_sids_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sids); + } + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r) +{ + ndr_print_struct(ndr, name, "samr_AddMultipleMembersToAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_AddMultipleMembersToAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sids", r->in.sids); + ndr->depth++; + ndr_print_lsa_SidArray(ndr, "sids", r->in.sids); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_AddMultipleMembersToAlias"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_RemoveMultipleMembersFromAlias(struct ndr_push *ndr, int flags, const struct samr_RemoveMultipleMembersFromAlias *r) +{ + if (flags & NDR_IN) { + if (r->in.alias_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + if (r->in.sids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_RemoveMultipleMembersFromAlias(struct ndr_pull *ndr, int flags, struct samr_RemoveMultipleMembersFromAlias *r) +{ + TALLOC_CTX *_mem_save_alias_handle_0; + TALLOC_CTX *_mem_save_sids_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.alias_handle); + } + _mem_save_alias_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.alias_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.alias_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sids); + } + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r) +{ + ndr_print_struct(ndr, name, "samr_RemoveMultipleMembersFromAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_RemoveMultipleMembersFromAlias"); + ndr->depth++; + ndr_print_ptr(ndr, "alias_handle", r->in.alias_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "alias_handle", r->in.alias_handle); + ndr->depth--; + ndr_print_ptr(ndr, "sids", r->in.sids); + ndr->depth++; + ndr_print_lsa_SidArray(ndr, "sids", r->in.sids); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_RemoveMultipleMembersFromAlias"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_OemChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_OemChangePasswordUser2 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); + if (r->in.server) { + NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + } + if (r->in.account == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password)); + if (r->in.password) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash)); + if (r->in.hash) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_OemChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_OemChangePasswordUser2 *r) +{ + uint32_t _ptr_server; + uint32_t _ptr_password; + uint32_t _ptr_hash; + TALLOC_CTX *_mem_save_server_0; + TALLOC_CTX *_mem_save_account_0; + TALLOC_CTX *_mem_save_password_0; + TALLOC_CTX *_mem_save_hash_0; + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->in.server); + } else { + r->in.server = NULL; + } + if (r->in.server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); + NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account); + } + _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password)); + if (_ptr_password) { + NDR_PULL_ALLOC(ndr, r->in.password); + } else { + r->in.password = NULL; + } + if (r->in.password) { + _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash)); + if (_ptr_hash) { + NDR_PULL_ALLOC(ndr, r->in.hash); + } else { + r->in.hash = NULL; + } + if (r->in.hash) { + _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r) +{ + ndr_print_struct(ndr, name, "samr_OemChangePasswordUser2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_OemChangePasswordUser2"); + ndr->depth++; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_lsa_AsciiString(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + ndr_print_lsa_AsciiString(ndr, "account", r->in.account); + ndr->depth--; + ndr_print_ptr(ndr, "password", r->in.password); + ndr->depth++; + if (r->in.password) { + ndr_print_samr_CryptPassword(ndr, "password", r->in.password); + } + ndr->depth--; + ndr_print_ptr(ndr, "hash", r->in.hash); + ndr->depth++; + if (r->in.hash) { + ndr_print_samr_Password(ndr, "hash", r->in.hash); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_OemChangePasswordUser2"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ChangePasswordUser2(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser2 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); + if (r->in.server) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + } + if (r->in.account == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password)); + if (r->in.nt_password) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier)); + if (r->in.nt_verifier) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier)); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password)); + if (r->in.lm_password) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier)); + if (r->in.lm_verifier) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ChangePasswordUser2(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser2 *r) +{ + uint32_t _ptr_server; + uint32_t _ptr_nt_password; + uint32_t _ptr_nt_verifier; + uint32_t _ptr_lm_password; + uint32_t _ptr_lm_verifier; + TALLOC_CTX *_mem_save_server_0; + TALLOC_CTX *_mem_save_account_0; + TALLOC_CTX *_mem_save_nt_password_0; + TALLOC_CTX *_mem_save_nt_verifier_0; + TALLOC_CTX *_mem_save_lm_password_0; + TALLOC_CTX *_mem_save_lm_verifier_0; + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->in.server); + } else { + r->in.server = NULL; + } + if (r->in.server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account); + } + _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password)); + if (_ptr_nt_password) { + NDR_PULL_ALLOC(ndr, r->in.nt_password); + } else { + r->in.nt_password = NULL; + } + if (r->in.nt_password) { + _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier)); + if (_ptr_nt_verifier) { + NDR_PULL_ALLOC(ndr, r->in.nt_verifier); + } else { + r->in.nt_verifier = NULL; + } + if (r->in.nt_verifier) { + _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0); + } + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password)); + if (_ptr_lm_password) { + NDR_PULL_ALLOC(ndr, r->in.lm_password); + } else { + r->in.lm_password = NULL; + } + if (r->in.lm_password) { + _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier)); + if (_ptr_lm_verifier) { + NDR_PULL_ALLOC(ndr, r->in.lm_verifier); + } else { + r->in.lm_verifier = NULL; + } + if (r->in.lm_verifier) { + _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r) +{ + ndr_print_struct(ndr, name, "samr_ChangePasswordUser2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_ChangePasswordUser2"); + ndr->depth++; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_lsa_String(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + ndr_print_lsa_String(ndr, "account", r->in.account); + ndr->depth--; + ndr_print_ptr(ndr, "nt_password", r->in.nt_password); + ndr->depth++; + if (r->in.nt_password) { + ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password); + } + ndr->depth--; + ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier); + ndr->depth++; + if (r->in.nt_verifier) { + ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier); + } + ndr->depth--; + ndr_print_uint8(ndr, "lm_change", r->in.lm_change); + ndr_print_ptr(ndr, "lm_password", r->in.lm_password); + ndr->depth++; + if (r->in.lm_password) { + ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password); + } + ndr->depth--; + ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier); + ndr->depth++; + if (r->in.lm_verifier) { + ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_ChangePasswordUser2"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetDomPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetDomPwInfo *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name)); + if (r->in.domain_name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name)); + } + } + if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_PwInfo(ndr, NDR_SCALARS, r->out.info)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetDomPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetDomPwInfo *r) +{ + uint32_t _ptr_domain_name; + TALLOC_CTX *_mem_save_domain_name_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name)); + if (_ptr_domain_name) { + NDR_PULL_ALLOC(ndr, r->in.domain_name); + } else { + r->in.domain_name = NULL; + } + if (r->in.domain_name) { + _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0); + } + 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_samr_PwInfo(ndr, NDR_SCALARS, r->out.info)); + 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; +} + +_PUBLIC_ void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r) +{ + ndr_print_struct(ndr, name, "samr_GetDomPwInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetDomPwInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_name", r->in.domain_name); + ndr->depth++; + if (r->in.domain_name) { + ndr_print_lsa_String(ndr, "domain_name", r->in.domain_name); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetDomPwInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_samr_PwInfo(ndr, "info", r->out.info); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_Connect2(struct ndr_push *ndr, int flags, const struct samr_Connect2 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); + if (r->in.system_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags, struct samr_Connect2 *r) +{ + uint32_t _ptr_system_name; + TALLOC_CTX *_mem_save_system_name_0; + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name)); + if (_ptr_system_name) { + NDR_PULL_ALLOC(ndr, r->in.system_name); + } else { + r->in.system_name = NULL; + } + if (r->in.system_name) { + _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name)); + if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); + } + NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + ZERO_STRUCTP(r->out.connect_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r) +{ + ndr_print_struct(ndr, name, "samr_Connect2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Connect2"); + ndr->depth++; + ndr_print_ptr(ndr, "system_name", r->in.system_name); + ndr->depth++; + if (r->in.system_name) { + ndr_print_string(ndr, "system_name", r->in.system_name); + } + ndr->depth--; + ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Connect2"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r) +{ + if (flags & NDR_IN) { + if (r->in.user_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r) +{ + TALLOC_CTX *_mem_save_user_handle_0; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.user_handle); + } + _mem_save_user_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r) +{ + ndr_print_struct(ndr, name, "samr_SetUserInfo2"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetUserInfo2"); + ndr->depth++; + ndr_print_ptr(ndr, "user_handle", r->in.user_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle); + ndr->depth--; + ndr_print_uint16(ndr, "level", r->in.level); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info, r->in.level); + ndr_print_samr_UserInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetUserInfo2"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_SetBootKeyInformation *r) +{ + if (flags & NDR_IN) { + if (r->in.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_SetBootKeyInformation *r) +{ + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r) +{ + ndr_print_struct(ndr, name, "samr_SetBootKeyInformation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetBootKeyInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->in.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->in.connect_handle); + ndr->depth--; + ndr_print_uint32(ndr, "unknown1", r->in.unknown1); + ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_uint32(ndr, "unknown3", r->in.unknown3); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetBootKeyInformation"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_GetBootKeyInformation(struct ndr_push *ndr, int flags, const struct samr_GetBootKeyInformation *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + } + if (flags & NDR_OUT) { + if (r->out.unknown == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_GetBootKeyInformation(struct ndr_pull *ndr, int flags, struct samr_GetBootKeyInformation *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_unknown_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.unknown); + ZERO_STRUCTP(r->out.unknown); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.unknown); + } + _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r) +{ + ndr_print_struct(ndr, name, "samr_GetBootKeyInformation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_GetBootKeyInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_GetBootKeyInformation"); + ndr->depth++; + ndr_print_ptr(ndr, "unknown", r->out.unknown); + ndr->depth++; + ndr_print_uint32(ndr, "unknown", *r->out.unknown); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_Connect3(struct ndr_push *ndr, int flags, const struct samr_Connect3 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); + if (r->in.system_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags, struct samr_Connect3 *r) +{ + uint32_t _ptr_system_name; + TALLOC_CTX *_mem_save_system_name_0; + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name)); + if (_ptr_system_name) { + NDR_PULL_ALLOC(ndr, r->in.system_name); + } else { + r->in.system_name = NULL; + } + if (r->in.system_name) { + _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name)); + if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + ZERO_STRUCTP(r->out.connect_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r) +{ + ndr_print_struct(ndr, name, "samr_Connect3"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Connect3"); + ndr->depth++; + ndr_print_ptr(ndr, "system_name", r->in.system_name); + ndr->depth++; + if (r->in.system_name) { + ndr_print_string(ndr, "system_name", r->in.system_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Connect3"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, const struct samr_Connect4 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); + if (r->in.system_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + } + if (flags & NDR_OUT) { + if (r->out.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, struct samr_Connect4 *r) +{ + uint32_t _ptr_system_name; + TALLOC_CTX *_mem_save_system_name_0; + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name)); + if (_ptr_system_name) { + NDR_PULL_ALLOC(ndr, r->in.system_name); + } else { + r->in.system_name = NULL; + } + if (r->in.system_name) { + _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name)); + if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + ZERO_STRUCTP(r->out.connect_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r) +{ + ndr_print_struct(ndr, name, "samr_Connect4"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Connect4"); + ndr->depth++; + ndr_print_ptr(ndr, "system_name", r->in.system_name); + ndr->depth++; + if (r->in.system_name) { + ndr_print_string(ndr, "system_name", r->in.system_name); + } + ndr->depth--; + ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Connect4"); + ndr->depth++; + ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser3 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server)); + if (r->in.server) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + } + if (r->in.account == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_password)); + if (r->in.nt_password) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.nt_verifier)); + if (r->in.nt_verifier) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier)); + } + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.lm_change)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_password)); + if (r->in.lm_password) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lm_verifier)); + if (r->in.lm_verifier) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password3)); + if (r->in.password3) { + NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3)); + } + } + if (flags & NDR_OUT) { + if (r->out.dominfo == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, r->out.dominfo)); + if (r->out.reject == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, r->out.reject)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser3 *r) +{ + uint32_t _ptr_server; + uint32_t _ptr_nt_password; + uint32_t _ptr_nt_verifier; + uint32_t _ptr_lm_password; + uint32_t _ptr_lm_verifier; + uint32_t _ptr_password3; + TALLOC_CTX *_mem_save_server_0; + TALLOC_CTX *_mem_save_account_0; + TALLOC_CTX *_mem_save_nt_password_0; + TALLOC_CTX *_mem_save_nt_verifier_0; + TALLOC_CTX *_mem_save_lm_password_0; + TALLOC_CTX *_mem_save_lm_verifier_0; + TALLOC_CTX *_mem_save_password3_0; + TALLOC_CTX *_mem_save_dominfo_0; + TALLOC_CTX *_mem_save_reject_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server)); + if (_ptr_server) { + NDR_PULL_ALLOC(ndr, r->in.server); + } else { + r->in.server = NULL; + } + if (r->in.server) { + _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.server)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0); + } + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account); + } + _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_password)); + if (_ptr_nt_password) { + NDR_PULL_ALLOC(ndr, r->in.nt_password); + } else { + r->in.nt_password = NULL; + } + if (r->in.nt_password) { + _mem_save_nt_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_password, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.nt_password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_password_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nt_verifier)); + if (_ptr_nt_verifier) { + NDR_PULL_ALLOC(ndr, r->in.nt_verifier); + } else { + r->in.nt_verifier = NULL; + } + if (r->in.nt_verifier) { + _mem_save_nt_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.nt_verifier, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.nt_verifier)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nt_verifier_0, 0); + } + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.lm_change)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_password)); + if (_ptr_lm_password) { + NDR_PULL_ALLOC(ndr, r->in.lm_password); + } else { + r->in.lm_password = NULL; + } + if (r->in.lm_password) { + _mem_save_lm_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_password, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.lm_password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_password_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lm_verifier)); + if (_ptr_lm_verifier) { + NDR_PULL_ALLOC(ndr, r->in.lm_verifier); + } else { + r->in.lm_verifier = NULL; + } + if (r->in.lm_verifier) { + _mem_save_lm_verifier_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.lm_verifier, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.lm_verifier)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lm_verifier_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password3)); + if (_ptr_password3) { + NDR_PULL_ALLOC(ndr, r->in.password3); + } else { + r->in.password3 = NULL; + } + if (r->in.password3) { + _mem_save_password3_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.password3, 0); + NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, r->in.password3)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password3_0, 0); + } + NDR_PULL_ALLOC(ndr, r->out.dominfo); + ZERO_STRUCTP(r->out.dominfo); + NDR_PULL_ALLOC(ndr, r->out.reject); + ZERO_STRUCTP(r->out.reject); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.dominfo); + } + _mem_save_dominfo_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.dominfo, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, r->out.dominfo)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.reject); + } + _mem_save_reject_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.reject, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, r->out.reject)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r) +{ + ndr_print_struct(ndr, name, "samr_ChangePasswordUser3"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_ChangePasswordUser3"); + ndr->depth++; + ndr_print_ptr(ndr, "server", r->in.server); + ndr->depth++; + if (r->in.server) { + ndr_print_lsa_String(ndr, "server", r->in.server); + } + ndr->depth--; + ndr_print_ptr(ndr, "account", r->in.account); + ndr->depth++; + ndr_print_lsa_String(ndr, "account", r->in.account); + ndr->depth--; + ndr_print_ptr(ndr, "nt_password", r->in.nt_password); + ndr->depth++; + if (r->in.nt_password) { + ndr_print_samr_CryptPassword(ndr, "nt_password", r->in.nt_password); + } + ndr->depth--; + ndr_print_ptr(ndr, "nt_verifier", r->in.nt_verifier); + ndr->depth++; + if (r->in.nt_verifier) { + ndr_print_samr_Password(ndr, "nt_verifier", r->in.nt_verifier); + } + ndr->depth--; + ndr_print_uint8(ndr, "lm_change", r->in.lm_change); + ndr_print_ptr(ndr, "lm_password", r->in.lm_password); + ndr->depth++; + if (r->in.lm_password) { + ndr_print_samr_CryptPassword(ndr, "lm_password", r->in.lm_password); + } + ndr->depth--; + ndr_print_ptr(ndr, "lm_verifier", r->in.lm_verifier); + ndr->depth++; + if (r->in.lm_verifier) { + ndr_print_samr_Password(ndr, "lm_verifier", r->in.lm_verifier); + } + ndr->depth--; + ndr_print_ptr(ndr, "password3", r->in.password3); + ndr->depth++; + if (r->in.password3) { + ndr_print_samr_CryptPassword(ndr, "password3", r->in.password3); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_ChangePasswordUser3"); + ndr->depth++; + ndr_print_ptr(ndr, "dominfo", r->out.dominfo); + ndr->depth++; + ndr_print_samr_DomInfo1(ndr, "dominfo", r->out.dominfo); + ndr->depth--; + ndr_print_ptr(ndr, "reject", r->out.reject); + ndr->depth++; + ndr_print_samr_ChangeReject(ndr, "reject", r->out.reject); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); + if (r->in.system_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level_in)); + if (r->in.info_in == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info_in, r->in.level_in)); + NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in)); + } + if (flags & NDR_OUT) { + if (r->out.level_out == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out)); + if (r->out.info_out == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info_out, *r->out.level_out)); + NDR_CHECK(ndr_push_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out)); + if (r->out.connect_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r) +{ + uint32_t _ptr_system_name; + TALLOC_CTX *_mem_save_system_name_0; + TALLOC_CTX *_mem_save_info_in_0; + TALLOC_CTX *_mem_save_level_out_0; + TALLOC_CTX *_mem_save_info_out_0; + TALLOC_CTX *_mem_save_connect_handle_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name)); + if (_ptr_system_name) { + NDR_PULL_ALLOC(ndr, r->in.system_name); + } else { + r->in.system_name = NULL; + } + if (r->in.system_name) { + _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name)); + if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); + } + NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level_in)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info_in); + } + _mem_save_info_in_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info_in, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info_in, r->in.level_in)); + NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->in.info_in)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_in_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.level_out); + ZERO_STRUCTP(r->out.level_out); + NDR_PULL_ALLOC(ndr, r->out.info_out); + ZERO_STRUCTP(r->out.info_out); + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + ZERO_STRUCTP(r->out.connect_handle); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.level_out); + } + _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.info_out); + } + _mem_save_info_out_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.info_out, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info_out, *r->out.level_out)); + NDR_CHECK(ndr_pull_samr_ConnectInfo(ndr, NDR_SCALARS, r->out.info_out)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_out_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.connect_handle); + } + _mem_save_connect_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.connect_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.connect_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connect_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r) +{ + ndr_print_struct(ndr, name, "samr_Connect5"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_Connect5"); + ndr->depth++; + ndr_print_ptr(ndr, "system_name", r->in.system_name); + ndr->depth++; + if (r->in.system_name) { + ndr_print_string(ndr, "system_name", r->in.system_name); + } + ndr->depth--; + ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_uint32(ndr, "level_in", r->in.level_in); + ndr_print_ptr(ndr, "info_in", r->in.info_in); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.info_in, r->in.level_in); + ndr_print_samr_ConnectInfo(ndr, "info_in", r->in.info_in); + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_Connect5"); + ndr->depth++; + ndr_print_ptr(ndr, "level_out", r->out.level_out); + ndr->depth++; + ndr_print_uint32(ndr, "level_out", *r->out.level_out); + ndr->depth--; + ndr_print_ptr(ndr, "info_out", r->out.info_out); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.info_out, *r->out.level_out); + ndr_print_samr_ConnectInfo(ndr, "info_out", r->out.info_out); + ndr->depth--; + ndr_print_ptr(ndr, "connect_handle", r->out.connect_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "connect_handle", r->out.connect_handle); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags, const struct samr_RidToSid *r) +{ + if (flags & NDR_IN) { + if (r->in.domain_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.rid)); + } + if (flags & NDR_OUT) { + if (r->out.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags, struct samr_RidToSid *r) +{ + TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_sid_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.domain_handle); + } + _mem_save_domain_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rid)); + NDR_PULL_ALLOC(ndr, r->out.sid); + ZERO_STRUCTP(r->out.sid); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sid); + } + _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r) +{ + ndr_print_struct(ndr, name, "samr_RidToSid"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_RidToSid"); + ndr->depth++; + ndr_print_ptr(ndr, "domain_handle", r->in.domain_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); + ndr->depth--; + ndr_print_uint32(ndr, "rid", r->in.rid); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_RidToSid"); + ndr->depth++; + ndr_print_ptr(ndr, "sid", r->out.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", r->out.sid); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_SetDsrmPassword(struct ndr_push *ndr, int flags, const struct samr_SetDsrmPassword *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.name)); + if (r->in.name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hash)); + if (r->in.hash) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.hash)); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_SetDsrmPassword(struct ndr_pull *ndr, int flags, struct samr_SetDsrmPassword *r) +{ + uint32_t _ptr_name; + uint32_t _ptr_hash; + TALLOC_CTX *_mem_save_name_0; + TALLOC_CTX *_mem_save_hash_0; + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name)); + if (_ptr_name) { + NDR_PULL_ALLOC(ndr, r->in.name); + } else { + r->in.name = NULL; + } + if (r->in.name) { + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hash)); + if (_ptr_hash) { + NDR_PULL_ALLOC(ndr, r->in.hash); + } else { + r->in.hash = NULL; + } + if (r->in.hash) { + _mem_save_hash_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.hash, 0); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.hash)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hash_0, 0); + } + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r) +{ + ndr_print_struct(ndr, name, "samr_SetDsrmPassword"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_SetDsrmPassword"); + ndr->depth++; + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + if (r->in.name) { + ndr_print_lsa_String(ndr, "name", r->in.name); + } + ndr->depth--; + ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_ptr(ndr, "hash", r->in.hash); + ndr->depth++; + if (r->in.hash) { + ndr_print_samr_Password(ndr, "hash", r->in.hash); + } + ndr->depth--; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_SetDsrmPassword"); + ndr->depth++; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_samr_ValidatePassword(struct ndr_push *ndr, int flags, const struct samr_ValidatePassword *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_push_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); + } + if (flags & NDR_OUT) { + if (r->out.rep == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.rep, r->in.level)); + NDR_CHECK(ndr_push_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rep)); + NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ValidatePassword(struct ndr_pull *ndr, int flags, struct samr_ValidatePassword *r) +{ + TALLOC_CTX *_mem_save_rep_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_samr_ValidatePasswordLevel(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordReq(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); + NDR_PULL_ALLOC(ndr, r->out.rep); + ZERO_STRUCTP(r->out.rep); + } + if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rep); + } + _mem_save_rep_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rep, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.rep, r->in.level)); + NDR_CHECK(ndr_pull_samr_ValidatePasswordRep(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rep)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rep_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r) +{ + ndr_print_struct(ndr, name, "samr_ValidatePassword"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "samr_ValidatePassword"); + ndr->depth++; + ndr_print_samr_ValidatePasswordLevel(ndr, "level", r->in.level); + ndr_print_set_switch_value(ndr, &r->in.req, r->in.level); + ndr_print_samr_ValidatePasswordReq(ndr, "req", &r->in.req); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "samr_ValidatePassword"); + ndr->depth++; + ndr_print_ptr(ndr, "rep", r->out.rep); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->out.rep, r->in.level); + ndr_print_samr_ValidatePasswordRep(ndr, "rep", r->out.rep); + ndr->depth--; + ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static const struct ndr_interface_call samr_calls[] = { + { + "samr_Connect", + sizeof(struct samr_Connect), + (ndr_push_flags_fn_t) ndr_push_samr_Connect, + (ndr_pull_flags_fn_t) ndr_pull_samr_Connect, + (ndr_print_function_t) ndr_print_samr_Connect, + false, + }, + { + "samr_Close", + sizeof(struct samr_Close), + (ndr_push_flags_fn_t) ndr_push_samr_Close, + (ndr_pull_flags_fn_t) ndr_pull_samr_Close, + (ndr_print_function_t) ndr_print_samr_Close, + false, + }, + { + "samr_SetSecurity", + sizeof(struct samr_SetSecurity), + (ndr_push_flags_fn_t) ndr_push_samr_SetSecurity, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetSecurity, + (ndr_print_function_t) ndr_print_samr_SetSecurity, + false, + }, + { + "samr_QuerySecurity", + sizeof(struct samr_QuerySecurity), + (ndr_push_flags_fn_t) ndr_push_samr_QuerySecurity, + (ndr_pull_flags_fn_t) ndr_pull_samr_QuerySecurity, + (ndr_print_function_t) ndr_print_samr_QuerySecurity, + false, + }, + { + "samr_Shutdown", + sizeof(struct samr_Shutdown), + (ndr_push_flags_fn_t) ndr_push_samr_Shutdown, + (ndr_pull_flags_fn_t) ndr_pull_samr_Shutdown, + (ndr_print_function_t) ndr_print_samr_Shutdown, + false, + }, + { + "samr_LookupDomain", + sizeof(struct samr_LookupDomain), + (ndr_push_flags_fn_t) ndr_push_samr_LookupDomain, + (ndr_pull_flags_fn_t) ndr_pull_samr_LookupDomain, + (ndr_print_function_t) ndr_print_samr_LookupDomain, + false, + }, + { + "samr_EnumDomains", + sizeof(struct samr_EnumDomains), + (ndr_push_flags_fn_t) ndr_push_samr_EnumDomains, + (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomains, + (ndr_print_function_t) ndr_print_samr_EnumDomains, + false, + }, + { + "samr_OpenDomain", + sizeof(struct samr_OpenDomain), + (ndr_push_flags_fn_t) ndr_push_samr_OpenDomain, + (ndr_pull_flags_fn_t) ndr_pull_samr_OpenDomain, + (ndr_print_function_t) ndr_print_samr_OpenDomain, + false, + }, + { + "samr_QueryDomainInfo", + sizeof(struct samr_QueryDomainInfo), + (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo, + (ndr_print_function_t) ndr_print_samr_QueryDomainInfo, + false, + }, + { + "samr_SetDomainInfo", + sizeof(struct samr_SetDomainInfo), + (ndr_push_flags_fn_t) ndr_push_samr_SetDomainInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetDomainInfo, + (ndr_print_function_t) ndr_print_samr_SetDomainInfo, + false, + }, + { + "samr_CreateDomainGroup", + sizeof(struct samr_CreateDomainGroup), + (ndr_push_flags_fn_t) ndr_push_samr_CreateDomainGroup, + (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomainGroup, + (ndr_print_function_t) ndr_print_samr_CreateDomainGroup, + false, + }, + { + "samr_EnumDomainGroups", + sizeof(struct samr_EnumDomainGroups), + (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainGroups, + (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainGroups, + (ndr_print_function_t) ndr_print_samr_EnumDomainGroups, + false, + }, + { + "samr_CreateUser", + sizeof(struct samr_CreateUser), + (ndr_push_flags_fn_t) ndr_push_samr_CreateUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser, + (ndr_print_function_t) ndr_print_samr_CreateUser, + false, + }, + { + "samr_EnumDomainUsers", + sizeof(struct samr_EnumDomainUsers), + (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainUsers, + (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainUsers, + (ndr_print_function_t) ndr_print_samr_EnumDomainUsers, + false, + }, + { + "samr_CreateDomAlias", + sizeof(struct samr_CreateDomAlias), + (ndr_push_flags_fn_t) ndr_push_samr_CreateDomAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_CreateDomAlias, + (ndr_print_function_t) ndr_print_samr_CreateDomAlias, + false, + }, + { + "samr_EnumDomainAliases", + sizeof(struct samr_EnumDomainAliases), + (ndr_push_flags_fn_t) ndr_push_samr_EnumDomainAliases, + (ndr_pull_flags_fn_t) ndr_pull_samr_EnumDomainAliases, + (ndr_print_function_t) ndr_print_samr_EnumDomainAliases, + false, + }, + { + "samr_GetAliasMembership", + sizeof(struct samr_GetAliasMembership), + (ndr_push_flags_fn_t) ndr_push_samr_GetAliasMembership, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetAliasMembership, + (ndr_print_function_t) ndr_print_samr_GetAliasMembership, + false, + }, + { + "samr_LookupNames", + sizeof(struct samr_LookupNames), + (ndr_push_flags_fn_t) ndr_push_samr_LookupNames, + (ndr_pull_flags_fn_t) ndr_pull_samr_LookupNames, + (ndr_print_function_t) ndr_print_samr_LookupNames, + false, + }, + { + "samr_LookupRids", + sizeof(struct samr_LookupRids), + (ndr_push_flags_fn_t) ndr_push_samr_LookupRids, + (ndr_pull_flags_fn_t) ndr_pull_samr_LookupRids, + (ndr_print_function_t) ndr_print_samr_LookupRids, + false, + }, + { + "samr_OpenGroup", + sizeof(struct samr_OpenGroup), + (ndr_push_flags_fn_t) ndr_push_samr_OpenGroup, + (ndr_pull_flags_fn_t) ndr_pull_samr_OpenGroup, + (ndr_print_function_t) ndr_print_samr_OpenGroup, + false, + }, + { + "samr_QueryGroupInfo", + sizeof(struct samr_QueryGroupInfo), + (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupInfo, + (ndr_print_function_t) ndr_print_samr_QueryGroupInfo, + false, + }, + { + "samr_SetGroupInfo", + sizeof(struct samr_SetGroupInfo), + (ndr_push_flags_fn_t) ndr_push_samr_SetGroupInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetGroupInfo, + (ndr_print_function_t) ndr_print_samr_SetGroupInfo, + false, + }, + { + "samr_AddGroupMember", + sizeof(struct samr_AddGroupMember), + (ndr_push_flags_fn_t) ndr_push_samr_AddGroupMember, + (ndr_pull_flags_fn_t) ndr_pull_samr_AddGroupMember, + (ndr_print_function_t) ndr_print_samr_AddGroupMember, + false, + }, + { + "samr_DeleteDomainGroup", + sizeof(struct samr_DeleteDomainGroup), + (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomainGroup, + (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomainGroup, + (ndr_print_function_t) ndr_print_samr_DeleteDomainGroup, + false, + }, + { + "samr_DeleteGroupMember", + sizeof(struct samr_DeleteGroupMember), + (ndr_push_flags_fn_t) ndr_push_samr_DeleteGroupMember, + (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteGroupMember, + (ndr_print_function_t) ndr_print_samr_DeleteGroupMember, + false, + }, + { + "samr_QueryGroupMember", + sizeof(struct samr_QueryGroupMember), + (ndr_push_flags_fn_t) ndr_push_samr_QueryGroupMember, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryGroupMember, + (ndr_print_function_t) ndr_print_samr_QueryGroupMember, + false, + }, + { + "samr_SetMemberAttributesOfGroup", + sizeof(struct samr_SetMemberAttributesOfGroup), + (ndr_push_flags_fn_t) ndr_push_samr_SetMemberAttributesOfGroup, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetMemberAttributesOfGroup, + (ndr_print_function_t) ndr_print_samr_SetMemberAttributesOfGroup, + false, + }, + { + "samr_OpenAlias", + sizeof(struct samr_OpenAlias), + (ndr_push_flags_fn_t) ndr_push_samr_OpenAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_OpenAlias, + (ndr_print_function_t) ndr_print_samr_OpenAlias, + false, + }, + { + "samr_QueryAliasInfo", + sizeof(struct samr_QueryAliasInfo), + (ndr_push_flags_fn_t) ndr_push_samr_QueryAliasInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryAliasInfo, + (ndr_print_function_t) ndr_print_samr_QueryAliasInfo, + false, + }, + { + "samr_SetAliasInfo", + sizeof(struct samr_SetAliasInfo), + (ndr_push_flags_fn_t) ndr_push_samr_SetAliasInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetAliasInfo, + (ndr_print_function_t) ndr_print_samr_SetAliasInfo, + false, + }, + { + "samr_DeleteDomAlias", + sizeof(struct samr_DeleteDomAlias), + (ndr_push_flags_fn_t) ndr_push_samr_DeleteDomAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteDomAlias, + (ndr_print_function_t) ndr_print_samr_DeleteDomAlias, + false, + }, + { + "samr_AddAliasMember", + sizeof(struct samr_AddAliasMember), + (ndr_push_flags_fn_t) ndr_push_samr_AddAliasMember, + (ndr_pull_flags_fn_t) ndr_pull_samr_AddAliasMember, + (ndr_print_function_t) ndr_print_samr_AddAliasMember, + false, + }, + { + "samr_DeleteAliasMember", + sizeof(struct samr_DeleteAliasMember), + (ndr_push_flags_fn_t) ndr_push_samr_DeleteAliasMember, + (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteAliasMember, + (ndr_print_function_t) ndr_print_samr_DeleteAliasMember, + false, + }, + { + "samr_GetMembersInAlias", + sizeof(struct samr_GetMembersInAlias), + (ndr_push_flags_fn_t) ndr_push_samr_GetMembersInAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetMembersInAlias, + (ndr_print_function_t) ndr_print_samr_GetMembersInAlias, + false, + }, + { + "samr_OpenUser", + sizeof(struct samr_OpenUser), + (ndr_push_flags_fn_t) ndr_push_samr_OpenUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_OpenUser, + (ndr_print_function_t) ndr_print_samr_OpenUser, + false, + }, + { + "samr_DeleteUser", + sizeof(struct samr_DeleteUser), + (ndr_push_flags_fn_t) ndr_push_samr_DeleteUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_DeleteUser, + (ndr_print_function_t) ndr_print_samr_DeleteUser, + false, + }, + { + "samr_QueryUserInfo", + sizeof(struct samr_QueryUserInfo), + (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo, + (ndr_print_function_t) ndr_print_samr_QueryUserInfo, + false, + }, + { + "samr_SetUserInfo", + sizeof(struct samr_SetUserInfo), + (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo, + (ndr_print_function_t) ndr_print_samr_SetUserInfo, + false, + }, + { + "samr_ChangePasswordUser", + sizeof(struct samr_ChangePasswordUser), + (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser, + (ndr_print_function_t) ndr_print_samr_ChangePasswordUser, + false, + }, + { + "samr_GetGroupsForUser", + sizeof(struct samr_GetGroupsForUser), + (ndr_push_flags_fn_t) ndr_push_samr_GetGroupsForUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetGroupsForUser, + (ndr_print_function_t) ndr_print_samr_GetGroupsForUser, + false, + }, + { + "samr_QueryDisplayInfo", + sizeof(struct samr_QueryDisplayInfo), + (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo, + (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo, + false, + }, + { + "samr_GetDisplayEnumerationIndex", + sizeof(struct samr_GetDisplayEnumerationIndex), + (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex, + (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex, + false, + }, + { + "samr_TestPrivateFunctionsDomain", + sizeof(struct samr_TestPrivateFunctionsDomain), + (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsDomain, + (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsDomain, + (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsDomain, + false, + }, + { + "samr_TestPrivateFunctionsUser", + sizeof(struct samr_TestPrivateFunctionsUser), + (ndr_push_flags_fn_t) ndr_push_samr_TestPrivateFunctionsUser, + (ndr_pull_flags_fn_t) ndr_pull_samr_TestPrivateFunctionsUser, + (ndr_print_function_t) ndr_print_samr_TestPrivateFunctionsUser, + false, + }, + { + "samr_GetUserPwInfo", + sizeof(struct samr_GetUserPwInfo), + (ndr_push_flags_fn_t) ndr_push_samr_GetUserPwInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetUserPwInfo, + (ndr_print_function_t) ndr_print_samr_GetUserPwInfo, + false, + }, + { + "samr_RemoveMemberFromForeignDomain", + sizeof(struct samr_RemoveMemberFromForeignDomain), + (ndr_push_flags_fn_t) ndr_push_samr_RemoveMemberFromForeignDomain, + (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMemberFromForeignDomain, + (ndr_print_function_t) ndr_print_samr_RemoveMemberFromForeignDomain, + false, + }, + { + "samr_QueryDomainInfo2", + sizeof(struct samr_QueryDomainInfo2), + (ndr_push_flags_fn_t) ndr_push_samr_QueryDomainInfo2, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDomainInfo2, + (ndr_print_function_t) ndr_print_samr_QueryDomainInfo2, + false, + }, + { + "samr_QueryUserInfo2", + sizeof(struct samr_QueryUserInfo2), + (ndr_push_flags_fn_t) ndr_push_samr_QueryUserInfo2, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryUserInfo2, + (ndr_print_function_t) ndr_print_samr_QueryUserInfo2, + false, + }, + { + "samr_QueryDisplayInfo2", + sizeof(struct samr_QueryDisplayInfo2), + (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo2, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo2, + (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo2, + false, + }, + { + "samr_GetDisplayEnumerationIndex2", + sizeof(struct samr_GetDisplayEnumerationIndex2), + (ndr_push_flags_fn_t) ndr_push_samr_GetDisplayEnumerationIndex2, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetDisplayEnumerationIndex2, + (ndr_print_function_t) ndr_print_samr_GetDisplayEnumerationIndex2, + false, + }, + { + "samr_CreateUser2", + sizeof(struct samr_CreateUser2), + (ndr_push_flags_fn_t) ndr_push_samr_CreateUser2, + (ndr_pull_flags_fn_t) ndr_pull_samr_CreateUser2, + (ndr_print_function_t) ndr_print_samr_CreateUser2, + false, + }, + { + "samr_QueryDisplayInfo3", + sizeof(struct samr_QueryDisplayInfo3), + (ndr_push_flags_fn_t) ndr_push_samr_QueryDisplayInfo3, + (ndr_pull_flags_fn_t) ndr_pull_samr_QueryDisplayInfo3, + (ndr_print_function_t) ndr_print_samr_QueryDisplayInfo3, + false, + }, + { + "samr_AddMultipleMembersToAlias", + sizeof(struct samr_AddMultipleMembersToAlias), + (ndr_push_flags_fn_t) ndr_push_samr_AddMultipleMembersToAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_AddMultipleMembersToAlias, + (ndr_print_function_t) ndr_print_samr_AddMultipleMembersToAlias, + false, + }, + { + "samr_RemoveMultipleMembersFromAlias", + sizeof(struct samr_RemoveMultipleMembersFromAlias), + (ndr_push_flags_fn_t) ndr_push_samr_RemoveMultipleMembersFromAlias, + (ndr_pull_flags_fn_t) ndr_pull_samr_RemoveMultipleMembersFromAlias, + (ndr_print_function_t) ndr_print_samr_RemoveMultipleMembersFromAlias, + false, + }, + { + "samr_OemChangePasswordUser2", + sizeof(struct samr_OemChangePasswordUser2), + (ndr_push_flags_fn_t) ndr_push_samr_OemChangePasswordUser2, + (ndr_pull_flags_fn_t) ndr_pull_samr_OemChangePasswordUser2, + (ndr_print_function_t) ndr_print_samr_OemChangePasswordUser2, + false, + }, + { + "samr_ChangePasswordUser2", + sizeof(struct samr_ChangePasswordUser2), + (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser2, + (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser2, + (ndr_print_function_t) ndr_print_samr_ChangePasswordUser2, + false, + }, + { + "samr_GetDomPwInfo", + sizeof(struct samr_GetDomPwInfo), + (ndr_push_flags_fn_t) ndr_push_samr_GetDomPwInfo, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetDomPwInfo, + (ndr_print_function_t) ndr_print_samr_GetDomPwInfo, + false, + }, + { + "samr_Connect2", + sizeof(struct samr_Connect2), + (ndr_push_flags_fn_t) ndr_push_samr_Connect2, + (ndr_pull_flags_fn_t) ndr_pull_samr_Connect2, + (ndr_print_function_t) ndr_print_samr_Connect2, + false, + }, + { + "samr_SetUserInfo2", + sizeof(struct samr_SetUserInfo2), + (ndr_push_flags_fn_t) ndr_push_samr_SetUserInfo2, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetUserInfo2, + (ndr_print_function_t) ndr_print_samr_SetUserInfo2, + false, + }, + { + "samr_SetBootKeyInformation", + sizeof(struct samr_SetBootKeyInformation), + (ndr_push_flags_fn_t) ndr_push_samr_SetBootKeyInformation, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetBootKeyInformation, + (ndr_print_function_t) ndr_print_samr_SetBootKeyInformation, + false, + }, + { + "samr_GetBootKeyInformation", + sizeof(struct samr_GetBootKeyInformation), + (ndr_push_flags_fn_t) ndr_push_samr_GetBootKeyInformation, + (ndr_pull_flags_fn_t) ndr_pull_samr_GetBootKeyInformation, + (ndr_print_function_t) ndr_print_samr_GetBootKeyInformation, + false, + }, + { + "samr_Connect3", + sizeof(struct samr_Connect3), + (ndr_push_flags_fn_t) ndr_push_samr_Connect3, + (ndr_pull_flags_fn_t) ndr_pull_samr_Connect3, + (ndr_print_function_t) ndr_print_samr_Connect3, + false, + }, + { + "samr_Connect4", + sizeof(struct samr_Connect4), + (ndr_push_flags_fn_t) ndr_push_samr_Connect4, + (ndr_pull_flags_fn_t) ndr_pull_samr_Connect4, + (ndr_print_function_t) ndr_print_samr_Connect4, + false, + }, + { + "samr_ChangePasswordUser3", + sizeof(struct samr_ChangePasswordUser3), + (ndr_push_flags_fn_t) ndr_push_samr_ChangePasswordUser3, + (ndr_pull_flags_fn_t) ndr_pull_samr_ChangePasswordUser3, + (ndr_print_function_t) ndr_print_samr_ChangePasswordUser3, + false, + }, + { + "samr_Connect5", + sizeof(struct samr_Connect5), + (ndr_push_flags_fn_t) ndr_push_samr_Connect5, + (ndr_pull_flags_fn_t) ndr_pull_samr_Connect5, + (ndr_print_function_t) ndr_print_samr_Connect5, + false, + }, + { + "samr_RidToSid", + sizeof(struct samr_RidToSid), + (ndr_push_flags_fn_t) ndr_push_samr_RidToSid, + (ndr_pull_flags_fn_t) ndr_pull_samr_RidToSid, + (ndr_print_function_t) ndr_print_samr_RidToSid, + false, + }, + { + "samr_SetDsrmPassword", + sizeof(struct samr_SetDsrmPassword), + (ndr_push_flags_fn_t) ndr_push_samr_SetDsrmPassword, + (ndr_pull_flags_fn_t) ndr_pull_samr_SetDsrmPassword, + (ndr_print_function_t) ndr_print_samr_SetDsrmPassword, + false, + }, + { + "samr_ValidatePassword", + sizeof(struct samr_ValidatePassword), + (ndr_push_flags_fn_t) ndr_push_samr_ValidatePassword, + (ndr_pull_flags_fn_t) ndr_pull_samr_ValidatePassword, + (ndr_print_function_t) ndr_print_samr_ValidatePassword, + false, + }, + { NULL, 0, NULL, NULL, NULL, false } +}; + +static const char * const samr_endpoint_strings[] = { + "ncacn_np:[\\pipe\\samr]", + "ncacn_ip_tcp:", + "ncalrpc:", +}; + +static const struct ndr_interface_string_array samr_endpoints = { + .count = 3, + .names = samr_endpoint_strings +}; + +static const char * const samr_authservice_strings[] = { + "host", +}; + +static const struct ndr_interface_string_array samr_authservices = { + .count = 3, + .names = samr_authservice_strings +}; + + +const struct ndr_interface_table ndr_table_samr = { + .name = "samr", + .syntax_id = { + {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xac}}, + NDR_SAMR_VERSION + }, + .helpstring = NDR_SAMR_HELPSTRING, + .num_calls = 68, + .calls = samr_calls, + .endpoints = &samr_endpoints, + .authservices = &samr_authservices +}; + diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h new file mode 100644 index 0000000000..96fd59b507 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_samr.h @@ -0,0 +1,340 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/samr.h" + +#ifndef _HEADER_NDR_samr +#define _HEADER_NDR_samr + +#define NDR_SAMR_UUID "12345778-1234-abcd-ef00-0123456789ac" +#define NDR_SAMR_VERSION 1.0 +#define NDR_SAMR_NAME "samr" +#define NDR_SAMR_HELPSTRING NULL +extern const struct ndr_interface_table ndr_table_samr; +#define NDR_SAMR_CONNECT (0x00) + +#define NDR_SAMR_CLOSE (0x01) + +#define NDR_SAMR_SETSECURITY (0x02) + +#define NDR_SAMR_QUERYSECURITY (0x03) + +#define NDR_SAMR_SHUTDOWN (0x04) + +#define NDR_SAMR_LOOKUPDOMAIN (0x05) + +#define NDR_SAMR_ENUMDOMAINS (0x06) + +#define NDR_SAMR_OPENDOMAIN (0x07) + +#define NDR_SAMR_QUERYDOMAININFO (0x08) + +#define NDR_SAMR_SETDOMAININFO (0x09) + +#define NDR_SAMR_CREATEDOMAINGROUP (0x0a) + +#define NDR_SAMR_ENUMDOMAINGROUPS (0x0b) + +#define NDR_SAMR_CREATEUSER (0x0c) + +#define NDR_SAMR_ENUMDOMAINUSERS (0x0d) + +#define NDR_SAMR_CREATEDOMALIAS (0x0e) + +#define NDR_SAMR_ENUMDOMAINALIASES (0x0f) + +#define NDR_SAMR_GETALIASMEMBERSHIP (0x10) + +#define NDR_SAMR_LOOKUPNAMES (0x11) + +#define NDR_SAMR_LOOKUPRIDS (0x12) + +#define NDR_SAMR_OPENGROUP (0x13) + +#define NDR_SAMR_QUERYGROUPINFO (0x14) + +#define NDR_SAMR_SETGROUPINFO (0x15) + +#define NDR_SAMR_ADDGROUPMEMBER (0x16) + +#define NDR_SAMR_DELETEDOMAINGROUP (0x17) + +#define NDR_SAMR_DELETEGROUPMEMBER (0x18) + +#define NDR_SAMR_QUERYGROUPMEMBER (0x19) + +#define NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP (0x1a) + +#define NDR_SAMR_OPENALIAS (0x1b) + +#define NDR_SAMR_QUERYALIASINFO (0x1c) + +#define NDR_SAMR_SETALIASINFO (0x1d) + +#define NDR_SAMR_DELETEDOMALIAS (0x1e) + +#define NDR_SAMR_ADDALIASMEMBER (0x1f) + +#define NDR_SAMR_DELETEALIASMEMBER (0x20) + +#define NDR_SAMR_GETMEMBERSINALIAS (0x21) + +#define NDR_SAMR_OPENUSER (0x22) + +#define NDR_SAMR_DELETEUSER (0x23) + +#define NDR_SAMR_QUERYUSERINFO (0x24) + +#define NDR_SAMR_SETUSERINFO (0x25) + +#define NDR_SAMR_CHANGEPASSWORDUSER (0x26) + +#define NDR_SAMR_GETGROUPSFORUSER (0x27) + +#define NDR_SAMR_QUERYDISPLAYINFO (0x28) + +#define NDR_SAMR_GETDISPLAYENUMERATIONINDEX (0x29) + +#define NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN (0x2a) + +#define NDR_SAMR_TESTPRIVATEFUNCTIONSUSER (0x2b) + +#define NDR_SAMR_GETUSERPWINFO (0x2c) + +#define NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN (0x2d) + +#define NDR_SAMR_QUERYDOMAININFO2 (0x2e) + +#define NDR_SAMR_QUERYUSERINFO2 (0x2f) + +#define NDR_SAMR_QUERYDISPLAYINFO2 (0x30) + +#define NDR_SAMR_GETDISPLAYENUMERATIONINDEX2 (0x31) + +#define NDR_SAMR_CREATEUSER2 (0x32) + +#define NDR_SAMR_QUERYDISPLAYINFO3 (0x33) + +#define NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS (0x34) + +#define NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS (0x35) + +#define NDR_SAMR_OEMCHANGEPASSWORDUSER2 (0x36) + +#define NDR_SAMR_CHANGEPASSWORDUSER2 (0x37) + +#define NDR_SAMR_GETDOMPWINFO (0x38) + +#define NDR_SAMR_CONNECT2 (0x39) + +#define NDR_SAMR_SETUSERINFO2 (0x3a) + +#define NDR_SAMR_SETBOOTKEYINFORMATION (0x3b) + +#define NDR_SAMR_GETBOOTKEYINFORMATION (0x3c) + +#define NDR_SAMR_CONNECT3 (0x3d) + +#define NDR_SAMR_CONNECT4 (0x3e) + +#define NDR_SAMR_CHANGEPASSWORDUSER3 (0x3f) + +#define NDR_SAMR_CONNECT5 (0x40) + +#define NDR_SAMR_RIDTOSID (0x41) + +#define NDR_SAMR_SETDSRMPASSWORD (0x42) + +#define NDR_SAMR_VALIDATEPASSWORD (0x43) + +#define NDR_SAMR_CALL_COUNT (68) +enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r); +void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r); +void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r); +enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r); +void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r); +void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r); +void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r); +void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r); +void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r); +void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r); +void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r); +void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r); +void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r); +void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r); +void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r); +void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r); +void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r); +enum ndr_err_code ndr_push_samr_GroupAttrs(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_samr_GroupAttrs(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_samr_GroupAttrs(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r); +void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r); +void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r); +void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r); +void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const struct samr_RidTypeArray *r); +void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r); +void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r); +void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r); +void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r); +void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r); +enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r); +enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r); +void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r); +void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r); +void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r); +void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r); +void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r); +void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r); +void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r); +void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r); +void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r); +void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r); +void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r); +void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r); +void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r); +void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r); +void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r); +void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r); +void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r); +enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r); +enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r); +void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r); +void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r); +void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r); +void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r); +void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r); +void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r); +void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r); +enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r); +enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r); +void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r); +enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r); +enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r); +void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r); +enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r); +enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r); +void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r); +void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r); +void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r); +void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r); +void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r); +void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r); +void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r); +void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r); +void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r); +void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r); +void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r); +void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r); +void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r); +void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r); +void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r); +void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r); +void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r); +void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r); +void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r); +void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r); +void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r); +void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r); +void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r); +void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r); +void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r); +enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r); +enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r); +void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r); +void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r); +void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r); +void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r); +void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r); +void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r); +enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r); +enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r); +void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r); +void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r); +void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r); +void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r); +void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r); +void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r); +void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r); +void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r); +void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r); +void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r); +enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r); +enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r); +void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r); +void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r); +void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r); +void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r); +void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r); +void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r); +void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r); +void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r); +void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r); +void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r); +void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r); +void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r); +void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r); +void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r); +void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r); +void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r); +void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r); +enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r); +enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r); +void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r); +void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r); +enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r); +enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r); +void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r); +enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r); +enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r); +void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r); +void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r); +void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r); +void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r); +void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r); +void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r); +void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r); +enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r); +enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r); +void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r); +void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r); +void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r); +void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r); +void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r); +void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r); +void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r); +void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r); +void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r); +void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r); +void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r); +void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r); +void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r); +void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r); +enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r); +enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r); +void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r); +void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r); +void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r); +void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r); +void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r); +void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r); +enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r); +enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r); +void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r); +void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r); +void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r); +void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r); +#endif /* _HEADER_NDR_samr */ diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h new file mode 100644 index 0000000000..a512a64380 --- /dev/null +++ b/source3/librpc/gen_ndr/samr.h @@ -0,0 +1,1754 @@ +/* header auto-generated by pidl */ + +#include + +#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/lsa.h" +#include "librpc/gen_ndr/security.h" +#ifndef _HEADER_samr +#define _HEADER_samr + +#define SAMR_ENUM_USERS_MULTIPLIER ( 54 ) +; + +/* bitmap samr_AcctFlags */ +#define ACB_DISABLED ( 0x00000001 ) +#define ACB_HOMDIRREQ ( 0x00000002 ) +#define ACB_PWNOTREQ ( 0x00000004 ) +#define ACB_TEMPDUP ( 0x00000008 ) +#define ACB_NORMAL ( 0x00000010 ) +#define ACB_MNS ( 0x00000020 ) +#define ACB_DOMTRUST ( 0x00000040 ) +#define ACB_WSTRUST ( 0x00000080 ) +#define ACB_SVRTRUST ( 0x00000100 ) +#define ACB_PWNOEXP ( 0x00000200 ) +#define ACB_AUTOLOCK ( 0x00000400 ) +#define ACB_ENC_TXT_PWD_ALLOWED ( 0x00000800 ) +#define ACB_SMARTCARD_REQUIRED ( 0x00001000 ) +#define ACB_TRUSTED_FOR_DELEGATION ( 0x00002000 ) +#define ACB_NOT_DELEGATED ( 0x00004000 ) +#define ACB_USE_DES_KEY_ONLY ( 0x00008000 ) +#define ACB_DONT_REQUIRE_PREAUTH ( 0x00010000 ) +#define ACB_PW_EXPIRED ( 0x00020000 ) +#define ACB_NO_AUTH_DATA_REQD ( 0x00080000 ) + +; + +/* bitmap samr_ConnectAccessMask */ +#define SAMR_ACCESS_CONNECT_TO_SERVER ( 0x00000001 ) +#define SAMR_ACCESS_SHUTDOWN_SERVER ( 0x00000002 ) +#define SAMR_ACCESS_INITIALIZE_SERVER ( 0x00000004 ) +#define SAMR_ACCESS_CREATE_DOMAIN ( 0x00000008 ) +#define SAMR_ACCESS_ENUM_DOMAINS ( 0x00000010 ) +#define SAMR_ACCESS_OPEN_DOMAIN ( 0x00000020 ) + +; + +/* bitmap samr_UserAccessMask */ +#define USER_ACCESS_GET_NAME_ETC ( 0x00000001 ) +#define USER_ACCESS_GET_LOCALE ( 0x00000002 ) +#define USER_ACCESS_SET_LOC_COM ( 0x00000004 ) +#define USER_ACCESS_GET_LOGONINFO ( 0x00000008 ) +#define USER_ACCESS_GET_ATTRIBUTES ( 0x00000010 ) +#define USER_ACCESS_SET_ATTRIBUTES ( 0x00000020 ) +#define USER_ACCESS_CHANGE_PASSWORD ( 0x00000040 ) +#define USER_ACCESS_SET_PASSWORD ( 0x00000080 ) +#define USER_ACCESS_GET_GROUPS ( 0x00000100 ) +#define USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 ) +#define USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 ) + +; + +/* bitmap samr_DomainAccessMask */ +#define DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 ) +#define DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 ) +#define DOMAIN_ACCESS_LOOKUP_INFO_2 ( 0x00000004 ) +#define DOMAIN_ACCESS_SET_INFO_2 ( 0x00000008 ) +#define DOMAIN_ACCESS_CREATE_USER ( 0x00000010 ) +#define DOMAIN_ACCESS_CREATE_GROUP ( 0x00000020 ) +#define DOMAIN_ACCESS_CREATE_ALIAS ( 0x00000040 ) +#define DOMAIN_ACCESS_LOOKUP_ALIAS ( 0x00000080 ) +#define DOMAIN_ACCESS_ENUM_ACCOUNTS ( 0x00000100 ) +#define DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 ) +#define DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 ) + +; + +/* bitmap samr_GroupAccessMask */ +#define GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 ) +#define GROUP_ACCESS_SET_INFO ( 0x00000002 ) +#define GROUP_ACCESS_ADD_MEMBER ( 0x00000004 ) +#define GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 ) +#define GROUP_ACCESS_GET_MEMBERS ( 0x00000010 ) + +; + +/* bitmap samr_AliasAccessMask */ +#define ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 ) +#define ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 ) +#define ALIAS_ACCESS_GET_MEMBERS ( 0x00000004 ) +#define ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 ) +#define ALIAS_ACCESS_SET_INFO ( 0x00000010 ) + +; + +struct samr_SamEntry { + uint32_t idx; + struct lsa_String name; +}; + +struct samr_SamArray { + uint32_t count; + struct samr_SamEntry *entries;/* [unique,size_is(count)] */ +}; + +enum samr_Role +#ifndef USE_UINT_ENUMS + { + SAMR_ROLE_STANDALONE=0, + SAMR_ROLE_DOMAIN_MEMBER=1, + SAMR_ROLE_DOMAIN_BDC=2, + SAMR_ROLE_DOMAIN_PDC=3 +} +#else + { __donnot_use_enum_samr_Role=0x7FFFFFFF} +#define SAMR_ROLE_STANDALONE ( 0 ) +#define SAMR_ROLE_DOMAIN_MEMBER ( 1 ) +#define SAMR_ROLE_DOMAIN_BDC ( 2 ) +#define SAMR_ROLE_DOMAIN_PDC ( 3 ) +#endif +; + +/* bitmap samr_PasswordProperties */ +#define DOMAIN_PASSWORD_COMPLEX ( 0x00000001 ) +#define DOMAIN_PASSWORD_NO_ANON_CHANGE ( 0x00000002 ) +#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE ( 0x00000004 ) +#define DOMAIN_PASSWORD_LOCKOUT_ADMINS ( 0x00000008 ) +#define DOMAIN_PASSWORD_STORE_CLEARTEXT ( 0x00000010 ) +#define DOMAIN_REFUSE_PASSWORD_CHANGE ( 0x00000020 ) + +; + +struct samr_DomInfo1 { + uint16_t min_password_length; + uint16_t password_history_length; + uint32_t password_properties; + int64_t max_password_age; + int64_t min_password_age; +}; + +struct samr_DomInfo2 { + NTTIME force_logoff_time; + struct lsa_String comment; + struct lsa_String domain_name; + struct lsa_String primary; + uint64_t sequence_num; + uint32_t unknown2; + enum samr_Role role; + uint32_t unknown3; + uint32_t num_users; + uint32_t num_groups; + uint32_t num_aliases; +}; + +struct samr_DomInfo3 { + NTTIME force_logoff_time; +}; + +struct samr_DomInfo4 { + struct lsa_String comment; +}; + +struct samr_DomInfo5 { + struct lsa_String domain_name; +}; + +struct samr_DomInfo6 { + struct lsa_String primary; +}; + +struct samr_DomInfo7 { + enum samr_Role role; +}; + +struct samr_DomInfo8 { + uint64_t sequence_num; + NTTIME domain_create_time; +}; + +struct samr_DomInfo9 { + uint32_t unknown; +}; + +struct samr_DomInfo11 { + struct samr_DomInfo2 info2; + uint64_t lockout_duration; + uint64_t lockout_window; + uint16_t lockout_threshold; +}; + +struct samr_DomInfo12 { + uint64_t lockout_duration; + uint64_t lockout_window; + uint16_t lockout_threshold; +}; + +struct samr_DomInfo13 { + uint64_t sequence_num; + NTTIME domain_create_time; + uint32_t unknown1; + uint32_t unknown2; +}; + +union samr_DomainInfo { + struct samr_DomInfo1 info1;/* [case] */ + struct samr_DomInfo2 info2;/* [case(2)] */ + struct samr_DomInfo3 info3;/* [case(3)] */ + struct samr_DomInfo4 info4;/* [case(4)] */ + struct samr_DomInfo5 info5;/* [case(5)] */ + struct samr_DomInfo6 info6;/* [case(6)] */ + struct samr_DomInfo7 info7;/* [case(7)] */ + struct samr_DomInfo8 info8;/* [case(8)] */ + struct samr_DomInfo9 info9;/* [case(9)] */ + struct samr_DomInfo11 info11;/* [case(11)] */ + struct samr_DomInfo12 info12;/* [case(12)] */ + struct samr_DomInfo13 info13;/* [case(13)] */ +}/* [switch_type(uint16)] */; + +struct samr_Ids { + uint32_t count;/* [range(0 1024)] */ + uint32_t *ids;/* [unique,size_is(count)] */ +}; + +/* bitmap samr_GroupAttrs */ +#define SE_GROUP_MANDATORY ( 0x00000001 ) +#define SE_GROUP_ENABLED_BY_DEFAULT ( 0x00000002 ) +#define SE_GROUP_ENABLED ( 0x00000004 ) +#define SE_GROUP_OWNER ( 0x00000008 ) +#define SE_GROUP_USE_FOR_DENY_ONLY ( 0x00000010 ) +#define SE_GROUP_RESOURCE ( 0x20000000 ) +#define SE_GROUP_LOGON_ID ( 0xC0000000 ) + +; + +struct samr_GroupInfoAll { + struct lsa_String name; + uint32_t attributes; + uint32_t num_members; + struct lsa_String description; +}; + +struct samr_GroupInfoAttributes { + uint32_t attributes; +}; + +struct samr_GroupInfoDescription { + struct lsa_String description; +}; + +enum samr_GroupInfoEnum +#ifndef USE_UINT_ENUMS + { + GROUPINFOALL=1, + GROUPINFONAME=2, + GROUPINFOATTRIBUTES=3, + GROUPINFODESCRIPTION=4, + GROUPINFOALL2=5 +} +#else + { __donnot_use_enum_samr_GroupInfoEnum=0x7FFFFFFF} +#define GROUPINFOALL ( 1 ) +#define GROUPINFONAME ( 2 ) +#define GROUPINFOATTRIBUTES ( 3 ) +#define GROUPINFODESCRIPTION ( 4 ) +#define GROUPINFOALL2 ( 5 ) +#endif +; + +union samr_GroupInfo { + struct samr_GroupInfoAll all;/* [case(GROUPINFOALL)] */ + struct lsa_String name;/* [case(GROUPINFONAME)] */ + struct samr_GroupInfoAttributes attributes;/* [case(GROUPINFOATTRIBUTES)] */ + struct lsa_String description;/* [case(GROUPINFODESCRIPTION)] */ + struct samr_GroupInfoAll all2;/* [case(GROUPINFOALL2)] */ +}/* [switch_type(samr_GroupInfoEnum)] */; + +struct samr_RidTypeArray { + uint32_t count; + uint32_t *rids;/* [unique,size_is(count)] */ + uint32_t *types;/* [unique,size_is(count)] */ +}; + +struct samr_AliasInfoAll { + struct lsa_String name; + uint32_t num_members; + struct lsa_String description; +}; + +enum samr_AliasInfoEnum +#ifndef USE_UINT_ENUMS + { + ALIASINFOALL=1, + ALIASINFONAME=2, + ALIASINFODESCRIPTION=3 +} +#else + { __donnot_use_enum_samr_AliasInfoEnum=0x7FFFFFFF} +#define ALIASINFOALL ( 1 ) +#define ALIASINFONAME ( 2 ) +#define ALIASINFODESCRIPTION ( 3 ) +#endif +; + +union samr_AliasInfo { + struct samr_AliasInfoAll all;/* [case(ALIASINFOALL)] */ + struct lsa_String name;/* [case(ALIASINFONAME)] */ + struct lsa_String description;/* [case(ALIASINFODESCRIPTION)] */ +}/* [switch_type(samr_AliasInfoEnum)] */; + +struct samr_UserInfo1 { + struct lsa_String account_name; + struct lsa_String full_name; + uint32_t primary_gid; + struct lsa_String description; + struct lsa_String comment; +}; + +struct samr_UserInfo2 { + struct lsa_String comment; + struct lsa_String unknown; + uint16_t country_code; + uint16_t code_page; +}; + +struct samr_LogonHours { + uint16_t units_per_week; + uint8_t *bits;/* [unique,length_is(units_per_week/8),size_is(1260)] */ +}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct samr_UserInfo3 { + struct lsa_String account_name; + struct lsa_String full_name; + uint32_t rid; + uint32_t primary_gid; + struct lsa_String home_directory; + struct lsa_String home_drive; + struct lsa_String logon_script; + struct lsa_String profile_path; + struct lsa_String workstations; + NTTIME last_logon; + NTTIME last_logoff; + NTTIME last_password_change; + NTTIME allow_password_change; + NTTIME force_password_change; + struct samr_LogonHours logon_hours; + uint16_t bad_password_count; + uint16_t logon_count; + uint32_t acct_flags; +}; + +struct samr_UserInfo4 { + struct samr_LogonHours logon_hours; +}; + +struct samr_UserInfo5 { + struct lsa_String account_name; + struct lsa_String full_name; + uint32_t rid; + uint32_t primary_gid; + struct lsa_String home_directory; + struct lsa_String home_drive; + struct lsa_String logon_script; + struct lsa_String profile_path; + struct lsa_String description; + struct lsa_String workstations; + NTTIME last_logon; + NTTIME last_logoff; + struct samr_LogonHours logon_hours; + uint16_t bad_password_count; + uint16_t logon_count; + NTTIME last_password_change; + NTTIME acct_expiry; + uint32_t acct_flags; +}; + +struct samr_UserInfo6 { + struct lsa_String account_name; + struct lsa_String full_name; +}; + +struct samr_UserInfo7 { + struct lsa_String account_name; +}; + +struct samr_UserInfo8 { + struct lsa_String full_name; +}; + +struct samr_UserInfo9 { + uint32_t primary_gid; +}; + +struct samr_UserInfo10 { + struct lsa_String home_directory; + struct lsa_String home_drive; +}; + +struct samr_UserInfo11 { + struct lsa_String logon_script; +}; + +struct samr_UserInfo12 { + struct lsa_String profile_path; +}; + +struct samr_UserInfo13 { + struct lsa_String description; +}; + +struct samr_UserInfo14 { + struct lsa_String workstations; +}; + +struct samr_UserInfo16 { + uint32_t acct_flags; +}; + +struct samr_UserInfo17 { + NTTIME acct_expiry; +}; + +struct samr_UserInfo20 { + struct lsa_String parameters; +}; + +/* bitmap samr_FieldsPresent */ +#define SAMR_FIELD_ACCOUNT_NAME ( 0x00000001 ) +#define SAMR_FIELD_FULL_NAME ( 0x00000002 ) +#define SAMR_FIELD_RID ( 0x00000004 ) +#define SAMR_FIELD_PRIMARY_GID ( 0x00000008 ) +#define SAMR_FIELD_DESCRIPTION ( 0x00000010 ) +#define SAMR_FIELD_COMMENT ( 0x00000020 ) +#define SAMR_FIELD_HOME_DIRECTORY ( 0x00000040 ) +#define SAMR_FIELD_HOME_DRIVE ( 0x00000080 ) +#define SAMR_FIELD_LOGON_SCRIPT ( 0x00000100 ) +#define SAMR_FIELD_PROFILE_PATH ( 0x00000200 ) +#define SAMR_FIELD_WORKSTATIONS ( 0x00000400 ) +#define SAMR_FIELD_LAST_LOGON ( 0x00000800 ) +#define SAMR_FIELD_LAST_LOGOFF ( 0x00001000 ) +#define SAMR_FIELD_LOGON_HOURS ( 0x00002000 ) +#define SAMR_FIELD_BAD_PWD_COUNT ( 0x00004000 ) +#define SAMR_FIELD_NUM_LOGONS ( 0x00008000 ) +#define SAMR_FIELD_ALLOW_PWD_CHANGE ( 0x00010000 ) +#define SAMR_FIELD_FORCE_PWD_CHANGE ( 0x00020000 ) +#define SAMR_FIELD_LAST_PWD_CHANGE ( 0x00040000 ) +#define SAMR_FIELD_ACCT_EXPIRY ( 0x00080000 ) +#define SAMR_FIELD_ACCT_FLAGS ( 0x00100000 ) +#define SAMR_FIELD_PARAMETERS ( 0x00200000 ) +#define SAMR_FIELD_COUNTRY_CODE ( 0x00400000 ) +#define SAMR_FIELD_CODE_PAGE ( 0x00800000 ) +#define SAMR_FIELD_PASSWORD ( 0x01000000 ) +#define SAMR_FIELD_PASSWORD2 ( 0x02000000 ) +#define SAMR_FIELD_PRIVATE_DATA ( 0x04000000 ) +#define SAMR_FIELD_EXPIRED_FLAG ( 0x08000000 ) +#define SAMR_FIELD_SEC_DESC ( 0x10000000 ) +#define SAMR_FIELD_OWF_PWD ( 0x20000000 ) + +; + +struct samr_UserInfo21 { + NTTIME last_logon; + NTTIME last_logoff; + NTTIME last_password_change; + NTTIME acct_expiry; + NTTIME allow_password_change; + NTTIME force_password_change; + struct lsa_String account_name; + struct lsa_String full_name; + struct lsa_String home_directory; + struct lsa_String home_drive; + struct lsa_String logon_script; + struct lsa_String profile_path; + struct lsa_String description; + struct lsa_String workstations; + struct lsa_String comment; + struct lsa_String parameters; + struct lsa_String unknown1; + struct lsa_String unknown2; + struct lsa_String unknown3; + uint32_t buf_count; + uint8_t *buffer;/* [unique,size_is(buf_count)] */ + uint32_t rid; + uint32_t primary_gid; + uint32_t acct_flags; + uint32_t fields_present; + struct samr_LogonHours logon_hours; + uint16_t bad_password_count; + uint16_t logon_count; + uint16_t country_code; + uint16_t code_page; + uint8_t nt_password_set; + uint8_t lm_password_set; + uint8_t password_expired; + uint8_t unknown4; +}; + +struct samr_CryptPassword { + uint8_t data[516]; +}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct samr_UserInfo23 { + struct samr_UserInfo21 info; + struct samr_CryptPassword password; +}; + +struct samr_UserInfo24 { + struct samr_CryptPassword password; + uint8_t pw_len; +}; + +struct samr_CryptPasswordEx { + uint8_t data[532]; +}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct samr_UserInfo25 { + struct samr_UserInfo21 info; + struct samr_CryptPasswordEx password; +}; + +struct samr_UserInfo26 { + struct samr_CryptPasswordEx password; + uint8_t pw_len; +}; + +union samr_UserInfo { + struct samr_UserInfo1 info1;/* [case] */ + struct samr_UserInfo2 info2;/* [case(2)] */ + struct samr_UserInfo3 info3;/* [case(3)] */ + struct samr_UserInfo4 info4;/* [case(4)] */ + struct samr_UserInfo5 info5;/* [case(5)] */ + struct samr_UserInfo6 info6;/* [case(6)] */ + struct samr_UserInfo7 info7;/* [case(7)] */ + struct samr_UserInfo8 info8;/* [case(8)] */ + struct samr_UserInfo9 info9;/* [case(9)] */ + struct samr_UserInfo10 info10;/* [case(10)] */ + struct samr_UserInfo11 info11;/* [case(11)] */ + struct samr_UserInfo12 info12;/* [case(12)] */ + struct samr_UserInfo13 info13;/* [case(13)] */ + struct samr_UserInfo14 info14;/* [case(14)] */ + struct samr_UserInfo16 info16;/* [case(16)] */ + struct samr_UserInfo17 info17;/* [case(17)] */ + struct samr_UserInfo20 info20;/* [case(20)] */ + struct samr_UserInfo21 info21;/* [case(21)] */ + struct samr_UserInfo23 info23;/* [case(23)] */ + struct samr_UserInfo24 info24;/* [case(24)] */ + struct samr_UserInfo25 info25;/* [case(25)] */ + struct samr_UserInfo26 info26;/* [case(26)] */ +}/* [switch_type(uint16)] */; + +struct samr_Password { + uint8_t hash[16]; +}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct samr_RidWithAttribute { + uint32_t rid; + uint32_t attributes; +}/* [public] */; + +struct samr_RidWithAttributeArray { + uint32_t count; + struct samr_RidWithAttribute *rids;/* [unique,size_is(count)] */ +}/* [public] */; + +struct samr_DispEntryGeneral { + uint32_t idx; + uint32_t rid; + uint32_t acct_flags; + struct lsa_String account_name; + struct lsa_String description; + struct lsa_String full_name; +}; + +struct samr_DispInfoGeneral { + uint32_t count; + struct samr_DispEntryGeneral *entries;/* [unique,size_is(count)] */ +}; + +struct samr_DispEntryFull { + uint32_t idx; + uint32_t rid; + uint32_t acct_flags; + struct lsa_String account_name; + struct lsa_String description; +}; + +struct samr_DispInfoFull { + uint32_t count; + struct samr_DispEntryFull *entries;/* [unique,size_is(count)] */ +}; + +struct samr_DispEntryFullGroup { + uint32_t idx; + uint32_t rid; + uint32_t acct_flags; + struct lsa_String account_name; + struct lsa_String description; +}; + +struct samr_DispInfoFullGroups { + uint32_t count; + struct samr_DispEntryFullGroup *entries;/* [unique,size_is(count)] */ +}; + +struct samr_DispEntryAscii { + uint32_t idx; + struct lsa_AsciiString account_name; +}; + +struct samr_DispInfoAscii { + uint32_t count; + struct samr_DispEntryAscii *entries;/* [unique,size_is(count)] */ +}; + +union samr_DispInfo { + struct samr_DispInfoGeneral info1;/* [case] */ + struct samr_DispInfoFull info2;/* [case(2)] */ + struct samr_DispInfoFullGroups info3;/* [case(3)] */ + struct samr_DispInfoAscii info4;/* [case(4)] */ + struct samr_DispInfoAscii info5;/* [case(5)] */ +}/* [switch_type(uint16)] */; + +struct samr_PwInfo { + uint16_t min_password_length; + uint32_t password_properties; +}; + +enum samr_RejectReason; + +struct samr_ChangeReject { + enum samr_RejectReason reason; + uint32_t unknown1; + uint32_t unknown2; +}; + +struct samr_ConnectInfo1 { + uint32_t unknown1; + uint32_t unknown2; +}; + +union samr_ConnectInfo { + struct samr_ConnectInfo1 info1;/* [case] */ +}; + +/* bitmap samr_ValidateFieldsPresent */ +#define SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET ( 0x00000001 ) +#define SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME ( 0x00000002 ) +#define SAMR_VALIDATE_FIELD_LOCKOUT_TIME ( 0x00000004 ) +#define SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT ( 0x00000008 ) +#define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH ( 0x00000010 ) +#define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY ( 0x00000020 ) + +; + +enum samr_ValidatePasswordLevel +#ifndef USE_UINT_ENUMS + { + NetValidateAuthentication=1, + NetValidatePasswordChange=2, + NetValidatePasswordReset=3 +} +#else + { __donnot_use_enum_samr_ValidatePasswordLevel=0x7FFFFFFF} +#define NetValidateAuthentication ( 1 ) +#define NetValidatePasswordChange ( 2 ) +#define NetValidatePasswordReset ( 3 ) +#endif +; + +enum samr_ValidationStatus +#ifndef USE_UINT_ENUMS + { + SAMR_VALIDATION_STATUS_SUCCESS=0, + SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1, + SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2, + SAMR_VALIDATION_STATUS_BAD_PASSWORD=4, + SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5, + SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6, + SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7, + SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8, + SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9 +} +#else + { __donnot_use_enum_samr_ValidationStatus=0x7FFFFFFF} +#define SAMR_VALIDATION_STATUS_SUCCESS ( 0 ) +#define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 ) +#define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 ) +#define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 ) +#define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 ) +#define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 ) +#define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 ) +#define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 ) +#define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 ) +#endif +; + +struct samr_ValidationBlob { + uint32_t length; + uint8_t *data;/* [unique,size_is(length)] */ +}; + +struct samr_ValidatePasswordInfo { + uint32_t fields_present; + NTTIME last_password_change; + NTTIME bad_password_time; + NTTIME lockout_time; + uint32_t bad_pwd_count; + uint32_t pwd_history_len; + struct samr_ValidationBlob *pwd_history;/* [unique,size_is(pwd_history_len)] */ +}; + +struct samr_ValidatePasswordRepCtr { + struct samr_ValidatePasswordInfo info; + enum samr_ValidationStatus status; +}; + +union samr_ValidatePasswordRep { + struct samr_ValidatePasswordRepCtr ctr1;/* [case] */ + struct samr_ValidatePasswordRepCtr ctr2;/* [case(2)] */ + struct samr_ValidatePasswordRepCtr ctr3;/* [case(3)] */ +}/* [switch_type(uint16)] */; + +struct samr_ValidatePasswordReq3 { + struct samr_ValidatePasswordInfo info; + struct lsa_StringLarge password; + struct lsa_StringLarge account; + struct samr_ValidationBlob hash; + uint8_t pwd_must_change_at_next_logon; + uint8_t clear_lockout; +}; + +struct samr_ValidatePasswordReq2 { + struct samr_ValidatePasswordInfo info; + struct lsa_StringLarge password; + struct lsa_StringLarge account; + struct samr_ValidationBlob hash; + uint8_t password_matched; +}; + +struct samr_ValidatePasswordReq1 { + struct samr_ValidatePasswordInfo info; + uint8_t password_matched; +}; + +union samr_ValidatePasswordReq { + struct samr_ValidatePasswordReq1 req1;/* [case] */ + struct samr_ValidatePasswordReq2 req2;/* [case(2)] */ + struct samr_ValidatePasswordReq3 req3;/* [case(3)] */ +}/* [switch_type(uint16)] */; + + +struct samr_Connect { + struct { + uint16_t *system_name;/* [unique] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *connect_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Close { + struct { + struct policy_handle *handle;/* [ref] */ + } in; + + struct { + struct policy_handle *handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetSecurity { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t sec_info; + struct sec_desc_buf *sdbuf;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_QuerySecurity { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t sec_info; + } in; + + struct { + struct sec_desc_buf *sdbuf;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Shutdown { + struct { + struct policy_handle *connect_handle;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_LookupDomain { + struct { + struct policy_handle *connect_handle;/* [ref] */ + struct lsa_String *domain_name;/* [ref] */ + } in; + + struct { + struct dom_sid2 *sid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_EnumDomains { + struct { + struct policy_handle *connect_handle;/* [ref] */ + uint32_t buf_size; + uint32_t *resume_handle;/* [ref] */ + } in; + + struct { + struct samr_SamArray *sam;/* [ref] */ + uint32_t *num_entries;/* [ref] */ + uint32_t *resume_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_OpenDomain { + struct { + struct policy_handle *connect_handle;/* [ref] */ + uint32_t access_mask; + struct dom_sid2 *sid;/* [ref] */ + } in; + + struct { + struct policy_handle *domain_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryDomainInfo { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + } in; + + struct { + union samr_DomainInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetDomainInfo { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + union samr_DomainInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_CreateDomainGroup { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct lsa_String *name;/* [ref] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *group_handle;/* [ref] */ + uint32_t *rid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_EnumDomainGroups { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t max_size; + uint32_t *resume_handle;/* [ref] */ + } in; + + struct { + struct samr_SamArray *sam;/* [ref] */ + uint32_t *num_entries;/* [ref] */ + uint32_t *resume_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_CreateUser { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct lsa_String *account_name;/* [ref] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *user_handle;/* [ref] */ + uint32_t *rid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_EnumDomainUsers { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t acct_flags; + uint32_t max_size; + uint32_t *resume_handle;/* [ref] */ + } in; + + struct { + struct samr_SamArray *sam;/* [ref] */ + uint32_t *num_entries;/* [ref] */ + uint32_t *resume_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_CreateDomAlias { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct lsa_String *alias_name;/* [ref] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *alias_handle;/* [ref] */ + uint32_t *rid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_EnumDomainAliases { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t acct_flags; + uint32_t *resume_handle;/* [ref] */ + } in; + + struct { + struct samr_SamArray *sam;/* [ref] */ + uint32_t *num_entries;/* [ref] */ + uint32_t *resume_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_GetAliasMembership { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct lsa_SidArray *sids;/* [ref] */ + } in; + + struct { + struct samr_Ids *rids;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_LookupNames { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t num_names;/* [range(0 1000)] */ + struct lsa_String *names;/* [length_is(num_names),size_is(1000)] */ + } in; + + struct { + struct samr_Ids *rids;/* [ref] */ + struct samr_Ids *types;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_LookupRids { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t num_rids;/* [range(0 1000)] */ + uint32_t *rids;/* [length_is(num_rids),size_is(1000)] */ + } in; + + struct { + struct lsa_Strings *names;/* [ref] */ + struct samr_Ids *types;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_OpenGroup { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t access_mask; + uint32_t rid; + } in; + + struct { + struct policy_handle *group_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryGroupInfo { + struct { + struct policy_handle *group_handle;/* [ref] */ + enum samr_GroupInfoEnum level; + } in; + + struct { + union samr_GroupInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetGroupInfo { + struct { + struct policy_handle *group_handle;/* [ref] */ + enum samr_GroupInfoEnum level; + union samr_GroupInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_AddGroupMember { + struct { + struct policy_handle *group_handle;/* [ref] */ + uint32_t rid; + uint32_t flags; + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_DeleteDomainGroup { + struct { + struct policy_handle *group_handle;/* [ref] */ + } in; + + struct { + struct policy_handle *group_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_DeleteGroupMember { + struct { + struct policy_handle *group_handle;/* [ref] */ + uint32_t rid; + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_QueryGroupMember { + struct { + struct policy_handle *group_handle;/* [ref] */ + } in; + + struct { + struct samr_RidTypeArray *rids;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetMemberAttributesOfGroup { + struct { + struct policy_handle *group_handle;/* [ref] */ + uint32_t unknown1; + uint32_t unknown2; + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_OpenAlias { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t access_mask; + uint32_t rid; + } in; + + struct { + struct policy_handle *alias_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryAliasInfo { + struct { + struct policy_handle *alias_handle;/* [ref] */ + enum samr_AliasInfoEnum level; + } in; + + struct { + union samr_AliasInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetAliasInfo { + struct { + struct policy_handle *alias_handle;/* [ref] */ + enum samr_AliasInfoEnum level; + union samr_AliasInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_DeleteDomAlias { + struct { + struct policy_handle *alias_handle;/* [ref] */ + } in; + + struct { + struct policy_handle *alias_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_AddAliasMember { + struct { + struct policy_handle *alias_handle;/* [ref] */ + struct dom_sid2 *sid;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_DeleteAliasMember { + struct { + struct policy_handle *alias_handle;/* [ref] */ + struct dom_sid2 *sid;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_GetMembersInAlias { + struct { + struct policy_handle *alias_handle;/* [ref] */ + } in; + + struct { + struct lsa_SidArray *sids;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_OpenUser { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t access_mask; + uint32_t rid; + } in; + + struct { + struct policy_handle *user_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_DeleteUser { + struct { + struct policy_handle *user_handle;/* [ref] */ + } in; + + struct { + struct policy_handle *user_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryUserInfo { + struct { + struct policy_handle *user_handle;/* [ref] */ + uint16_t level; + } in; + + struct { + union samr_UserInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetUserInfo { + struct { + struct policy_handle *user_handle;/* [ref] */ + uint16_t level; + union samr_UserInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_ChangePasswordUser { + struct { + struct policy_handle *user_handle;/* [ref] */ + uint8_t lm_present; + struct samr_Password *old_lm_crypted;/* [unique] */ + struct samr_Password *new_lm_crypted;/* [unique] */ + uint8_t nt_present; + struct samr_Password *old_nt_crypted;/* [unique] */ + struct samr_Password *new_nt_crypted;/* [unique] */ + uint8_t cross1_present; + struct samr_Password *nt_cross;/* [unique] */ + uint8_t cross2_present; + struct samr_Password *lm_cross;/* [unique] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_GetGroupsForUser { + struct { + struct policy_handle *user_handle;/* [ref] */ + } in; + + struct { + struct samr_RidWithAttributeArray *rids;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryDisplayInfo { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + uint32_t start_idx; + uint32_t max_entries; + uint32_t buf_size; + } in; + + struct { + uint32_t *total_size;/* [ref] */ + uint32_t *returned_size;/* [ref] */ + union samr_DispInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_GetDisplayEnumerationIndex { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + struct lsa_String name; + } in; + + struct { + uint32_t *idx;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_TestPrivateFunctionsDomain { + struct { + struct policy_handle *domain_handle;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_TestPrivateFunctionsUser { + struct { + struct policy_handle *user_handle;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_GetUserPwInfo { + struct { + struct policy_handle *user_handle;/* [ref] */ + } in; + + struct { + struct samr_PwInfo *info;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_RemoveMemberFromForeignDomain { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct dom_sid2 *sid;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_QueryDomainInfo2 { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + } in; + + struct { + union samr_DomainInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryUserInfo2 { + struct { + struct policy_handle *user_handle;/* [ref] */ + uint16_t level; + } in; + + struct { + union samr_UserInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryDisplayInfo2 { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + uint32_t start_idx; + uint32_t max_entries; + uint32_t buf_size; + } in; + + struct { + uint32_t *total_size;/* [ref] */ + uint32_t *returned_size;/* [ref] */ + union samr_DispInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_GetDisplayEnumerationIndex2 { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + struct lsa_String name; + } in; + + struct { + uint32_t *idx;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_CreateUser2 { + struct { + struct policy_handle *domain_handle;/* [ref] */ + struct lsa_String *account_name;/* [ref] */ + uint32_t acct_flags; + uint32_t access_mask; + } in; + + struct { + struct policy_handle *user_handle;/* [ref] */ + uint32_t *access_granted;/* [ref] */ + uint32_t *rid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_QueryDisplayInfo3 { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint16_t level; + uint32_t start_idx; + uint32_t max_entries; + uint32_t buf_size; + } in; + + struct { + uint32_t *total_size;/* [ref] */ + uint32_t *returned_size;/* [ref] */ + union samr_DispInfo *info;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + + +struct samr_AddMultipleMembersToAlias { + struct { + struct policy_handle *alias_handle;/* [ref] */ + struct lsa_SidArray *sids;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_RemoveMultipleMembersFromAlias { + struct { + struct policy_handle *alias_handle;/* [ref] */ + struct lsa_SidArray *sids;/* [ref] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_OemChangePasswordUser2 { + struct { + struct lsa_AsciiString *server;/* [unique] */ + struct lsa_AsciiString *account;/* [ref] */ + struct samr_CryptPassword *password;/* [unique] */ + struct samr_Password *hash;/* [unique] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_ChangePasswordUser2 { + struct { + struct lsa_String *server;/* [unique] */ + struct lsa_String *account;/* [ref] */ + struct samr_CryptPassword *nt_password;/* [unique] */ + struct samr_Password *nt_verifier;/* [unique] */ + uint8_t lm_change; + struct samr_CryptPassword *lm_password;/* [unique] */ + struct samr_Password *lm_verifier;/* [unique] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_GetDomPwInfo { + struct { + struct lsa_String *domain_name;/* [unique] */ + } in; + + struct { + struct samr_PwInfo *info;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Connect2 { + struct { + const char *system_name;/* [unique,charset(UTF16)] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *connect_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetUserInfo2 { + struct { + struct policy_handle *user_handle;/* [ref] */ + uint16_t level; + union samr_UserInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_SetBootKeyInformation { + struct { + struct policy_handle *connect_handle;/* [ref] */ + uint32_t unknown1; + uint32_t unknown2; + uint32_t unknown3; + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_GetBootKeyInformation { + struct { + struct policy_handle *domain_handle;/* [ref] */ + } in; + + struct { + uint32_t *unknown;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Connect3 { + struct { + const char *system_name;/* [unique,charset(UTF16)] */ + uint32_t unknown; + uint32_t access_mask; + } in; + + struct { + struct policy_handle *connect_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Connect4 { + struct { + const char *system_name;/* [unique,charset(UTF16)] */ + uint32_t unknown; + uint32_t access_mask; + } in; + + struct { + struct policy_handle *connect_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_ChangePasswordUser3 { + struct { + struct lsa_String *server;/* [unique] */ + struct lsa_String *account;/* [ref] */ + struct samr_CryptPassword *nt_password;/* [unique] */ + struct samr_Password *nt_verifier;/* [unique] */ + uint8_t lm_change; + struct samr_CryptPassword *lm_password;/* [unique] */ + struct samr_Password *lm_verifier;/* [unique] */ + struct samr_CryptPassword *password3;/* [unique] */ + } in; + + struct { + struct samr_DomInfo1 *dominfo;/* [ref] */ + struct samr_ChangeReject *reject;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_Connect5 { + struct { + const char *system_name;/* [unique,charset(UTF16)] */ + uint32_t access_mask; + uint32_t level_in; + union samr_ConnectInfo *info_in;/* [ref,switch_is(level_in)] */ + } in; + + struct { + uint32_t *level_out;/* [ref] */ + union samr_ConnectInfo *info_out;/* [ref,switch_is(*level_out)] */ + struct policy_handle *connect_handle;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_RidToSid { + struct { + struct policy_handle *domain_handle;/* [ref] */ + uint32_t rid; + } in; + + struct { + struct dom_sid2 *sid;/* [ref] */ + NTSTATUS result; + } out; + +}; + + +struct samr_SetDsrmPassword { + struct { + struct lsa_String *name;/* [unique] */ + uint32_t unknown; + struct samr_Password *hash;/* [unique] */ + } in; + + struct { + NTSTATUS result; + } out; + +}; + + +struct samr_ValidatePassword { + struct { + enum samr_ValidatePasswordLevel level; + union samr_ValidatePasswordReq req;/* [switch_is(level)] */ + } in; + + struct { + union samr_ValidatePasswordRep *rep;/* [ref,switch_is(level)] */ + NTSTATUS result; + } out; + +}; + +#endif /* _HEADER_samr */ diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c new file mode 100644 index 0000000000..72116f355b --- /dev/null +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -0,0 +1,5482 @@ +/* + * Unix SMB/CIFS implementation. + * server auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/srv_samr.h" + +static bool api_samr_Connect(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Connect *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CONNECT]; + + r = talloc(NULL, struct samr_Connect); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect, r); + } + + ZERO_STRUCT(r->out); + r->out.connect_handle = talloc_zero(r, struct policy_handle); + if (r->out.connect_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_Connect(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Close(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Close *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CLOSE]; + + r = talloc(NULL, struct samr_Close); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Close, r); + } + + ZERO_STRUCT(r->out); + r->out.handle = r->in.handle; + r->out.result = _samr_Close(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Close, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetSecurity(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetSecurity *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETSECURITY]; + + r = talloc(NULL, struct samr_SetSecurity); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetSecurity, r); + } + + r->out.result = _samr_SetSecurity(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetSecurity, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QuerySecurity(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QuerySecurity *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYSECURITY]; + + r = talloc(NULL, struct samr_QuerySecurity); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QuerySecurity, r); + } + + ZERO_STRUCT(r->out); + r->out.sdbuf = talloc_zero(r, struct sec_desc_buf); + if (r->out.sdbuf == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QuerySecurity(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QuerySecurity, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Shutdown(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Shutdown *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SHUTDOWN]; + + r = talloc(NULL, struct samr_Shutdown); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Shutdown, r); + } + + r->out.result = _samr_Shutdown(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Shutdown, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_LookupDomain(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_LookupDomain *r; + + call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPDOMAIN]; + + r = talloc(NULL, struct samr_LookupDomain); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupDomain, r); + } + + ZERO_STRUCT(r->out); + r->out.sid = talloc_zero(r, struct dom_sid2); + if (r->out.sid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_LookupDomain(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupDomain, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_EnumDomains(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_EnumDomains *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINS]; + + r = talloc(NULL, struct samr_EnumDomains); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomains, r); + } + + ZERO_STRUCT(r->out); + r->out.resume_handle = r->in.resume_handle; + r->out.sam = talloc_zero(r, struct samr_SamArray); + if (r->out.sam == NULL) { + talloc_free(r); + return false; + } + + r->out.num_entries = talloc_zero(r, uint32_t); + if (r->out.num_entries == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_EnumDomains(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomains, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_OpenDomain(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_OpenDomain *r; + + call = &ndr_table_samr.calls[NDR_SAMR_OPENDOMAIN]; + + r = talloc(NULL, struct samr_OpenDomain); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenDomain, r); + } + + ZERO_STRUCT(r->out); + r->out.domain_handle = talloc_zero(r, struct policy_handle); + if (r->out.domain_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_OpenDomain(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenDomain, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryDomainInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryDomainInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYDOMAININFO]; + + r = talloc(NULL, struct samr_QueryDomainInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_DomainInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryDomainInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetDomainInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetDomainInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETDOMAININFO]; + + r = talloc(NULL, struct samr_SetDomainInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDomainInfo, r); + } + + r->out.result = _samr_SetDomainInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_CreateDomainGroup(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_CreateDomainGroup *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CREATEDOMAINGROUP]; + + r = talloc(NULL, struct samr_CreateDomainGroup); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomainGroup, r); + } + + ZERO_STRUCT(r->out); + r->out.group_handle = talloc_zero(r, struct policy_handle); + if (r->out.group_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.rid = talloc_zero(r, uint32_t); + if (r->out.rid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_CreateDomainGroup(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_EnumDomainGroups(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_EnumDomainGroups *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINGROUPS]; + + r = talloc(NULL, struct samr_EnumDomainGroups); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainGroups, r); + } + + ZERO_STRUCT(r->out); + r->out.resume_handle = r->in.resume_handle; + r->out.sam = talloc_zero(r, struct samr_SamArray); + if (r->out.sam == NULL) { + talloc_free(r); + return false; + } + + r->out.num_entries = talloc_zero(r, uint32_t); + if (r->out.num_entries == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_EnumDomainGroups(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_CreateUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_CreateUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CREATEUSER]; + + r = talloc(NULL, struct samr_CreateUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser, r); + } + + ZERO_STRUCT(r->out); + r->out.user_handle = talloc_zero(r, struct policy_handle); + if (r->out.user_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.rid = talloc_zero(r, uint32_t); + if (r->out.rid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_CreateUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_EnumDomainUsers(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_EnumDomainUsers *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINUSERS]; + + r = talloc(NULL, struct samr_EnumDomainUsers); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainUsers, r); + } + + ZERO_STRUCT(r->out); + r->out.resume_handle = r->in.resume_handle; + r->out.sam = talloc_zero(r, struct samr_SamArray); + if (r->out.sam == NULL) { + talloc_free(r); + return false; + } + + r->out.num_entries = talloc_zero(r, uint32_t); + if (r->out.num_entries == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_EnumDomainUsers(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_CreateDomAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_CreateDomAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CREATEDOMALIAS]; + + r = talloc(NULL, struct samr_CreateDomAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomAlias, r); + } + + ZERO_STRUCT(r->out); + r->out.alias_handle = talloc_zero(r, struct policy_handle); + if (r->out.alias_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.rid = talloc_zero(r, uint32_t); + if (r->out.rid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_CreateDomAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_EnumDomainAliases(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_EnumDomainAliases *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINALIASES]; + + r = talloc(NULL, struct samr_EnumDomainAliases); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainAliases, r); + } + + ZERO_STRUCT(r->out); + r->out.resume_handle = r->in.resume_handle; + r->out.sam = talloc_zero(r, struct samr_SamArray); + if (r->out.sam == NULL) { + talloc_free(r); + return false; + } + + r->out.num_entries = talloc_zero(r, uint32_t); + if (r->out.num_entries == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_EnumDomainAliases(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetAliasMembership(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetAliasMembership *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETALIASMEMBERSHIP]; + + r = talloc(NULL, struct samr_GetAliasMembership); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetAliasMembership, r); + } + + ZERO_STRUCT(r->out); + r->out.rids = talloc_zero(r, struct samr_Ids); + if (r->out.rids == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetAliasMembership(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetAliasMembership, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_LookupNames(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_LookupNames *r; + + call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPNAMES]; + + r = talloc(NULL, struct samr_LookupNames); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupNames, r); + } + + ZERO_STRUCT(r->out); + r->out.rids = talloc_zero(r, struct samr_Ids); + if (r->out.rids == NULL) { + talloc_free(r); + return false; + } + + r->out.types = talloc_zero(r, struct samr_Ids); + if (r->out.types == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_LookupNames(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupNames, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_LookupRids(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_LookupRids *r; + + call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPRIDS]; + + r = talloc(NULL, struct samr_LookupRids); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupRids, r); + } + + ZERO_STRUCT(r->out); + r->out.names = talloc_zero(r, struct lsa_Strings); + if (r->out.names == NULL) { + talloc_free(r); + return false; + } + + r->out.types = talloc_zero(r, struct samr_Ids); + if (r->out.types == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_LookupRids(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupRids, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_OpenGroup(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_OpenGroup *r; + + call = &ndr_table_samr.calls[NDR_SAMR_OPENGROUP]; + + r = talloc(NULL, struct samr_OpenGroup); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenGroup, r); + } + + ZERO_STRUCT(r->out); + r->out.group_handle = talloc_zero(r, struct policy_handle); + if (r->out.group_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_OpenGroup(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenGroup, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryGroupInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryGroupInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYGROUPINFO]; + + r = talloc(NULL, struct samr_QueryGroupInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_GroupInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryGroupInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryGroupInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetGroupInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetGroupInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETGROUPINFO]; + + r = talloc(NULL, struct samr_SetGroupInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetGroupInfo, r); + } + + r->out.result = _samr_SetGroupInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_AddGroupMember(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_AddGroupMember *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ADDGROUPMEMBER]; + + r = talloc(NULL, struct samr_AddGroupMember); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddGroupMember, r); + } + + r->out.result = _samr_AddGroupMember(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddGroupMember, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_DeleteDomainGroup(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_DeleteDomainGroup *r; + + call = &ndr_table_samr.calls[NDR_SAMR_DELETEDOMAINGROUP]; + + r = talloc(NULL, struct samr_DeleteDomainGroup); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomainGroup, r); + } + + ZERO_STRUCT(r->out); + r->out.group_handle = r->in.group_handle; + r->out.result = _samr_DeleteDomainGroup(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_DeleteGroupMember(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_DeleteGroupMember *r; + + call = &ndr_table_samr.calls[NDR_SAMR_DELETEGROUPMEMBER]; + + r = talloc(NULL, struct samr_DeleteGroupMember); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteGroupMember, r); + } + + r->out.result = _samr_DeleteGroupMember(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryGroupMember(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryGroupMember *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYGROUPMEMBER]; + + r = talloc(NULL, struct samr_QueryGroupMember); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupMember, r); + } + + ZERO_STRUCT(r->out); + r->out.rids = talloc_zero(r, struct samr_RidTypeArray); + if (r->out.rids == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryGroupMember(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryGroupMember, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetMemberAttributesOfGroup(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetMemberAttributesOfGroup *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP]; + + r = talloc(NULL, struct samr_SetMemberAttributesOfGroup); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetMemberAttributesOfGroup, r); + } + + r->out.result = _samr_SetMemberAttributesOfGroup(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_OpenAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_OpenAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_OPENALIAS]; + + r = talloc(NULL, struct samr_OpenAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenAlias, r); + } + + ZERO_STRUCT(r->out); + r->out.alias_handle = talloc_zero(r, struct policy_handle); + if (r->out.alias_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_OpenAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryAliasInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryAliasInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYALIASINFO]; + + r = talloc(NULL, struct samr_QueryAliasInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryAliasInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_AliasInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryAliasInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryAliasInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetAliasInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetAliasInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETALIASINFO]; + + r = talloc(NULL, struct samr_SetAliasInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetAliasInfo, r); + } + + r->out.result = _samr_SetAliasInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_DeleteDomAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_DeleteDomAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_DELETEDOMALIAS]; + + r = talloc(NULL, struct samr_DeleteDomAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomAlias, r); + } + + ZERO_STRUCT(r->out); + r->out.alias_handle = r->in.alias_handle; + r->out.result = _samr_DeleteDomAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_AddAliasMember(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_AddAliasMember *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ADDALIASMEMBER]; + + r = talloc(NULL, struct samr_AddAliasMember); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddAliasMember, r); + } + + r->out.result = _samr_AddAliasMember(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddAliasMember, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_DeleteAliasMember(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_DeleteAliasMember *r; + + call = &ndr_table_samr.calls[NDR_SAMR_DELETEALIASMEMBER]; + + r = talloc(NULL, struct samr_DeleteAliasMember); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteAliasMember, r); + } + + r->out.result = _samr_DeleteAliasMember(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetMembersInAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetMembersInAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETMEMBERSINALIAS]; + + r = talloc(NULL, struct samr_GetMembersInAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetMembersInAlias, r); + } + + ZERO_STRUCT(r->out); + r->out.sids = talloc_zero(r, struct lsa_SidArray); + if (r->out.sids == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetMembersInAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetMembersInAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_OpenUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_OpenUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_OPENUSER]; + + r = talloc(NULL, struct samr_OpenUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenUser, r); + } + + ZERO_STRUCT(r->out); + r->out.user_handle = talloc_zero(r, struct policy_handle); + if (r->out.user_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_OpenUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_DeleteUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_DeleteUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_DELETEUSER]; + + r = talloc(NULL, struct samr_DeleteUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteUser, r); + } + + ZERO_STRUCT(r->out); + r->out.user_handle = r->in.user_handle; + r->out.result = _samr_DeleteUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryUserInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryUserInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYUSERINFO]; + + r = talloc(NULL, struct samr_QueryUserInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_UserInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryUserInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetUserInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetUserInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETUSERINFO]; + + r = talloc(NULL, struct samr_SetUserInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo, r); + } + + r->out.result = _samr_SetUserInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_ChangePasswordUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_ChangePasswordUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER]; + + r = talloc(NULL, struct samr_ChangePasswordUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser, r); + } + + r->out.result = _samr_ChangePasswordUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetGroupsForUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetGroupsForUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETGROUPSFORUSER]; + + r = talloc(NULL, struct samr_GetGroupsForUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetGroupsForUser, r); + } + + ZERO_STRUCT(r->out); + r->out.rids = talloc_zero(r, struct samr_RidWithAttributeArray); + if (r->out.rids == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetGroupsForUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetGroupsForUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryDisplayInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryDisplayInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO]; + + r = talloc(NULL, struct samr_QueryDisplayInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.total_size = talloc_zero(r, uint32_t); + if (r->out.total_size == NULL) { + talloc_free(r); + return false; + } + + r->out.returned_size = talloc_zero(r, uint32_t); + if (r->out.returned_size == NULL) { + talloc_free(r); + return false; + } + + r->out.info = talloc_zero(r, union samr_DispInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryDisplayInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetDisplayEnumerationIndex(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetDisplayEnumerationIndex *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETDISPLAYENUMERATIONINDEX]; + + r = talloc(NULL, struct samr_GetDisplayEnumerationIndex); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex, r); + } + + ZERO_STRUCT(r->out); + r->out.idx = talloc_zero(r, uint32_t); + if (r->out.idx == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetDisplayEnumerationIndex(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_TestPrivateFunctionsDomain(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_TestPrivateFunctionsDomain *r; + + call = &ndr_table_samr.calls[NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN]; + + r = talloc(NULL, struct samr_TestPrivateFunctionsDomain); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsDomain, r); + } + + r->out.result = _samr_TestPrivateFunctionsDomain(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_TestPrivateFunctionsUser(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_TestPrivateFunctionsUser *r; + + call = &ndr_table_samr.calls[NDR_SAMR_TESTPRIVATEFUNCTIONSUSER]; + + r = talloc(NULL, struct samr_TestPrivateFunctionsUser); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsUser, r); + } + + r->out.result = _samr_TestPrivateFunctionsUser(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetUserPwInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetUserPwInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETUSERPWINFO]; + + r = talloc(NULL, struct samr_GetUserPwInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetUserPwInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, struct samr_PwInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetUserPwInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetUserPwInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_RemoveMemberFromForeignDomain *r; + + call = &ndr_table_samr.calls[NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN]; + + r = talloc(NULL, struct samr_RemoveMemberFromForeignDomain); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMemberFromForeignDomain, r); + } + + r->out.result = _samr_RemoveMemberFromForeignDomain(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryDomainInfo2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryDomainInfo2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYDOMAININFO2]; + + r = talloc(NULL, struct samr_QueryDomainInfo2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo2, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_DomainInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryDomainInfo2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryUserInfo2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryUserInfo2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYUSERINFO2]; + + r = talloc(NULL, struct samr_QueryUserInfo2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo2, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union samr_UserInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryUserInfo2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryDisplayInfo2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryDisplayInfo2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO2]; + + r = talloc(NULL, struct samr_QueryDisplayInfo2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo2, r); + } + + ZERO_STRUCT(r->out); + r->out.total_size = talloc_zero(r, uint32_t); + if (r->out.total_size == NULL) { + talloc_free(r); + return false; + } + + r->out.returned_size = talloc_zero(r, uint32_t); + if (r->out.returned_size == NULL) { + talloc_free(r); + return false; + } + + r->out.info = talloc_zero(r, union samr_DispInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryDisplayInfo2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetDisplayEnumerationIndex2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETDISPLAYENUMERATIONINDEX2]; + + r = talloc(NULL, struct samr_GetDisplayEnumerationIndex2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex2, r); + } + + ZERO_STRUCT(r->out); + r->out.idx = talloc_zero(r, uint32_t); + if (r->out.idx == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetDisplayEnumerationIndex2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_CreateUser2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_CreateUser2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CREATEUSER2]; + + r = talloc(NULL, struct samr_CreateUser2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser2, r); + } + + ZERO_STRUCT(r->out); + r->out.user_handle = talloc_zero(r, struct policy_handle); + if (r->out.user_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.access_granted = talloc_zero(r, uint32_t); + if (r->out.access_granted == NULL) { + talloc_free(r); + return false; + } + + r->out.rid = talloc_zero(r, uint32_t); + if (r->out.rid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_CreateUser2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_QueryDisplayInfo3(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_QueryDisplayInfo3 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO3]; + + r = talloc(NULL, struct samr_QueryDisplayInfo3); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo3, r); + } + + ZERO_STRUCT(r->out); + r->out.total_size = talloc_zero(r, uint32_t); + if (r->out.total_size == NULL) { + talloc_free(r); + return false; + } + + r->out.returned_size = talloc_zero(r, uint32_t); + if (r->out.returned_size == NULL) { + talloc_free(r); + return false; + } + + r->out.info = talloc_zero(r, union samr_DispInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_QueryDisplayInfo3(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo3, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_AddMultipleMembersToAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_AddMultipleMembersToAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS]; + + r = talloc(NULL, struct samr_AddMultipleMembersToAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddMultipleMembersToAlias, r); + } + + r->out.result = _samr_AddMultipleMembersToAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_RemoveMultipleMembersFromAlias *r; + + call = &ndr_table_samr.calls[NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS]; + + r = talloc(NULL, struct samr_RemoveMultipleMembersFromAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMultipleMembersFromAlias, r); + } + + r->out.result = _samr_RemoveMultipleMembersFromAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_OemChangePasswordUser2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_OemChangePasswordUser2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_OEMCHANGEPASSWORDUSER2]; + + r = talloc(NULL, struct samr_OemChangePasswordUser2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OemChangePasswordUser2, r); + } + + r->out.result = _samr_OemChangePasswordUser2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_ChangePasswordUser2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_ChangePasswordUser2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER2]; + + r = talloc(NULL, struct samr_ChangePasswordUser2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser2, r); + } + + r->out.result = _samr_ChangePasswordUser2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetDomPwInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetDomPwInfo *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETDOMPWINFO]; + + r = talloc(NULL, struct samr_GetDomPwInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDomPwInfo, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, struct samr_PwInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetDomPwInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDomPwInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Connect2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Connect2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CONNECT2]; + + r = talloc(NULL, struct samr_Connect2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect2, r); + } + + ZERO_STRUCT(r->out); + r->out.connect_handle = talloc_zero(r, struct policy_handle); + if (r->out.connect_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_Connect2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetUserInfo2(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetUserInfo2 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETUSERINFO2]; + + r = talloc(NULL, struct samr_SetUserInfo2); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo2, r); + } + + r->out.result = _samr_SetUserInfo2(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetBootKeyInformation(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetBootKeyInformation *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETBOOTKEYINFORMATION]; + + r = talloc(NULL, struct samr_SetBootKeyInformation); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetBootKeyInformation, r); + } + + r->out.result = _samr_SetBootKeyInformation(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_GetBootKeyInformation(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_GetBootKeyInformation *r; + + call = &ndr_table_samr.calls[NDR_SAMR_GETBOOTKEYINFORMATION]; + + r = talloc(NULL, struct samr_GetBootKeyInformation); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetBootKeyInformation, r); + } + + ZERO_STRUCT(r->out); + r->out.unknown = talloc_zero(r, uint32_t); + if (r->out.unknown == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_GetBootKeyInformation(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Connect3(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Connect3 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CONNECT3]; + + r = talloc(NULL, struct samr_Connect3); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect3, r); + } + + ZERO_STRUCT(r->out); + r->out.connect_handle = talloc_zero(r, struct policy_handle); + if (r->out.connect_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_Connect3(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect3, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Connect4(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Connect4 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CONNECT4]; + + r = talloc(NULL, struct samr_Connect4); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect4, r); + } + + ZERO_STRUCT(r->out); + r->out.connect_handle = talloc_zero(r, struct policy_handle); + if (r->out.connect_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_Connect4(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect4, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_ChangePasswordUser3(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_ChangePasswordUser3 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER3]; + + r = talloc(NULL, struct samr_ChangePasswordUser3); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser3, r); + } + + ZERO_STRUCT(r->out); + r->out.dominfo = talloc_zero(r, struct samr_DomInfo1); + if (r->out.dominfo == NULL) { + talloc_free(r); + return false; + } + + r->out.reject = talloc_zero(r, struct samr_ChangeReject); + if (r->out.reject == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_ChangePasswordUser3(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_Connect5(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_Connect5 *r; + + call = &ndr_table_samr.calls[NDR_SAMR_CONNECT5]; + + r = talloc(NULL, struct samr_Connect5); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect5, r); + } + + ZERO_STRUCT(r->out); + r->out.level_out = talloc_zero(r, uint32_t); + if (r->out.level_out == NULL) { + talloc_free(r); + return false; + } + + r->out.info_out = talloc_zero(r, union samr_ConnectInfo); + if (r->out.info_out == NULL) { + talloc_free(r); + return false; + } + + r->out.connect_handle = talloc_zero(r, struct policy_handle); + if (r->out.connect_handle == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_Connect5(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect5, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_RidToSid(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_RidToSid *r; + + call = &ndr_table_samr.calls[NDR_SAMR_RIDTOSID]; + + r = talloc(NULL, struct samr_RidToSid); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RidToSid, r); + } + + ZERO_STRUCT(r->out); + r->out.sid = talloc_zero(r, struct dom_sid2); + if (r->out.sid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_RidToSid(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RidToSid, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_SetDsrmPassword(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_SetDsrmPassword *r; + + call = &ndr_table_samr.calls[NDR_SAMR_SETDSRMPASSWORD]; + + r = talloc(NULL, struct samr_SetDsrmPassword); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDsrmPassword, r); + } + + r->out.result = _samr_SetDsrmPassword(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_samr_ValidatePassword(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct samr_ValidatePassword *r; + + call = &ndr_table_samr.calls[NDR_SAMR_VALIDATEPASSWORD]; + + r = talloc(NULL, struct samr_ValidatePassword); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ValidatePassword, r); + } + + ZERO_STRUCT(r->out); + r->out.rep = talloc_zero(r, union samr_ValidatePasswordRep); + if (r->out.rep == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _samr_ValidatePassword(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ValidatePassword, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + + +/* Tables */ +static struct api_struct api_samr_cmds[] = +{ + {"SAMR_CONNECT", NDR_SAMR_CONNECT, api_samr_Connect}, + {"SAMR_CLOSE", NDR_SAMR_CLOSE, api_samr_Close}, + {"SAMR_SETSECURITY", NDR_SAMR_SETSECURITY, api_samr_SetSecurity}, + {"SAMR_QUERYSECURITY", NDR_SAMR_QUERYSECURITY, api_samr_QuerySecurity}, + {"SAMR_SHUTDOWN", NDR_SAMR_SHUTDOWN, api_samr_Shutdown}, + {"SAMR_LOOKUPDOMAIN", NDR_SAMR_LOOKUPDOMAIN, api_samr_LookupDomain}, + {"SAMR_ENUMDOMAINS", NDR_SAMR_ENUMDOMAINS, api_samr_EnumDomains}, + {"SAMR_OPENDOMAIN", NDR_SAMR_OPENDOMAIN, api_samr_OpenDomain}, + {"SAMR_QUERYDOMAININFO", NDR_SAMR_QUERYDOMAININFO, api_samr_QueryDomainInfo}, + {"SAMR_SETDOMAININFO", NDR_SAMR_SETDOMAININFO, api_samr_SetDomainInfo}, + {"SAMR_CREATEDOMAINGROUP", NDR_SAMR_CREATEDOMAINGROUP, api_samr_CreateDomainGroup}, + {"SAMR_ENUMDOMAINGROUPS", NDR_SAMR_ENUMDOMAINGROUPS, api_samr_EnumDomainGroups}, + {"SAMR_CREATEUSER", NDR_SAMR_CREATEUSER, api_samr_CreateUser}, + {"SAMR_ENUMDOMAINUSERS", NDR_SAMR_ENUMDOMAINUSERS, api_samr_EnumDomainUsers}, + {"SAMR_CREATEDOMALIAS", NDR_SAMR_CREATEDOMALIAS, api_samr_CreateDomAlias}, + {"SAMR_ENUMDOMAINALIASES", NDR_SAMR_ENUMDOMAINALIASES, api_samr_EnumDomainAliases}, + {"SAMR_GETALIASMEMBERSHIP", NDR_SAMR_GETALIASMEMBERSHIP, api_samr_GetAliasMembership}, + {"SAMR_LOOKUPNAMES", NDR_SAMR_LOOKUPNAMES, api_samr_LookupNames}, + {"SAMR_LOOKUPRIDS", NDR_SAMR_LOOKUPRIDS, api_samr_LookupRids}, + {"SAMR_OPENGROUP", NDR_SAMR_OPENGROUP, api_samr_OpenGroup}, + {"SAMR_QUERYGROUPINFO", NDR_SAMR_QUERYGROUPINFO, api_samr_QueryGroupInfo}, + {"SAMR_SETGROUPINFO", NDR_SAMR_SETGROUPINFO, api_samr_SetGroupInfo}, + {"SAMR_ADDGROUPMEMBER", NDR_SAMR_ADDGROUPMEMBER, api_samr_AddGroupMember}, + {"SAMR_DELETEDOMAINGROUP", NDR_SAMR_DELETEDOMAINGROUP, api_samr_DeleteDomainGroup}, + {"SAMR_DELETEGROUPMEMBER", NDR_SAMR_DELETEGROUPMEMBER, api_samr_DeleteGroupMember}, + {"SAMR_QUERYGROUPMEMBER", NDR_SAMR_QUERYGROUPMEMBER, api_samr_QueryGroupMember}, + {"SAMR_SETMEMBERATTRIBUTESOFGROUP", NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP, api_samr_SetMemberAttributesOfGroup}, + {"SAMR_OPENALIAS", NDR_SAMR_OPENALIAS, api_samr_OpenAlias}, + {"SAMR_QUERYALIASINFO", NDR_SAMR_QUERYALIASINFO, api_samr_QueryAliasInfo}, + {"SAMR_SETALIASINFO", NDR_SAMR_SETALIASINFO, api_samr_SetAliasInfo}, + {"SAMR_DELETEDOMALIAS", NDR_SAMR_DELETEDOMALIAS, api_samr_DeleteDomAlias}, + {"SAMR_ADDALIASMEMBER", NDR_SAMR_ADDALIASMEMBER, api_samr_AddAliasMember}, + {"SAMR_DELETEALIASMEMBER", NDR_SAMR_DELETEALIASMEMBER, api_samr_DeleteAliasMember}, + {"SAMR_GETMEMBERSINALIAS", NDR_SAMR_GETMEMBERSINALIAS, api_samr_GetMembersInAlias}, + {"SAMR_OPENUSER", NDR_SAMR_OPENUSER, api_samr_OpenUser}, + {"SAMR_DELETEUSER", NDR_SAMR_DELETEUSER, api_samr_DeleteUser}, + {"SAMR_QUERYUSERINFO", NDR_SAMR_QUERYUSERINFO, api_samr_QueryUserInfo}, + {"SAMR_SETUSERINFO", NDR_SAMR_SETUSERINFO, api_samr_SetUserInfo}, + {"SAMR_CHANGEPASSWORDUSER", NDR_SAMR_CHANGEPASSWORDUSER, api_samr_ChangePasswordUser}, + {"SAMR_GETGROUPSFORUSER", NDR_SAMR_GETGROUPSFORUSER, api_samr_GetGroupsForUser}, + {"SAMR_QUERYDISPLAYINFO", NDR_SAMR_QUERYDISPLAYINFO, api_samr_QueryDisplayInfo}, + {"SAMR_GETDISPLAYENUMERATIONINDEX", NDR_SAMR_GETDISPLAYENUMERATIONINDEX, api_samr_GetDisplayEnumerationIndex}, + {"SAMR_TESTPRIVATEFUNCTIONSDOMAIN", NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN, api_samr_TestPrivateFunctionsDomain}, + {"SAMR_TESTPRIVATEFUNCTIONSUSER", NDR_SAMR_TESTPRIVATEFUNCTIONSUSER, api_samr_TestPrivateFunctionsUser}, + {"SAMR_GETUSERPWINFO", NDR_SAMR_GETUSERPWINFO, api_samr_GetUserPwInfo}, + {"SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN", NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN, api_samr_RemoveMemberFromForeignDomain}, + {"SAMR_QUERYDOMAININFO2", NDR_SAMR_QUERYDOMAININFO2, api_samr_QueryDomainInfo2}, + {"SAMR_QUERYUSERINFO2", NDR_SAMR_QUERYUSERINFO2, api_samr_QueryUserInfo2}, + {"SAMR_QUERYDISPLAYINFO2", NDR_SAMR_QUERYDISPLAYINFO2, api_samr_QueryDisplayInfo2}, + {"SAMR_GETDISPLAYENUMERATIONINDEX2", NDR_SAMR_GETDISPLAYENUMERATIONINDEX2, api_samr_GetDisplayEnumerationIndex2}, + {"SAMR_CREATEUSER2", NDR_SAMR_CREATEUSER2, api_samr_CreateUser2}, + {"SAMR_QUERYDISPLAYINFO3", NDR_SAMR_QUERYDISPLAYINFO3, api_samr_QueryDisplayInfo3}, + {"SAMR_ADDMULTIPLEMEMBERSTOALIAS", NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS, api_samr_AddMultipleMembersToAlias}, + {"SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS", NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS, api_samr_RemoveMultipleMembersFromAlias}, + {"SAMR_OEMCHANGEPASSWORDUSER2", NDR_SAMR_OEMCHANGEPASSWORDUSER2, api_samr_OemChangePasswordUser2}, + {"SAMR_CHANGEPASSWORDUSER2", NDR_SAMR_CHANGEPASSWORDUSER2, api_samr_ChangePasswordUser2}, + {"SAMR_GETDOMPWINFO", NDR_SAMR_GETDOMPWINFO, api_samr_GetDomPwInfo}, + {"SAMR_CONNECT2", NDR_SAMR_CONNECT2, api_samr_Connect2}, + {"SAMR_SETUSERINFO2", NDR_SAMR_SETUSERINFO2, api_samr_SetUserInfo2}, + {"SAMR_SETBOOTKEYINFORMATION", NDR_SAMR_SETBOOTKEYINFORMATION, api_samr_SetBootKeyInformation}, + {"SAMR_GETBOOTKEYINFORMATION", NDR_SAMR_GETBOOTKEYINFORMATION, api_samr_GetBootKeyInformation}, + {"SAMR_CONNECT3", NDR_SAMR_CONNECT3, api_samr_Connect3}, + {"SAMR_CONNECT4", NDR_SAMR_CONNECT4, api_samr_Connect4}, + {"SAMR_CHANGEPASSWORDUSER3", NDR_SAMR_CHANGEPASSWORDUSER3, api_samr_ChangePasswordUser3}, + {"SAMR_CONNECT5", NDR_SAMR_CONNECT5, api_samr_Connect5}, + {"SAMR_RIDTOSID", NDR_SAMR_RIDTOSID, api_samr_RidToSid}, + {"SAMR_SETDSRMPASSWORD", NDR_SAMR_SETDSRMPASSWORD, api_samr_SetDsrmPassword}, + {"SAMR_VALIDATEPASSWORD", NDR_SAMR_VALIDATEPASSWORD, api_samr_ValidatePassword}, +}; + +void samr_get_pipe_fns(struct api_struct **fns, int *n_fns) +{ + *fns = api_samr_cmds; + *n_fns = sizeof(api_samr_cmds) / sizeof(struct api_struct); +} + +NTSTATUS rpc_samr_init(void) +{ + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "samr", "samr", api_samr_cmds, sizeof(api_samr_cmds) / sizeof(struct api_struct)); +} diff --git a/source3/librpc/gen_ndr/srv_samr.h b/source3/librpc/gen_ndr/srv_samr.h new file mode 100644 index 0000000000..7d5cdd745d --- /dev/null +++ b/source3/librpc/gen_ndr/srv_samr.h @@ -0,0 +1,74 @@ +#include "librpc/gen_ndr/ndr_samr.h" +#ifndef __SRV_SAMR__ +#define __SRV_SAMR__ +NTSTATUS _samr_Connect(pipes_struct *p, struct samr_Connect *r); +NTSTATUS _samr_Close(pipes_struct *p, struct samr_Close *r); +NTSTATUS _samr_SetSecurity(pipes_struct *p, struct samr_SetSecurity *r); +NTSTATUS _samr_QuerySecurity(pipes_struct *p, struct samr_QuerySecurity *r); +NTSTATUS _samr_Shutdown(pipes_struct *p, struct samr_Shutdown *r); +NTSTATUS _samr_LookupDomain(pipes_struct *p, struct samr_LookupDomain *r); +NTSTATUS _samr_EnumDomains(pipes_struct *p, struct samr_EnumDomains *r); +NTSTATUS _samr_OpenDomain(pipes_struct *p, struct samr_OpenDomain *r); +NTSTATUS _samr_QueryDomainInfo(pipes_struct *p, struct samr_QueryDomainInfo *r); +NTSTATUS _samr_SetDomainInfo(pipes_struct *p, struct samr_SetDomainInfo *r); +NTSTATUS _samr_CreateDomainGroup(pipes_struct *p, struct samr_CreateDomainGroup *r); +NTSTATUS _samr_EnumDomainGroups(pipes_struct *p, struct samr_EnumDomainGroups *r); +NTSTATUS _samr_CreateUser(pipes_struct *p, struct samr_CreateUser *r); +NTSTATUS _samr_EnumDomainUsers(pipes_struct *p, struct samr_EnumDomainUsers *r); +NTSTATUS _samr_CreateDomAlias(pipes_struct *p, struct samr_CreateDomAlias *r); +NTSTATUS _samr_EnumDomainAliases(pipes_struct *p, struct samr_EnumDomainAliases *r); +NTSTATUS _samr_GetAliasMembership(pipes_struct *p, struct samr_GetAliasMembership *r); +NTSTATUS _samr_LookupNames(pipes_struct *p, struct samr_LookupNames *r); +NTSTATUS _samr_LookupRids(pipes_struct *p, struct samr_LookupRids *r); +NTSTATUS _samr_OpenGroup(pipes_struct *p, struct samr_OpenGroup *r); +NTSTATUS _samr_QueryGroupInfo(pipes_struct *p, struct samr_QueryGroupInfo *r); +NTSTATUS _samr_SetGroupInfo(pipes_struct *p, struct samr_SetGroupInfo *r); +NTSTATUS _samr_AddGroupMember(pipes_struct *p, struct samr_AddGroupMember *r); +NTSTATUS _samr_DeleteDomainGroup(pipes_struct *p, struct samr_DeleteDomainGroup *r); +NTSTATUS _samr_DeleteGroupMember(pipes_struct *p, struct samr_DeleteGroupMember *r); +NTSTATUS _samr_QueryGroupMember(pipes_struct *p, struct samr_QueryGroupMember *r); +NTSTATUS _samr_SetMemberAttributesOfGroup(pipes_struct *p, struct samr_SetMemberAttributesOfGroup *r); +NTSTATUS _samr_OpenAlias(pipes_struct *p, struct samr_OpenAlias *r); +NTSTATUS _samr_QueryAliasInfo(pipes_struct *p, struct samr_QueryAliasInfo *r); +NTSTATUS _samr_SetAliasInfo(pipes_struct *p, struct samr_SetAliasInfo *r); +NTSTATUS _samr_DeleteDomAlias(pipes_struct *p, struct samr_DeleteDomAlias *r); +NTSTATUS _samr_AddAliasMember(pipes_struct *p, struct samr_AddAliasMember *r); +NTSTATUS _samr_DeleteAliasMember(pipes_struct *p, struct samr_DeleteAliasMember *r); +NTSTATUS _samr_GetMembersInAlias(pipes_struct *p, struct samr_GetMembersInAlias *r); +NTSTATUS _samr_OpenUser(pipes_struct *p, struct samr_OpenUser *r); +NTSTATUS _samr_DeleteUser(pipes_struct *p, struct samr_DeleteUser *r); +NTSTATUS _samr_QueryUserInfo(pipes_struct *p, struct samr_QueryUserInfo *r); +NTSTATUS _samr_SetUserInfo(pipes_struct *p, struct samr_SetUserInfo *r); +NTSTATUS _samr_ChangePasswordUser(pipes_struct *p, struct samr_ChangePasswordUser *r); +NTSTATUS _samr_GetGroupsForUser(pipes_struct *p, struct samr_GetGroupsForUser *r); +NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p, struct samr_QueryDisplayInfo *r); +NTSTATUS _samr_GetDisplayEnumerationIndex(pipes_struct *p, struct samr_GetDisplayEnumerationIndex *r); +NTSTATUS _samr_TestPrivateFunctionsDomain(pipes_struct *p, struct samr_TestPrivateFunctionsDomain *r); +NTSTATUS _samr_TestPrivateFunctionsUser(pipes_struct *p, struct samr_TestPrivateFunctionsUser *r); +NTSTATUS _samr_GetUserPwInfo(pipes_struct *p, struct samr_GetUserPwInfo *r); +NTSTATUS _samr_RemoveMemberFromForeignDomain(pipes_struct *p, struct samr_RemoveMemberFromForeignDomain *r); +NTSTATUS _samr_QueryDomainInfo2(pipes_struct *p, struct samr_QueryDomainInfo2 *r); +NTSTATUS _samr_QueryUserInfo2(pipes_struct *p, struct samr_QueryUserInfo2 *r); +NTSTATUS _samr_QueryDisplayInfo2(pipes_struct *p, struct samr_QueryDisplayInfo2 *r); +NTSTATUS _samr_GetDisplayEnumerationIndex2(pipes_struct *p, struct samr_GetDisplayEnumerationIndex2 *r); +NTSTATUS _samr_CreateUser2(pipes_struct *p, struct samr_CreateUser2 *r); +NTSTATUS _samr_QueryDisplayInfo3(pipes_struct *p, struct samr_QueryDisplayInfo3 *r); +NTSTATUS _samr_AddMultipleMembersToAlias(pipes_struct *p, struct samr_AddMultipleMembersToAlias *r); +NTSTATUS _samr_RemoveMultipleMembersFromAlias(pipes_struct *p, struct samr_RemoveMultipleMembersFromAlias *r); +NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p, struct samr_OemChangePasswordUser2 *r); +NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p, struct samr_ChangePasswordUser2 *r); +NTSTATUS _samr_GetDomPwInfo(pipes_struct *p, struct samr_GetDomPwInfo *r); +NTSTATUS _samr_Connect2(pipes_struct *p, struct samr_Connect2 *r); +NTSTATUS _samr_SetUserInfo2(pipes_struct *p, struct samr_SetUserInfo2 *r); +NTSTATUS _samr_SetBootKeyInformation(pipes_struct *p, struct samr_SetBootKeyInformation *r); +NTSTATUS _samr_GetBootKeyInformation(pipes_struct *p, struct samr_GetBootKeyInformation *r); +NTSTATUS _samr_Connect3(pipes_struct *p, struct samr_Connect3 *r); +NTSTATUS _samr_Connect4(pipes_struct *p, struct samr_Connect4 *r); +NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p, struct samr_ChangePasswordUser3 *r); +NTSTATUS _samr_Connect5(pipes_struct *p, struct samr_Connect5 *r); +NTSTATUS _samr_RidToSid(pipes_struct *p, struct samr_RidToSid *r); +NTSTATUS _samr_SetDsrmPassword(pipes_struct *p, struct samr_SetDsrmPassword *r); +NTSTATUS _samr_ValidatePassword(pipes_struct *p, struct samr_ValidatePassword *r); +void samr_get_pipe_fns(struct api_struct **fns, int *n_fns); +NTSTATUS rpc_samr_init(void); +#endif /* __SRV_SAMR__ */ -- cgit From a2b0e355e5cd8d0799ef77988e08ac7776e1cc92 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jan 2008 10:20:50 +0100 Subject: Re-run make idl to regnerated netlogon. Guenther (This used to be commit 0230284cfa83477ad5a084a7970db1ea0cfe8563) --- source3/librpc/gen_ndr/ndr_netlogon.c | 1 + source3/librpc/gen_ndr/netlogon.h | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 1ceca9d8d4..8a5ac4726f 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -965,6 +965,7 @@ _PUBLIC_ void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_GRACE_LOGON", NETLOGON_GRACE_LOGON, r); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 2ced17405d..1dcc363742 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -94,16 +94,17 @@ struct netr_LMSessionKey { }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; /* bitmap netr_UserFlags */ -#define NETLOGON_GUEST ( 0x0001 ) -#define NETLOGON_NOENCRYPTION ( 0x0002 ) -#define NETLOGON_CACHED_ACCOUNT ( 0x0004 ) -#define NETLOGON_USED_LM_PASSWORD ( 0x0008 ) -#define NETLOGON_EXTRA_SIDS ( 0x0020 ) -#define NETLOGON_SUBAUTH_SESSION_KEY ( 0x0040 ) -#define NETLOGON_SERVER_TRUST_ACCOUNT ( 0x0080 ) -#define NETLOGON_NTLMV2_ENABLED ( 0x0100 ) -#define NETLOGON_RESOURCE_GROUPS ( 0x0200 ) -#define NETLOGON_PROFILE_PATH_RETURNED ( 0x0400 ) +#define NETLOGON_GUEST ( 0x00000001 ) +#define NETLOGON_NOENCRYPTION ( 0x00000002 ) +#define NETLOGON_CACHED_ACCOUNT ( 0x00000004 ) +#define NETLOGON_USED_LM_PASSWORD ( 0x00000008 ) +#define NETLOGON_EXTRA_SIDS ( 0x00000020 ) +#define NETLOGON_SUBAUTH_SESSION_KEY ( 0x00000040 ) +#define NETLOGON_SERVER_TRUST_ACCOUNT ( 0x00000080 ) +#define NETLOGON_NTLMV2_ENABLED ( 0x00000100 ) +#define NETLOGON_RESOURCE_GROUPS ( 0x00000200 ) +#define NETLOGON_PROFILE_PATH_RETURNED ( 0x00000400 ) +#define NETLOGON_GRACE_LOGON ( 0x01000000 ) ; -- cgit From 3b5913810ccb89dedec286b35454ff6b6d4b1cb5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 24 Jan 2008 11:44:29 +0100 Subject: Fix samr_EnumDomainUsers in samba3, must not be a ref pointer here. Guenther (This used to be commit 3b87c5ce4f74f8dd01bfdf8859c6c832da15cd24) --- source3/librpc/gen_ndr/cli_samr.c | 4 +++- source3/librpc/gen_ndr/ndr_samr.c | 28 +++++++++++++++++----------- source3/librpc/gen_ndr/samr.h | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 99e7e45b02..73c123bbdd 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -621,7 +621,9 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, /* Return variables */ *resume_handle = *r.out.resume_handle; - *sam = *r.out.sam; + if (sam && r.out.sam) { + *sam = *r.out.sam; + } *num_entries = *r.out.num_entries; /* Return result */ diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index f407fcf954..ed80da2885 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -6409,10 +6409,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); - if (r->out.sam == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sam)); + if (r->out.sam) { + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); } - NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); if (r->out.num_entries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6424,6 +6424,7 @@ static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int flags, struct samr_EnumDomainUsers *r) { + uint32_t _ptr_sam; TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_sam_0; @@ -6449,8 +6450,6 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); NDR_PULL_ALLOC(ndr, r->out.resume_handle); *r->out.resume_handle = *r->in.resume_handle; - NDR_PULL_ALLOC(ndr, r->out.sam); - ZERO_STRUCTP(r->out.sam); NDR_PULL_ALLOC(ndr, r->out.num_entries); ZERO_STRUCTP(r->out.num_entries); } @@ -6462,13 +6461,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam)); + if (_ptr_sam) { NDR_PULL_ALLOC(ndr, r->out.sam); + } else { + r->out.sam = NULL; + } + if (r->out.sam) { + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, 0); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, 0); } - _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_entries); } @@ -6512,7 +6516,9 @@ _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char * ndr->depth--; ndr_print_ptr(ndr, "sam", r->out.sam); ndr->depth++; - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + if (r->out.sam) { + ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + } ndr->depth--; ndr_print_ptr(ndr, "num_entries", r->out.num_entries); ndr->depth++; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index a512a64380..16e633e47c 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -946,7 +946,7 @@ struct samr_EnumDomainUsers { } in; struct { - struct samr_SamArray *sam;/* [ref] */ + struct samr_SamArray *sam;/* [unique] */ uint32_t *num_entries;/* [ref] */ uint32_t *resume_handle;/* [ref] */ NTSTATUS result; -- cgit From df5b03a7802f1fedb2fd91f75f3545459be9f0e0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 24 Jan 2008 13:53:36 +0100 Subject: Re-run make idl and use generated ndr based on samba4 security.idl (except for DOM_SID). Guenther (This used to be commit 1781a57b18f681f1bc03873330147a813f10eba2) --- source3/librpc/gen_ndr/ndr_security.c | 1032 +++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_security.h | 41 +- source3/librpc/gen_ndr/security.h | 335 ++++++++++- 3 files changed, 1406 insertions(+), 2 deletions(-) create mode 100644 source3/librpc/gen_ndr/ndr_security.c (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c new file mode 100644 index 0000000000..ab341436b4 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -0,0 +1,1032 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_security.h" + +#include "librpc/gen_ndr/ndr_misc.h" +static enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r) +{ + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r) +{ + uint8_t v; + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r) +{ + ndr_print_uint8(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_OBJECT_INHERIT", SEC_ACE_FLAG_OBJECT_INHERIT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_CONTAINER_INHERIT", SEC_ACE_FLAG_CONTAINER_INHERIT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_NO_PROPAGATE_INHERIT", SEC_ACE_FLAG_NO_PROPAGATE_INHERIT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERIT_ONLY", SEC_ACE_FLAG_INHERIT_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERITED_ACE", SEC_ACE_FLAG_INHERITED_ACE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_VALID_INHERIT", SEC_ACE_FLAG_VALID_INHERIT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_SUCCESSFUL_ACCESS", SEC_ACE_FLAG_SUCCESSFUL_ACCESS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_FAILED_ACCESS", SEC_ACE_FLAG_FAILED_ACCESS, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r) +{ + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r) +{ + uint8_t v; + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r) +{ + const char *val = NULL; + + switch (r) { + case SEC_ACE_TYPE_ACCESS_ALLOWED: val = "SEC_ACE_TYPE_ACCESS_ALLOWED"; break; + case SEC_ACE_TYPE_ACCESS_DENIED: val = "SEC_ACE_TYPE_ACCESS_DENIED"; break; + case SEC_ACE_TYPE_SYSTEM_AUDIT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT"; break; + case SEC_ACE_TYPE_SYSTEM_ALARM: val = "SEC_ACE_TYPE_SYSTEM_ALARM"; break; + case SEC_ACE_TYPE_ALLOWED_COMPOUND: val = "SEC_ACE_TYPE_ALLOWED_COMPOUND"; break; + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT"; break; + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_DENIED_OBJECT"; break; + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT"; break; + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_security_ace_object_flags(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_security_ace_object_flags(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_security_ace_object_flags(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), "SEC_ACE_OBJECT_TYPE_PRESENT", SEC_ACE_OBJECT_TYPE_PRESENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT", SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_type *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->type)); + break; + + default: + break; + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->type)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_type *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: { + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->type)); + break; } + + default: { + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->type)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "security_ace_object_type"); + switch (level) { + case SEC_ACE_OBJECT_TYPE_PRESENT: + ndr_print_GUID(ndr, "type", &r->type); + break; + + default: + break; + + } +} + +static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_inherited_type *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->inherited_type)); + break; + + default: + break; + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->inherited_type)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_inherited_type *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->inherited_type)); + break; } + + default: { + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->inherited_type)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "security_ace_object_inherited_type"); + switch (level) { + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: + ndr_print_GUID(ndr, "inherited_type", &r->inherited_type); + break; + + default: + break; + + } +} + +static enum ndr_err_code ndr_push_security_ace_object(struct ndr_push *ndr, int ndr_flags, const struct security_ace_object *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_security_ace_object_flags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_BUFFERS, &r->type)); + NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_object(struct ndr_pull *ndr, int ndr_flags, struct security_ace_object *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_security_ace_object_flags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)); + NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_BUFFERS, &r->type)); + NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r) +{ + ndr_print_struct(ndr, name, "security_ace_object"); + ndr->depth++; + ndr_print_security_ace_object_flags(ndr, "flags", r->flags); + ndr_print_set_switch_value(ndr, &r->type, r->flags & SEC_ACE_OBJECT_TYPE_PRESENT); + ndr_print_security_ace_object_type(ndr, "type", &r->type); + ndr_print_set_switch_value(ndr, &r->inherited_type, r->flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT); + ndr_print_security_ace_object_inherited_type(ndr, "inherited_type", &r->inherited_type); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; + + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; + + default: + break; + + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: + NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; } + + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: { + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; } + + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: { + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; } + + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: { + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object)); + break; } + + default: { + break; } + + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: + NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object)); + break; + + default: + break; + + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "security_ace_object_ctr"); + switch (level) { + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + ndr_print_security_ace_object(ndr, "object", &r->object); + break; + + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: + ndr_print_security_ace_object(ndr, "object", &r->object); + break; + + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: + ndr_print_security_ace_object(ndr, "object", &r->object); + break; + + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: + ndr_print_security_ace_object(ndr, "object", &r->object); + break; + + default: + break; + + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type)); + NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r, ndr->flags))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type)); + NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object)); + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->trustee)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_security_ace_type(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_pull_security_ace_flags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->type)); + NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object)); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object)); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->trustee)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r) +{ + ndr_print_struct(ndr, name, "security_ace"); + ndr->depth++; + ndr_print_security_ace_type(ndr, "type", r->type); + ndr_print_security_ace_flags(ndr, "flags", r->flags); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r, ndr->flags):r->size); + ndr_print_uint32(ndr, "access_mask", r->access_mask); + ndr_print_set_switch_value(ndr, &r->object, r->type); + ndr_print_security_ace_object_ctr(ndr, "object", &r->object); + ndr_print_dom_sid(ndr, "trustee", &r->trustee); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_security_acl_revision(struct ndr_push *ndr, int ndr_flags, enum security_acl_revision r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_flags, enum security_acl_revision *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r) +{ + const char *val = NULL; + + switch (r) { + case SECURITY_ACL_REVISION_NT4: val = "SECURITY_ACL_REVISION_NT4"; break; + case SECURITY_ACL_REVISION_ADS: val = "SECURITY_ACL_REVISION_ADS"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r) +{ + uint32_t cntr_aces_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_security_acl_revision(ndr, NDR_SCALARS, r->revision)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_acl(r, ndr->flags))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aces)); + for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { + NDR_CHECK(ndr_push_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { + NDR_CHECK(ndr_push_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0])); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r) +{ + uint32_t cntr_aces_0; + TALLOC_CTX *_mem_save_aces_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces)); + if (r->num_aces < 0 || r->num_aces > 1000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_PULL_ALLOC_N(ndr, r->aces, r->num_aces); + _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0); + for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { + NDR_CHECK(ndr_pull_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0); + for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) { + NDR_CHECK(ndr_pull_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r) +{ + uint32_t cntr_aces_0; + ndr_print_struct(ndr, name, "security_acl"); + ndr->depth++; + ndr_print_security_acl_revision(ndr, "revision", r->revision); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_acl(r, ndr->flags):r->size); + ndr_print_uint32(ndr, "num_aces", r->num_aces); + ndr->print(ndr, "%s: ARRAY(%d)", "aces", r->num_aces); + ndr->depth++; + for (cntr_aces_0=0;cntr_aces_0num_aces;cntr_aces_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_aces_0); + if (idx_0) { + ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_security_descriptor_revision(struct ndr_push *ndr, int ndr_flags, enum security_descriptor_revision r) +{ + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, int ndr_flags, enum security_descriptor_revision *r) +{ + uint8_t v; + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r) +{ + const char *val = NULL; + + switch (r) { + case SECURITY_DESCRIPTOR_REVISION_1: val = "SECURITY_DESCRIPTOR_REVISION_1"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_security_descriptor_type(struct ndr_push *ndr, int ndr_flags, uint16_t r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_security_descriptor_type(struct ndr_pull *ndr, int ndr_flags, uint16_t *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r) +{ + ndr_print_uint16(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_OWNER_DEFAULTED", SEC_DESC_OWNER_DEFAULTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_GROUP_DEFAULTED", SEC_DESC_GROUP_DEFAULTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PRESENT", SEC_DESC_DACL_PRESENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_DEFAULTED", SEC_DESC_DACL_DEFAULTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PRESENT", SEC_DESC_SACL_PRESENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_DEFAULTED", SEC_DESC_SACL_DEFAULTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_TRUSTED", SEC_DESC_DACL_TRUSTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SERVER_SECURITY", SEC_DESC_SERVER_SECURITY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERIT_REQ", SEC_DESC_DACL_AUTO_INHERIT_REQ, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERIT_REQ", SEC_DESC_SACL_AUTO_INHERIT_REQ, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERITED", SEC_DESC_DACL_AUTO_INHERITED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERITED", SEC_DESC_SACL_AUTO_INHERITED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PROTECTED", SEC_DESC_DACL_PROTECTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PROTECTED", SEC_DESC_SACL_PROTECTED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_RM_CONTROL_VALID", SEC_DESC_RM_CONTROL_VALID, r); + ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SELF_RELATIVE", SEC_DESC_SELF_RELATIVE, r); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_security_descriptor_revision(ndr, NDR_SCALARS, r->revision)); + NDR_CHECK(ndr_push_security_descriptor_type(ndr, NDR_SCALARS, r->type)); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->owner_sid)); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->group_sid)); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sacl)); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dacl)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->owner_sid) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->owner_sid)); + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->owner_sid)); + } + if (r->group_sid) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->group_sid)); + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_sid)); + } + if (r->sacl) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sacl)); + NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl)); + } + if (r->dacl) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dacl)); + NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r) +{ + uint32_t _ptr_owner_sid; + TALLOC_CTX *_mem_save_owner_sid_0; + uint32_t _ptr_group_sid; + TALLOC_CTX *_mem_save_group_sid_0; + uint32_t _ptr_sacl; + TALLOC_CTX *_mem_save_sacl_0; + uint32_t _ptr_dacl; + TALLOC_CTX *_mem_save_dacl_0; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, NDR_SCALARS, &r->revision)); + NDR_CHECK(ndr_pull_security_descriptor_type(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid)); + if (_ptr_owner_sid) { + NDR_PULL_ALLOC(ndr, r->owner_sid); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->owner_sid, _ptr_owner_sid)); + } else { + r->owner_sid = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); + if (_ptr_group_sid) { + NDR_PULL_ALLOC(ndr, r->group_sid); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->group_sid, _ptr_group_sid)); + } else { + r->group_sid = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl)); + if (_ptr_sacl) { + NDR_PULL_ALLOC(ndr, r->sacl); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl)); + } else { + r->sacl = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl)); + if (_ptr_dacl) { + NDR_PULL_ALLOC(ndr, r->dacl); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl)); + } else { + r->dacl = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->owner_sid) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid)); + _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->owner_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0); + ndr->offset = _relative_save_offset; + } + if (r->group_sid) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid)); + _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); + ndr->offset = _relative_save_offset; + } + if (r->sacl) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl)); + _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0); + NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0); + ndr->offset = _relative_save_offset; + } + if (r->dacl) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl)); + _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0); + NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0); + ndr->offset = _relative_save_offset; + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r) +{ + ndr_print_struct(ndr, name, "security_descriptor"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); + ndr->depth++; + ndr_print_security_descriptor_revision(ndr, "revision", r->revision); + ndr_print_security_descriptor_type(ndr, "type", r->type); + ndr_print_ptr(ndr, "owner_sid", r->owner_sid); + ndr->depth++; + if (r->owner_sid) { + ndr_print_dom_sid(ndr, "owner_sid", r->owner_sid); + } + ndr->depth--; + ndr_print_ptr(ndr, "group_sid", r->group_sid); + ndr->depth++; + if (r->group_sid) { + ndr_print_dom_sid(ndr, "group_sid", r->group_sid); + } + ndr->depth--; + ndr_print_ptr(ndr, "sacl", r->sacl); + ndr->depth++; + if (r->sacl) { + ndr_print_security_acl(ndr, "sacl", r->sacl); + } + ndr->depth--; + ndr_print_ptr(ndr, "dacl", r->dacl); + ndr->depth++; + if (r->dacl) { + ndr_print_security_acl(ndr, "dacl", r->dacl); + } + ndr->depth--; + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd, ndr->flags))); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sd) { + { + struct ndr_push *_ndr_sd; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1)); + NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1)); + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r) +{ + uint32_t _ptr_sd; + TALLOC_CTX *_mem_save_sd_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size)); + if (r->sd_size < 0 || r->sd_size > 0x40000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd)); + if (_ptr_sd) { + NDR_PULL_ALLOC(ndr, r->sd); + } else { + r->sd = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->sd) { + _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0); + { + struct ndr_pull *_ndr_sd; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1)); + NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1)); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r) +{ + ndr_print_struct(ndr, name, "sec_desc_buf"); + ndr->depth++; + ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd, ndr->flags):r->sd_size); + ndr_print_ptr(ndr, "sd", r->sd); + ndr->depth++; + if (r->sd) { + ndr_print_security_descriptor(ndr, "sd", r->sd); + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr_flags, const struct security_token *r) +{ + uint32_t cntr_sids_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_sid)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_sid)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids)); + for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids[cntr_sids_0])); + } + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->privilege_mask)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->user_sid) { + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->user_sid)); + } + if (r->group_sid) { + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_sid)); + } + for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) { + if (r->sids[cntr_sids_0]) { + NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_0])); + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r) +{ + uint32_t _ptr_user_sid; + TALLOC_CTX *_mem_save_user_sid_0; + uint32_t _ptr_group_sid; + TALLOC_CTX *_mem_save_group_sid_0; + uint32_t _ptr_sids; + uint32_t cntr_sids_0; + TALLOC_CTX *_mem_save_sids_0; + TALLOC_CTX *_mem_save_sids_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid)); + if (_ptr_user_sid) { + NDR_PULL_ALLOC(ndr, r->user_sid); + } else { + r->user_sid = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid)); + if (_ptr_group_sid) { + NDR_PULL_ALLOC(ndr, r->group_sid); + } else { + r->group_sid = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->sids)); + NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids)); + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0); + for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids)); + if (_ptr_sids) { + NDR_PULL_ALLOC(ndr, r->sids[cntr_sids_0]); + } else { + r->sids[cntr_sids_0] = NULL; + } + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->privilege_mask)); + if (r->sids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids)); + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->user_sid) { + _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->user_sid, 0); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->user_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0); + } + if (r->group_sid) { + _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0); + } + _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0); + for (cntr_sids_0 = 0; cntr_sids_0 < r->num_sids; cntr_sids_0++) { + if (r->sids[cntr_sids_0]) { + _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->sids[cntr_sids_0], 0); + NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_0])); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0); + } + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r) +{ + uint32_t cntr_sids_0; + ndr_print_struct(ndr, name, "security_token"); + ndr->depth++; + ndr_print_ptr(ndr, "user_sid", r->user_sid); + ndr->depth++; + if (r->user_sid) { + ndr_print_dom_sid(ndr, "user_sid", r->user_sid); + } + ndr->depth--; + ndr_print_ptr(ndr, "group_sid", r->group_sid); + ndr->depth++; + if (r->group_sid) { + ndr_print_dom_sid(ndr, "group_sid", r->group_sid); + } + ndr->depth--; + ndr_print_uint32(ndr, "num_sids", r->num_sids); + ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->num_sids); + ndr->depth++; + for (cntr_sids_0=0;cntr_sids_0num_sids;cntr_sids_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_sids_0); + if (idx_0) { + ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_0]); + ndr->depth++; + if (r->sids[cntr_sids_0]) { + ndr_print_dom_sid(ndr, "sids", r->sids[cntr_sids_0]); + } + ndr->depth--; + free(idx_0); + } + } + ndr->depth--; + ndr_print_udlong(ndr, "privilege_mask", r->privilege_mask); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_security_secinfo(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_security_secinfo(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), "SECINFO_OWNER", SECINFO_OWNER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_GROUP", SECINFO_GROUP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_DACL", SECINFO_DACL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_SACL", SECINFO_SACL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_UNPROTECTED_SACL", SECINFO_UNPROTECTED_SACL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_UNPROTECTED_DACL", SECINFO_UNPROTECTED_DACL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_PROTECTED_SACL", SECINFO_PROTECTED_SACL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_PROTECTED_DACL", SECINFO_PROTECTED_DACL, r); + ndr->depth--; +} + diff --git a/source3/librpc/gen_ndr/ndr_security.h b/source3/librpc/gen_ndr/ndr_security.h index 292e9011c6..79bfd78f51 100644 --- a/source3/librpc/gen_ndr/ndr_security.h +++ b/source3/librpc/gen_ndr/ndr_security.h @@ -1,2 +1,41 @@ -/* empty header to deal with pidl */ +/* header auto-generated by pidl */ +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/security.h" + +#ifndef _HEADER_NDR_security +#define _HEADER_NDR_security + +#define NDR_SECURITY_CALL_COUNT (0) +void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r); +void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r); +void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r); +void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r); +void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r); +void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r); +enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r); +enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r); +void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r); +size_t ndr_size_security_ace(const struct security_ace *r, int flags); +void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r); +enum ndr_err_code ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r); +enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r); +void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r); +size_t ndr_size_security_acl(const struct security_acl *r, int flags); +void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r); +void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r); +enum ndr_err_code ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r); +enum ndr_err_code ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r); +void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r); +size_t ndr_size_security_descriptor(const struct security_descriptor *r, int flags); +enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r); +enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r); +void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r); +enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr_flags, const struct security_token *r); +enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr_flags, struct security_token *r); +void ndr_print_security_token(struct ndr_print *ndr, const char *name, const struct security_token *r); +enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r); +#endif /* _HEADER_NDR_security */ diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h index 1c51af5b9c..b87259c9cb 100644 --- a/source3/librpc/gen_ndr/security.h +++ b/source3/librpc/gen_ndr/security.h @@ -1 +1,334 @@ -#include "ndr/security.h" +/* header auto-generated by pidl */ + +#include + +#include "librpc/gen_ndr/misc.h" +#define dom_sid2 dom_sid +#define dom_sid28 dom_sid +#ifndef _HEADER_security +#define _HEADER_security + +#define SEC_MASK_GENERIC ( 0xF0000000 ) +#define SEC_MASK_FLAGS ( 0x0F000000 ) +#define SEC_MASK_STANDARD ( 0x00FF0000 ) +#define SEC_MASK_SPECIFIC ( 0x0000FFFF ) +#define SEC_GENERIC_ALL ( 0x10000000 ) +#define SEC_GENERIC_EXECUTE ( 0x20000000 ) +#define SEC_GENERIC_WRITE ( 0x40000000 ) +#define SEC_GENERIC_READ ( 0x80000000 ) +#define SEC_FLAG_SYSTEM_SECURITY ( 0x01000000 ) +#define SEC_FLAG_MAXIMUM_ALLOWED ( 0x02000000 ) +#define SEC_STD_DELETE ( 0x00010000 ) +#define SEC_STD_READ_CONTROL ( 0x00020000 ) +#define SEC_STD_WRITE_DAC ( 0x00040000 ) +#define SEC_STD_WRITE_OWNER ( 0x00080000 ) +#define SEC_STD_SYNCHRONIZE ( 0x00100000 ) +#define SEC_STD_REQUIRED ( 0x000F0000 ) +#define SEC_STD_ALL ( 0x001F0000 ) +#define SEC_FILE_READ_DATA ( 0x00000001 ) +#define SEC_FILE_WRITE_DATA ( 0x00000002 ) +#define SEC_FILE_APPEND_DATA ( 0x00000004 ) +#define SEC_FILE_READ_EA ( 0x00000008 ) +#define SEC_FILE_WRITE_EA ( 0x00000010 ) +#define SEC_FILE_EXECUTE ( 0x00000020 ) +#define SEC_FILE_READ_ATTRIBUTE ( 0x00000080 ) +#define SEC_FILE_WRITE_ATTRIBUTE ( 0x00000100 ) +#define SEC_FILE_ALL ( 0x000001ff ) +#define SEC_DIR_LIST ( 0x00000001 ) +#define SEC_DIR_ADD_FILE ( 0x00000002 ) +#define SEC_DIR_ADD_SUBDIR ( 0x00000004 ) +#define SEC_DIR_READ_EA ( 0x00000008 ) +#define SEC_DIR_WRITE_EA ( 0x00000010 ) +#define SEC_DIR_TRAVERSE ( 0x00000020 ) +#define SEC_DIR_DELETE_CHILD ( 0x00000040 ) +#define SEC_DIR_READ_ATTRIBUTE ( 0x00000080 ) +#define SEC_DIR_WRITE_ATTRIBUTE ( 0x00000100 ) +#define SEC_REG_QUERY_VALUE ( 0x00000001 ) +#define SEC_REG_SET_VALUE ( 0x00000002 ) +#define SEC_REG_CREATE_SUBKEY ( 0x00000004 ) +#define SEC_REG_ENUM_SUBKEYS ( 0x00000008 ) +#define SEC_REG_NOTIFY ( 0x00000010 ) +#define SEC_REG_CREATE_LINK ( 0x00000020 ) +#define SEC_ADS_CREATE_CHILD ( 0x00000001 ) +#define SEC_ADS_DELETE_CHILD ( 0x00000002 ) +#define SEC_ADS_LIST ( 0x00000004 ) +#define SEC_ADS_SELF_WRITE ( 0x00000008 ) +#define SEC_ADS_READ_PROP ( 0x00000010 ) +#define SEC_ADS_WRITE_PROP ( 0x00000020 ) +#define SEC_ADS_DELETE_TREE ( 0x00000040 ) +#define SEC_ADS_LIST_OBJECT ( 0x00000080 ) +#define SEC_ADS_CONTROL_ACCESS ( 0x00000100 ) +#define SEC_RIGHTS_FILE_READ ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA ) +#define SEC_RIGHTS_FILE_WRITE ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_WRITE_DATA|SEC_FILE_WRITE_ATTRIBUTE|SEC_FILE_WRITE_EA|SEC_FILE_APPEND_DATA ) +#define SEC_RIGHTS_FILE_EXECUTE ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE ) +#define SEC_RIGHTS_FILE_ALL ( SEC_STD_ALL|SEC_FILE_ALL ) +#define SEC_RIGHTS_DIR_READ ( SEC_RIGHTS_FILE_READ ) +#define SEC_RIGHTS_DIR_WRITE ( SEC_RIGHTS_FILE_WRITE ) +#define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE ) +#define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL ) +#define SID_NULL ( "S-1-0-0" ) +#define NAME_WORLD ( "WORLD" ) +#define SID_WORLD_DOMAIN ( "S-1-1" ) +#define SID_WORLD ( "S-1-1-0" ) +#define SID_CREATOR_OWNER_DOMAIN ( "S-1-3" ) +#define SID_CREATOR_OWNER ( "S-1-3-0" ) +#define SID_CREATOR_GROUP ( "S-1-3-1" ) +#define NAME_NT_AUTHORITY ( "NT AUTHORITY" ) +#define SID_NT_AUTHORITY ( "S-1-5" ) +#define SID_NT_DIALUP ( "S-1-5-1" ) +#define SID_NT_NETWORK ( "S-1-5-2" ) +#define SID_NT_BATCH ( "S-1-5-3" ) +#define SID_NT_INTERACTIVE ( "S-1-5-4" ) +#define SID_NT_SERVICE ( "S-1-5-6" ) +#define SID_NT_ANONYMOUS ( "S-1-5-7" ) +#define SID_NT_PROXY ( "S-1-5-8" ) +#define SID_NT_ENTERPRISE_DCS ( "S-1-5-9" ) +#define SID_NT_SELF ( "S-1-5-10" ) +#define SID_NT_AUTHENTICATED_USERS ( "S-1-5-11" ) +#define SID_NT_RESTRICTED ( "S-1-5-12" ) +#define SID_NT_TERMINAL_SERVER_USERS ( "S-1-5-13" ) +#define SID_NT_REMOTE_INTERACTIVE ( "S-1-5-14" ) +#define SID_NT_THIS_ORGANISATION ( "S-1-5-15" ) +#define SID_NT_SYSTEM ( "S-1-5-18" ) +#define SID_NT_LOCAL_SERVICE ( "S-1-5-19" ) +#define SID_NT_NETWORK_SERVICE ( "S-1-5-20" ) +#define NAME_BUILTIN ( "BUILTIN" ) +#define SID_BUILTIN ( "S-1-5-32" ) +#define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" ) +#define SID_BUILTIN_USERS ( "S-1-5-32-545" ) +#define SID_BUILTIN_GUESTS ( "S-1-5-32-546" ) +#define SID_BUILTIN_POWER_USERS ( "S-1-5-32-547" ) +#define SID_BUILTIN_ACCOUNT_OPERATORS ( "S-1-5-32-548" ) +#define SID_BUILTIN_SERVER_OPERATORS ( "S-1-5-32-549" ) +#define SID_BUILTIN_PRINT_OPERATORS ( "S-1-5-32-550" ) +#define SID_BUILTIN_BACKUP_OPERATORS ( "S-1-5-32-551" ) +#define SID_BUILTIN_REPLICATOR ( "S-1-5-32-552" ) +#define SID_BUILTIN_RAS_SERVERS ( "S-1-5-32-553" ) +#define SID_BUILTIN_PREW2K ( "S-1-5-32-554" ) +#define DOMAIN_RID_LOGON ( 9 ) +#define DOMAIN_RID_ADMINISTRATOR ( 500 ) +#define DOMAIN_RID_GUEST ( 501 ) +#define DOMAIN_RID_ADMINS ( 512 ) +#define DOMAIN_RID_USERS ( 513 ) +#define DOMAIN_RID_DOMAIN_MEMBERS ( 515 ) +#define DOMAIN_RID_DCS ( 516 ) +#define DOMAIN_RID_CERT_ADMINS ( 517 ) +#define DOMAIN_RID_SCHEMA_ADMINS ( 518 ) +#define DOMAIN_RID_ENTERPRISE_ADMINS ( 519 ) +#define NT4_ACL_REVISION ( SECURITY_ACL_REVISION_NT4 ) +#define SD_REVISION ( SECURITY_DESCRIPTOR_REVISION_1 ) +enum sec_privilege +#ifndef USE_UINT_ENUMS + { + SEC_PRIV_SECURITY=1, + SEC_PRIV_BACKUP=2, + SEC_PRIV_RESTORE=3, + SEC_PRIV_SYSTEMTIME=4, + SEC_PRIV_SHUTDOWN=5, + SEC_PRIV_REMOTE_SHUTDOWN=6, + SEC_PRIV_TAKE_OWNERSHIP=7, + SEC_PRIV_DEBUG=8, + SEC_PRIV_SYSTEM_ENVIRONMENT=9, + SEC_PRIV_SYSTEM_PROFILE=10, + SEC_PRIV_PROFILE_SINGLE_PROCESS=11, + SEC_PRIV_INCREASE_BASE_PRIORITY=12, + SEC_PRIV_LOAD_DRIVER=13, + SEC_PRIV_CREATE_PAGEFILE=14, + SEC_PRIV_INCREASE_QUOTA=15, + SEC_PRIV_CHANGE_NOTIFY=16, + SEC_PRIV_UNDOCK=17, + SEC_PRIV_MANAGE_VOLUME=18, + SEC_PRIV_IMPERSONATE=19, + SEC_PRIV_CREATE_GLOBAL=20, + SEC_PRIV_ENABLE_DELEGATION=21, + SEC_PRIV_INTERACTIVE_LOGON=22, + SEC_PRIV_NETWORK_LOGON=23, + SEC_PRIV_REMOTE_INTERACTIVE_LOGON=24 +} +#else + { __donnot_use_enum_sec_privilege=0x7FFFFFFF} +#define SEC_PRIV_SECURITY ( 1 ) +#define SEC_PRIV_BACKUP ( 2 ) +#define SEC_PRIV_RESTORE ( 3 ) +#define SEC_PRIV_SYSTEMTIME ( 4 ) +#define SEC_PRIV_SHUTDOWN ( 5 ) +#define SEC_PRIV_REMOTE_SHUTDOWN ( 6 ) +#define SEC_PRIV_TAKE_OWNERSHIP ( 7 ) +#define SEC_PRIV_DEBUG ( 8 ) +#define SEC_PRIV_SYSTEM_ENVIRONMENT ( 9 ) +#define SEC_PRIV_SYSTEM_PROFILE ( 10 ) +#define SEC_PRIV_PROFILE_SINGLE_PROCESS ( 11 ) +#define SEC_PRIV_INCREASE_BASE_PRIORITY ( 12 ) +#define SEC_PRIV_LOAD_DRIVER ( 13 ) +#define SEC_PRIV_CREATE_PAGEFILE ( 14 ) +#define SEC_PRIV_INCREASE_QUOTA ( 15 ) +#define SEC_PRIV_CHANGE_NOTIFY ( 16 ) +#define SEC_PRIV_UNDOCK ( 17 ) +#define SEC_PRIV_MANAGE_VOLUME ( 18 ) +#define SEC_PRIV_IMPERSONATE ( 19 ) +#define SEC_PRIV_CREATE_GLOBAL ( 20 ) +#define SEC_PRIV_ENABLE_DELEGATION ( 21 ) +#define SEC_PRIV_INTERACTIVE_LOGON ( 22 ) +#define SEC_PRIV_NETWORK_LOGON ( 23 ) +#define SEC_PRIV_REMOTE_INTERACTIVE_LOGON ( 24 ) +#endif +; + +/* bitmap security_ace_flags */ +#define SEC_ACE_FLAG_OBJECT_INHERIT ( 0x01 ) +#define SEC_ACE_FLAG_CONTAINER_INHERIT ( 0x02 ) +#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT ( 0x04 ) +#define SEC_ACE_FLAG_INHERIT_ONLY ( 0x08 ) +#define SEC_ACE_FLAG_INHERITED_ACE ( 0x10 ) +#define SEC_ACE_FLAG_VALID_INHERIT ( 0x0f ) +#define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 ) +#define SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 ) + +; + +enum security_ace_type +#ifndef USE_UINT_ENUMS + { + SEC_ACE_TYPE_ACCESS_ALLOWED=0, + SEC_ACE_TYPE_ACCESS_DENIED=1, + SEC_ACE_TYPE_SYSTEM_AUDIT=2, + SEC_ACE_TYPE_SYSTEM_ALARM=3, + SEC_ACE_TYPE_ALLOWED_COMPOUND=4, + SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT=5, + SEC_ACE_TYPE_ACCESS_DENIED_OBJECT=6, + SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT=7, + SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT=8 +} +#else + { __donnot_use_enum_security_ace_type=0x7FFFFFFF} +#define SEC_ACE_TYPE_ACCESS_ALLOWED ( 0 ) +#define SEC_ACE_TYPE_ACCESS_DENIED ( 1 ) +#define SEC_ACE_TYPE_SYSTEM_AUDIT ( 2 ) +#define SEC_ACE_TYPE_SYSTEM_ALARM ( 3 ) +#define SEC_ACE_TYPE_ALLOWED_COMPOUND ( 4 ) +#define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT ( 5 ) +#define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT ( 6 ) +#define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT ( 7 ) +#define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT ( 8 ) +#endif +; + +/* bitmap security_ace_object_flags */ +#define SEC_ACE_OBJECT_TYPE_PRESENT ( 0x00000001 ) +#define SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT ( 0x00000002 ) + +; + +union security_ace_object_type { + struct GUID type;/* [case(SEC_ACE_OBJECT_TYPE_PRESENT)] */ +}/* [nodiscriminant] */; + +union security_ace_object_inherited_type { + struct GUID inherited_type;/* [case(SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */ +}/* [nodiscriminant] */; + +struct security_ace_object { + uint32_t flags; + union security_ace_object_type type;/* [switch_is(flags&SEC_ACE_OBJECT_TYPE_PRESENT)] */ + union security_ace_object_inherited_type inherited_type;/* [switch_is(flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */ +}; + +union security_ace_object_ctr { + struct security_ace_object object;/* [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] */ +}/* [nodiscriminant] */; + +struct security_ace { + enum security_ace_type type; + uint8_t flags; + uint16_t size;/* [value(ndr_size_security_ace(r,ndr->flags))] */ + uint32_t access_mask; + union security_ace_object_ctr object;/* [switch_is(type)] */ + struct dom_sid trustee; +}/* [gensize,public,nosize] */; + +enum security_acl_revision +#ifndef USE_UINT_ENUMS + { + SECURITY_ACL_REVISION_NT4=2, + SECURITY_ACL_REVISION_ADS=4 +} +#else + { __donnot_use_enum_security_acl_revision=0x7FFFFFFF} +#define SECURITY_ACL_REVISION_NT4 ( 2 ) +#define SECURITY_ACL_REVISION_ADS ( 4 ) +#endif +; + +struct security_acl { + enum security_acl_revision revision; + uint16_t size;/* [value(ndr_size_security_acl(r,ndr->flags))] */ + uint32_t num_aces;/* [range(0 1000)] */ + struct security_ace *aces; +}/* [gensize,public,nosize] */; + +enum security_descriptor_revision +#ifndef USE_UINT_ENUMS + { + SECURITY_DESCRIPTOR_REVISION_1=1 +} +#else + { __donnot_use_enum_security_descriptor_revision=0x7FFFFFFF} +#define SECURITY_DESCRIPTOR_REVISION_1 ( 1 ) +#endif +; + +/* bitmap security_descriptor_type */ +#define SEC_DESC_OWNER_DEFAULTED ( 0x0001 ) +#define SEC_DESC_GROUP_DEFAULTED ( 0x0002 ) +#define SEC_DESC_DACL_PRESENT ( 0x0004 ) +#define SEC_DESC_DACL_DEFAULTED ( 0x0008 ) +#define SEC_DESC_SACL_PRESENT ( 0x0010 ) +#define SEC_DESC_SACL_DEFAULTED ( 0x0020 ) +#define SEC_DESC_DACL_TRUSTED ( 0x0040 ) +#define SEC_DESC_SERVER_SECURITY ( 0x0080 ) +#define SEC_DESC_DACL_AUTO_INHERIT_REQ ( 0x0100 ) +#define SEC_DESC_SACL_AUTO_INHERIT_REQ ( 0x0200 ) +#define SEC_DESC_DACL_AUTO_INHERITED ( 0x0400 ) +#define SEC_DESC_SACL_AUTO_INHERITED ( 0x0800 ) +#define SEC_DESC_DACL_PROTECTED ( 0x1000 ) +#define SEC_DESC_SACL_PROTECTED ( 0x2000 ) +#define SEC_DESC_RM_CONTROL_VALID ( 0x4000 ) +#define SEC_DESC_SELF_RELATIVE ( 0x8000 ) + +; + +struct security_descriptor { + enum security_descriptor_revision revision; + uint16_t type; + struct dom_sid *owner_sid;/* [relative] */ + struct dom_sid *group_sid;/* [relative] */ + struct security_acl *sacl;/* [relative] */ + struct security_acl *dacl;/* [relative] */ +}/* [gensize,public,flag(LIBNDR_FLAG_LITTLE_ENDIAN),nosize] */; + +struct sec_desc_buf { + uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->flags)),range(0 0x40000)] */ + struct security_descriptor *sd;/* [unique,subcontext(4)] */ +}/* [public] */; + +struct security_token { + struct dom_sid *user_sid;/* [unique] */ + struct dom_sid *group_sid;/* [unique] */ + uint32_t num_sids; + struct dom_sid **sids;/* [unique,size_is(num_sids)] */ + uint64_t privilege_mask; +}/* [public] */; + +/* bitmap security_secinfo */ +#define SECINFO_OWNER ( 0x00000001 ) +#define SECINFO_GROUP ( 0x00000002 ) +#define SECINFO_DACL ( 0x00000004 ) +#define SECINFO_SACL ( 0x00000008 ) +#define SECINFO_UNPROTECTED_SACL ( 0x10000000 ) +#define SECINFO_UNPROTECTED_DACL ( 0x20000000 ) +#define SECINFO_PROTECTED_SACL ( 0x40000000 ) +#define SECINFO_PROTECTED_DACL ( 0x80000000 ) + +; + +#endif /* _HEADER_security */ -- cgit From 048c80bf5472ff5492e543a33c28a370ed3efea8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 24 Jan 2008 15:12:00 +0100 Subject: rerun 'make idl' metze (This used to be commit 37b95450518419e2153e9930b63f894b68096d3d) --- source3/librpc/gen_ndr/dfs.h | 6 --- source3/librpc/gen_ndr/eventlog.h | 4 -- source3/librpc/gen_ndr/lsa.h | 2 - source3/librpc/gen_ndr/ndr_netlogon.c | 72 ++++++++++++++++------------------- source3/librpc/gen_ndr/ndr_netlogon.h | 6 +-- source3/librpc/gen_ndr/netlogon.h | 30 +++++---------- source3/librpc/gen_ndr/samr.h | 22 ----------- source3/librpc/gen_ndr/srvsvc.h | 6 --- source3/librpc/gen_ndr/svcctl.h | 2 - source3/librpc/gen_ndr/winreg.h | 4 -- source3/librpc/gen_ndr/wkssvc.h | 4 -- 11 files changed, 45 insertions(+), 113 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/dfs.h b/source3/librpc/gen_ndr/dfs.h index 38e7f93950..dc11e70b59 100644 --- a/source3/librpc/gen_ndr/dfs.h +++ b/source3/librpc/gen_ndr/dfs.h @@ -37,8 +37,6 @@ struct dfs_Info1 { #define DFS_VOLUME_STATE_STANDALONE ( DFS_VOLUME_FLAVOR_STANDALONE ) #define DFS_VOLUME_STATE_AD_BLOB ( DFS_VOLUME_FLAVOR_AD_BLOB ) -; - struct dfs_Info2 { const char *path;/* [unique,charset(UTF16)] */ const char *comment;/* [unique,charset(UTF16)] */ @@ -51,8 +49,6 @@ struct dfs_Info2 { #define DFS_STORAGE_STATE_ONLINE ( 2 ) #define DFS_STORAGE_STATE_ACTIVE ( 4 ) -; - struct dfs_StorageInfo { uint32_t state; const char *server;/* [unique,charset(UTF16)] */ @@ -84,8 +80,6 @@ struct dfs_Info4 { #define DFS_PROPERTY_FLAG_TARGET_FAILBACK ( 0x08 ) #define DFS_PROPERTY_FLAG_CLUSTER_ENABLED ( 0x10 ) -; - struct dfs_Info5 { const char *path;/* [unique,charset(UTF16)] */ const char *comment;/* [unique,charset(UTF16)] */ diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index e13fb50a5d..656dadcc6c 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -13,8 +13,6 @@ #define EVENTLOG_FORWARDS_READ ( 0x0004 ) #define EVENTLOG_BACKWARDS_READ ( 0x0008 ) -; - /* bitmap eventlogEventTypes */ #define EVENTLOG_SUCCESS ( 0x0000 ) #define EVENTLOG_ERROR_TYPE ( 0x0001 ) @@ -23,8 +21,6 @@ #define EVENTLOG_AUDIT_SUCCESS ( 0x0008 ) #define EVENTLOG_AUDIT_FAILURE ( 0x0010 ) -; - struct eventlog_OpenUnknown0 { uint16_t unknown0; uint16_t unknown1; diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index cbaa9083e4..2657557d90 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -9,8 +9,6 @@ #define LSA_ENUM_TRUST_DOMAIN_MULTIPLIER ( 60 ) #define LSA_REF_DOMAIN_LIST_MULTIPLIER ( 32 ) #define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER ( 82 ) -; - struct lsa_String { uint16_t length;/* [value(2*strlen_m(string))] */ uint16_t size;/* [value(2*strlen_m(string))] */ diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 8a5ac4726f..88b9fbd6e5 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -327,12 +327,39 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonParameterControl(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_netr_LogonParameterControl(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), "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", MSV1_0_CLEARTEXT_PASSWORD_ALLOWED, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_UPDATE_LOGON_STATISTICS", MSV1_0_UPDATE_LOGON_STATISTICS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_USER_PARAMETERS", MSV1_0_RETURN_USER_PARAMETERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_RETURN_PROFILE_PATH", MSV1_0_RETURN_PROFILE_PATH, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parameter_control)); + NDR_CHECK(ndr_push_netr_LogonParameterControl(ndr, NDR_SCALARS, r->parameter_control)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_id_low)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_id_high)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name)); @@ -351,7 +378,7 @@ static enum ndr_err_code ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parameter_control)); + NDR_CHECK(ndr_pull_netr_LogonParameterControl(ndr, NDR_SCALARS, &r->parameter_control)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_id_low)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_id_high)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name)); @@ -370,7 +397,7 @@ _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *nam ndr_print_struct(ndr, name, "netr_IdentityInfo"); ndr->depth++; ndr_print_lsa_String(ndr, "domain_name", &r->domain_name); - ndr_print_uint32(ndr, "parameter_control", r->parameter_control); + ndr_print_netr_LogonParameterControl(ndr, "parameter_control", r->parameter_control); ndr_print_uint32(ndr, "logon_id_low", r->logon_id_low); ndr_print_uint32(ndr, "logon_id_high", r->logon_id_high); ndr_print_lsa_String(ndr, "account_name", &r->account_name); @@ -814,39 +841,6 @@ _PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, } } -_PUBLIC_ enum ndr_err_code ndr_push_netr_GroupMembership(struct ndr_push *ndr, int ndr_flags, const struct netr_GroupMembership *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_netr_GroupMembership(struct ndr_pull *ndr, int ndr_flags, struct netr_GroupMembership *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_netr_GroupMembership(struct ndr_print *ndr, const char *name, const struct netr_GroupMembership *r) -{ - ndr_print_struct(ndr, name, "netr_GroupMembership"); - ndr->depth++; - ndr_print_uint32(ndr, "rid", r->rid); - ndr_print_uint32(ndr, "attributes", r->attributes); - ndr->depth--; -} - _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r) { { @@ -1164,7 +1158,7 @@ static enum ndr_err_code ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute)); + NDR_CHECK(ndr_push_samr_GroupAttrs(ndr, NDR_SCALARS, r->attributes)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1186,7 +1180,7 @@ static enum ndr_err_code ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_fla } else { r->sid = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute)); + NDR_CHECK(ndr_pull_samr_GroupAttrs(ndr, NDR_SCALARS, &r->attributes)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -1209,7 +1203,7 @@ _PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, co ndr_print_dom_sid2(ndr, "sid", r->sid); } ndr->depth--; - ndr_print_uint32(ndr, "attribute", r->attribute); + ndr_print_samr_GroupAttrs(ndr, "attributes", r->attributes); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index c2fd0655d8..b1a5ce9973 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -109,6 +109,9 @@ extern const struct ndr_interface_table ndr_table_netlogon; void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r); void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r); void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r); +enum ndr_err_code ndr_push_netr_LogonParameterControl(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_netr_LogonParameterControl(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_netr_LogonParameterControl(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r); void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r); void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r); @@ -116,9 +119,6 @@ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const s enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r); enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r); void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r); -enum ndr_err_code ndr_push_netr_GroupMembership(struct ndr_push *ndr, int ndr_flags, const struct netr_GroupMembership *r); -enum ndr_err_code ndr_pull_netr_GroupMembership(struct ndr_pull *ndr, int ndr_flags, struct netr_GroupMembership *r); -void ndr_print_netr_GroupMembership(struct ndr_print *ndr, const char *name, const struct netr_GroupMembership *r); enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r); enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r); void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r); diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 1dcc363742..53aa350bed 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -8,15 +8,10 @@ #ifndef _HEADER_netlogon #define _HEADER_netlogon -#define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED ( 0x002 ) -#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT ( 0x020 ) -#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x800 ) #define NETLOGON_NEG_ARCFOUR ( 0x00000004 ) #define NETLOGON_NEG_128BIT ( 0x00004000 ) #define NETLOGON_NEG_SCHANNEL ( 0x40000000 ) #define DS_GFTI_UPDATE_TDO ( 0x1 ) -; - struct netr_UasInfo { const char *account_name;/* [unique,charset(UTF16)] */ uint32_t priv; @@ -47,6 +42,14 @@ struct netr_AcctLockStr { uint16_t *bindata;/* [unique,length_is(length/2),size_is(size/2)] */ }; +/* bitmap netr_LogonParameterControl */ +#define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED ( 0x00000002 ) +#define MSV1_0_UPDATE_LOGON_STATISTICS ( 0x00000004 ) +#define MSV1_0_RETURN_USER_PARAMETERS ( 0x00000008 ) +#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT ( 0x00000020 ) +#define MSV1_0_RETURN_PROFILE_PATH ( 0x00000200 ) +#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x00000800 ) + struct netr_IdentityInfo { struct lsa_String domain_name; uint32_t parameter_control; @@ -80,11 +83,6 @@ union netr_LogonLevel { struct netr_NetworkInfo *network;/* [unique,case(2)] */ }/* [public,switch_type(uint16)] */; -struct netr_GroupMembership { - uint32_t rid; - uint32_t attributes; -}/* [public] */; - struct netr_UserSessionKey { uint8_t key[16]; }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; @@ -106,8 +104,6 @@ struct netr_LMSessionKey { #define NETLOGON_PROFILE_PATH_RETURNED ( 0x00000400 ) #define NETLOGON_GRACE_LOGON ( 0x01000000 ) -; - struct netr_SamBaseInfo { NTTIME last_logon; NTTIME last_logoff; @@ -142,7 +138,7 @@ struct netr_SamInfo2 { struct netr_SidAttr { struct dom_sid2 *sid;/* [unique] */ - uint32_t attribute; + uint32_t attributes; }; struct netr_SamInfo3 { @@ -650,8 +646,6 @@ struct netr_Blob { #define DS_RETURN_DNS_NAME ( 0x40000000 ) #define DS_RETURN_FLAT_NAME ( 0x80000000 ) -; - enum netr_DsRGetDCNameInfo_AddressType #ifndef USE_UINT_ENUMS { @@ -680,8 +674,6 @@ enum netr_DsRGetDCNameInfo_AddressType #define DS_DNS_DOMAIN ( 0x40000000 ) #define DS_DNS_FOREST ( 0x80000000 ) -; - struct netr_DsRGetDCNameInfo { const char *dc_unc;/* [unique,charset(UTF16)] */ const char *dc_address;/* [unique,charset(UTF16)] */ @@ -763,8 +755,6 @@ struct netr_DsRAddress { #define NETR_TRUST_FLAG_NATIVE ( 0x00000010 ) #define NETR_TRUST_FLAG_INBOUND ( 0x00000020 ) -; - enum netr_TrustType #ifndef USE_UINT_ENUMS { @@ -791,8 +781,6 @@ enum netr_TrustType #define NETR_TRUST_ATTRIBUTE_WITHIN_FOREST ( 0x00000020 ) #define NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL ( 0x00000040 ) -; - struct netr_DomainTrust { const char *netbios_name;/* [unique,charset(UTF16)] */ const char *dns_name;/* [unique,charset(UTF16)] */ diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 16e633e47c..2ac845ee92 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -9,8 +9,6 @@ #define _HEADER_samr #define SAMR_ENUM_USERS_MULTIPLIER ( 54 ) -; - /* bitmap samr_AcctFlags */ #define ACB_DISABLED ( 0x00000001 ) #define ACB_HOMDIRREQ ( 0x00000002 ) @@ -32,8 +30,6 @@ #define ACB_PW_EXPIRED ( 0x00020000 ) #define ACB_NO_AUTH_DATA_REQD ( 0x00080000 ) -; - /* bitmap samr_ConnectAccessMask */ #define SAMR_ACCESS_CONNECT_TO_SERVER ( 0x00000001 ) #define SAMR_ACCESS_SHUTDOWN_SERVER ( 0x00000002 ) @@ -42,8 +38,6 @@ #define SAMR_ACCESS_ENUM_DOMAINS ( 0x00000010 ) #define SAMR_ACCESS_OPEN_DOMAIN ( 0x00000020 ) -; - /* bitmap samr_UserAccessMask */ #define USER_ACCESS_GET_NAME_ETC ( 0x00000001 ) #define USER_ACCESS_GET_LOCALE ( 0x00000002 ) @@ -57,8 +51,6 @@ #define USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 ) #define USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 ) -; - /* bitmap samr_DomainAccessMask */ #define DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 ) #define DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 ) @@ -72,8 +64,6 @@ #define DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 ) #define DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 ) -; - /* bitmap samr_GroupAccessMask */ #define GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 ) #define GROUP_ACCESS_SET_INFO ( 0x00000002 ) @@ -81,8 +71,6 @@ #define GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 ) #define GROUP_ACCESS_GET_MEMBERS ( 0x00000010 ) -; - /* bitmap samr_AliasAccessMask */ #define ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 ) #define ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 ) @@ -90,8 +78,6 @@ #define ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 ) #define ALIAS_ACCESS_SET_INFO ( 0x00000010 ) -; - struct samr_SamEntry { uint32_t idx; struct lsa_String name; @@ -127,8 +113,6 @@ enum samr_Role #define DOMAIN_PASSWORD_STORE_CLEARTEXT ( 0x00000010 ) #define DOMAIN_REFUSE_PASSWORD_CHANGE ( 0x00000020 ) -; - struct samr_DomInfo1 { uint16_t min_password_length; uint16_t password_history_length; @@ -229,8 +213,6 @@ struct samr_Ids { #define SE_GROUP_RESOURCE ( 0x20000000 ) #define SE_GROUP_LOGON_ID ( 0xC0000000 ) -; - struct samr_GroupInfoAll { struct lsa_String name; uint32_t attributes; @@ -454,8 +436,6 @@ struct samr_UserInfo20 { #define SAMR_FIELD_SEC_DESC ( 0x10000000 ) #define SAMR_FIELD_OWF_PWD ( 0x20000000 ) -; - struct samr_UserInfo21 { NTTIME last_logon; NTTIME last_logoff; @@ -648,8 +628,6 @@ union samr_ConnectInfo { #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH ( 0x00000010 ) #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY ( 0x00000020 ) -; - enum samr_ValidatePasswordLevel #ifndef USE_UINT_ENUMS { diff --git a/source3/librpc/gen_ndr/srvsvc.h b/source3/librpc/gen_ndr/srvsvc.h index bc167bb31c..6e6c7829a0 100644 --- a/source3/librpc/gen_ndr/srvsvc.h +++ b/source3/librpc/gen_ndr/srvsvc.h @@ -11,10 +11,6 @@ #define STYPE_HIDDEN ( 0x80000000 ) #define SHARE_1005_CSC_POLICY_MASK ( 0x00000030 ) #define SHARE_1005_CSC_POLICY_SHIFT ( 4 ) -; - -; - struct srvsvc_NetCharDevInfo0 { const char *device;/* [unique,charset(UTF16)] */ }; @@ -325,8 +321,6 @@ struct srvsvc_NetShareCtr1004 { #define SHARE_1005_IN_DFS ( 0x00000001 ) #define SHARE_1005_DFS_ROOT ( 0x00000002 ) -; - struct srvsvc_NetShareInfo1005 { uint32_t dfs_flags; }; diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h index f0e476c105..7314be0a33 100644 --- a/source3/librpc/gen_ndr/svcctl.h +++ b/source3/librpc/gen_ndr/svcctl.h @@ -68,8 +68,6 @@ struct ENUM_SERVICE_STATUS { #define SV_TYPE_LOCAL_LIST_ONLY ( 0x40000000 ) #define SV_TYPE_DOMAIN_ENUM ( 0x80000000 ) -; - enum SERVICE_CONTROL #ifndef USE_UINT_ENUMS { diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h index 8c498963b6..5570b310cd 100644 --- a/source3/librpc/gen_ndr/winreg.h +++ b/source3/librpc/gen_ndr/winreg.h @@ -8,8 +8,6 @@ #ifndef _HEADER_winreg #define _HEADER_winreg -; - /* bitmap winreg_AccessMask */ #define KEY_QUERY_VALUE ( 0x00001 ) #define KEY_SET_VALUE ( 0x00002 ) @@ -20,8 +18,6 @@ #define KEY_WOW64_64KEY ( 0x00100 ) #define KEY_WOW64_32KEY ( 0x00200 ) -; - enum winreg_Type #ifndef USE_UINT_ENUMS { diff --git a/source3/librpc/gen_ndr/wkssvc.h b/source3/librpc/gen_ndr/wkssvc.h index b4df7c2d8f..cdbf851671 100644 --- a/source3/librpc/gen_ndr/wkssvc.h +++ b/source3/librpc/gen_ndr/wkssvc.h @@ -415,8 +415,6 @@ struct wkssvc_NetrWorkstationStatistics { /* bitmap wkssvc_renameflags */ #define WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE ( 0x00000002 ) -; - enum wkssvc_NetValidateNameType #ifndef USE_UINT_ENUMS { @@ -471,8 +469,6 @@ struct wkssvc_PasswordBuffer { #define WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE ( 0x00000002 ) #define WKSSVC_JOIN_FLAGS_JOIN_TYPE ( 0x00000001 ) -; - enum wkssvc_ComputerNameType #ifndef USE_UINT_ENUMS { -- cgit From cd8ef2e41db5ec60ed9a893c4d533839af3501a6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 24 Jan 2008 23:37:57 +0100 Subject: make idl. Guenther (This used to be commit 212f6fc000d093bad9f78307743639b391db3fe5) --- source3/librpc/gen_ndr/cli_netlogon.c | 20 ++++--- source3/librpc/gen_ndr/cli_netlogon.h | 9 ++- source3/librpc/gen_ndr/ndr_netlogon.c | 108 ++++++++++++++++++++++++++++++---- source3/librpc/gen_ndr/ndr_netlogon.h | 4 +- source3/librpc/gen_ndr/netlogon.h | 8 ++- source3/librpc/gen_ndr/srv_netlogon.c | 23 +++++--- source3/librpc/gen_ndr/srv_netlogon.h | 2 +- 7 files changed, 141 insertions(+), 33 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 414e053dc9..d6739c5a26 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -1183,24 +1183,29 @@ NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *server_name, + const char *domain_name, + uint32_t *rid, + WERROR *werror) { - struct netr_NETRLOGONGETTRUSTRID r; + struct netr_LogonGetTrustRid r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.domain_name = domain_name; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTRUSTRID, &r); + NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, &r); } status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, &ndr_table_netlogon, - NDR_NETR_NETRLOGONGETTRUSTRID, + NDR_NETR_LOGONGETTRUSTRID, &r); if (!NT_STATUS_IS_OK(status)) { @@ -1208,7 +1213,7 @@ NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID, &r); + NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1216,6 +1221,7 @@ NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, } /* Return variables */ + *rid = *r.out.rid; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 30a9645767..9716f4084b 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -185,9 +185,12 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); -NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); +NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *server_name, + const char *domain_name, + uint32_t *rid, + WERROR *werror); NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 88b9fbd6e5..7bc85935d1 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -11184,41 +11184,127 @@ _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, cons ndr->depth--; } -static enum ndr_err_code ndr_push_netr_NETRLOGONGETTRUSTRID(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTRUSTRID *r) +static enum ndr_err_code ndr_push_netr_LogonGetTrustRid(struct ndr_push *ndr, int flags, const struct netr_LogonGetTrustRid *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name)); + if (r->in.domain_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } if (flags & NDR_OUT) { + if (r->out.rid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_NETRLOGONGETTRUSTRID(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTRUSTRID *r) +static enum ndr_err_code ndr_pull_netr_LogonGetTrustRid(struct ndr_pull *ndr, int flags, struct netr_LogonGetTrustRid *r) { + uint32_t _ptr_server_name; + uint32_t _ptr_domain_name; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_domain_name_0; + TALLOC_CTX *_mem_save_rid_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name)); + if (_ptr_domain_name) { + NDR_PULL_ALLOC(ndr, r->in.domain_name); + } else { + r->in.domain_name = NULL; + } + if (r->in.domain_name) { + _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name)); + if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0); + } + NDR_PULL_ALLOC(ndr, r->out.rid); + ZERO_STRUCTP(r->out.rid); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.rid); + } + _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_NETRLOGONGETTRUSTRID(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTRUSTRID *r) +_PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r) { - ndr_print_struct(ndr, name, "netr_NETRLOGONGETTRUSTRID"); + ndr_print_struct(ndr, name, "netr_LogonGetTrustRid"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTRUSTRID"); + ndr_print_struct(ndr, "in", "netr_LogonGetTrustRid"); ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain_name", r->in.domain_name); + ndr->depth++; + if (r->in.domain_name) { + ndr_print_string(ndr, "domain_name", r->in.domain_name); + } + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTRUSTRID"); + ndr_print_struct(ndr, "out", "netr_LogonGetTrustRid"); + ndr->depth++; + ndr_print_ptr(ndr, "rid", r->out.rid); ndr->depth++; + ndr_print_uint32(ndr, "rid", *r->out.rid); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -14376,11 +14462,11 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_NETRLOGONGETTRUSTRID", - sizeof(struct netr_NETRLOGONGETTRUSTRID), - (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTRUSTRID, - (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTRUSTRID, - (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTRUSTRID, + "netr_LogonGetTrustRid", + sizeof(struct netr_LogonGetTrustRid), + (ndr_push_flags_fn_t) ndr_push_netr_LogonGetTrustRid, + (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetTrustRid, + (ndr_print_function_t) ndr_print_netr_LogonGetTrustRid, false, }, { diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index b1a5ce9973..9338aa760b 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -57,7 +57,7 @@ extern const struct ndr_interface_table ndr_table_netlogon; #define NDR_NETR_NETRLOGONSETSERVICEBITS (0x16) -#define NDR_NETR_NETRLOGONGETTRUSTRID (0x17) +#define NDR_NETR_LOGONGETTRUSTRID (0x17) #define NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST (0x18) @@ -227,7 +227,7 @@ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const cha void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r); void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r); void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r); -void ndr_print_netr_NETRLOGONGETTRUSTRID(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTRUSTRID *r); +void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r); void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r); void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r); void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r); diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 53aa350bed..64a70ca1a7 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1200,8 +1200,14 @@ struct netr_NETRLOGONSETSERVICEBITS { }; -struct netr_NETRLOGONGETTRUSTRID { +struct netr_LogonGetTrustRid { struct { + const char *server_name;/* [unique,charset(UTF16)] */ + const char *domain_name;/* [unique,charset(UTF16)] */ + } in; + + struct { + uint32_t *rid;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 421014e829..3f88d7f694 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -1866,18 +1866,18 @@ static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p) return true; } -static bool api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p) +static bool api_netr_LogonGetTrustRid(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_NETRLOGONGETTRUSTRID *r; + struct netr_LogonGetTrustRid *r; - call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONGETTRUSTRID]; + call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETTRUSTRID]; - r = talloc(NULL, struct netr_NETRLOGONGETTRUSTRID); + r = talloc(NULL, struct netr_LogonGetTrustRid); if (r == NULL) { return false; } @@ -1901,10 +1901,17 @@ static bool api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTRUSTRID, r); + NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, r); } - r->out.result = _netr_NETRLOGONGETTRUSTRID(p, r); + ZERO_STRUCT(r->out); + r->out.rid = talloc_zero(r, uint32_t); + if (r->out.rid == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _netr_LogonGetTrustRid(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1913,7 +1920,7 @@ static bool api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID, r); + NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, r); } push = ndr_push_init_ctx(r); @@ -3806,7 +3813,7 @@ static struct api_struct api_netlogon_cmds[] = {"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME, api_netr_DsRGetDCName}, {"NETR_NETRLOGONDUMMYROUTINE1", NDR_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1}, {"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS}, - {"NETR_NETRLOGONGETTRUSTRID", NDR_NETR_NETRLOGONGETTRUSTRID, api_netr_NETRLOGONGETTRUSTRID}, + {"NETR_LOGONGETTRUSTRID", NDR_NETR_LOGONGETTRUSTRID, api_netr_LogonGetTrustRid}, {"NETR_NETRLOGONCOMPUTESERVERDIGEST", NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST, api_netr_NETRLOGONCOMPUTESERVERDIGEST}, {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST, api_netr_NETRLOGONCOMPUTECLIENTDIGEST}, {"NETR_SERVERAUTHENTICATE3", NDR_NETR_SERVERAUTHENTICATE3, api_netr_ServerAuthenticate3}, diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h index dc91cf5c0c..fb6ed9fa90 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.h +++ b/source3/librpc/gen_ndr/srv_netlogon.h @@ -24,7 +24,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p, struct netr_NetrEnumer WERROR _netr_DsRGetDCName(pipes_struct *p, struct netr_DsRGetDCName *r); WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p, struct netr_NETRLOGONDUMMYROUTINE1 *r); WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p, struct netr_NETRLOGONSETSERVICEBITS *r); -WERROR _netr_NETRLOGONGETTRUSTRID(pipes_struct *p, struct netr_NETRLOGONGETTRUSTRID *r); +WERROR _netr_LogonGetTrustRid(pipes_struct *p, struct netr_LogonGetTrustRid *r); WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r); WERROR _netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r); NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p, struct netr_ServerAuthenticate3 *r); -- cgit From ed8385a177cf45de2970d70f08857b8aa60c046b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 00:11:58 +0100 Subject: Re-run make idl. Guenther (This used to be commit c0bf3af692bee5bc5a3405feb405e67d35d77a16) --- source3/librpc/gen_ndr/ndr_samr.c | 64 +++++++++++++++++------------------ source3/librpc/gen_ndr/ndr_security.c | 4 --- source3/librpc/gen_ndr/samr.h | 64 +++++++++++++++++------------------ source3/librpc/gen_ndr/security.h | 8 ----- 4 files changed, 64 insertions(+), 76 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index ed80da2885..adbe549df0 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -91,17 +91,17 @@ _PUBLIC_ void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *n { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_NAME_ETC", USER_ACCESS_GET_NAME_ETC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_LOCALE", USER_ACCESS_GET_LOCALE, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_LOC_COM", USER_ACCESS_SET_LOC_COM, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_LOGONINFO", USER_ACCESS_GET_LOGONINFO, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_ATTRIBUTES", USER_ACCESS_GET_ATTRIBUTES, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_ATTRIBUTES", USER_ACCESS_SET_ATTRIBUTES, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_CHANGE_PASSWORD", USER_ACCESS_CHANGE_PASSWORD, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_SET_PASSWORD", USER_ACCESS_SET_PASSWORD, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_GROUPS", USER_ACCESS_GET_GROUPS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_GET_GROUP_MEMBERSHIP", USER_ACCESS_GET_GROUP_MEMBERSHIP, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_NAME_ETC", SAMR_USER_ACCESS_GET_NAME_ETC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOCALE", SAMR_USER_ACCESS_GET_LOCALE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_LOC_COM", SAMR_USER_ACCESS_SET_LOC_COM, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_LOGONINFO", SAMR_USER_ACCESS_GET_LOGONINFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_ATTRIBUTES", SAMR_USER_ACCESS_GET_ATTRIBUTES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_ATTRIBUTES", SAMR_USER_ACCESS_SET_ATTRIBUTES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_PASSWORD", SAMR_USER_ACCESS_CHANGE_PASSWORD, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_SET_PASSWORD", SAMR_USER_ACCESS_SET_PASSWORD, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUPS", SAMR_USER_ACCESS_GET_GROUPS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP", SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP, r); ndr->depth--; } @@ -123,17 +123,17 @@ _PUBLIC_ void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_LOOKUP_INFO_1", DOMAIN_ACCESS_LOOKUP_INFO_1, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_1", DOMAIN_ACCESS_SET_INFO_1, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_LOOKUP_INFO_2", DOMAIN_ACCESS_LOOKUP_INFO_2, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_2", DOMAIN_ACCESS_SET_INFO_2, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_USER", DOMAIN_ACCESS_CREATE_USER, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_GROUP", DOMAIN_ACCESS_CREATE_GROUP, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_CREATE_ALIAS", DOMAIN_ACCESS_CREATE_ALIAS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_LOOKUP_ALIAS", DOMAIN_ACCESS_LOOKUP_ALIAS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_ENUM_ACCOUNTS", DOMAIN_ACCESS_ENUM_ACCOUNTS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_OPEN_ACCOUNT", DOMAIN_ACCESS_OPEN_ACCOUNT, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DOMAIN_ACCESS_SET_INFO_3", DOMAIN_ACCESS_SET_INFO_3, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_1", SAMR_DOMAIN_ACCESS_SET_INFO_1, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2", SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_2", SAMR_DOMAIN_ACCESS_SET_INFO_2, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_USER", SAMR_DOMAIN_ACCESS_CREATE_USER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_GROUP", SAMR_DOMAIN_ACCESS_CREATE_GROUP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_CREATE_ALIAS", SAMR_DOMAIN_ACCESS_CREATE_ALIAS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS", SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS", SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT", SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_DOMAIN_ACCESS_SET_INFO_3", SAMR_DOMAIN_ACCESS_SET_INFO_3, r); ndr->depth--; } @@ -155,11 +155,11 @@ _PUBLIC_ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char * { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_LOOKUP_INFO", GROUP_ACCESS_LOOKUP_INFO, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_SET_INFO", GROUP_ACCESS_SET_INFO, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_ADD_MEMBER", GROUP_ACCESS_ADD_MEMBER, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_REMOVE_MEMBER", GROUP_ACCESS_REMOVE_MEMBER, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "GROUP_ACCESS_GET_MEMBERS", GROUP_ACCESS_GET_MEMBERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_LOOKUP_INFO", SAMR_GROUP_ACCESS_LOOKUP_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_SET_INFO", SAMR_GROUP_ACCESS_SET_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_ADD_MEMBER", SAMR_GROUP_ACCESS_ADD_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_REMOVE_MEMBER", SAMR_GROUP_ACCESS_REMOVE_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_GROUP_ACCESS_GET_MEMBERS", SAMR_GROUP_ACCESS_GET_MEMBERS, r); ndr->depth--; } @@ -181,11 +181,11 @@ _PUBLIC_ void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char * { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_ADD_MEMBER", ALIAS_ACCESS_ADD_MEMBER, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_REMOVE_MEMBER", ALIAS_ACCESS_REMOVE_MEMBER, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_GET_MEMBERS", ALIAS_ACCESS_GET_MEMBERS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_LOOKUP_INFO", ALIAS_ACCESS_LOOKUP_INFO, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ALIAS_ACCESS_SET_INFO", ALIAS_ACCESS_SET_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_ADD_MEMBER", SAMR_ALIAS_ACCESS_ADD_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_REMOVE_MEMBER", SAMR_ALIAS_ACCESS_REMOVE_MEMBER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_GET_MEMBERS", SAMR_ALIAS_ACCESS_GET_MEMBERS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_LOOKUP_INFO", SAMR_ALIAS_ACCESS_LOOKUP_INFO, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SAMR_ALIAS_ACCESS_SET_INFO", SAMR_ALIAS_ACCESS_SET_INFO, r); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c index ab341436b4..a6ee1a5ddb 100644 --- a/source3/librpc/gen_ndr/ndr_security.c +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -106,7 +106,6 @@ static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); switch (level) { case SEC_ACE_OBJECT_TYPE_PRESENT: - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->type)); break; default: @@ -135,7 +134,6 @@ static enum ndr_err_code ndr_pull_security_ace_object_type(struct ndr_pull *ndr, if (ndr_flags & NDR_BUFFERS) { switch (level) { case SEC_ACE_OBJECT_TYPE_PRESENT: - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->type)); break; default: @@ -180,7 +178,6 @@ static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_ int level = ndr_push_get_switch_value(ndr, r); switch (level) { case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->inherited_type)); break; default: @@ -209,7 +206,6 @@ static enum ndr_err_code ndr_pull_security_ace_object_inherited_type(struct ndr_ if (ndr_flags & NDR_BUFFERS) { switch (level) { case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->inherited_type)); break; default: diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 2ac845ee92..c6a68e8bd5 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -39,44 +39,44 @@ #define SAMR_ACCESS_OPEN_DOMAIN ( 0x00000020 ) /* bitmap samr_UserAccessMask */ -#define USER_ACCESS_GET_NAME_ETC ( 0x00000001 ) -#define USER_ACCESS_GET_LOCALE ( 0x00000002 ) -#define USER_ACCESS_SET_LOC_COM ( 0x00000004 ) -#define USER_ACCESS_GET_LOGONINFO ( 0x00000008 ) -#define USER_ACCESS_GET_ATTRIBUTES ( 0x00000010 ) -#define USER_ACCESS_SET_ATTRIBUTES ( 0x00000020 ) -#define USER_ACCESS_CHANGE_PASSWORD ( 0x00000040 ) -#define USER_ACCESS_SET_PASSWORD ( 0x00000080 ) -#define USER_ACCESS_GET_GROUPS ( 0x00000100 ) -#define USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 ) -#define USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 ) +#define SAMR_USER_ACCESS_GET_NAME_ETC ( 0x00000001 ) +#define SAMR_USER_ACCESS_GET_LOCALE ( 0x00000002 ) +#define SAMR_USER_ACCESS_SET_LOC_COM ( 0x00000004 ) +#define SAMR_USER_ACCESS_GET_LOGONINFO ( 0x00000008 ) +#define SAMR_USER_ACCESS_GET_ATTRIBUTES ( 0x00000010 ) +#define SAMR_USER_ACCESS_SET_ATTRIBUTES ( 0x00000020 ) +#define SAMR_USER_ACCESS_CHANGE_PASSWORD ( 0x00000040 ) +#define SAMR_USER_ACCESS_SET_PASSWORD ( 0x00000080 ) +#define SAMR_USER_ACCESS_GET_GROUPS ( 0x00000100 ) +#define SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 ) +#define SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 ) /* bitmap samr_DomainAccessMask */ -#define DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 ) -#define DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 ) -#define DOMAIN_ACCESS_LOOKUP_INFO_2 ( 0x00000004 ) -#define DOMAIN_ACCESS_SET_INFO_2 ( 0x00000008 ) -#define DOMAIN_ACCESS_CREATE_USER ( 0x00000010 ) -#define DOMAIN_ACCESS_CREATE_GROUP ( 0x00000020 ) -#define DOMAIN_ACCESS_CREATE_ALIAS ( 0x00000040 ) -#define DOMAIN_ACCESS_LOOKUP_ALIAS ( 0x00000080 ) -#define DOMAIN_ACCESS_ENUM_ACCOUNTS ( 0x00000100 ) -#define DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 ) -#define DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 ) +#define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 ) +#define SAMR_DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 ) +#define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2 ( 0x00000004 ) +#define SAMR_DOMAIN_ACCESS_SET_INFO_2 ( 0x00000008 ) +#define SAMR_DOMAIN_ACCESS_CREATE_USER ( 0x00000010 ) +#define SAMR_DOMAIN_ACCESS_CREATE_GROUP ( 0x00000020 ) +#define SAMR_DOMAIN_ACCESS_CREATE_ALIAS ( 0x00000040 ) +#define SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS ( 0x00000080 ) +#define SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS ( 0x00000100 ) +#define SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 ) +#define SAMR_DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 ) /* bitmap samr_GroupAccessMask */ -#define GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 ) -#define GROUP_ACCESS_SET_INFO ( 0x00000002 ) -#define GROUP_ACCESS_ADD_MEMBER ( 0x00000004 ) -#define GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 ) -#define GROUP_ACCESS_GET_MEMBERS ( 0x00000010 ) +#define SAMR_GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 ) +#define SAMR_GROUP_ACCESS_SET_INFO ( 0x00000002 ) +#define SAMR_GROUP_ACCESS_ADD_MEMBER ( 0x00000004 ) +#define SAMR_GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 ) +#define SAMR_GROUP_ACCESS_GET_MEMBERS ( 0x00000010 ) /* bitmap samr_AliasAccessMask */ -#define ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 ) -#define ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 ) -#define ALIAS_ACCESS_GET_MEMBERS ( 0x00000004 ) -#define ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 ) -#define ALIAS_ACCESS_SET_INFO ( 0x00000010 ) +#define SAMR_ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 ) +#define SAMR_ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 ) +#define SAMR_ALIAS_ACCESS_GET_MEMBERS ( 0x00000004 ) +#define SAMR_ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 ) +#define SAMR_ALIAS_ACCESS_SET_INFO ( 0x00000010 ) struct samr_SamEntry { uint32_t idx; diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h index b87259c9cb..f37b5d70f0 100644 --- a/source3/librpc/gen_ndr/security.h +++ b/source3/librpc/gen_ndr/security.h @@ -184,8 +184,6 @@ enum sec_privilege #define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 ) #define SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 ) -; - enum security_ace_type #ifndef USE_UINT_ENUMS { @@ -217,8 +215,6 @@ enum security_ace_type #define SEC_ACE_OBJECT_TYPE_PRESENT ( 0x00000001 ) #define SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT ( 0x00000002 ) -; - union security_ace_object_type { struct GUID type;/* [case(SEC_ACE_OBJECT_TYPE_PRESENT)] */ }/* [nodiscriminant] */; @@ -295,8 +291,6 @@ enum security_descriptor_revision #define SEC_DESC_RM_CONTROL_VALID ( 0x4000 ) #define SEC_DESC_SELF_RELATIVE ( 0x8000 ) -; - struct security_descriptor { enum security_descriptor_revision revision; uint16_t type; @@ -329,6 +323,4 @@ struct security_token { #define SECINFO_PROTECTED_SACL ( 0x40000000 ) #define SECINFO_PROTECTED_DACL ( 0x80000000 ) -; - #endif /* _HEADER_security */ -- cgit From d7d4f1c132cfa24a96b07ec812c0235b69dacfaa Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 13:04:58 +0100 Subject: Add generated dssetup code after make idl. Guenther (This used to be commit 4b3d96be8017a38a6af4ce58ae54a6af005fbe3e) --- source3/librpc/gen_ndr/cli_dssetup.c | 476 +++++++++++++++ source3/librpc/gen_ndr/cli_dssetup.h | 39 ++ source3/librpc/gen_ndr/dssetup.h | 211 +++++++ source3/librpc/gen_ndr/ndr_dssetup.c | 1084 ++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_dssetup.h | 58 ++ source3/librpc/gen_ndr/srv_dssetup.c | 845 ++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_dssetup.h | 17 + 7 files changed, 2730 insertions(+) create mode 100644 source3/librpc/gen_ndr/cli_dssetup.c create mode 100644 source3/librpc/gen_ndr/cli_dssetup.h create mode 100644 source3/librpc/gen_ndr/dssetup.h create mode 100644 source3/librpc/gen_ndr/ndr_dssetup.c create mode 100644 source3/librpc/gen_ndr/ndr_dssetup.h create mode 100644 source3/librpc/gen_ndr/srv_dssetup.c create mode 100644 source3/librpc/gen_ndr/srv_dssetup.h (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_dssetup.c b/source3/librpc/gen_ndr/cli_dssetup.c new file mode 100644 index 0000000000..8947d99bb5 --- /dev/null +++ b/source3/librpc/gen_ndr/cli_dssetup.c @@ -0,0 +1,476 @@ +/* + * Unix SMB/CIFS implementation. + * client auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/cli_dssetup.h" + +NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + enum dssetup_DsRoleInfoLevel level, + union dssetup_DsRoleInfo *info, + WERROR *werror) +{ + struct dssetup_DsRoleGetPrimaryDomainInformation r; + NTSTATUS status; + + /* In parameters */ + r.in.level = level; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + if (info && r.out.info) { + *info = *r.out.info; + } + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleDnsNameToFlatName r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleDcAsDc r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDCASDC, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleDcAsReplica r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDCASREPLICA, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleDemoteDc r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDEMOTEDC, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleGetDcOperationProgress r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleGetDcOperationResults r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleCancel r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLECANCEL, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleServerSaveStateForUpgrade r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleUpgradeDownlevelServer r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + +NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror) +{ + struct dssetup_DsRoleAbortDownlevelServerUpgrade r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_DSSETUP, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); +} + diff --git a/source3/librpc/gen_ndr/cli_dssetup.h b/source3/librpc/gen_ndr/cli_dssetup.h new file mode 100644 index 0000000000..b645c26829 --- /dev/null +++ b/source3/librpc/gen_ndr/cli_dssetup.h @@ -0,0 +1,39 @@ +#include "librpc/gen_ndr/ndr_dssetup.h" +#ifndef __CLI_DSSETUP__ +#define __CLI_DSSETUP__ +NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + enum dssetup_DsRoleInfoLevel level, + union dssetup_DsRoleInfo *info, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + WERROR *werror); +#endif /* __CLI_DSSETUP__ */ diff --git a/source3/librpc/gen_ndr/dssetup.h b/source3/librpc/gen_ndr/dssetup.h new file mode 100644 index 0000000000..d284a63375 --- /dev/null +++ b/source3/librpc/gen_ndr/dssetup.h @@ -0,0 +1,211 @@ +/* header auto-generated by pidl */ + +#include + +#include "librpc/gen_ndr/misc.h" +#ifndef _HEADER_dssetup +#define _HEADER_dssetup + +enum dssetup_DsRole +#ifndef USE_UINT_ENUMS + { + DS_ROLE_STANDALONE_WORKSTATION=0, + DS_ROLE_MEMBER_WORKSTATION=1, + DS_ROLE_STANDALONE_SERVER=2, + DS_ROLE_MEMBER_SERVER=3, + DS_ROLE_BACKUP_DC=4, + DS_ROLE_PRIMARY_DC=5 +} +#else + { __donnot_use_enum_dssetup_DsRole=0x7FFFFFFF} +#define DS_ROLE_STANDALONE_WORKSTATION ( 0 ) +#define DS_ROLE_MEMBER_WORKSTATION ( 1 ) +#define DS_ROLE_STANDALONE_SERVER ( 2 ) +#define DS_ROLE_MEMBER_SERVER ( 3 ) +#define DS_ROLE_BACKUP_DC ( 4 ) +#define DS_ROLE_PRIMARY_DC ( 5 ) +#endif +; + +/* bitmap dssetup_DsRoleFlags */ +#define DS_ROLE_PRIMARY_DS_RUNNING ( 0x00000001 ) +#define DS_ROLE_PRIMARY_DS_MIXED_MODE ( 0x00000002 ) +#define DS_ROLE_UPGRADE_IN_PROGRESS ( 0x00000004 ) +#define DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT ( 0x01000000 ) + +struct dssetup_DsRolePrimaryDomInfoBasic { + enum dssetup_DsRole role; + uint32_t flags; + const char *domain;/* [unique,charset(UTF16)] */ + const char *dns_domain;/* [unique,charset(UTF16)] */ + const char *forest;/* [unique,charset(UTF16)] */ + struct GUID domain_guid; +}; + +enum dssetup_DsUpgrade +#ifndef USE_UINT_ENUMS + { + DS_ROLE_NOT_UPGRADING=0, + DS_ROLE_UPGRADING=1 +} +#else + { __donnot_use_enum_dssetup_DsUpgrade=0x7FFFFFFF} +#define DS_ROLE_NOT_UPGRADING ( 0 ) +#define DS_ROLE_UPGRADING ( 1 ) +#endif +; + +enum dssetup_DsPrevious +#ifndef USE_UINT_ENUMS + { + DS_ROLE_PREVIOUS_UNKNOWN=0, + DS_ROLE_PREVIOUS_PRIMARY=1, + DS_ROLE_PREVIOUS_BACKUP=2 +} +#else + { __donnot_use_enum_dssetup_DsPrevious=0x7FFFFFFF} +#define DS_ROLE_PREVIOUS_UNKNOWN ( 0 ) +#define DS_ROLE_PREVIOUS_PRIMARY ( 1 ) +#define DS_ROLE_PREVIOUS_BACKUP ( 2 ) +#endif +; + +struct dssetup_DsRoleUpgradeStatus { + enum dssetup_DsUpgrade upgrading; + enum dssetup_DsPrevious previous_role; +}; + +enum dssetup_DsRoleOp +#ifndef USE_UINT_ENUMS + { + DS_ROLE_OP_IDLE=0, + DS_ROLE_OP_ACTIVE=1, + DS_ROLE_OP_NEEDS_REBOOT=2 +} +#else + { __donnot_use_enum_dssetup_DsRoleOp=0x7FFFFFFF} +#define DS_ROLE_OP_IDLE ( 0 ) +#define DS_ROLE_OP_ACTIVE ( 1 ) +#define DS_ROLE_OP_NEEDS_REBOOT ( 2 ) +#endif +; + +struct dssetup_DsRoleOpStatus { + enum dssetup_DsRoleOp status; +}; + +enum dssetup_DsRoleInfoLevel +#ifndef USE_UINT_ENUMS + { + DS_ROLE_BASIC_INFORMATION=1, + DS_ROLE_UPGRADE_STATUS=2, + DS_ROLE_OP_STATUS=3 +} +#else + { __donnot_use_enum_dssetup_DsRoleInfoLevel=0x7FFFFFFF} +#define DS_ROLE_BASIC_INFORMATION ( 1 ) +#define DS_ROLE_UPGRADE_STATUS ( 2 ) +#define DS_ROLE_OP_STATUS ( 3 ) +#endif +; + +union dssetup_DsRoleInfo { + struct dssetup_DsRolePrimaryDomInfoBasic basic;/* [case(DS_ROLE_BASIC_INFORMATION)] */ + struct dssetup_DsRoleUpgradeStatus upgrade;/* [case(DS_ROLE_UPGRADE_STATUS)] */ + struct dssetup_DsRoleOpStatus opstatus;/* [case(DS_ROLE_OP_STATUS)] */ +}/* [switch_type(dssetup_DsRoleInfoLevel)] */; + + +struct dssetup_DsRoleGetPrimaryDomainInformation { + struct { + enum dssetup_DsRoleInfoLevel level; + } in; + + struct { + union dssetup_DsRoleInfo *info;/* [unique,switch_is(level)] */ + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleDnsNameToFlatName { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleDcAsDc { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleDcAsReplica { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleDemoteDc { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleGetDcOperationProgress { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleGetDcOperationResults { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleCancel { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleServerSaveStateForUpgrade { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleUpgradeDownlevelServer { + struct { + WERROR result; + } out; + +}; + + +struct dssetup_DsRoleAbortDownlevelServerUpgrade { + struct { + WERROR result; + } out; + +}; + +#endif /* _HEADER_dssetup */ diff --git a/source3/librpc/gen_ndr/ndr_dssetup.c b/source3/librpc/gen_ndr/ndr_dssetup.c new file mode 100644 index 0000000000..f089b71cd4 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_dssetup.c @@ -0,0 +1,1084 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_dssetup.h" + +#include "librpc/gen_ndr/ndr_misc.h" +static enum ndr_err_code ndr_push_dssetup_DsRole(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRole r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRole(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRole *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r) +{ + const char *val = NULL; + + switch (r) { + case DS_ROLE_STANDALONE_WORKSTATION: val = "DS_ROLE_STANDALONE_WORKSTATION"; break; + case DS_ROLE_MEMBER_WORKSTATION: val = "DS_ROLE_MEMBER_WORKSTATION"; break; + case DS_ROLE_STANDALONE_SERVER: val = "DS_ROLE_STANDALONE_SERVER"; break; + case DS_ROLE_MEMBER_SERVER: val = "DS_ROLE_MEMBER_SERVER"; break; + case DS_ROLE_BACKUP_DC: val = "DS_ROLE_BACKUP_DC"; break; + case DS_ROLE_PRIMARY_DC: val = "DS_ROLE_PRIMARY_DC"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleFlags(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_dssetup_DsRoleFlags(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_dssetup_DsRoleFlags(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), "DS_ROLE_PRIMARY_DS_RUNNING", DS_ROLE_PRIMARY_DS_RUNNING, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DS_MIXED_MODE", DS_ROLE_PRIMARY_DS_MIXED_MODE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_UPGRADE_IN_PROGRESS", DS_ROLE_UPGRADE_IN_PROGRESS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT", DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRolePrimaryDomInfoBasic *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dssetup_DsRole(ndr, NDR_SCALARS, r->role)); + NDR_CHECK(ndr_push_dssetup_DsRoleFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->domain) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->dns_domain) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain, ndr_charset_length(r->dns_domain, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->forest) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest, ndr_charset_length(r->forest, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRolePrimaryDomInfoBasic *r) +{ + uint32_t _ptr_domain; + TALLOC_CTX *_mem_save_domain_0; + uint32_t _ptr_dns_domain; + TALLOC_CTX *_mem_save_dns_domain_0; + uint32_t _ptr_forest; + TALLOC_CTX *_mem_save_forest_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dssetup_DsRole(ndr, NDR_SCALARS, &r->role)); + NDR_CHECK(ndr_pull_dssetup_DsRoleFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain)); + if (_ptr_domain) { + NDR_PULL_ALLOC(ndr, r->domain); + } else { + r->domain = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain)); + if (_ptr_dns_domain) { + NDR_PULL_ALLOC(ndr, r->dns_domain); + } else { + r->dns_domain = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest)); + if (_ptr_forest) { + NDR_PULL_ALLOC(ndr, r->forest); + } else { + r->forest = NULL; + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->domain) { + _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->domain)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->domain)); + if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0); + } + if (r->dns_domain) { + _mem_save_dns_domain_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain)); + if (ndr_get_array_length(ndr, &r->dns_domain) > ndr_get_array_size(ndr, &r->dns_domain)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dns_domain), ndr_get_array_length(ndr, &r->dns_domain)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dns_domain), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain, ndr_get_array_length(ndr, &r->dns_domain), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_0, 0); + } + if (r->forest) { + _mem_save_forest_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->forest, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->forest)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->forest)); + if (ndr_get_array_length(ndr, &r->forest) > ndr_get_array_size(ndr, &r->forest)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->forest), ndr_get_array_length(ndr, &r->forest)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->forest), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest, ndr_get_array_length(ndr, &r->forest), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_0, 0); + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRolePrimaryDomInfoBasic"); + ndr->depth++; + ndr_print_dssetup_DsRole(ndr, "role", r->role); + ndr_print_dssetup_DsRoleFlags(ndr, "flags", r->flags); + ndr_print_ptr(ndr, "domain", r->domain); + ndr->depth++; + if (r->domain) { + ndr_print_string(ndr, "domain", r->domain); + } + ndr->depth--; + ndr_print_ptr(ndr, "dns_domain", r->dns_domain); + ndr->depth++; + if (r->dns_domain) { + ndr_print_string(ndr, "dns_domain", r->dns_domain); + } + ndr->depth--; + ndr_print_ptr(ndr, "forest", r->forest); + ndr->depth++; + if (r->forest) { + ndr_print_string(ndr, "forest", r->forest); + } + ndr->depth--; + ndr_print_GUID(ndr, "domain_guid", &r->domain_guid); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsUpgrade(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsUpgrade r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsUpgrade(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsUpgrade *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r) +{ + const char *val = NULL; + + switch (r) { + case DS_ROLE_NOT_UPGRADING: val = "DS_ROLE_NOT_UPGRADING"; break; + case DS_ROLE_UPGRADING: val = "DS_ROLE_UPGRADING"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_dssetup_DsPrevious(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsPrevious r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsPrevious(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsPrevious *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r) +{ + const char *val = NULL; + + switch (r) { + case DS_ROLE_PREVIOUS_UNKNOWN: val = "DS_ROLE_PREVIOUS_UNKNOWN"; break; + case DS_ROLE_PREVIOUS_PRIMARY: val = "DS_ROLE_PREVIOUS_PRIMARY"; break; + case DS_ROLE_PREVIOUS_BACKUP: val = "DS_ROLE_PREVIOUS_BACKUP"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleUpgradeStatus *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_dssetup_DsUpgrade(ndr, NDR_SCALARS, r->upgrading)); + NDR_CHECK(ndr_push_dssetup_DsPrevious(ndr, NDR_SCALARS, r->previous_role)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleUpgradeStatus *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_dssetup_DsUpgrade(ndr, NDR_SCALARS, &r->upgrading)); + NDR_CHECK(ndr_pull_dssetup_DsPrevious(ndr, NDR_SCALARS, &r->previous_role)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeStatus"); + ndr->depth++; + ndr_print_dssetup_DsUpgrade(ndr, "upgrading", r->upgrading); + ndr_print_dssetup_DsPrevious(ndr, "previous_role", r->previous_role); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleOp(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleOp r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleOp(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleOp *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r) +{ + const char *val = NULL; + + switch (r) { + case DS_ROLE_OP_IDLE: val = "DS_ROLE_OP_IDLE"; break; + case DS_ROLE_OP_ACTIVE: val = "DS_ROLE_OP_ACTIVE"; break; + case DS_ROLE_OP_NEEDS_REBOOT: val = "DS_ROLE_OP_NEEDS_REBOOT"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleOpStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleOpStatus *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 2)); + NDR_CHECK(ndr_push_dssetup_DsRoleOp(ndr, NDR_SCALARS, r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleOpStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleOpStatus *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 2)); + NDR_CHECK(ndr_pull_dssetup_DsRoleOp(ndr, NDR_SCALARS, &r->status)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleOpStatus"); + ndr->depth++; + ndr_print_dssetup_DsRoleOp(ndr, "status", r->status); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleInfoLevel(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r) +{ + const char *val = NULL; + + switch (r) { + case DS_ROLE_BASIC_INFORMATION: val = "DS_ROLE_BASIC_INFORMATION"; break; + case DS_ROLE_UPGRADE_STATUS: val = "DS_ROLE_UPGRADE_STATUS"; break; + case DS_ROLE_OP_STATUS: val = "DS_ROLE_OP_STATUS"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleInfo(struct ndr_push *ndr, int ndr_flags, const union dssetup_DsRoleInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, level)); + switch (level) { + case DS_ROLE_BASIC_INFORMATION: + NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic)); + break; + + case DS_ROLE_UPGRADE_STATUS: + NDR_CHECK(ndr_push_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade)); + break; + + case DS_ROLE_OP_STATUS: + NDR_CHECK(ndr_push_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case DS_ROLE_BASIC_INFORMATION: + NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic)); + break; + + case DS_ROLE_UPGRADE_STATUS: + break; + + case DS_ROLE_OP_STATUS: + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleInfo(struct ndr_pull *ndr, int ndr_flags, union dssetup_DsRoleInfo *r) +{ + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); + } + switch (level) { + case DS_ROLE_BASIC_INFORMATION: { + NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic)); + break; } + + case DS_ROLE_UPGRADE_STATUS: { + NDR_CHECK(ndr_pull_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade)); + break; } + + case DS_ROLE_OP_STATUS: { + NDR_CHECK(ndr_pull_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case DS_ROLE_BASIC_INFORMATION: + NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic)); + break; + + case DS_ROLE_UPGRADE_STATUS: + break; + + case DS_ROLE_OP_STATUS: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "dssetup_DsRoleInfo"); + switch (level) { + case DS_ROLE_BASIC_INFORMATION: + ndr_print_dssetup_DsRolePrimaryDomInfoBasic(ndr, "basic", &r->basic); + break; + + case DS_ROLE_UPGRADE_STATUS: + ndr_print_dssetup_DsRoleUpgradeStatus(ndr, "upgrade", &r->upgrade); + break; + + case DS_ROLE_OP_STATUS: + ndr_print_dssetup_DsRoleOpStatus(ndr, "opstatus", &r->opstatus); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(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_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + } + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetPrimaryDomainInformation *r) +{ + uint32_t _ptr_info; + TALLOC_CTX *_mem_save_info_0; + if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, &r->in.level)); + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->out.info); + } else { + 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_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleGetPrimaryDomainInformation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleGetPrimaryDomainInformation"); + ndr->depth++; + ndr_print_dssetup_DsRoleInfoLevel(ndr, "level", r->in.level); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleGetPrimaryDomainInformation"); + 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_dssetup_DsRoleInfo(ndr, "info", r->out.info); + } + ndr->depth--; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleDnsNameToFlatName(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleDnsNameToFlatName(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDnsNameToFlatName *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleDnsNameToFlatName"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleDnsNameToFlatName"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleDnsNameToFlatName"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsDc *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsDc *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsDc"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsDc"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsDc"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsReplica(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsReplica *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsReplica(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsReplica *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsReplica"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsReplica"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsReplica"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleDemoteDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDemoteDc *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleDemoteDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDemoteDc *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleDemoteDc"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleDemoteDc"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleDemoteDc"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationProgress(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationProgress(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationProgress *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationProgress"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationProgress"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationProgress"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationResults(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationResults *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationResults(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationResults *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationResults"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationResults"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationResults"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleCancel(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleCancel *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleCancel(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleCancel *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleCancel"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleCancel"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleCancel"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleServerSaveStateForUpgrade *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleServerSaveStateForUpgrade"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleServerSaveStateForUpgrade"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleServerSaveStateForUpgrade"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleUpgradeDownlevelServer *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeDownlevelServer"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleUpgradeDownlevelServer"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleUpgradeDownlevelServer"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleAbortDownlevelServerUpgrade *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r) +{ + ndr_print_struct(ndr, name, "dssetup_DsRoleAbortDownlevelServerUpgrade"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "dssetup_DsRoleAbortDownlevelServerUpgrade"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "dssetup_DsRoleAbortDownlevelServerUpgrade"); + ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); + ndr->depth--; + } + ndr->depth--; +} + +static const struct ndr_interface_call dssetup_calls[] = { + { + "dssetup_DsRoleGetPrimaryDomainInformation", + sizeof(struct dssetup_DsRoleGetPrimaryDomainInformation), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetPrimaryDomainInformation, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation, + (ndr_print_function_t) ndr_print_dssetup_DsRoleGetPrimaryDomainInformation, + false, + }, + { + "dssetup_DsRoleDnsNameToFlatName", + sizeof(struct dssetup_DsRoleDnsNameToFlatName), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDnsNameToFlatName, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDnsNameToFlatName, + (ndr_print_function_t) ndr_print_dssetup_DsRoleDnsNameToFlatName, + false, + }, + { + "dssetup_DsRoleDcAsDc", + sizeof(struct dssetup_DsRoleDcAsDc), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsDc, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsDc, + (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsDc, + false, + }, + { + "dssetup_DsRoleDcAsReplica", + sizeof(struct dssetup_DsRoleDcAsReplica), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsReplica, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsReplica, + (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsReplica, + false, + }, + { + "dssetup_DsRoleDemoteDc", + sizeof(struct dssetup_DsRoleDemoteDc), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDemoteDc, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDemoteDc, + (ndr_print_function_t) ndr_print_dssetup_DsRoleDemoteDc, + false, + }, + { + "dssetup_DsRoleGetDcOperationProgress", + sizeof(struct dssetup_DsRoleGetDcOperationProgress), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationProgress, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationProgress, + (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationProgress, + false, + }, + { + "dssetup_DsRoleGetDcOperationResults", + sizeof(struct dssetup_DsRoleGetDcOperationResults), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationResults, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationResults, + (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationResults, + false, + }, + { + "dssetup_DsRoleCancel", + sizeof(struct dssetup_DsRoleCancel), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleCancel, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleCancel, + (ndr_print_function_t) ndr_print_dssetup_DsRoleCancel, + false, + }, + { + "dssetup_DsRoleServerSaveStateForUpgrade", + sizeof(struct dssetup_DsRoleServerSaveStateForUpgrade), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleServerSaveStateForUpgrade, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade, + (ndr_print_function_t) ndr_print_dssetup_DsRoleServerSaveStateForUpgrade, + false, + }, + { + "dssetup_DsRoleUpgradeDownlevelServer", + sizeof(struct dssetup_DsRoleUpgradeDownlevelServer), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleUpgradeDownlevelServer, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleUpgradeDownlevelServer, + (ndr_print_function_t) ndr_print_dssetup_DsRoleUpgradeDownlevelServer, + false, + }, + { + "dssetup_DsRoleAbortDownlevelServerUpgrade", + sizeof(struct dssetup_DsRoleAbortDownlevelServerUpgrade), + (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade, + (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade, + (ndr_print_function_t) ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade, + false, + }, + { NULL, 0, NULL, NULL, NULL, false } +}; + +static const char * const dssetup_endpoint_strings[] = { + "ncacn_np:[\\pipe\\lsarpc]", + "ncacn_np:[\\pipe\\lsass]", + "ncacn_ip_tcp:", + "ncalrpc:", +}; + +static const struct ndr_interface_string_array dssetup_endpoints = { + .count = 4, + .names = dssetup_endpoint_strings +}; + +static const char * const dssetup_authservice_strings[] = { + "host", +}; + +static const struct ndr_interface_string_array dssetup_authservices = { + .count = 4, + .names = dssetup_authservice_strings +}; + + +const struct ndr_interface_table ndr_table_dssetup = { + .name = "dssetup", + .syntax_id = { + {0x3919286a,0xb10c,0x11d0,{0x9b,0xa8},{0x00,0xc0,0x4f,0xd9,0x2e,0xf5}}, + NDR_DSSETUP_VERSION + }, + .helpstring = NDR_DSSETUP_HELPSTRING, + .num_calls = 11, + .calls = dssetup_calls, + .endpoints = &dssetup_endpoints, + .authservices = &dssetup_authservices +}; + diff --git a/source3/librpc/gen_ndr/ndr_dssetup.h b/source3/librpc/gen_ndr/ndr_dssetup.h new file mode 100644 index 0000000000..103ad116a3 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_dssetup.h @@ -0,0 +1,58 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/dssetup.h" + +#ifndef _HEADER_NDR_dssetup +#define _HEADER_NDR_dssetup + +#define NDR_DSSETUP_UUID "3919286a-b10c-11d0-9ba8-00c04fd92ef5" +#define NDR_DSSETUP_VERSION 0.0 +#define NDR_DSSETUP_NAME "dssetup" +#define NDR_DSSETUP_HELPSTRING "Active Directory Setup" +extern const struct ndr_interface_table ndr_table_dssetup; +#define NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION (0x00) + +#define NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME (0x01) + +#define NDR_DSSETUP_DSROLEDCASDC (0x02) + +#define NDR_DSSETUP_DSROLEDCASREPLICA (0x03) + +#define NDR_DSSETUP_DSROLEDEMOTEDC (0x04) + +#define NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS (0x05) + +#define NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS (0x06) + +#define NDR_DSSETUP_DSROLECANCEL (0x07) + +#define NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE (0x08) + +#define NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER (0x09) + +#define NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE (0x0a) + +#define NDR_DSSETUP_CALL_COUNT (11) +void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r); +void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r); +void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r); +void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r); +void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r); +void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r); +void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r); +void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r); +void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r); +void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r); +void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r); +void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r); +void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r); +void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r); +void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r); +void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r); +void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r); +void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r); +void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r); +void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r); +#endif /* _HEADER_NDR_dssetup */ diff --git a/source3/librpc/gen_ndr/srv_dssetup.c b/source3/librpc/gen_ndr/srv_dssetup.c new file mode 100644 index 0000000000..9043566718 --- /dev/null +++ b/source3/librpc/gen_ndr/srv_dssetup.c @@ -0,0 +1,845 @@ +/* + * Unix SMB/CIFS implementation. + * server auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/srv_dssetup.h" + +static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleGetPrimaryDomainInformation *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION]; + + r = talloc(NULL, struct dssetup_DsRoleGetPrimaryDomainInformation); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r); + } + + ZERO_STRUCT(r->out); + r->out.info = talloc_zero(r, union dssetup_DsRoleInfo); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _dssetup_DsRoleGetPrimaryDomainInformation(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleDnsNameToFlatName *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME]; + + r = talloc(NULL, struct dssetup_DsRoleDnsNameToFlatName); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, r); + } + + r->out.result = _dssetup_DsRoleDnsNameToFlatName(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleDcAsDc *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASDC]; + + r = talloc(NULL, struct dssetup_DsRoleDcAsDc); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, r); + } + + r->out.result = _dssetup_DsRoleDcAsDc(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleDcAsReplica *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASREPLICA]; + + r = talloc(NULL, struct dssetup_DsRoleDcAsReplica); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, r); + } + + r->out.result = _dssetup_DsRoleDcAsReplica(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleDemoteDc *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDEMOTEDC]; + + r = talloc(NULL, struct dssetup_DsRoleDemoteDc); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, r); + } + + r->out.result = _dssetup_DsRoleDemoteDc(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleGetDcOperationProgress *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS]; + + r = talloc(NULL, struct dssetup_DsRoleGetDcOperationProgress); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, r); + } + + r->out.result = _dssetup_DsRoleGetDcOperationProgress(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleGetDcOperationResults *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS]; + + r = talloc(NULL, struct dssetup_DsRoleGetDcOperationResults); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, r); + } + + r->out.result = _dssetup_DsRoleGetDcOperationResults(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleCancel(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleCancel *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLECANCEL]; + + r = talloc(NULL, struct dssetup_DsRoleCancel); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, r); + } + + r->out.result = _dssetup_DsRoleCancel(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleServerSaveStateForUpgrade *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE]; + + r = talloc(NULL, struct dssetup_DsRoleServerSaveStateForUpgrade); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r); + } + + r->out.result = _dssetup_DsRoleServerSaveStateForUpgrade(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleUpgradeDownlevelServer *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER]; + + r = talloc(NULL, struct dssetup_DsRoleUpgradeDownlevelServer); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r); + } + + r->out.result = _dssetup_DsRoleUpgradeDownlevelServer(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct dssetup_DsRoleAbortDownlevelServerUpgrade *r; + + call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE]; + + r = talloc(NULL, struct dssetup_DsRoleAbortDownlevelServerUpgrade); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r); + } + + r->out.result = _dssetup_DsRoleAbortDownlevelServerUpgrade(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + + +/* Tables */ +static struct api_struct api_dssetup_cmds[] = +{ + {"DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION", NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION, api_dssetup_DsRoleGetPrimaryDomainInformation}, + {"DSSETUP_DSROLEDNSNAMETOFLATNAME", NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME, api_dssetup_DsRoleDnsNameToFlatName}, + {"DSSETUP_DSROLEDCASDC", NDR_DSSETUP_DSROLEDCASDC, api_dssetup_DsRoleDcAsDc}, + {"DSSETUP_DSROLEDCASREPLICA", NDR_DSSETUP_DSROLEDCASREPLICA, api_dssetup_DsRoleDcAsReplica}, + {"DSSETUP_DSROLEDEMOTEDC", NDR_DSSETUP_DSROLEDEMOTEDC, api_dssetup_DsRoleDemoteDc}, + {"DSSETUP_DSROLEGETDCOPERATIONPROGRESS", NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS, api_dssetup_DsRoleGetDcOperationProgress}, + {"DSSETUP_DSROLEGETDCOPERATIONRESULTS", NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS, api_dssetup_DsRoleGetDcOperationResults}, + {"DSSETUP_DSROLECANCEL", NDR_DSSETUP_DSROLECANCEL, api_dssetup_DsRoleCancel}, + {"DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE", NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE, api_dssetup_DsRoleServerSaveStateForUpgrade}, + {"DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER", NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER, api_dssetup_DsRoleUpgradeDownlevelServer}, + {"DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE", NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE, api_dssetup_DsRoleAbortDownlevelServerUpgrade}, +}; + +void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns) +{ + *fns = api_dssetup_cmds; + *n_fns = sizeof(api_dssetup_cmds) / sizeof(struct api_struct); +} + +NTSTATUS rpc_dssetup_init(void) +{ + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct)); +} diff --git a/source3/librpc/gen_ndr/srv_dssetup.h b/source3/librpc/gen_ndr/srv_dssetup.h new file mode 100644 index 0000000000..3233899eac --- /dev/null +++ b/source3/librpc/gen_ndr/srv_dssetup.h @@ -0,0 +1,17 @@ +#include "librpc/gen_ndr/ndr_dssetup.h" +#ifndef __SRV_DSSETUP__ +#define __SRV_DSSETUP__ +WERROR _dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p, struct dssetup_DsRoleGetPrimaryDomainInformation *r); +WERROR _dssetup_DsRoleDnsNameToFlatName(pipes_struct *p, struct dssetup_DsRoleDnsNameToFlatName *r); +WERROR _dssetup_DsRoleDcAsDc(pipes_struct *p, struct dssetup_DsRoleDcAsDc *r); +WERROR _dssetup_DsRoleDcAsReplica(pipes_struct *p, struct dssetup_DsRoleDcAsReplica *r); +WERROR _dssetup_DsRoleDemoteDc(pipes_struct *p, struct dssetup_DsRoleDemoteDc *r); +WERROR _dssetup_DsRoleGetDcOperationProgress(pipes_struct *p, struct dssetup_DsRoleGetDcOperationProgress *r); +WERROR _dssetup_DsRoleGetDcOperationResults(pipes_struct *p, struct dssetup_DsRoleGetDcOperationResults *r); +WERROR _dssetup_DsRoleCancel(pipes_struct *p, struct dssetup_DsRoleCancel *r); +WERROR _dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p, struct dssetup_DsRoleServerSaveStateForUpgrade *r); +WERROR _dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p, struct dssetup_DsRoleUpgradeDownlevelServer *r); +WERROR _dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p, struct dssetup_DsRoleAbortDownlevelServerUpgrade *r); +void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns); +NTSTATUS rpc_dssetup_init(void); +#endif /* __SRV_DSSETUP__ */ -- cgit From e49650ea909c927a2a01f3f3bba3ca815e28a12f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 16:33:36 +0100 Subject: run "make idl". Guenther (This used to be commit 5db4310d4c9149dc9d68f7684dc961926f94544a) --- source3/librpc/gen_ndr/cli_netlogon.c | 2 +- source3/librpc/gen_ndr/cli_netlogon.h | 2 +- source3/librpc/gen_ndr/ndr_netlogon.c | 22 +++------------------- source3/librpc/gen_ndr/netlogon.h | 2 +- source3/librpc/gen_ndr/srv_netlogon.c | 2 +- 5 files changed, 7 insertions(+), 23 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index d6739c5a26..4c9d97651d 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -2019,7 +2019,7 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, - struct netr_DomainTrustList **trusts, + struct netr_DomainTrustList *trusts, WERROR *werror) { struct netr_DsrEnumerateDomainTrusts r; diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 9716f4084b..5e58986d33 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -303,7 +303,7 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, - struct netr_DomainTrustList **trusts, + struct netr_DomainTrustList *trusts, WERROR *werror); NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 7bc85935d1..67a54fb4c7 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -13350,11 +13350,7 @@ static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push if (r->out.trusts == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.trusts == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trusts)); + NDR_CHECK(ndr_push_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -13363,10 +13359,8 @@ static enum ndr_err_code ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, int flags, struct netr_DsrEnumerateDomainTrusts *r) { uint32_t _ptr_server_name; - uint32_t _ptr_trusts; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_trusts_0; - TALLOC_CTX *_mem_save_trusts_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -13398,14 +13392,7 @@ static enum ndr_err_code ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull } _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_trusts)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->out.trusts); - } - _mem_save_trusts_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.trusts, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.trusts)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DomainTrustList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -13436,10 +13423,7 @@ _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "trusts", r->out.trusts); ndr->depth++; - ndr_print_ptr(ndr, "trusts", *r->out.trusts); - ndr->depth++; - ndr_print_netr_DomainTrustList(ndr, "trusts", *r->out.trusts); - ndr->depth--; + ndr_print_netr_DomainTrustList(ndr, "trusts", r->out.trusts); ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 64a70ca1a7..d1c00b19fb 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1453,7 +1453,7 @@ struct netr_DsrEnumerateDomainTrusts { } in; struct { - struct netr_DomainTrustList **trusts;/* [ref] */ + struct netr_DomainTrustList *trusts;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 3f88d7f694..692d9524e9 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -3253,7 +3253,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.trusts = talloc_zero(r, struct netr_DomainTrustList *); + r->out.trusts = talloc_zero(r, struct netr_DomainTrustList); if (r->out.trusts == NULL) { talloc_free(r); return false; -- cgit From 10c7aac3ccb83cddd4b2b7cd3b871bd553accdd2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 21:15:36 +0100 Subject: Re-run make idl. Couldn't we move on doing this during the build?? Guenther (This used to be commit d69cbd009903a8b36c9254a59faa5783fbc737f9) --- source3/librpc/gen_ndr/cli_netlogon.c | 22 ++-- source3/librpc/gen_ndr/cli_netlogon.h | 11 +- source3/librpc/gen_ndr/ndr_netlogon.c | 198 +++++++++++++++++++++++++++++++--- source3/librpc/gen_ndr/ndr_netlogon.h | 2 +- source3/librpc/gen_ndr/netlogon.h | 14 ++- source3/librpc/gen_ndr/srv_netlogon.c | 18 ++-- source3/librpc/gen_ndr/srv_netlogon.h | 2 +- 7 files changed, 227 insertions(+), 40 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 4c9d97651d..8bed385414 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -1375,7 +1375,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, struct GUID *domain_guid, const char *site_name, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror) { struct netr_DsRGetDCNameEx r; @@ -1728,7 +1728,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, struct GUID *domain_guid, const char *site_name, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror) { struct netr_DsRGetDCNameEx2 r; @@ -2063,17 +2063,27 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + const char *domain, + struct GUID *domain_guid, + struct GUID *dsa_guid, + const char *dns_host, WERROR *werror) { - struct netr_DSRDEREGISTERDNSHOSTRECORDS r; + struct netr_DsrDeregisterDNSHostRecords r; NTSTATUS status; /* In parameters */ + r.in.server_name = server_name; + r.in.domain = domain; + r.in.domain_guid = domain_guid; + r.in.dsa_guid = dsa_guid; + r.in.dns_host = dns_host; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, &r); + NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, &r); } status = cli_do_rpc_ndr(cli, @@ -2088,7 +2098,7 @@ NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, &r); + NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &r); } if (NT_STATUS_IS_ERR(status)) { diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 5e58986d33..d98b87a8ba 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -213,7 +213,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, struct GUID *domain_guid, const char *site_name, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror); NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -267,7 +267,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, struct GUID *domain_guid, const char *site_name, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror); NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -305,8 +305,13 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, uint32_t trust_flags, struct netr_DomainTrustList *trusts, WERROR *werror); -NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, +NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *server_name, + const char *domain, + struct GUID *domain_guid, + struct GUID *dsa_guid, + const char *dns_host, WERROR *werror); NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 67a54fb4c7..619f08a781 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -11614,7 +11614,11 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(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_ref_ptr(ndr)); + NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11626,11 +11630,13 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_name; + uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_domain_guid_0; TALLOC_CTX *_mem_save_site_name_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -11710,7 +11716,14 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int } _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } + _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -11759,7 +11772,10 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); + ndr_print_ptr(ndr, "info", *r->out.info); + ndr->depth++; + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -12571,7 +12587,11 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(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_ref_ptr(ndr)); + NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -12584,12 +12604,14 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_name; + uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_client_account_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_domain_guid_0; TALLOC_CTX *_mem_save_site_name_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -12688,7 +12710,14 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int } _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } + _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12744,7 +12773,10 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); + ndr_print_ptr(ndr, "info", *r->out.info); + ndr->depth++; + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -13431,9 +13463,38 @@ _PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, con ndr->depth--; } -static enum ndr_err_code ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_push *ndr, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r) +static enum ndr_err_code ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_push *ndr, int flags, const struct netr_DsrDeregisterDNSHostRecords *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); + if (r->in.server_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain)); + if (r->in.domain) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain, ndr_charset_length(r->in.domain, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid)); + if (r->in.domain_guid) { + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dsa_guid)); + if (r->in.dsa_guid) { + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dsa_guid)); + } + if (r->in.dns_host == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_host, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_host, ndr_charset_length(r->in.dns_host, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -13441,9 +13502,84 @@ static enum ndr_err_code ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pu return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pull *ndr, int flags, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r) +static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pull *ndr, int flags, struct netr_DsrDeregisterDNSHostRecords *r) { + uint32_t _ptr_server_name; + uint32_t _ptr_domain; + uint32_t _ptr_domain_guid; + uint32_t _ptr_dsa_guid; + TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_domain_0; + TALLOC_CTX *_mem_save_domain_guid_0; + TALLOC_CTX *_mem_save_dsa_guid_0; if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name)); + if (_ptr_server_name) { + NDR_PULL_ALLOC(ndr, r->in.server_name); + } else { + r->in.server_name = NULL; + } + if (r->in.server_name) { + _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name)); + if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain)); + if (_ptr_domain) { + NDR_PULL_ALLOC(ndr, r->in.domain); + } else { + r->in.domain = NULL; + } + if (r->in.domain) { + _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain)); + if (ndr_get_array_length(ndr, &r->in.domain) > ndr_get_array_size(ndr, &r->in.domain)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain), ndr_get_array_length(ndr, &r->in.domain)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain, ndr_get_array_length(ndr, &r->in.domain), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid)); + if (_ptr_domain_guid) { + NDR_PULL_ALLOC(ndr, r->in.domain_guid); + } else { + r->in.domain_guid = NULL; + } + if (r->in.domain_guid) { + _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_guid)); + if (_ptr_dsa_guid) { + NDR_PULL_ALLOC(ndr, r->in.dsa_guid); + } else { + r->in.dsa_guid = NULL; + } + if (r->in.dsa_guid) { + _mem_save_dsa_guid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.dsa_guid, 0); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dsa_guid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_guid_0, 0); + } + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_host)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_host)); + if (ndr_get_array_length(ndr, &r->in.dns_host) > ndr_get_array_size(ndr, &r->in.dns_host)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_host), ndr_get_array_length(ndr, &r->in.dns_host)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_host), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_host, ndr_get_array_length(ndr, &r->in.dns_host), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -13451,20 +13587,48 @@ static enum ndr_err_code ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pu return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r) +_PUBLIC_ void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r) { - ndr_print_struct(ndr, name, "netr_DSRDEREGISTERDNSHOSTRECORDS"); + ndr_print_struct(ndr, name, "netr_DsrDeregisterDNSHostRecords"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "netr_DSRDEREGISTERDNSHOSTRECORDS"); + ndr_print_struct(ndr, "in", "netr_DsrDeregisterDNSHostRecords"); + ndr->depth++; + ndr_print_ptr(ndr, "server_name", r->in.server_name); + ndr->depth++; + if (r->in.server_name) { + ndr_print_string(ndr, "server_name", r->in.server_name); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain", r->in.domain); ndr->depth++; + if (r->in.domain) { + ndr_print_string(ndr, "domain", r->in.domain); + } + ndr->depth--; + ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid); + ndr->depth++; + if (r->in.domain_guid) { + ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid); + } + ndr->depth--; + ndr_print_ptr(ndr, "dsa_guid", r->in.dsa_guid); + ndr->depth++; + if (r->in.dsa_guid) { + ndr_print_GUID(ndr, "dsa_guid", r->in.dsa_guid); + } + ndr->depth--; + ndr_print_ptr(ndr, "dns_host", r->in.dns_host); + ndr->depth++; + ndr_print_string(ndr, "dns_host", r->in.dns_host); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "netr_DSRDEREGISTERDNSHOSTRECORDS"); + ndr_print_struct(ndr, "out", "netr_DsrDeregisterDNSHostRecords"); ndr->depth++; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -14590,11 +14754,11 @@ static const struct ndr_interface_call netlogon_calls[] = { false, }, { - "netr_DSRDEREGISTERDNSHOSTRECORDS", - sizeof(struct netr_DSRDEREGISTERDNSHOSTRECORDS), - (ndr_push_flags_fn_t) ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS, - (ndr_pull_flags_fn_t) ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS, - (ndr_print_function_t) ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS, + "netr_DsrDeregisterDNSHostRecords", + sizeof(struct netr_DsrDeregisterDNSHostRecords), + (ndr_push_flags_fn_t) ndr_push_netr_DsrDeregisterDNSHostRecords, + (ndr_pull_flags_fn_t) ndr_pull_netr_DsrDeregisterDNSHostRecords, + (ndr_print_function_t) ndr_print_netr_DsrDeregisterDNSHostRecords, false, }, { diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index 9338aa760b..9a2eea8eff 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -245,7 +245,7 @@ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, const char * void ndr_print_netr_DsrGetDcSiteCoverageW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrGetDcSiteCoverageW *r); void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r); void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r); -void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r); +void ndr_print_netr_DsrDeregisterDNSHostRecords(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrDeregisterDNSHostRecords *r); void ndr_print_netr_ServerTrustPasswordsGet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerTrustPasswordsGet *r); void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetForestTrustInformation *r); void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetForestTrustInformation *r); diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index d1c00b19fb..f59d93764f 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1260,7 +1260,7 @@ struct netr_DsRGetDCNameEx { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [ref] */ + struct netr_DsRGetDCNameInfo **info;/* [ref] */ WERROR result; } out; @@ -1370,7 +1370,7 @@ struct netr_DsRGetDCNameEx2 { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [ref] */ + struct netr_DsRGetDCNameInfo **info;/* [ref] */ WERROR result; } out; @@ -1460,7 +1460,15 @@ struct netr_DsrEnumerateDomainTrusts { }; -struct netr_DSRDEREGISTERDNSHOSTRECORDS { +struct netr_DsrDeregisterDNSHostRecords { + struct { + const char *server_name;/* [unique,charset(UTF16)] */ + const char *domain;/* [unique,charset(UTF16)] */ + struct GUID *domain_guid;/* [unique] */ + struct GUID *dsa_guid;/* [unique] */ + const char *dns_host;/* [ref,charset(UTF16)] */ + } in; + struct { WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 692d9524e9..b9e6ae69b1 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -2213,7 +2213,7 @@ static bool api_netr_DsRGetDCNameEx(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo); + r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2773,7 +2773,7 @@ static bool api_netr_DsRGetDCNameEx2(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo); + r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -3294,18 +3294,18 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) return true; } -static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p) +static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p) { const struct ndr_interface_call *call; struct ndr_pull *pull; struct ndr_push *push; enum ndr_err_code ndr_err; DATA_BLOB blob; - struct netr_DSRDEREGISTERDNSHOSTRECORDS *r; + struct netr_DsrDeregisterDNSHostRecords *r; call = &ndr_table_netlogon.calls[NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS]; - r = talloc(NULL, struct netr_DSRDEREGISTERDNSHOSTRECORDS); + r = talloc(NULL, struct netr_DsrDeregisterDNSHostRecords); if (r == NULL) { return false; } @@ -3329,10 +3329,10 @@ static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, r); + NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, r); } - r->out.result = _netr_DSRDEREGISTERDNSHOSTRECORDS(p, r); + r->out.result = _netr_DsrDeregisterDNSHostRecords(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3341,7 +3341,7 @@ static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p) } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, r); + NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, r); } push = ndr_push_init_ctx(r); @@ -3831,7 +3831,7 @@ static struct api_struct api_netlogon_cmds[] = {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW, api_netr_DsrGetDcSiteCoverageW}, {"NETR_LOGONSAMLOGONEX", NDR_NETR_LOGONSAMLOGONEX, api_netr_LogonSamLogonEx}, {"NETR_DSRENUMERATEDOMAINTRUSTS", NDR_NETR_DSRENUMERATEDOMAINTRUSTS, api_netr_DsrEnumerateDomainTrusts}, - {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DSRDEREGISTERDNSHOSTRECORDS}, + {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DsrDeregisterDNSHostRecords}, {"NETR_SERVERTRUSTPASSWORDSGET", NDR_NETR_SERVERTRUSTPASSWORDSGET, api_netr_ServerTrustPasswordsGet}, {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DsRGetForestTrustInformation}, {"NETR_GETFORESTTRUSTINFORMATION", NDR_NETR_GETFORESTTRUSTINFORMATION, api_netr_GetForestTrustInformation}, diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h index fb6ed9fa90..085672d91d 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.h +++ b/source3/librpc/gen_ndr/srv_netlogon.h @@ -42,7 +42,7 @@ WERROR _netr_DsRAddressToSitenamesExW(pipes_struct *p, struct netr_DsRAddressToS WERROR _netr_DsrGetDcSiteCoverageW(pipes_struct *p, struct netr_DsrGetDcSiteCoverageW *r); NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p, struct netr_LogonSamLogonEx *r); WERROR _netr_DsrEnumerateDomainTrusts(pipes_struct *p, struct netr_DsrEnumerateDomainTrusts *r); -WERROR _netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r); +WERROR _netr_DsrDeregisterDNSHostRecords(pipes_struct *p, struct netr_DsrDeregisterDNSHostRecords *r); NTSTATUS _netr_ServerTrustPasswordsGet(pipes_struct *p, struct netr_ServerTrustPasswordsGet *r); WERROR _netr_DsRGetForestTrustInformation(pipes_struct *p, struct netr_DsRGetForestTrustInformation *r); WERROR _netr_GetForestTrustInformation(pipes_struct *p, struct netr_GetForestTrustInformation *r); -- cgit From 2e0a1fcf3f461f134c910e83ab82115c00827231 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 31 Jan 2008 14:10:22 +0100 Subject: Re-run make idl. Guenther (This used to be commit b658270518140c457536b0c7db06a646d7077529) --- source3/librpc/gen_ndr/cli_netlogon.c | 9 +++++++-- source3/librpc/gen_ndr/cli_netlogon.h | 3 ++- source3/librpc/gen_ndr/ndr_netlogon.c | 10 +++++++--- source3/librpc/gen_ndr/netlogon.h | 6 +++++- source3/librpc/gen_ndr/srv_netlogon.h | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 8bed385414..cac3962073 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -598,7 +598,8 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, - const char **dcname) + const char **dcname, + WERROR *werror) { struct netr_GetDcName r; NTSTATUS status; @@ -634,7 +635,11 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, *dcname = *r.out.dcname; /* Return result */ - return r.out.result; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index d98b87a8ba..fa043233ea 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -107,7 +107,8 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, - const char **dcname); + const char **dcname, + WERROR *werror); NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 619f08a781..2d41a2675e 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -6030,6 +6030,8 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const cha ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_FLAT_NAME", DS_IS_FLAT_NAME, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_IS_DNS_NAME", DS_IS_DNS_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_TRY_NEXTCLOSEST_SITE", DS_TRY_NEXTCLOSEST_SITE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DIRECTORY_SERVICE_6_REQUIRED", DS_DIRECTORY_SERVICE_6_REQUIRED, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_DNS_NAME", DS_RETURN_DNS_NAME, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME, r); ndr->depth--; @@ -6088,6 +6090,8 @@ _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_WRITABLE", DS_SERVER_WRITABLE, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_GOOD_TIMESERV", DS_SERVER_GOOD_TIMESERV, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_NDNC", DS_SERVER_NDNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_SELECT_SECRET_DOMAIN_6", DS_SERVER_SELECT_SECRET_DOMAIN_6, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_SERVER_FULL_SECRET_DOMAIN_6", DS_SERVER_FULL_SECRET_DOMAIN_6, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_CONTROLLER", DS_DNS_CONTROLLER, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_DOMAIN", DS_DNS_DOMAIN, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_DNS_FOREST", DS_DNS_FOREST, r); @@ -9781,7 +9785,7 @@ static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -9838,7 +9842,7 @@ static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -9872,7 +9876,7 @@ _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, ndr_print_string(ndr, "dcname", *r->out.dcname); ndr->depth--; ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index f59d93764f..c8f3c03c79 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -643,6 +643,8 @@ struct netr_Blob { #define DS_ONLY_LDAP_NEEDED ( 0x00008000 ) #define DS_IS_FLAT_NAME ( 0x00010000 ) #define DS_IS_DNS_NAME ( 0x00020000 ) +#define DS_TRY_NEXTCLOSEST_SITE ( 0x00040000 ) +#define DS_DIRECTORY_SERVICE_6_REQUIRED ( 0x00080000 ) #define DS_RETURN_DNS_NAME ( 0x40000000 ) #define DS_RETURN_FLAT_NAME ( 0x80000000 ) @@ -670,6 +672,8 @@ enum netr_DsRGetDCNameInfo_AddressType #define DS_SERVER_WRITABLE ( 0x00000100 ) #define DS_SERVER_GOOD_TIMESERV ( 0x00000200 ) #define DS_SERVER_NDNC ( 0x00000400 ) +#define DS_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 ) +#define DS_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 ) #define DS_DNS_CONTROLLER ( 0x20000000 ) #define DS_DNS_DOMAIN ( 0x40000000 ) #define DS_DNS_FOREST ( 0x80000000 ) @@ -1027,7 +1031,7 @@ struct netr_GetDcName { struct { const char **dcname;/* [ref,charset(UTF16)] */ - NTSTATUS result; + WERROR result; } out; }; diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h index 085672d91d..1fe16c603b 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.h +++ b/source3/librpc/gen_ndr/srv_netlogon.h @@ -12,7 +12,7 @@ NTSTATUS _netr_DatabaseDeltas(pipes_struct *p, struct netr_DatabaseDeltas *r); NTSTATUS _netr_DatabaseSync(pipes_struct *p, struct netr_DatabaseSync *r); NTSTATUS _netr_AccountDeltas(pipes_struct *p, struct netr_AccountDeltas *r); NTSTATUS _netr_AccountSync(pipes_struct *p, struct netr_AccountSync *r); -NTSTATUS _netr_GetDcName(pipes_struct *p, struct netr_GetDcName *r); +WERROR _netr_GetDcName(pipes_struct *p, struct netr_GetDcName *r); WERROR _netr_LogonControl(pipes_struct *p, struct netr_LogonControl *r); WERROR _netr_GetAnyDCName(pipes_struct *p, struct netr_GetAnyDCName *r); WERROR _netr_LogonControl2(pipes_struct *p, struct netr_LogonControl2 *r); -- cgit From d3b12796ad9ca9b2c78d199cc7ea17e36372c070 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Feb 2008 23:28:37 +0100 Subject: Re-run make idl. Guenther (This used to be commit 405e01628e66acfb4b1dbcb3b9fdae4cca0f9ce0) --- source3/librpc/gen_ndr/lsa.h | 32 ++++++++++++++++---------------- source3/librpc/gen_ndr/ndr_dssetup.c | 2 -- source3/librpc/gen_ndr/ndr_eventlog.c | 2 +- source3/librpc/gen_ndr/netlogon.h | 4 ++-- source3/librpc/gen_ndr/samr.h | 6 +++--- source3/librpc/gen_ndr/security.h | 4 ++-- source3/librpc/gen_ndr/unixinfo.h | 4 ++-- 7 files changed, 26 insertions(+), 28 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 2657557d90..7aa00b1503 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -229,7 +229,7 @@ struct lsa_SidPtr { }; struct lsa_SidArray { - uint32_t num_sids;/* [range(0 1000)] */ + uint32_t num_sids;/* [range(0,1000)] */ struct lsa_SidPtr *sids;/* [unique,size_is(num_sids)] */ }/* [public] */; @@ -274,12 +274,12 @@ struct lsa_TranslatedSid { }; struct lsa_TransSidArray { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_TranslatedSid *sids;/* [unique,size_is(count)] */ }; struct lsa_RefDomainList { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_DomainInfo *domains;/* [unique,size_is(count)] */ uint32_t max_size; }; @@ -312,7 +312,7 @@ struct lsa_TranslatedName { }; struct lsa_TransNameArray { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_TranslatedName *names;/* [unique,size_is(count)] */ }; @@ -322,7 +322,7 @@ struct lsa_LUIDAttribute { }; struct lsa_PrivilegeSet { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ uint32_t unknown; struct lsa_LUIDAttribute *set;/* [size_is(count)] */ }; @@ -334,7 +334,7 @@ struct lsa_DATA_BUF { }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; struct lsa_DATA_BUF2 { - uint32_t size;/* [range(0 65536)] */ + uint32_t size;/* [range(0,65536)] */ uint8_t *data;/* [unique,size_is(size)] */ }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; @@ -501,7 +501,7 @@ struct lsa_TranslatedName2 { }; struct lsa_TransNameArray2 { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_TranslatedName2 *names;/* [unique,size_is(count)] */ }; @@ -513,7 +513,7 @@ struct lsa_TranslatedSid2 { }; struct lsa_TransSidArray2 { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_TranslatedSid2 *sids;/* [unique,size_is(count)] */ }; @@ -525,12 +525,12 @@ struct lsa_TranslatedSid3 { }; struct lsa_TransSidArray3 { - uint32_t count;/* [range(0 1000)] */ + uint32_t count;/* [range(0,1000)] */ struct lsa_TranslatedSid3 *sids;/* [unique,size_is(count)] */ }; struct lsa_ForestTrustBinaryData { - uint32_t length;/* [range(0 131072)] */ + uint32_t length;/* [range(0,131072)] */ uint8_t *data;/* [unique,size_is(length)] */ }; @@ -572,7 +572,7 @@ struct lsa_ForestTrustRecord { }; struct lsa_ForestTrustInformation { - uint32_t count;/* [range(0 4000)] */ + uint32_t count;/* [range(0,4000)] */ struct lsa_ForestTrustRecord **entries;/* [unique,size_is(count)] */ }/* [public] */; @@ -717,7 +717,7 @@ struct lsa_CreateAccount { struct lsa_EnumAccounts { struct { struct policy_handle *handle;/* [ref] */ - uint32_t num_entries;/* [range(0 8192)] */ + uint32_t num_entries;/* [range(0,8192)] */ uint32_t *resume_handle;/* [ref] */ } in; @@ -764,7 +764,7 @@ struct lsa_EnumTrustDom { struct lsa_LookupNames { struct { struct policy_handle *handle;/* [ref] */ - uint32_t num_names;/* [range(0 1000)] */ + uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; struct lsa_TransSidArray *sids;/* [ref] */ @@ -1351,7 +1351,7 @@ struct lsa_LookupSids2 { struct lsa_LookupNames2 { struct { struct policy_handle *handle;/* [ref] */ - uint32_t num_names;/* [range(0 1000)] */ + uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; uint32_t unknown1; @@ -1445,7 +1445,7 @@ struct lsa_CREDRPROFILELOADED { struct lsa_LookupNames3 { struct { struct policy_handle *handle;/* [ref] */ - uint32_t num_names;/* [range(0 1000)] */ + uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; uint32_t unknown1; @@ -1549,7 +1549,7 @@ struct lsa_LookupSids3 { struct lsa_LookupNames4 { struct { - uint32_t num_names;/* [range(0 1000)] */ + uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; uint32_t unknown1; diff --git a/source3/librpc/gen_ndr/ndr_dssetup.c b/source3/librpc/gen_ndr/ndr_dssetup.c index f089b71cd4..37586549a6 100644 --- a/source3/librpc/gen_ndr/ndr_dssetup.c +++ b/source3/librpc/gen_ndr/ndr_dssetup.c @@ -88,7 +88,6 @@ static enum ndr_err_code ndr_push_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_p NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest, ndr_charset_length(r->forest, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); } return NDR_ERR_SUCCESS; } @@ -162,7 +161,6 @@ static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_p NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest, ndr_get_array_length(ndr, &r->forest), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); } return NDR_ERR_SUCCESS; } diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index ebd76515ff..3b9a42d68a 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -128,7 +128,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int nd { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings); + NDR_PULL_ALLOC_N(ndr, *r->strings, r->num_of_strings); _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, *r->strings, 0); for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) { diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index c8f3c03c79..612e30914a 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1350,7 +1350,7 @@ struct netr_NETRLOGONSENDTOSAM { struct netr_DsRAddressToSitenamesW { struct { const char *server_name;/* [unique,charset(UTF16)] */ - uint32_t count;/* [range(0 32000)] */ + uint32_t count;/* [range(0,32000)] */ struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */ } in; @@ -1405,7 +1405,7 @@ struct netr_NetrEnumerateTrustedDomainsEx { struct netr_DsRAddressToSitenamesExW { struct { const char *server_name;/* [unique,charset(UTF16)] */ - uint32_t count;/* [range(0 32000)] */ + uint32_t count;/* [range(0,32000)] */ struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */ } in; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index c6a68e8bd5..2a6a826078 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -200,7 +200,7 @@ union samr_DomainInfo { }/* [switch_type(uint16)] */; struct samr_Ids { - uint32_t count;/* [range(0 1024)] */ + uint32_t count;/* [range(0,1024)] */ uint32_t *ids;/* [unique,size_is(count)] */ }; @@ -983,7 +983,7 @@ struct samr_GetAliasMembership { struct samr_LookupNames { struct { struct policy_handle *domain_handle;/* [ref] */ - uint32_t num_names;/* [range(0 1000)] */ + uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [length_is(num_names),size_is(1000)] */ } in; @@ -999,7 +999,7 @@ struct samr_LookupNames { struct samr_LookupRids { struct { struct policy_handle *domain_handle;/* [ref] */ - uint32_t num_rids;/* [range(0 1000)] */ + uint32_t num_rids;/* [range(0,1000)] */ uint32_t *rids;/* [length_is(num_rids),size_is(1000)] */ } in; diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h index f37b5d70f0..a17fd512f7 100644 --- a/source3/librpc/gen_ndr/security.h +++ b/source3/librpc/gen_ndr/security.h @@ -258,7 +258,7 @@ enum security_acl_revision struct security_acl { enum security_acl_revision revision; uint16_t size;/* [value(ndr_size_security_acl(r,ndr->flags))] */ - uint32_t num_aces;/* [range(0 1000)] */ + uint32_t num_aces;/* [range(0,1000)] */ struct security_ace *aces; }/* [gensize,public,nosize] */; @@ -301,7 +301,7 @@ struct security_descriptor { }/* [gensize,public,flag(LIBNDR_FLAG_LITTLE_ENDIAN),nosize] */; struct sec_desc_buf { - uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->flags)),range(0 0x40000)] */ + uint32_t sd_size;/* [value(ndr_size_security_descriptor(sd,ndr->flags)),range(0,0x40000)] */ struct security_descriptor *sd;/* [unique,subcontext(4)] */ }/* [public] */; diff --git a/source3/librpc/gen_ndr/unixinfo.h b/source3/librpc/gen_ndr/unixinfo.h index 34dc27f469..bfe0934ccd 100644 --- a/source3/librpc/gen_ndr/unixinfo.h +++ b/source3/librpc/gen_ndr/unixinfo.h @@ -68,12 +68,12 @@ struct unixinfo_GidToSid { struct unixinfo_GetPWUid { struct { uint64_t *uids;/* [size_is(*count)] */ - uint32_t *count;/* [ref,range(0 1023)] */ + uint32_t *count;/* [ref,range(0,1023)] */ } in; struct { struct unixinfo_GetPWUidInfo *infos;/* [size_is(*count)] */ - uint32_t *count;/* [ref,range(0 1023)] */ + uint32_t *count;/* [ref,range(0,1023)] */ NTSTATUS result; } out; -- cgit From b5cd038000e6156f795095e5f845356baec6ca44 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Feb 2008 23:32:48 +0100 Subject: Re-run make idl. Guenther (This used to be commit e02b07da063200eaf7f2902b7541237b3f9442d1) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 73c123bbdd..1c71645069 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -136,7 +136,7 @@ NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, - struct sec_desc_buf *sdbuf) + struct sec_desc_buf **sdbuf) { struct samr_QuerySecurity r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 23f2d1f1b6..14f47ea925 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -18,7 +18,7 @@ NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, - struct sec_desc_buf *sdbuf); + struct sec_desc_buf **sdbuf); NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle); diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index adbe549df0..d6f51b94b0 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5425,7 +5425,11 @@ static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f if (r->out.sdbuf == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + if (*r->out.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5433,8 +5437,10 @@ static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int flags, struct samr_QuerySecurity *r) { + uint32_t _ptr_sdbuf; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sdbuf_0; + TALLOC_CTX *_mem_save_sdbuf_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5455,7 +5461,14 @@ static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int f } _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.sdbuf); + } + _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5484,7 +5497,10 @@ _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); ndr->depth++; - ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf); + ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 2a6a826078..6e79773fab 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -773,7 +773,7 @@ struct samr_QuerySecurity { } in; struct { - struct sec_desc_buf *sdbuf;/* [ref] */ + struct sec_desc_buf **sdbuf;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 72116f355b..188c5b1eb2 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -273,7 +273,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.sdbuf = talloc_zero(r, struct sec_desc_buf); + r->out.sdbuf = talloc_zero(r, struct sec_desc_buf *); if (r->out.sdbuf == NULL) { talloc_free(r); return false; -- cgit From e98d9af8b38f75402371567340a02c2eed0fcee7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 10:15:19 +0100 Subject: Re-run make idl. Guenther (This used to be commit cfb4c6d82f84eb3a434f8a3e07b8281636f192db) --- source3/librpc/gen_ndr/cli_eventlog.c | 4 ++-- source3/librpc/gen_ndr/cli_eventlog.h | 2 +- source3/librpc/gen_ndr/eventlog.h | 2 +- source3/librpc/gen_ndr/ndr_eventlog.c | 34 +++++++++++++++++----------------- 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c index 72cd886cb4..c756eee8d5 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.c +++ b/source3/librpc/gen_ndr/cli_eventlog.c @@ -9,14 +9,14 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_String *unknown) + struct lsa_String *backupfile) { struct eventlog_ClearEventLogW r; NTSTATUS status; /* In parameters */ r.in.handle = handle; - r.in.unknown = unknown; + r.in.backupfile = backupfile; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW, &r); diff --git a/source3/librpc/gen_ndr/cli_eventlog.h b/source3/librpc/gen_ndr/cli_eventlog.h index f75355c390..8cee82f885 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.h +++ b/source3/librpc/gen_ndr/cli_eventlog.h @@ -4,7 +4,7 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_String *unknown); + struct lsa_String *backupfile); NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index 656dadcc6c..4b61b64f2a 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -53,7 +53,7 @@ struct eventlog_Record { struct eventlog_ClearEventLogW { struct { struct policy_handle *handle;/* [ref] */ - struct lsa_String *unknown;/* [unique] */ + struct lsa_String *backupfile;/* [unique] */ } in; struct { diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index 3b9a42d68a..d7ff4681c2 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -194,9 +194,9 @@ static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown)); - if (r->in.unknown) { - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.unknown)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupfile)); + if (r->in.backupfile) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile)); } } if (flags & NDR_OUT) { @@ -207,9 +207,9 @@ static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r) { - uint32_t _ptr_unknown; + uint32_t _ptr_backupfile; TALLOC_CTX *_mem_save_handle_0; - TALLOC_CTX *_mem_save_unknown_0; + TALLOC_CTX *_mem_save_backupfile_0; if (flags & NDR_IN) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.handle); @@ -218,17 +218,17 @@ static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown)); - if (_ptr_unknown) { - NDR_PULL_ALLOC(ndr, r->in.unknown); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupfile)); + if (_ptr_backupfile) { + NDR_PULL_ALLOC(ndr, r->in.backupfile); } else { - r->in.unknown = NULL; + r->in.backupfile = NULL; } - if (r->in.unknown) { - _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.unknown)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0); + if (r->in.backupfile) { + _mem_save_backupfile_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.backupfile, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupfile_0, 0); } } if (flags & NDR_OUT) { @@ -251,10 +251,10 @@ _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const cha ndr->depth++; ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; - ndr_print_ptr(ndr, "unknown", r->in.unknown); + ndr_print_ptr(ndr, "backupfile", r->in.backupfile); ndr->depth++; - if (r->in.unknown) { - ndr_print_lsa_String(ndr, "unknown", r->in.unknown); + if (r->in.backupfile) { + ndr_print_lsa_String(ndr, "backupfile", r->in.backupfile); } ndr->depth--; ndr->depth--; -- cgit From ab66165cfe3e6bc673dfa285a3e03c2239e99442 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 10:44:00 +0100 Subject: Re-run make idl. Guenther (This used to be commit ff6fb5de32ee81efc88d8c15f13c302e21790eee) --- source3/librpc/gen_ndr/cli_eventlog.c | 6 +++++- source3/librpc/gen_ndr/cli_eventlog.h | 4 +++- source3/librpc/gen_ndr/eventlog.h | 5 +++++ source3/librpc/gen_ndr/ndr_eventlog.c | 36 +++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_eventlog.c | 7 +++++++ 5 files changed, 56 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c index c756eee8d5..5418f25102 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.c +++ b/source3/librpc/gen_ndr/cli_eventlog.c @@ -203,12 +203,15 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, } NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *oldest_entry) { struct eventlog_GetOldestRecord r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, &r); @@ -234,6 +237,7 @@ NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, } /* Return variables */ + *oldest_entry = *r.out.oldest_entry; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_eventlog.h b/source3/librpc/gen_ndr/cli_eventlog.h index 8cee82f885..2f6317c304 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.h +++ b/source3/librpc/gen_ndr/cli_eventlog.h @@ -17,7 +17,9 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t *number); NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *oldest_entry); NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index 4b61b64f2a..8c7e34e49d 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -107,6 +107,11 @@ struct eventlog_GetNumRecords { struct eventlog_GetOldestRecord { struct { + struct policy_handle *handle;/* [ref] */ + } in; + + struct { + uint32_t *oldest_entry;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index d7ff4681c2..de4da976a4 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -506,8 +506,16 @@ _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { + if (r->out.oldest_entry == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -515,9 +523,29 @@ static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_oldest_entry_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.oldest_entry); + ZERO_STRUCTP(r->out.oldest_entry); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.oldest_entry); + } + _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -533,11 +561,19 @@ _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const ch if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord"); ndr->depth++; + ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry); + ndr->depth++; + ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry); + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index d9310a8fbb..fc94993cee 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -418,6 +418,13 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, r); } + ZERO_STRUCT(r->out); + r->out.oldest_entry = talloc_zero(r, uint32_t); + if (r->out.oldest_entry == NULL) { + talloc_free(r); + return false; + } + r->out.result = _eventlog_GetOldestRecord(p, r); if (p->rng_fault_state) { -- cgit From e18af90e80d5c607889a0f96d229ab5f7f0265d3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 11:08:36 +0100 Subject: Re-run make idl. Guenther (This used to be commit f8a3dc350014ef08fe2d5a702dafdb5d0583ffef) --- source3/librpc/gen_ndr/cli_eventlog.c | 4 ++-- source3/librpc/gen_ndr/cli_eventlog.h | 4 ++-- source3/librpc/gen_ndr/eventlog.h | 4 ++-- source3/librpc/gen_ndr/ndr_eventlog.c | 38 +++++++++++++++++++++++++++++------ 4 files changed, 38 insertions(+), 12 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c index 5418f25102..0084776a08 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.c +++ b/source3/librpc/gen_ndr/cli_eventlog.c @@ -283,8 +283,8 @@ NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0, - struct lsa_String logname, - struct lsa_String servername, + struct lsa_String *logname, + struct lsa_String *servername, uint32_t unknown2, uint32_t unknown3, struct policy_handle *handle) diff --git a/source3/librpc/gen_ndr/cli_eventlog.h b/source3/librpc/gen_ndr/cli_eventlog.h index 2f6317c304..10790a21fc 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.h +++ b/source3/librpc/gen_ndr/cli_eventlog.h @@ -25,8 +25,8 @@ NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0, - struct lsa_String logname, - struct lsa_String servername, + struct lsa_String *logname, + struct lsa_String *servername, uint32_t unknown2, uint32_t unknown3, struct policy_handle *handle); diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index 8c7e34e49d..e067a2bdd3 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -129,8 +129,8 @@ struct eventlog_ChangeNotify { struct eventlog_OpenEventLogW { struct { struct eventlog_OpenUnknown0 *unknown0;/* [unique] */ - struct lsa_String logname; - struct lsa_String servername; + struct lsa_String *logname;/* [ref] */ + struct lsa_String *servername;/* [ref] */ uint32_t unknown2; uint32_t unknown3; } in; diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index de4da976a4..ef76616c8b 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -628,8 +628,14 @@ static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, i if (r->in.unknown0) { NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0)); } - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logname)); - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.servername)); + if (r->in.logname == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname)); + if (r->in.servername == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3)); } @@ -647,6 +653,8 @@ static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, i { uint32_t _ptr_unknown0; TALLOC_CTX *_mem_save_unknown0_0; + TALLOC_CTX *_mem_save_logname_0; + TALLOC_CTX *_mem_save_servername_0; TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -663,8 +671,20 @@ static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0); } - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logname)); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.servername)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.logname); + } + _mem_save_logname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.logname, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logname_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.servername); + } + _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3)); NDR_PULL_ALLOC(ndr, r->out.handle); @@ -699,8 +719,14 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0); } ndr->depth--; - ndr_print_lsa_String(ndr, "logname", &r->in.logname); - ndr_print_lsa_String(ndr, "servername", &r->in.servername); + ndr_print_ptr(ndr, "logname", r->in.logname); + ndr->depth++; + ndr_print_lsa_String(ndr, "logname", r->in.logname); + ndr->depth--; + ndr_print_ptr(ndr, "servername", r->in.servername); + ndr->depth++; + ndr_print_lsa_String(ndr, "servername", r->in.servername); + ndr->depth--; ndr_print_uint32(ndr, "unknown2", r->in.unknown2); ndr_print_uint32(ndr, "unknown3", r->in.unknown3); ndr->depth--; -- cgit From 72ea99a0aa7ce9ffe0043c27d0d9cd466ec60e26 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 11:28:15 +0100 Subject: Re-run make idl. Guenther (This used to be commit c56b702454c82b7aa7debbfc7f270b2d2b10226d) --- source3/librpc/gen_ndr/eventlog.h | 2 +- source3/librpc/gen_ndr/ndr_eventlog.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h index e067a2bdd3..0fd929dd99 100644 --- a/source3/librpc/gen_ndr/eventlog.h +++ b/source3/librpc/gen_ndr/eventlog.h @@ -164,7 +164,7 @@ struct eventlog_ReadEventLogW { struct policy_handle *handle;/* [ref] */ uint32_t flags; uint32_t offset; - uint32_t number_of_bytes; + uint32_t number_of_bytes;/* [range(0,0x7FFFF)] */ } in; struct { diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index ef76616c8b..442c40bb80 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -874,6 +874,9 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes)); + if (r->in.number_of_bytes < 0 || r->in.number_of_bytes > 0x7FFFF) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes); memset(r->out.data, 0, r->in.number_of_bytes * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out.sent_size); -- cgit From ba9cae9da445778f6304443482704bc30b8f9501 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 11:52:30 +0100 Subject: Forgot to add this hunk in ndr_pull_eventlog_Record from an earlier commit. Guenther (This used to be commit 675a17877c3086816e53d87d264adf1fa60d9700) --- source3/librpc/gen_ndr/ndr_eventlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index 442c40bb80..c6a77c54e5 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -128,9 +128,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int nd { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_PULL_ALLOC_N(ndr, *r->strings, r->num_of_strings); + NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings); _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->strings, 0); + NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0); for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) { NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0])); } -- cgit From 422a2465e6e7c85e3e4b0d59d9105a33d60f8b95 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 21:12:12 +0100 Subject: Re-run make idl. Guenther (This used to be commit f914fd377165f5580e5cfd0c6a92bbb0216f7352) --- source3/librpc/gen_ndr/cli_lsa.c | 6 ++---- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 2 +- source3/librpc/gen_ndr/ndr_lsa.c | 40 +++++++++++++++++++++++++--------------- source3/librpc/gen_ndr/srv_lsa.c | 2 +- 5 files changed, 30 insertions(+), 22 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 76370cabf1..002a9716d8 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -135,7 +135,7 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, - struct sec_desc_buf *sdbuf) + struct sec_desc_buf **sdbuf) { struct lsa_QuerySecurity r; NTSTATUS status; @@ -168,9 +168,7 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, } /* Return variables */ - if (sdbuf && r.out.sdbuf) { - *sdbuf = *r.out.sdbuf; - } + *sdbuf = *r.out.sdbuf; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index c45aed1d37..831b93b5c8 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -17,7 +17,7 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, - struct sec_desc_buf *sdbuf); + struct sec_desc_buf **sdbuf); NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 7aa00b1503..3127dc483d 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -625,7 +625,7 @@ struct lsa_QuerySecurity { } in; struct { - struct sec_desc_buf *sdbuf;/* [unique] */ + struct sec_desc_buf **sdbuf;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 25fa3d2129..ad6634837a 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -4768,10 +4768,14 @@ static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int fl NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sdbuf)); - if (r->out.sdbuf) { - NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); + if (r->out.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4782,6 +4786,7 @@ static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int fl uint32_t _ptr_sdbuf; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sdbuf_0; + TALLOC_CTX *_mem_save_sdbuf_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -4793,20 +4798,24 @@ static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info)); + NDR_PULL_ALLOC(ndr, r->out.sdbuf); + ZERO_STRUCTP(r->out.sdbuf); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf)); - if (_ptr_sdbuf) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sdbuf); - } else { - r->out.sdbuf = NULL; } - if (r->out.sdbuf) { - _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, 0); - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, 0); + _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.sdbuf); } + _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -4834,9 +4843,10 @@ _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); ndr->depth++; - if (r->out.sdbuf) { - ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf); - } + ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 8f8f985650..a24f04f456 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -274,7 +274,7 @@ static bool api_lsa_QuerySecurity(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.sdbuf = talloc_zero(r, struct sec_desc_buf); + r->out.sdbuf = talloc_zero(r, struct sec_desc_buf *); if (r->out.sdbuf == NULL) { talloc_free(r); return false; -- cgit From 19e1f08305acf4b6b94f46bc1c3e75c128c2f95d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 4 Feb 2008 22:04:36 +0100 Subject: Re-run make idl. Guenther (This used to be commit ba167f3c9ce17ff458d8292e73ce3deafdd2e240) --- source3/librpc/gen_ndr/cli_lsa.c | 13 ++++- source3/librpc/gen_ndr/cli_lsa.h | 8 +++- source3/librpc/gen_ndr/lsa.h | 11 +++++ source3/librpc/gen_ndr/ndr_lsa.c | 100 +++++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_lsa.c | 2 + 5 files changed, 130 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 002a9716d8..3599d9fe9c 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -175,12 +175,18 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf) { struct lsa_SetSecObj r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.sec_info = sec_info; + r.in.sdbuf = sdbuf; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_SetSecObj, &r); @@ -1486,12 +1492,14 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle **handle) { struct lsa_DeleteObject r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_DeleteObject, &r); @@ -1517,6 +1525,7 @@ NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, } /* Return variables */ + *handle = *r.out.handle; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 831b93b5c8..4997f5cb35 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -19,7 +19,10 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, uint32_t sec_info, struct sec_desc_buf **sdbuf); NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t sec_info, + struct sec_desc_buf *sdbuf); NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, @@ -163,7 +166,8 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, uint16_t *language_id, uint16_t unknown); NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle **handle); NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 3127dc483d..32e6739095 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -633,6 +633,12 @@ struct lsa_QuerySecurity { struct lsa_SetSecObj { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t sec_info; + struct sec_desc_buf *sdbuf;/* [ref] */ + } in; + struct { NTSTATUS result; } out; @@ -1035,6 +1041,11 @@ struct lsa_LookupPrivDisplayName { struct lsa_DeleteObject { struct { + struct policy_handle **handle;/* [ref] */ + } in; + + struct { + struct policy_handle **handle;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index ad6634837a..89b7da5785 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -4857,6 +4857,15 @@ _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info)); + if (r->in.sdbuf == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -4866,7 +4875,24 @@ static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_sdbuf_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.sdbuf); + } + _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.sdbuf, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); @@ -4884,6 +4910,15 @@ _PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, i if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_SetSecObj"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info); + ndr_print_ptr(ndr, "sdbuf", r->in.sdbuf); + ndr->depth++; + ndr_print_sec_desc_buf(ndr, "sdbuf", r->in.sdbuf); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -7602,8 +7637,24 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const c static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); } if (flags & NDR_OUT) { + if (r->out.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + if (*r->out.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7611,9 +7662,44 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r) { + uint32_t _ptr_handle; + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_handle_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_handle)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->in.handle); + } + _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.handle); + *r->out.handle = *r->in.handle; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_handle)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.handle); + } + _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -7629,11 +7715,25 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_DeleteObject"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_ptr(ndr, "handle", *r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", *r->in.handle); + ndr->depth--; + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "lsa_DeleteObject"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->out.handle); + ndr->depth++; + ndr_print_ptr(ndr, "handle", *r->out.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", *r->out.handle); + ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index a24f04f456..aa870a6d59 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -2674,6 +2674,8 @@ static bool api_lsa_DeleteObject(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_DeleteObject, r); } + ZERO_STRUCT(r->out); + r->out.handle = r->in.handle; r->out.result = _lsa_DeleteObject(p, r); if (p->rng_fault_state) { -- cgit From 93710e7e01f0647316f5d6610ade79cec86c564c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 01:27:46 +0100 Subject: Re-run make idl. Guenther (This used to be commit 9ecb72183571af80cbcb56c57a09087eb0479f93) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 1c71645069..a688e67fea 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -218,7 +218,7 @@ NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle, struct lsa_String *domain_name, - struct dom_sid2 *sid) + struct dom_sid2 **sid) { struct samr_LookupDomain r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 14f47ea925..d1e262cd43 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -26,7 +26,7 @@ NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle, struct lsa_String *domain_name, - struct dom_sid2 *sid); + struct dom_sid2 **sid); NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index d6f51b94b0..1d003f21fe 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5581,7 +5581,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl if (r->out.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + if (*r->out.sid == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5589,9 +5593,11 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int flags, struct samr_LookupDomain *r) { + uint32_t _ptr_sid; TALLOC_CTX *_mem_save_connect_handle_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_sid_0; + TALLOC_CTX *_mem_save_sid_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5618,7 +5624,14 @@ static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int fl } _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sid)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.sid); + } + _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5650,7 +5663,10 @@ _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "sid", r->out.sid); ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->out.sid); + ndr_print_ptr(ndr, "sid", *r->out.sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "sid", *r->out.sid); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 6e79773fab..ba917c8367 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -799,7 +799,7 @@ struct samr_LookupDomain { } in; struct { - struct dom_sid2 *sid;/* [ref] */ + struct dom_sid2 **sid;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 188c5b1eb2..215d773aa1 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -426,7 +426,7 @@ static bool api_samr_LookupDomain(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.sid = talloc_zero(r, struct dom_sid2); + r->out.sid = talloc_zero(r, struct dom_sid2 *); if (r->out.sid == NULL) { talloc_free(r); return false; -- cgit From 36818c0ff0b49d85895027dc60add0754b9c907b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 03:19:35 +0100 Subject: Re-run make idl. Guenther (This used to be commit 8bcbf8cccdbd14a1c7a446828605c7235b63ff56) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 22 +++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index a688e67fea..627c448d1e 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -1120,7 +1120,7 @@ NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, - struct samr_RidTypeArray *rids) + struct samr_RidTypeArray **rids) { struct samr_QueryGroupMember r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index d1e262cd43..86396be455 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -143,7 +143,7 @@ NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, - struct samr_RidTypeArray *rids); + struct samr_RidTypeArray **rids); NTSTATUS rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 1d003f21fe..fbb6c644af 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -7642,7 +7642,11 @@ static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, in if (r->out.rids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + if (*r->out.rids == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7650,8 +7654,10 @@ static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, int flags, struct samr_QueryGroupMember *r) { + uint32_t _ptr_rids; TALLOC_CTX *_mem_save_group_handle_0; TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_rids_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7671,7 +7677,14 @@ static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, in } _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_rids)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.rids); + } + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7699,7 +7712,10 @@ _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "rids", r->out.rids); ndr->depth++; - ndr_print_samr_RidTypeArray(ndr, "rids", r->out.rids); + ndr_print_ptr(ndr, "rids", *r->out.rids); + ndr->depth++; + ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index ba917c8367..7a1537ef46 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1101,7 +1101,7 @@ struct samr_QueryGroupMember { } in; struct { - struct samr_RidTypeArray *rids;/* [ref] */ + struct samr_RidTypeArray **rids;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 215d773aa1..1df7fcfb7f 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -2051,7 +2051,7 @@ static bool api_samr_QueryGroupMember(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.rids = talloc_zero(r, struct samr_RidTypeArray); + r->out.rids = talloc_zero(r, struct samr_RidTypeArray *); if (r->out.rids == NULL) { talloc_free(r); return false; -- cgit From 2bca1422908c5221af4fbed3eb33e0f07eb063ca Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 13:23:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit 47dd4baae7f6c4f78ef058eabba9ac4e9d8151f5) --- source3/librpc/gen_ndr/cli_samr.c | 4 ++-- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 38 ++++++++++++++++++++++++++++++++------ source3/librpc/gen_ndr/ndr_samr.h | 1 + source3/librpc/gen_ndr/samr.h | 19 +++++++++++++++++-- 5 files changed, 53 insertions(+), 11 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 627c448d1e..cabb05fbbe 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -2751,7 +2751,7 @@ NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, - uint32_t unknown, + enum samr_ConnectVersion client_version, uint32_t access_mask, struct policy_handle *connect_handle) { @@ -2760,7 +2760,7 @@ NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, /* In parameters */ r.in.system_name = system_name; - r.in.unknown = unknown; + r.in.client_version = client_version; r.in.access_mask = access_mask; if (DEBUGLEVEL >= 10) { diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 86396be455..a878b50592 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -347,7 +347,7 @@ NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, - uint32_t unknown, + enum samr_ConnectVersion client_version, uint32_t access_mask, struct policy_handle *connect_handle); NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index fbb6c644af..300f8e0059 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -4380,6 +4380,32 @@ _PUBLIC_ void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, con ndr->depth--; } +static enum ndr_err_code ndr_push_samr_ConnectVersion(struct ndr_push *ndr, int ndr_flags, enum samr_ConnectVersion r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_ConnectVersion(struct ndr_pull *ndr, int ndr_flags, enum samr_ConnectVersion *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r) +{ + const char *val = NULL; + + switch (r) { + case SAMR_CONNECT_PRE_W2K: val = "SAMR_CONNECT_PRE_W2K"; break; + case SAMR_CONNECT_W2K: val = "SAMR_CONNECT_W2K"; break; + case SAMR_CONNECT_AFTER_W2K: val = "SAMR_CONNECT_AFTER_W2K"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r) { if (ndr_flags & NDR_SCALARS) { @@ -4420,7 +4446,7 @@ static enum ndr_err_code ndr_push_samr_ConnectInfo1(struct ndr_push *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->client_version)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); } if (ndr_flags & NDR_BUFFERS) { @@ -4432,7 +4458,7 @@ static enum ndr_err_code ndr_pull_samr_ConnectInfo1(struct ndr_pull *ndr, int nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->client_version)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); } if (ndr_flags & NDR_BUFFERS) { @@ -4444,7 +4470,7 @@ _PUBLIC_ void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *nam { ndr_print_struct(ndr, name, "samr_ConnectInfo1"); ndr->depth++; - ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_samr_ConnectVersion(ndr, "client_version", r->client_version); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr->depth--; } @@ -11025,7 +11051,7 @@ static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_samr_ConnectVersion(ndr, NDR_SCALARS, r->in.client_version)); NDR_CHECK(ndr_push_samr_ConnectAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { @@ -11064,7 +11090,7 @@ static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version)); NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); NDR_PULL_ALLOC(ndr, r->out.connect_handle); ZERO_STRUCTP(r->out.connect_handle); @@ -11098,7 +11124,7 @@ _PUBLIC_ void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, i ndr_print_string(ndr, "system_name", r->in.system_name); } ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_samr_ConnectVersion(ndr, "client_version", r->in.client_version); ndr_print_samr_ConnectAccessMask(ndr, "access_mask", r->in.access_mask); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h index 96fd59b507..f769cddddb 100644 --- a/source3/librpc/gen_ndr/ndr_samr.h +++ b/source3/librpc/gen_ndr/ndr_samr.h @@ -237,6 +237,7 @@ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, cons void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r); void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r); void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r); +void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r); void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r); void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r); void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r); diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 7a1537ef46..e0bf5e5c80 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -603,6 +603,21 @@ struct samr_PwInfo { uint32_t password_properties; }; +enum samr_ConnectVersion +#ifndef USE_UINT_ENUMS + { + SAMR_CONNECT_PRE_W2K=1, + SAMR_CONNECT_W2K=2, + SAMR_CONNECT_AFTER_W2K=3 +} +#else + { __donnot_use_enum_samr_ConnectVersion=0x7FFFFFFF} +#define SAMR_CONNECT_PRE_W2K ( 1 ) +#define SAMR_CONNECT_W2K ( 2 ) +#define SAMR_CONNECT_AFTER_W2K ( 3 ) +#endif +; + enum samr_RejectReason; struct samr_ChangeReject { @@ -612,7 +627,7 @@ struct samr_ChangeReject { }; struct samr_ConnectInfo1 { - uint32_t unknown1; + enum samr_ConnectVersion client_version; uint32_t unknown2; }; @@ -1637,7 +1652,7 @@ struct samr_Connect3 { struct samr_Connect4 { struct { const char *system_name;/* [unique,charset(UTF16)] */ - uint32_t unknown; + enum samr_ConnectVersion client_version; uint32_t access_mask; } in; -- cgit From 7599d6bd314e261d9a62c0dfb4011d3fbe11699b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 5 Feb 2008 14:42:01 +0100 Subject: Re-run make idl. Guenther (This used to be commit bc047ee520ef9c74cb0c5a3b6b6877b4ed7fd62b) --- source3/librpc/gen_ndr/cli_samr.c | 4 +-- source3/librpc/gen_ndr/cli_samr.h | 4 +-- source3/librpc/gen_ndr/ndr_samr.c | 56 ++++++++++++++++++++++++++++++--------- source3/librpc/gen_ndr/samr.h | 4 +-- source3/librpc/gen_ndr/srv_samr.c | 4 +-- 5 files changed, 52 insertions(+), 20 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index cabb05fbbe..a0441fcd84 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -354,7 +354,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint16_t level, - union samr_DomainInfo *info) + union samr_DomainInfo **info) { struct samr_QueryDomainInfo r; NTSTATUS status; @@ -2028,7 +2028,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint16_t level, - union samr_DomainInfo *info) + union samr_DomainInfo **info) { struct samr_QueryDomainInfo2 r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index a878b50592..52e6b13c7a 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -44,7 +44,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint16_t level, - union samr_DomainInfo *info); + union samr_DomainInfo **info); NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, @@ -250,7 +250,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint16_t level, - union samr_DomainInfo *info); + union samr_DomainInfo **info); NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 300f8e0059..ff3f0a1c98 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5940,8 +5940,12 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_DomainInfo(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_ref_ptr(ndr)); + NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5949,8 +5953,10 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo *r) { + uint32_t _ptr_info; TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5971,8 +5977,15 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int } _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_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } + _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); 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)); } @@ -6001,8 +6014,11 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_samr_DomainInfo(ndr, "info", r->out.info); + ndr_print_ptr(ndr, "info", *r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -9455,8 +9471,12 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_DomainInfo(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_ref_ptr(ndr)); + NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level)); + NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9464,8 +9484,10 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, int flags, struct samr_QueryDomainInfo2 *r) { + uint32_t _ptr_info; TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9486,8 +9508,15 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, in } _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_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_info)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } + _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level)); + NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); 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)); } @@ -9516,8 +9545,11 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_samr_DomainInfo(ndr, "info", r->out.info); + ndr_print_ptr(ndr, "info", *r->out.info); + ndr->depth++; + ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index e0bf5e5c80..d0e758d72f 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -860,7 +860,7 @@ struct samr_QueryDomainInfo { } in; struct { - union samr_DomainInfo *info;/* [ref,switch_is(level)] */ + union samr_DomainInfo **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; @@ -1414,7 +1414,7 @@ struct samr_QueryDomainInfo2 { } in; struct { - union samr_DomainInfo *info;/* [ref,switch_is(level)] */ + union samr_DomainInfo **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 1df7fcfb7f..38cc59978c 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -673,7 +673,7 @@ static bool api_samr_QueryDomainInfo(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union samr_DomainInfo); + r->out.info = talloc_zero(r, union samr_DomainInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -3670,7 +3670,7 @@ static bool api_samr_QueryDomainInfo2(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union samr_DomainInfo); + r->out.info = talloc_zero(r, union samr_DomainInfo *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From c49ae172cacd4a4e4292a0de526ec256d288bb19 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 09:43:46 +0100 Subject: Re-run make idl after metzes fixes for multilevel and embedded pointers. Thanks metze! Now we can move a lot more opcodes to use pidl generated marshalling. Guenther (This used to be commit 4128ed8bdfb82324e80c0e5a4114da464d50f6de) --- source3/librpc/gen_ndr/ndr_dfs.c | 87 ++++++---- source3/librpc/gen_ndr/ndr_echo.c | 100 +++++++----- source3/librpc/gen_ndr/ndr_lsa.c | 108 ++++++++----- source3/librpc/gen_ndr/ndr_netlogon.c | 294 +++++++++++++++++++++------------- source3/librpc/gen_ndr/ndr_samr.c | 147 ++++++++++------- source3/librpc/gen_ndr/ndr_svcctl.c | 264 +++++++++++++++++++----------- source3/librpc/gen_ndr/ndr_wkssvc.c | 257 ++++++++++++++++++++--------- 7 files changed, 799 insertions(+), 458 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index dee32485be..c373a4364c 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -4974,14 +4974,13 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla if (r->in.server_fullname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->in.server_fullname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname)); + if (*r->in.server_fullname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); if (r->in.is_root == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -4995,14 +4994,13 @@ static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int fla if (r->out.server_fullname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.server_fullname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname)); + if (*r->out.server_fullname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); if (r->out.is_root == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5020,6 +5018,7 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla { uint32_t _ptr_server_fullname; TALLOC_CTX *_mem_save_server_fullname_0; + TALLOC_CTX *_mem_save_server_fullname_1; TALLOC_CTX *_mem_save_is_root_0; TALLOC_CTX *_mem_save_ttl_0; if (flags & NDR_IN) { @@ -5037,14 +5036,24 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla } _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); - if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); + if (_ptr_server_fullname) { + NDR_PULL_ALLOC(ndr, *r->in.server_fullname); + } else { + *r->in.server_fullname = NULL; + } + if (*r->in.server_fullname) { + _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname)); + if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.is_root); @@ -5073,14 +5082,24 @@ static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int fla } _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_server_fullname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); - if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname)); + if (_ptr_server_fullname) { + NDR_PULL_ALLOC(ndr, *r->out.server_fullname); + } else { + *r->out.server_fullname = NULL; + } + if (*r->out.server_fullname) { + _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname)); + if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.is_root); @@ -5116,7 +5135,9 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname); ndr->depth++; - ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + if (*r->in.server_fullname) { + ndr_print_string(ndr, "server_fullname", *r->in.server_fullname); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "is_root", r->in.is_root); @@ -5136,7 +5157,9 @@ _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname); ndr->depth++; - ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + if (*r->out.server_fullname) { + ndr_print_string(ndr, "server_fullname", *r->out.server_fullname); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "is_root", r->out.is_root); diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c index 29a10220e5..dda9813e23 100644 --- a/source3/librpc/gen_ndr/ndr_echo.c +++ b/source3/librpc/gen_ndr/ndr_echo.c @@ -876,14 +876,13 @@ static enum ndr_err_code ndr_push_echo_TestCall(struct ndr_push *ndr, int flags, if (r->out.s2 == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.s2 == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.s2)); + if (*r->out.s2) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.s2, ndr_charset_length(*r->out.s2, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.s2, ndr_charset_length(*r->out.s2, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } return NDR_ERR_SUCCESS; } @@ -892,6 +891,7 @@ static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, { uint32_t _ptr_s2; TALLOC_CTX *_mem_save_s2_0; + TALLOC_CTX *_mem_save_s2_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -911,14 +911,24 @@ static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, int flags, } _mem_save_s2_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.s2, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_s2)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2)); - if (ndr_get_array_length(ndr, r->out.s2) > ndr_get_array_size(ndr, r->out.s2)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.s2), ndr_get_array_length(ndr, r->out.s2)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s2)); + if (_ptr_s2) { + NDR_PULL_ALLOC(ndr, *r->out.s2); + } else { + *r->out.s2 = NULL; + } + if (*r->out.s2) { + _mem_save_s2_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.s2, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2)); + if (ndr_get_array_length(ndr, r->out.s2) > ndr_get_array_size(ndr, r->out.s2)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.s2), ndr_get_array_length(ndr, r->out.s2)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_1, 0); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, ndr_get_array_length(ndr, r->out.s2), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_0, LIBNDR_FLAG_REF_ALLOC); } return NDR_ERR_SUCCESS; @@ -947,7 +957,9 @@ _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, i ndr->depth++; ndr_print_ptr(ndr, "s2", *r->out.s2); ndr->depth++; - ndr_print_string(ndr, "s2", *r->out.s2); + if (*r->out.s2) { + ndr_print_string(ndr, "s2", *r->out.s2); + } ndr->depth--; ndr->depth--; ndr->depth--; @@ -1290,15 +1302,13 @@ static enum ndr_err_code ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, i if (r->in.data == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->in.data == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - if (**r->in.data == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.data)); + if (*r->in.data) { + NDR_CHECK(ndr_push_unique_ptr(ndr, **r->in.data)); + if (**r->in.data) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ***r->in.data)); + } } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ***r->in.data)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.result)); @@ -1318,21 +1328,29 @@ static enum ndr_err_code ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, i } _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_data)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { NDR_PULL_ALLOC(ndr, *r->in.data); + } else { + *r->in.data = NULL; } - _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_data)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, **r->in.data); + if (*r->in.data) { + _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data)); + if (_ptr_data) { + NDR_PULL_ALLOC(ndr, **r->in.data); + } else { + **r->in.data = NULL; + } + if (**r->in.data) { + _mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, 0); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0); } - _mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); } if (flags & NDR_OUT) { @@ -1355,10 +1373,14 @@ _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "data", *r->in.data); ndr->depth++; - ndr_print_ptr(ndr, "data", **r->in.data); - ndr->depth++; - ndr_print_uint16(ndr, "data", ***r->in.data); - ndr->depth--; + if (*r->in.data) { + ndr_print_ptr(ndr, "data", **r->in.data); + ndr->depth++; + if (**r->in.data) { + ndr_print_uint16(ndr, "data", ***r->in.data); + } + ndr->depth--; + } ndr->depth--; ndr->depth--; ndr->depth--; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 89b7da5785..e934ca87c2 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -4771,11 +4771,10 @@ static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int fl if (r->out.sdbuf == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.sdbuf == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf)); + if (*r->out.sdbuf) { + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4807,14 +4806,18 @@ static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int fl } _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf)); + if (_ptr_sdbuf) { NDR_PULL_ALLOC(ndr, *r->out.sdbuf); + } else { + *r->out.sdbuf = NULL; + } + if (*r->out.sdbuf) { + _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0); } - _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -4845,7 +4848,9 @@ _PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf); ndr->depth++; - ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + if (*r->out.sdbuf) { + ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -7640,21 +7645,19 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla if (r->in.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->in.handle == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.handle)); + if (*r->in.handle) { + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); } if (flags & NDR_OUT) { if (r->out.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.handle == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.handle)); + if (*r->out.handle) { + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7673,14 +7676,18 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_handle)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle)); + if (_ptr_handle) { NDR_PULL_ALLOC(ndr, *r->in.handle); + } else { + *r->in.handle = NULL; + } + if (*r->in.handle) { + _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, 0); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); } - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.handle); *r->out.handle = *r->in.handle; @@ -7691,14 +7698,18 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_handle)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle)); + if (_ptr_handle) { NDR_PULL_ALLOC(ndr, *r->out.handle); + } else { + *r->out.handle = NULL; + } + if (*r->out.handle) { + _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, 0); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); } - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7719,7 +7730,9 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", *r->in.handle); ndr->depth++; - ndr_print_policy_handle(ndr, "handle", *r->in.handle); + if (*r->in.handle) { + ndr_print_policy_handle(ndr, "handle", *r->in.handle); + } ndr->depth--; ndr->depth--; ndr->depth--; @@ -7731,7 +7744,9 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", *r->out.handle); ndr->depth++; - ndr_print_policy_handle(ndr, "handle", *r->out.handle); + if (*r->out.handle) { + ndr_print_policy_handle(ndr, "handle", *r->out.handle); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -10701,11 +10716,10 @@ static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr if (r->out.forest_trust_info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.forest_trust_info == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info)); + if (*r->out.forest_trust_info) { + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10745,14 +10759,18 @@ static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr } _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info)); + if (_ptr_forest_trust_info) { NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } else { + *r->out.forest_trust_info = NULL; + } + if (*r->out.forest_trust_info) { + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0); } - _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -10787,7 +10805,9 @@ _PUBLIC_ void ndr_print_lsa_lsaRQueryForestTrustInformation(struct ndr_print *nd ndr->depth++; ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); ndr->depth++; - ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + if (*r->out.forest_trust_info) { + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 2d41a2675e..eabbc337fc 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -9777,14 +9777,13 @@ static enum ndr_err_code ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags if (r->out.dcname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.dcname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname)); + if (*r->out.dcname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9796,6 +9795,7 @@ static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags uint32_t _ptr_dcname; TALLOC_CTX *_mem_save_domainname_0; TALLOC_CTX *_mem_save_dcname_0; + TALLOC_CTX *_mem_save_dcname_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9833,14 +9833,24 @@ static enum ndr_err_code ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags } _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dcname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname)); - if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname)); + if (_ptr_dcname) { + NDR_PULL_ALLOC(ndr, *r->out.dcname); + } else { + *r->out.dcname = NULL; + } + if (*r->out.dcname) { + _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname)); + if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -9873,7 +9883,9 @@ _PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "dcname", *r->out.dcname); ndr->depth++; - ndr_print_string(ndr, "dcname", *r->out.dcname); + if (*r->out.dcname) { + ndr_print_string(ndr, "dcname", *r->out.dcname); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -10007,14 +10019,13 @@ static enum ndr_err_code ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int fl if (r->out.dcname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.dcname == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dcname)); + if (*r->out.dcname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10028,6 +10039,7 @@ static enum ndr_err_code ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int fl TALLOC_CTX *_mem_save_logon_server_0; TALLOC_CTX *_mem_save_domainname_0; TALLOC_CTX *_mem_save_dcname_0; + TALLOC_CTX *_mem_save_dcname_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10076,14 +10088,24 @@ static enum ndr_err_code ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int fl } _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dcname)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname)); - if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dcname)); + if (_ptr_dcname) { + NDR_PULL_ALLOC(ndr, *r->out.dcname); + } else { + *r->out.dcname = NULL; + } + if (*r->out.dcname) { + _mem_save_dcname_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.dcname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname)); + if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -10121,7 +10143,9 @@ _PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "dcname", *r->out.dcname); ndr->depth++; - ndr_print_string(ndr, "dcname", *r->out.dcname); + if (*r->out.dcname) { + ndr_print_string(ndr, "dcname", *r->out.dcname); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -11618,11 +11642,10 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11720,14 +11743,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int } _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_ref_ptr(ndr, &_ptr_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0); } - _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -11778,7 +11805,9 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + if (*r->out.info) { + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -11802,14 +11831,13 @@ static enum ndr_err_code ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int if (r->out.site == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.site == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.site)); + if (*r->out.site) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11821,6 +11849,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int uint32_t _ptr_site; TALLOC_CTX *_mem_save_computer_name_0; TALLOC_CTX *_mem_save_site_0; + TALLOC_CTX *_mem_save_site_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -11851,14 +11880,24 @@ static enum ndr_err_code ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int } _mem_save_site_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.site, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_site)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.site)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.site)); - if (ndr_get_array_length(ndr, r->out.site) > ndr_get_array_size(ndr, r->out.site)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.site), ndr_get_array_length(ndr, r->out.site)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site)); + if (_ptr_site) { + NDR_PULL_ALLOC(ndr, *r->out.site); + } else { + *r->out.site = NULL; + } + if (*r->out.site) { + _mem_save_site_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.site, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.site)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.site)); + if (ndr_get_array_length(ndr, r->out.site) > ndr_get_array_size(ndr, r->out.site)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.site), ndr_get_array_length(ndr, r->out.site)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -11890,7 +11929,9 @@ _PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "site", *r->out.site); ndr->depth++; - ndr_print_string(ndr, "site", *r->out.site); + if (*r->out.site) { + ndr_print_string(ndr, "site", *r->out.site); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -12416,11 +12457,10 @@ static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesW(struct ndr_push *n if (r->out.ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.ctr == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr)); + if (*r->out.ctr) { + NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -12485,14 +12525,18 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *n } _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ctr)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr)); + if (_ptr_ctr) { NDR_PULL_ALLOC(ndr, *r->out.ctr); + } else { + *r->out.ctr = NULL; + } + if (*r->out.ctr) { + _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0); + NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0); } - _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12540,7 +12584,9 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const ndr->depth++; ndr_print_ptr(ndr, "ctr", *r->out.ctr); ndr->depth++; - ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr); + if (*r->out.ctr) { + ndr_print_netr_DsRAddressToSitenamesWCtr(ndr, "ctr", *r->out.ctr); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -12591,11 +12637,10 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -12714,14 +12759,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int } _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_ref_ptr(ndr, &_ptr_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0); } - _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12779,7 +12828,9 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + if (*r->out.info) { + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -12950,11 +13001,10 @@ static enum ndr_err_code ndr_push_netr_DsRAddressToSitenamesExW(struct ndr_push if (r->out.ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.ctr == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr)); + if (*r->out.ctr) { + NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -13019,14 +13069,18 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull } _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ctr)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr)); + if (_ptr_ctr) { NDR_PULL_ALLOC(ndr, *r->out.ctr); + } else { + *r->out.ctr = NULL; + } + if (*r->out.ctr) { + _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0); + NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0); } - _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DsRAddressToSitenamesExWCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -13074,7 +13128,9 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "ctr", *r->out.ctr); ndr->depth++; - ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr); + if (*r->out.ctr) { + ndr_print_netr_DsRAddressToSitenamesExWCtr(ndr, "ctr", *r->out.ctr); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -13836,11 +13892,10 @@ static enum ndr_err_code ndr_push_netr_DsRGetForestTrustInformation(struct ndr_p if (r->out.forest_trust_info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.forest_trust_info == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info)); + if (*r->out.forest_trust_info) { + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -13904,14 +13959,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetForestTrustInformation(struct ndr_p } _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info)); + if (_ptr_forest_trust_info) { NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } else { + *r->out.forest_trust_info = NULL; + } + if (*r->out.forest_trust_info) { + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0); } - _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -13950,7 +14009,9 @@ _PUBLIC_ void ndr_print_netr_DsRGetForestTrustInformation(struct ndr_print *ndr, ndr->depth++; ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); ndr->depth++; - ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + if (*r->out.forest_trust_info) { + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -13990,11 +14051,10 @@ static enum ndr_err_code ndr_push_netr_GetForestTrustInformation(struct ndr_push if (r->out.forest_trust_info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.forest_trust_info == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.forest_trust_info)); + if (*r->out.forest_trust_info) { + NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -14063,14 +14123,18 @@ static enum ndr_err_code ndr_pull_netr_GetForestTrustInformation(struct ndr_pull } _mem_save_forest_trust_info_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_forest_trust_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_info)); + if (_ptr_forest_trust_info) { NDR_PULL_ALLOC(ndr, *r->out.forest_trust_info); + } else { + *r->out.forest_trust_info = NULL; + } + if (*r->out.forest_trust_info) { + _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, 0); + NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, 0); } - _mem_save_forest_trust_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.forest_trust_info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_ForestTrustInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.forest_trust_info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -14115,7 +14179,9 @@ _PUBLIC_ void ndr_print_netr_GetForestTrustInformation(struct ndr_print *ndr, co ndr->depth++; ndr_print_ptr(ndr, "forest_trust_info", *r->out.forest_trust_info); ndr->depth++; - ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + if (*r->out.forest_trust_info) { + ndr_print_lsa_ForestTrustInformation(ndr, "forest_trust_info", *r->out.forest_trust_info); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index ff3f0a1c98..a7d9a9d610 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5451,11 +5451,10 @@ static enum ndr_err_code ndr_push_samr_QuerySecurity(struct ndr_push *ndr, int f if (r->out.sdbuf == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.sdbuf == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sdbuf)); + if (*r->out.sdbuf) { + NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5487,14 +5486,18 @@ static enum ndr_err_code ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, int f } _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sdbuf)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf)); + if (_ptr_sdbuf) { NDR_PULL_ALLOC(ndr, *r->out.sdbuf); + } else { + *r->out.sdbuf = NULL; + } + if (*r->out.sdbuf) { + _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, 0); + NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, 0); } - _mem_save_sdbuf_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.sdbuf, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sdbuf)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5525,7 +5528,9 @@ _PUBLIC_ void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_ptr(ndr, "sdbuf", *r->out.sdbuf); ndr->depth++; - ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + if (*r->out.sdbuf) { + ndr_print_sec_desc_buf(ndr, "sdbuf", *r->out.sdbuf); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -5607,11 +5612,10 @@ static enum ndr_err_code ndr_push_samr_LookupDomain(struct ndr_push *ndr, int fl if (r->out.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.sid == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid)); + if (*r->out.sid) { + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5650,14 +5654,18 @@ static enum ndr_err_code ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, int fl } _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_sid)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid)); + if (_ptr_sid) { NDR_PULL_ALLOC(ndr, *r->out.sid); + } else { + *r->out.sid = NULL; + } + if (*r->out.sid) { + _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0); } - _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5691,7 +5699,9 @@ _PUBLIC_ void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "sid", *r->out.sid); ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", *r->out.sid); + if (*r->out.sid) { + ndr_print_dom_sid2(ndr, "sid", *r->out.sid); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -5940,12 +5950,11 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5977,15 +5986,19 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int } _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_ref_ptr(ndr, &_ptr_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0); } - _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); 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)); } @@ -6016,8 +6029,10 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); - ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + if (*r->out.info) { + ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -7684,11 +7699,10 @@ static enum ndr_err_code ndr_push_samr_QueryGroupMember(struct ndr_push *ndr, in if (r->out.rids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.rids == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids)); + if (*r->out.rids) { + NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7719,14 +7733,18 @@ static enum ndr_err_code ndr_pull_samr_QueryGroupMember(struct ndr_pull *ndr, in } _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_rids)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids)); + if (_ptr_rids) { NDR_PULL_ALLOC(ndr, *r->out.rids); + } else { + *r->out.rids = NULL; + } + if (*r->out.rids) { + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0); + NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0); } - _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_RidTypeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7756,7 +7774,9 @@ _PUBLIC_ void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "rids", *r->out.rids); ndr->depth++; - ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids); + if (*r->out.rids) { + ndr_print_samr_RidTypeArray(ndr, "rids", *r->out.rids); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); @@ -9471,12 +9491,11 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_set_switch_value(ndr, *r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9508,15 +9527,19 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, in } _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_ref_ptr(ndr, &_ptr_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0); } - _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, *r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); 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)); } @@ -9547,8 +9570,10 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); - ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + if (*r->out.info) { + ndr_print_set_switch_value(ndr, *r->out.info, r->in.level); + ndr_print_samr_DomainInfo(ndr, "info", *r->out.info); + } ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c index b8d5dc186d..b2dfd0eef4 100644 --- a/source3/librpc/gen_ndr/ndr_svcctl.c +++ b/source3/librpc/gen_ndr/ndr_svcctl.c @@ -2380,14 +2380,13 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push if (r->out.display_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.display_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name)); + if (*r->out.display_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length)); if (r->out.display_name_length) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length)); @@ -2405,6 +2404,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_service_name_0; TALLOC_CTX *_mem_save_display_name_0; + TALLOC_CTX *_mem_save_display_name_1; TALLOC_CTX *_mem_save_display_name_length_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -2455,14 +2455,24 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull } _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_display_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name)); - if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name)); + if (_ptr_display_name) { + NDR_PULL_ALLOC(ndr, *r->out.display_name); + } else { + *r->out.display_name = NULL; + } + if (*r->out.display_name) { + _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name)); + if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length)); if (_ptr_display_name_length) { @@ -2516,7 +2526,9 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "display_name", *r->out.display_name); ndr->depth++; - ndr_print_string(ndr, "display_name", *r->out.display_name); + if (*r->out.display_name) { + ndr_print_string(ndr, "display_name", *r->out.display_name); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length); @@ -2554,14 +2566,13 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr if (r->out.key_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.key_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name)); + if (*r->out.key_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length)); if (r->out.display_name_length) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length)); @@ -2579,6 +2590,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_service_name_0; TALLOC_CTX *_mem_save_key_name_0; + TALLOC_CTX *_mem_save_key_name_1; TALLOC_CTX *_mem_save_display_name_length_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -2629,14 +2641,24 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr } _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_key_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name)); - if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name)); + if (_ptr_key_name) { + NDR_PULL_ALLOC(ndr, *r->out.key_name); + } else { + *r->out.key_name = NULL; + } + if (*r->out.key_name) { + _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name)); + if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length)); if (_ptr_display_name_length) { @@ -2690,7 +2712,9 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const c ndr->depth++; ndr_print_ptr(ndr, "key_name", *r->out.key_name); ndr->depth++; - ndr_print_string(ndr, "key_name", *r->out.key_name); + if (*r->out.key_name) { + ndr_print_string(ndr, "key_name", *r->out.key_name); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length); @@ -4186,14 +4210,13 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push if (r->out.display_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.display_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name)); + if (*r->out.display_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length)); if (r->out.display_name_length) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length)); @@ -4211,6 +4234,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_service_name_0; TALLOC_CTX *_mem_save_display_name_0; + TALLOC_CTX *_mem_save_display_name_1; TALLOC_CTX *_mem_save_display_name_length_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -4261,14 +4285,24 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull } _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_display_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name)); - if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name)); + if (_ptr_display_name) { + NDR_PULL_ALLOC(ndr, *r->out.display_name); + } else { + *r->out.display_name = NULL; + } + if (*r->out.display_name) { + _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name)); + if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length)); if (_ptr_display_name_length) { @@ -4322,7 +4356,9 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "display_name", *r->out.display_name); ndr->depth++; - ndr_print_string(ndr, "display_name", *r->out.display_name); + if (*r->out.display_name) { + ndr_print_string(ndr, "display_name", *r->out.display_name); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length); @@ -4360,14 +4396,13 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr if (r->out.key_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.key_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name)); + if (*r->out.key_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length)); if (r->out.display_name_length) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length)); @@ -4385,6 +4420,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_service_name_0; TALLOC_CTX *_mem_save_key_name_0; + TALLOC_CTX *_mem_save_key_name_1; TALLOC_CTX *_mem_save_display_name_length_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -4435,14 +4471,24 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr } _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_key_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name)); - if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name)); + if (_ptr_key_name) { + NDR_PULL_ALLOC(ndr, *r->out.key_name); + } else { + *r->out.key_name = NULL; + } + if (*r->out.key_name) { + _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name)); + if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length)); if (_ptr_display_name_length) { @@ -4496,7 +4542,9 @@ _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const c ndr->depth++; ndr_print_ptr(ndr, "key_name", *r->out.key_name); ndr->depth++; - ndr_print_string(ndr, "key_name", *r->out.key_name); + if (*r->out.key_name) { + ndr_print_string(ndr, "key_name", *r->out.key_name); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length); @@ -5055,14 +5103,13 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, in if (r->out.group_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.group_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name)); + if (*r->out.group_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5077,6 +5124,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in TALLOC_CTX *_mem_save_service_returned_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_group_name_0; + TALLOC_CTX *_mem_save_group_name_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5144,14 +5192,24 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in } _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_group_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name)); - if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name)); + if (_ptr_group_name) { + NDR_PULL_ALLOC(ndr, *r->out.group_name); + } else { + *r->out.group_name = NULL; + } + if (*r->out.group_name) { + _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name)); + if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -5206,7 +5264,9 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "group_name", *r->out.group_name); ndr->depth++; - ndr_print_string(ndr, "group_name", *r->out.group_name); + if (*r->out.group_name) { + ndr_print_string(ndr, "group_name", *r->out.group_name); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -5248,14 +5308,13 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in if (r->out.group_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.group_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name)); + if (*r->out.group_name) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5270,6 +5329,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in TALLOC_CTX *_mem_save_service_returned_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_group_name_0; + TALLOC_CTX *_mem_save_group_name_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5337,14 +5397,24 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in } _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_group_name)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name)); - if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name)); + if (_ptr_group_name) { + NDR_PULL_ALLOC(ndr, *r->out.group_name); + } else { + *r->out.group_name = NULL; + } + if (*r->out.group_name) { + _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name)); + if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -5399,7 +5469,9 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "group_name", *r->out.group_name); ndr->depth++; - ndr_print_string(ndr, "group_name", *r->out.group_name); + if (*r->out.group_name) { + ndr_print_string(ndr, "group_name", *r->out.group_name); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c index c3a1f706cd..3f2f418618 100644 --- a/source3/librpc/gen_ndr/ndr_wkssvc.c +++ b/source3/librpc/gen_ndr/ndr_wkssvc.c @@ -7458,11 +7458,10 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWorkstationStatisticsGet(struct ndr if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7527,14 +7526,18 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrWorkstationStatisticsGet(struct ndr } _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_ref_ptr(ndr, &_ptr_info)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0); } - _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_wkssvc_NetrWorkstationStatistics(ndr, NDR_SCALARS, *r->out.info)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -7574,7 +7577,9 @@ _PUBLIC_ void ndr_print_wkssvc_NetrWorkstationStatisticsGet(struct ndr_print *nd ndr->depth++; ndr_print_ptr(ndr, "info", *r->out.info); ndr->depth++; - ndr_print_wkssvc_NetrWorkstationStatistics(ndr, "info", *r->out.info); + if (*r->out.info) { + ndr_print_wkssvc_NetrWorkstationStatistics(ndr, "info", *r->out.info); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -8388,27 +8393,25 @@ static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinInformation(struct ndr_push if (r->in.name_buffer == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->in.name_buffer == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.name_buffer)); + if (*r->in.name_buffer) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.name_buffer, ndr_charset_length(*r->in.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.name_buffer, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.name_buffer, ndr_charset_length(*r->in.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } if (flags & NDR_OUT) { if (r->out.name_buffer == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.name_buffer == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.name_buffer)); + if (*r->out.name_buffer) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name_buffer, ndr_charset_length(*r->out.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16))); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.name_buffer, CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.name_buffer, ndr_charset_length(*r->out.name_buffer, CH_UTF16), sizeof(uint16_t), CH_UTF16)); if (r->out.name_type == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8424,6 +8427,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinInformation(struct ndr_pull uint32_t _ptr_name_buffer; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_name_buffer_0; + TALLOC_CTX *_mem_save_name_buffer_1; TALLOC_CTX *_mem_save_name_type_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8451,14 +8455,24 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinInformation(struct ndr_pull } _mem_save_name_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.name_buffer, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_name_buffer)); - NDR_CHECK(ndr_pull_array_size(ndr, r->in.name_buffer)); - NDR_CHECK(ndr_pull_array_length(ndr, r->in.name_buffer)); - if (ndr_get_array_length(ndr, r->in.name_buffer) > ndr_get_array_size(ndr, r->in.name_buffer)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.name_buffer), ndr_get_array_length(ndr, r->in.name_buffer)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.name_buffer), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.name_buffer, ndr_get_array_length(ndr, r->in.name_buffer), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_buffer)); + if (_ptr_name_buffer) { + NDR_PULL_ALLOC(ndr, *r->in.name_buffer); + } else { + *r->in.name_buffer = NULL; + } + if (*r->in.name_buffer) { + _mem_save_name_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.name_buffer, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->in.name_buffer)); + NDR_CHECK(ndr_pull_array_length(ndr, r->in.name_buffer)); + if (ndr_get_array_length(ndr, r->in.name_buffer) > ndr_get_array_size(ndr, r->in.name_buffer)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.name_buffer), ndr_get_array_length(ndr, r->in.name_buffer)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.name_buffer), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.name_buffer, ndr_get_array_length(ndr, r->in.name_buffer), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.name_buffer); *r->out.name_buffer = *r->in.name_buffer; @@ -8471,14 +8485,24 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinInformation(struct ndr_pull } _mem_save_name_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.name_buffer, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_name_buffer)); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.name_buffer)); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.name_buffer)); - if (ndr_get_array_length(ndr, r->out.name_buffer) > ndr_get_array_size(ndr, r->out.name_buffer)) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.name_buffer), ndr_get_array_length(ndr, r->out.name_buffer)); - } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name_buffer), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name_buffer, ndr_get_array_length(ndr, r->out.name_buffer), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_buffer)); + if (_ptr_name_buffer) { + NDR_PULL_ALLOC(ndr, *r->out.name_buffer); + } else { + *r->out.name_buffer = NULL; + } + if (*r->out.name_buffer) { + _mem_save_name_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.name_buffer, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.name_buffer)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.name_buffer)); + if (ndr_get_array_length(ndr, r->out.name_buffer) > ndr_get_array_size(ndr, r->out.name_buffer)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.name_buffer), ndr_get_array_length(ndr, r->out.name_buffer)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.name_buffer), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.name_buffer, ndr_get_array_length(ndr, r->out.name_buffer), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_buffer_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.name_type); @@ -8512,7 +8536,9 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "name_buffer", *r->in.name_buffer); ndr->depth++; - ndr_print_string(ndr, "name_buffer", *r->in.name_buffer); + if (*r->in.name_buffer) { + ndr_print_string(ndr, "name_buffer", *r->in.name_buffer); + } ndr->depth--; ndr->depth--; ndr->depth--; @@ -8524,7 +8550,9 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, con ndr->depth++; ndr_print_ptr(ndr, "name_buffer", *r->out.name_buffer); ndr->depth++; - ndr_print_string(ndr, "name_buffer", *r->out.name_buffer); + if (*r->out.name_buffer) { + ndr_print_string(ndr, "name_buffer", *r->out.name_buffer); + } ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "name_type", r->out.name_type); @@ -8584,10 +8612,18 @@ static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus(struct ndr_push *ndr } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1] == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ous[cntr_ous_1])); + } + for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { + if (r->out.ous[cntr_ous_1]) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous[cntr_ous_1])); + if (*r->out.ous[cntr_ous_1]) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.ous[cntr_ous_1], ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } - NDR_CHECK(ndr_push_ref_ptr(ndr)); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -8607,6 +8643,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr TALLOC_CTX *_mem_save_num_ous_0; TALLOC_CTX *_mem_save_ous_1; TALLOC_CTX *_mem_save_ous_2; + TALLOC_CTX *_mem_save_ous_3; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8698,9 +8735,36 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, 0); for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ous)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { NDR_PULL_ALLOC(ndr, r->out.ous[cntr_ous_1]); + } else { + r->out.ous[cntr_ous_1] = NULL; + } + } + for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { + if (r->out.ous[cntr_ous_1]) { + _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ous[cntr_ous_1], 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { + NDR_PULL_ALLOC(ndr, *r->out.ous[cntr_ous_1]); + } else { + *r->out.ous[cntr_ous_1] = NULL; + } + if (*r->out.ous[cntr_ous_1]) { + _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous[cntr_ous_1], 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous[cntr_ous_1])); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.ous[cntr_ous_1])); + if (ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]) > ndr_get_array_size(ndr, r->out.ous[cntr_ous_1])) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.ous[cntr_ous_1]), ndr_get_array_length(ndr, r->out.ous[cntr_ous_1])); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.ous[cntr_ous_1], ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); } } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); @@ -8768,10 +8832,14 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const c if (idx_1) { ndr_print_ptr(ndr, "ous", r->out.ous[cntr_ous_1]); ndr->depth++; - ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); - ndr->depth++; - ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); - ndr->depth--; + if (r->out.ous[cntr_ous_1]) { + ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); + ndr->depth++; + if (*r->out.ous[cntr_ous_1]) { + ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); + } + ndr->depth--; + } ndr->depth--; free(idx_1); } @@ -9466,10 +9534,18 @@ static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus2(struct ndr_push *nd } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1] == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ous[cntr_ous_1])); + } + for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { + if (r->out.ous[cntr_ous_1]) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous[cntr_ous_1])); + if (*r->out.ous[cntr_ous_1]) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.ous[cntr_ous_1], ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } } - NDR_CHECK(ndr_push_ref_ptr(ndr)); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -9489,6 +9565,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd TALLOC_CTX *_mem_save_num_ous_0; TALLOC_CTX *_mem_save_ous_1; TALLOC_CTX *_mem_save_ous_2; + TALLOC_CTX *_mem_save_ous_3; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9574,9 +9651,36 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, 0); for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ous)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { NDR_PULL_ALLOC(ndr, r->out.ous[cntr_ous_1]); + } else { + r->out.ous[cntr_ous_1] = NULL; + } + } + for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { + if (r->out.ous[cntr_ous_1]) { + _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ous[cntr_ous_1], 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { + NDR_PULL_ALLOC(ndr, *r->out.ous[cntr_ous_1]); + } else { + *r->out.ous[cntr_ous_1] = NULL; + } + if (*r->out.ous[cntr_ous_1]) { + _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous[cntr_ous_1], 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous[cntr_ous_1])); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.ous[cntr_ous_1])); + if (ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]) > ndr_get_array_size(ndr, r->out.ous[cntr_ous_1])) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.ous[cntr_ous_1]), ndr_get_array_length(ndr, r->out.ous[cntr_ous_1])); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.ous[cntr_ous_1], ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); } } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); @@ -9644,10 +9748,14 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const if (idx_1) { ndr_print_ptr(ndr, "ous", r->out.ous[cntr_ous_1]); ndr->depth++; - ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); - ndr->depth++; - ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); - ndr->depth--; + if (r->out.ous[cntr_ous_1]) { + ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); + ndr->depth++; + if (*r->out.ous[cntr_ous_1]) { + ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); + } + ndr->depth--; + } ndr->depth--; free(idx_1); } @@ -10178,11 +10286,10 @@ static enum ndr_err_code ndr_push_wkssvc_NetrEnumerateComputerNames(struct ndr_p if (r->out.ctr == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - if (*r->out.ctr == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ctr)); + if (*r->out.ctr) { + NDR_CHECK(ndr_push_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); } - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10227,14 +10334,18 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrEnumerateComputerNames(struct ndr_p } _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_ctr)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr)); + if (_ptr_ctr) { NDR_PULL_ALLOC(ndr, *r->out.ctr); + } else { + *r->out.ctr = NULL; + } + if (*r->out.ctr) { + _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, 0); + NDR_CHECK(ndr_pull_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, 0); } - _mem_save_ctr_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.ctr, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_wkssvc_ComputerNamesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ctr)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_1, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -10268,7 +10379,9 @@ _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, ndr->depth++; ndr_print_ptr(ndr, "ctr", *r->out.ctr); ndr->depth++; - ndr_print_wkssvc_ComputerNamesCtr(ndr, "ctr", *r->out.ctr); + if (*r->out.ctr) { + ndr_print_wkssvc_ComputerNamesCtr(ndr, "ctr", *r->out.ctr); + } ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); -- cgit From 6738467eabe18296bde0b9d709af2e821973756f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 09:49:59 +0100 Subject: Re-run make idl after fixes for wkssvc_NetrGetJoinableOus{2}. Guenther (This used to be commit 3984581564a44d631b9385c9e7be9751baf641d5) --- source3/librpc/gen_ndr/cli_wkssvc.c | 4 +- source3/librpc/gen_ndr/ndr_wkssvc.c | 250 +++++++++++++++++++----------------- source3/librpc/gen_ndr/srv_wkssvc.c | 4 +- source3/librpc/gen_ndr/wkssvc.h | 4 +- 4 files changed, 136 insertions(+), 126 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_wkssvc.c b/source3/librpc/gen_ndr/cli_wkssvc.c index 581a498146..adaa3dd7bd 100644 --- a/source3/librpc/gen_ndr/cli_wkssvc.c +++ b/source3/librpc/gen_ndr/cli_wkssvc.c @@ -1120,7 +1120,7 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, /* Return variables */ *num_ous = *r.out.num_ous; - memcpy(ous, r.out.ous, *r.in.num_ous); + *ous = *r.out.ous; /* Return result */ if (werror) { @@ -1383,7 +1383,7 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, /* Return variables */ *num_ous = *r.out.num_ous; - memcpy(ous, r.out.ous, *r.in.num_ous); + *ous = *r.out.ous; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c index 3f2f418618..e96a980705 100644 --- a/source3/librpc/gen_ndr/ndr_wkssvc.c +++ b/source3/librpc/gen_ndr/ndr_wkssvc.c @@ -8567,7 +8567,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinInformation(struct ndr_print *ndr, con static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus(struct ndr_push *ndr, int flags, const struct wkssvc_NetrGetJoinableOus *r) { - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); if (r->in.server_name) { @@ -8610,18 +8610,18 @@ static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus(struct ndr_push *ndr if (r->out.ous == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ous[cntr_ous_1])); - } - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1]) { - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous[cntr_ous_1])); - if (*r->out.ous[cntr_ous_1]) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous)); + if (*r->out.ous) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.ous)[cntr_ous_2])); + } + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + if ((*r->out.ous)[cntr_ous_2]) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.ous[cntr_ous_1], ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.ous)[cntr_ous_2], ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } } @@ -8636,11 +8636,12 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr uint32_t _ptr_Account; uint32_t _ptr_unknown; uint32_t _ptr_ous; - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_Account_0; TALLOC_CTX *_mem_save_unknown_0; TALLOC_CTX *_mem_save_num_ous_0; + TALLOC_CTX *_mem_save_ous_0; TALLOC_CTX *_mem_save_ous_1; TALLOC_CTX *_mem_save_ous_2; TALLOC_CTX *_mem_save_ous_3; @@ -8717,8 +8718,8 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.num_ous); *r->out.num_ous = *r->in.num_ous; - NDR_PULL_ALLOC_N(ndr, r->out.ous, *r->in.num_ous); - memset(r->out.ous, 0, *r->in.num_ous * sizeof(*r->out.ous)); + NDR_PULL_ALLOC(ndr, r->out.ous); + ZERO_STRUCTP(r->out.ous); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -8728,49 +8729,53 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ous, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ous)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_array_size(ndr, &r->out.ous)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC_N(ndr, r->out.ous, ndr_get_array_size(ndr, &r->out.ous)); - } - _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, 0); - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); - if (_ptr_ous) { - NDR_PULL_ALLOC(ndr, r->out.ous[cntr_ous_1]); - } else { - r->out.ous[cntr_ous_1] = NULL; - } - } - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1]) { - _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ous[cntr_ous_1], 0); + NDR_PULL_ALLOC(ndr, r->out.ous); + } + _mem_save_ous_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { + NDR_PULL_ALLOC(ndr, *r->out.ous); + } else { + *r->out.ous = NULL; + } + if (*r->out.ous) { + _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous)); + NDR_PULL_ALLOC_N(ndr, *r->out.ous, ndr_get_array_size(ndr, r->out.ous)); + _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0); + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); if (_ptr_ous) { - NDR_PULL_ALLOC(ndr, *r->out.ous[cntr_ous_1]); + NDR_PULL_ALLOC(ndr, (*r->out.ous)[cntr_ous_2]); } else { - *r->out.ous[cntr_ous_1] = NULL; + (*r->out.ous)[cntr_ous_2] = NULL; } - if (*r->out.ous[cntr_ous_1]) { + } + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + if ((*r->out.ous)[cntr_ous_2]) { _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous[cntr_ous_1], 0); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous[cntr_ous_1])); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.ous[cntr_ous_1])); - if (ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]) > ndr_get_array_size(ndr, r->out.ous[cntr_ous_1])) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.ous[cntr_ous_1]), ndr_get_array_length(ndr, r->out.ous[cntr_ous_1])); + NDR_PULL_SET_MEM_CTX(ndr, (*r->out.ous)[cntr_ous_2], 0); + NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.ous)[cntr_ous_2])); + NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.ous)[cntr_ous_2])); + if (ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]) > ndr_get_array_size(ndr, &(*r->out.ous)[cntr_ous_2])) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &(*r->out.ous)[cntr_ous_2]), ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2])); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.ous[cntr_ous_1], ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.ous)[cntr_ous_2], ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); - if (r->out.ous) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.ous, *r->out.num_ous)); + if (*r->out.ous) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ous, *r->out.num_ous)); } } return NDR_ERR_SUCCESS; @@ -8778,7 +8783,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus(struct ndr_pull *ndr _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus *r) { - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; ndr_print_struct(ndr, name, "wkssvc_NetrGetJoinableOus"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -8824,25 +8829,25 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const c ndr->depth--; ndr_print_ptr(ndr, "ous", r->out.ous); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "ous", *r->out.num_ous); + ndr_print_ptr(ndr, "ous", *r->out.ous); ndr->depth++; - for (cntr_ous_1=0;cntr_ous_1<*r->out.num_ous;cntr_ous_1++) { - char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_ous_1); - if (idx_1) { - ndr_print_ptr(ndr, "ous", r->out.ous[cntr_ous_1]); - ndr->depth++; - if (r->out.ous[cntr_ous_1]) { - ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); + if (*r->out.ous) { + ndr->print(ndr, "%s: ARRAY(%d)", "ous", *r->out.num_ous); + ndr->depth++; + for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) { + char *idx_2=NULL; + asprintf(&idx_2, "[%d]", cntr_ous_2); + if (idx_2) { + ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]); ndr->depth++; - if (*r->out.ous[cntr_ous_1]) { - ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); + if ((*r->out.ous)[cntr_ous_2]) { + ndr_print_string(ndr, "ous", (*r->out.ous)[cntr_ous_2]); } ndr->depth--; + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -9492,7 +9497,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrValidateName2(struct ndr_print *ndr, const ch static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus2(struct ndr_push *ndr, int flags, const struct wkssvc_NetrGetJoinableOus2 *r) { - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name)); if (r->in.server_name) { @@ -9532,18 +9537,18 @@ static enum ndr_err_code ndr_push_wkssvc_NetrGetJoinableOus2(struct ndr_push *nd if (r->out.ous == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.ous[cntr_ous_1])); - } - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1]) { - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous[cntr_ous_1])); - if (*r->out.ous[cntr_ous_1]) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ous)); + if (*r->out.ous) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ous)); + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.ous)[cntr_ous_2])); + } + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + if ((*r->out.ous)[cntr_ous_2]) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16))); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.ous[cntr_ous_1], ndr_charset_length(*r->out.ous[cntr_ous_1], CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.ous)[cntr_ous_2], ndr_charset_length((*r->out.ous)[cntr_ous_2], CH_UTF16), sizeof(uint16_t), CH_UTF16)); } } } @@ -9558,11 +9563,12 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd uint32_t _ptr_Account; uint32_t _ptr_EncryptedPassword; uint32_t _ptr_ous; - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_Account_0; TALLOC_CTX *_mem_save_EncryptedPassword_0; TALLOC_CTX *_mem_save_num_ous_0; + TALLOC_CTX *_mem_save_ous_0; TALLOC_CTX *_mem_save_ous_1; TALLOC_CTX *_mem_save_ous_2; TALLOC_CTX *_mem_save_ous_3; @@ -9633,8 +9639,8 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.num_ous); *r->out.num_ous = *r->in.num_ous; - NDR_PULL_ALLOC_N(ndr, r->out.ous, *r->in.num_ous); - memset(r->out.ous, 0, *r->in.num_ous * sizeof(*r->out.ous)); + NDR_PULL_ALLOC(ndr, r->out.ous); + ZERO_STRUCTP(r->out.ous); } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -9644,49 +9650,53 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ous, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ous)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ous_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_array_size(ndr, &r->out.ous)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC_N(ndr, r->out.ous, ndr_get_array_size(ndr, &r->out.ous)); - } - _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, 0); - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); - if (_ptr_ous) { - NDR_PULL_ALLOC(ndr, r->out.ous[cntr_ous_1]); - } else { - r->out.ous[cntr_ous_1] = NULL; - } - } - for (cntr_ous_1 = 0; cntr_ous_1 < *r->out.num_ous; cntr_ous_1++) { - if (r->out.ous[cntr_ous_1]) { - _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.ous[cntr_ous_1], 0); + NDR_PULL_ALLOC(ndr, r->out.ous); + } + _mem_save_ous_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.ous, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); + if (_ptr_ous) { + NDR_PULL_ALLOC(ndr, *r->out.ous); + } else { + *r->out.ous = NULL; + } + if (*r->out.ous) { + _mem_save_ous_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous)); + NDR_PULL_ALLOC_N(ndr, *r->out.ous, ndr_get_array_size(ndr, r->out.ous)); + _mem_save_ous_2 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous, 0); + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ous)); if (_ptr_ous) { - NDR_PULL_ALLOC(ndr, *r->out.ous[cntr_ous_1]); + NDR_PULL_ALLOC(ndr, (*r->out.ous)[cntr_ous_2]); } else { - *r->out.ous[cntr_ous_1] = NULL; + (*r->out.ous)[cntr_ous_2] = NULL; } - if (*r->out.ous[cntr_ous_1]) { + } + for (cntr_ous_2 = 0; cntr_ous_2 < *r->out.num_ous; cntr_ous_2++) { + if ((*r->out.ous)[cntr_ous_2]) { _mem_save_ous_3 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.ous[cntr_ous_1], 0); - NDR_CHECK(ndr_pull_array_size(ndr, r->out.ous[cntr_ous_1])); - NDR_CHECK(ndr_pull_array_length(ndr, r->out.ous[cntr_ous_1])); - if (ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]) > ndr_get_array_size(ndr, r->out.ous[cntr_ous_1])) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.ous[cntr_ous_1]), ndr_get_array_length(ndr, r->out.ous[cntr_ous_1])); + NDR_PULL_SET_MEM_CTX(ndr, (*r->out.ous)[cntr_ous_2], 0); + NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.ous)[cntr_ous_2])); + NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.ous)[cntr_ous_2])); + if (ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]) > ndr_get_array_size(ndr, &(*r->out.ous)[cntr_ous_2])) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &(*r->out.ous)[cntr_ous_2]), ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2])); } - NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t))); - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.ous[cntr_ous_1], ndr_get_array_length(ndr, r->out.ous[cntr_ous_1]), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.ous)[cntr_ous_2], ndr_get_array_length(ndr, &(*r->out.ous)[cntr_ous_2]), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_3, 0); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_2, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ous_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); - if (r->out.ous) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.ous, *r->out.num_ous)); + if (*r->out.ous) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ous, *r->out.num_ous)); } } return NDR_ERR_SUCCESS; @@ -9694,7 +9704,7 @@ static enum ndr_err_code ndr_pull_wkssvc_NetrGetJoinableOus2(struct ndr_pull *nd _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrGetJoinableOus2 *r) { - uint32_t cntr_ous_1; + uint32_t cntr_ous_2; ndr_print_struct(ndr, name, "wkssvc_NetrGetJoinableOus2"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -9740,25 +9750,25 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const ndr->depth--; ndr_print_ptr(ndr, "ous", r->out.ous); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "ous", *r->out.num_ous); + ndr_print_ptr(ndr, "ous", *r->out.ous); ndr->depth++; - for (cntr_ous_1=0;cntr_ous_1<*r->out.num_ous;cntr_ous_1++) { - char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_ous_1); - if (idx_1) { - ndr_print_ptr(ndr, "ous", r->out.ous[cntr_ous_1]); - ndr->depth++; - if (r->out.ous[cntr_ous_1]) { - ndr_print_ptr(ndr, "ous", *r->out.ous[cntr_ous_1]); + if (*r->out.ous) { + ndr->print(ndr, "%s: ARRAY(%d)", "ous", *r->out.num_ous); + ndr->depth++; + for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) { + char *idx_2=NULL; + asprintf(&idx_2, "[%d]", cntr_ous_2); + if (idx_2) { + ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]); ndr->depth++; - if (*r->out.ous[cntr_ous_1]) { - ndr_print_string(ndr, "ous", *r->out.ous[cntr_ous_1]); + if ((*r->out.ous)[cntr_ous_2]) { + ndr_print_string(ndr, "ous", (*r->out.ous)[cntr_ous_2]); } ndr->depth--; + free(idx_2); } - ndr->depth--; - free(idx_1); } + ndr->depth--; } ndr->depth--; ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c index ddbf3aa373..da2279001d 100644 --- a/source3/librpc/gen_ndr/srv_wkssvc.c +++ b/source3/librpc/gen_ndr/srv_wkssvc.c @@ -1650,7 +1650,7 @@ static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p) ZERO_STRUCT(r->out); r->out.num_ous = r->in.num_ous; - r->out.ous = talloc_zero_array(r, const char **, *r->out.num_ous); + r->out.ous = talloc_zero(r, const char **); if (r->out.ous == NULL) { talloc_free(r); return false; @@ -2023,7 +2023,7 @@ static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p) ZERO_STRUCT(r->out); r->out.num_ous = r->in.num_ous; - r->out.ous = talloc_zero_array(r, const char **, *r->out.num_ous); + r->out.ous = talloc_zero(r, const char **); if (r->out.ous == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/wkssvc.h b/source3/librpc/gen_ndr/wkssvc.h index cdbf851671..088ad6632b 100644 --- a/source3/librpc/gen_ndr/wkssvc.h +++ b/source3/librpc/gen_ndr/wkssvc.h @@ -826,7 +826,7 @@ struct wkssvc_NetrGetJoinableOus { } in; struct { - const char ***ous;/* [ref,charset(UTF16),size_is(*num_ous)] */ + const char ***ous;/* [ref,charset(UTF16),size_is(,*num_ous)] */ uint32_t *num_ous;/* [ref] */ WERROR result; } out; @@ -908,7 +908,7 @@ struct wkssvc_NetrGetJoinableOus2 { } in; struct { - const char ***ous;/* [ref,charset(UTF16),size_is(*num_ous)] */ + const char ***ous;/* [ref,charset(UTF16),size_is(,*num_ous)] */ uint32_t *num_ous;/* [ref] */ WERROR result; } out; -- cgit From 8a62c149057627be8f98f1cc99e1877df55c0741 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 10:02:17 +0100 Subject: Re-run make idl. Guenther (This used to be commit 03101f253f140c9bb26eab3c940504f128278495) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 33 +++++++++++++++++++++++++++------ source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 31 insertions(+), 10 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index a0441fcd84..339f02b293 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -1250,7 +1250,7 @@ NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle, enum samr_AliasInfoEnum level, - union samr_AliasInfo *info) + union samr_AliasInfo **info) { struct samr_QueryAliasInfo r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 52e6b13c7a..9a895789f0 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -159,7 +159,7 @@ NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle, enum samr_AliasInfoEnum level, - union samr_AliasInfo *info); + union samr_AliasInfo **info); NTSTATUS rpccli_samr_SetAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index a7d9a9d610..a5315153e8 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -7944,8 +7944,11 @@ static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7953,8 +7956,10 @@ static enum ndr_err_code ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int flags, struct samr_QueryAliasInfo *r) { + uint32_t _ptr_info; TALLOC_CTX *_mem_save_alias_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7975,8 +7980,19 @@ static enum ndr_err_code ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, int } _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_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_samr_AliasInfo(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)); } @@ -8005,8 +8021,13 @@ _PUBLIC_ void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_samr_AliasInfo(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_samr_AliasInfo(ndr, "info", *r->out.info); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index d0e758d72f..64e1733705 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1159,7 +1159,7 @@ struct samr_QueryAliasInfo { } in; struct { - union samr_AliasInfo *info;/* [ref,switch_is(level)] */ + union samr_AliasInfo **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 38cc59978c..0d7b47cf33 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -2284,7 +2284,7 @@ static bool api_samr_QueryAliasInfo(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union samr_AliasInfo); + r->out.info = talloc_zero(r, union samr_AliasInfo *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From 8fabdec776090b2bcf6a89ee852aecc367072408 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 10:06:44 +0100 Subject: Re-run make idl. Guenther (This used to be commit 297ad1fe5d10ab67fae51f88df8f74d44db28b0a) --- source3/librpc/gen_ndr/cli_samr.c | 4 +-- source3/librpc/gen_ndr/cli_samr.h | 4 +-- source3/librpc/gen_ndr/ndr_samr.c | 54 ++++++++++++++++++++++++++++++++++----- source3/librpc/gen_ndr/samr.h | 4 +-- source3/librpc/gen_ndr/srv_samr.c | 4 +-- 5 files changed, 56 insertions(+), 14 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 339f02b293..4bd4e5c146 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -2803,8 +2803,8 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, struct samr_CryptPassword *lm_password, struct samr_Password *lm_verifier, struct samr_CryptPassword *password3, - struct samr_DomInfo1 *dominfo, - struct samr_ChangeReject *reject) + struct samr_DomInfo1 **dominfo, + struct samr_ChangeReject **reject) { struct samr_ChangePasswordUser3 r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 9a895789f0..0855adeba1 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -360,8 +360,8 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, struct samr_CryptPassword *lm_password, struct samr_Password *lm_verifier, struct samr_CryptPassword *password3, - struct samr_DomInfo1 *dominfo, - struct samr_ChangeReject *reject); + struct samr_DomInfo1 **dominfo, + struct samr_ChangeReject **reject); NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index a5315153e8..a7c0f4deaa 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -11256,11 +11256,17 @@ static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, if (r->out.dominfo == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, r->out.dominfo)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.dominfo)); + if (*r->out.dominfo) { + NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo)); + } if (r->out.reject == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, r->out.reject)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject)); + if (*r->out.reject) { + NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11274,6 +11280,8 @@ static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, uint32_t _ptr_lm_password; uint32_t _ptr_lm_verifier; uint32_t _ptr_password3; + uint32_t _ptr_dominfo; + uint32_t _ptr_reject; TALLOC_CTX *_mem_save_server_0; TALLOC_CTX *_mem_save_account_0; TALLOC_CTX *_mem_save_nt_password_0; @@ -11282,7 +11290,9 @@ static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, TALLOC_CTX *_mem_save_lm_verifier_0; TALLOC_CTX *_mem_save_password3_0; TALLOC_CTX *_mem_save_dominfo_0; + TALLOC_CTX *_mem_save_dominfo_1; TALLOC_CTX *_mem_save_reject_0; + TALLOC_CTX *_mem_save_reject_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -11377,14 +11387,36 @@ static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, } _mem_save_dominfo_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.dominfo, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, r->out.dominfo)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dominfo)); + if (_ptr_dominfo) { + NDR_PULL_ALLOC(ndr, *r->out.dominfo); + } else { + *r->out.dominfo = NULL; + } + if (*r->out.dominfo) { + _mem_save_dominfo_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.dominfo, 0); + NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, *r->out.dominfo)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dominfo_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.reject); } _mem_save_reject_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.reject, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, r->out.reject)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reject)); + if (_ptr_reject) { + NDR_PULL_ALLOC(ndr, *r->out.reject); + } else { + *r->out.reject = NULL; + } + if (*r->out.reject) { + _mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0); + NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -11449,11 +11481,21 @@ _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const ch ndr->depth++; ndr_print_ptr(ndr, "dominfo", r->out.dominfo); ndr->depth++; - ndr_print_samr_DomInfo1(ndr, "dominfo", r->out.dominfo); + ndr_print_ptr(ndr, "dominfo", *r->out.dominfo); + ndr->depth++; + if (*r->out.dominfo) { + ndr_print_samr_DomInfo1(ndr, "dominfo", *r->out.dominfo); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "reject", r->out.reject); ndr->depth++; - ndr_print_samr_ChangeReject(ndr, "reject", r->out.reject); + ndr_print_ptr(ndr, "reject", *r->out.reject); + ndr->depth++; + if (*r->out.reject) { + ndr_print_samr_ChangeReject(ndr, "reject", *r->out.reject); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 64e1733705..0108396a22 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1677,8 +1677,8 @@ struct samr_ChangePasswordUser3 { } in; struct { - struct samr_DomInfo1 *dominfo;/* [ref] */ - struct samr_ChangeReject *reject;/* [ref] */ + struct samr_DomInfo1 **dominfo;/* [ref] */ + struct samr_ChangeReject **reject;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 0d7b47cf33..470c45ca00 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -5024,13 +5024,13 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.dominfo = talloc_zero(r, struct samr_DomInfo1); + r->out.dominfo = talloc_zero(r, struct samr_DomInfo1 *); if (r->out.dominfo == NULL) { talloc_free(r); return false; } - r->out.reject = talloc_zero(r, struct samr_ChangeReject); + r->out.reject = talloc_zero(r, struct samr_ChangeReject *); if (r->out.reject == NULL) { talloc_free(r); return false; -- cgit From 6c457ac59f1e07ac6f2c8deaef22f858f86d1497 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 13:43:48 +0100 Subject: Re-run make idl. Guenther (This used to be commit 07faaadd5ff2a94fc0db15f68836ffbdb2763461) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 33 +++++++++++++++++++++++++++------ source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 31 insertions(+), 10 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 4bd4e5c146..4c9709da21 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -911,7 +911,7 @@ NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, enum samr_GroupInfoEnum level, - union samr_GroupInfo *info) + union samr_GroupInfo **info) { struct samr_QueryGroupInfo r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 0855adeba1..27b2c5cb21 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -122,7 +122,7 @@ NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, enum samr_GroupInfoEnum level, - union samr_GroupInfo *info); + union samr_GroupInfo **info); NTSTATUS rpccli_samr_SetGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index a7c0f4deaa..733391050b 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -7339,8 +7339,11 @@ static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7348,8 +7351,10 @@ static enum ndr_err_code ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int flags, struct samr_QueryGroupInfo *r) { + uint32_t _ptr_info; TALLOC_CTX *_mem_save_group_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7370,8 +7375,19 @@ static enum ndr_err_code ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, int } _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_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_samr_GroupInfo(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)); } @@ -7400,8 +7416,13 @@ _PUBLIC_ void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_samr_GroupInfo(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_samr_GroupInfo(ndr, "info", *r->out.info); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 0108396a22..085604dd71 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1049,7 +1049,7 @@ struct samr_QueryGroupInfo { } in; struct { - union samr_GroupInfo *info;/* [ref,switch_is(level)] */ + union samr_GroupInfo **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 470c45ca00..57fc0e2e8a 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -1677,7 +1677,7 @@ static bool api_samr_QueryGroupInfo(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union samr_GroupInfo); + r->out.info = talloc_zero(r, union samr_GroupInfo *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From 2f6e8a75e3027cabe02791b1266a0229a2243095 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 7 Feb 2008 14:24:21 +0100 Subject: Re-run make idl. Guenther (This used to be commit cfaf47883d7135d66d5d40c7d474b8dbf60eb64d) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 4c9709da21..b98c89c4a8 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -1728,7 +1728,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, - struct samr_RidWithAttributeArray *rids) + struct samr_RidWithAttributeArray **rids) { struct samr_GetGroupsForUser r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 27b2c5cb21..3e2029ec35 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -215,7 +215,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, - struct samr_RidWithAttributeArray *rids); + struct samr_RidWithAttributeArray **rids); NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 733391050b..5848e3b800 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -8980,7 +8980,10 @@ static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, in if (r->out.rids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.rids)); + if (*r->out.rids) { + NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -8988,8 +8991,10 @@ static enum ndr_err_code ndr_push_samr_GetGroupsForUser(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, int flags, struct samr_GetGroupsForUser *r) { + uint32_t _ptr_rids; TALLOC_CTX *_mem_save_user_handle_0; TALLOC_CTX *_mem_save_rids_0; + TALLOC_CTX *_mem_save_rids_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9009,7 +9014,18 @@ static enum ndr_err_code ndr_pull_samr_GetGroupsForUser(struct ndr_pull *ndr, in } _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.rids, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids)); + if (_ptr_rids) { + NDR_PULL_ALLOC(ndr, *r->out.rids); + } else { + *r->out.rids = NULL; + } + if (*r->out.rids) { + _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.rids, 0); + NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.rids)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -9037,7 +9053,12 @@ _PUBLIC_ void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char ndr->depth++; ndr_print_ptr(ndr, "rids", r->out.rids); ndr->depth++; - ndr_print_samr_RidWithAttributeArray(ndr, "rids", r->out.rids); + ndr_print_ptr(ndr, "rids", *r->out.rids); + ndr->depth++; + if (*r->out.rids) { + ndr_print_samr_RidWithAttributeArray(ndr, "rids", *r->out.rids); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 085604dd71..d02b577612 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1316,7 +1316,7 @@ struct samr_GetGroupsForUser { } in; struct { - struct samr_RidWithAttributeArray *rids;/* [ref] */ + struct samr_RidWithAttributeArray **rids;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 57fc0e2e8a..24b1abb222 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -3119,7 +3119,7 @@ static bool api_samr_GetGroupsForUser(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.rids = talloc_zero(r, struct samr_RidWithAttributeArray); + r->out.rids = talloc_zero(r, struct samr_RidWithAttributeArray *); if (r->out.rids == NULL) { talloc_free(r); return false; -- cgit From 61fec2ccff64fd31a345ace75f10bac9e9f28084 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 09:43:21 +0100 Subject: Re-run make idl. Guenther (This used to be commit a415a2a3f081b1d83c2af9d6cd44edbce1d2cb6d) --- source3/librpc/gen_ndr/cli_samr.c | 6 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 186 ++++++++++++++++++++++++++------------ source3/librpc/gen_ndr/ndr_samr.h | 7 +- source3/librpc/gen_ndr/samr.h | 18 +++- source3/librpc/gen_ndr/srv_samr.c | 2 +- 6 files changed, 150 insertions(+), 71 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index b98c89c4a8..c3cb5ad273 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -584,7 +584,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, uint32_t *resume_handle, uint32_t acct_flags, uint32_t max_size, - struct samr_SamArray *sam, + struct samr_SamArray **sam, uint32_t *num_entries) { struct samr_EnumDomainUsers r; @@ -621,9 +621,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, /* Return variables */ *resume_handle = *r.out.resume_handle; - if (sam && r.out.sam) { - *sam = *r.out.sam; - } + *sam = *r.out.sam; *num_entries = *r.out.num_entries; /* Return result */ diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 3e2029ec35..5df5e3a70c 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -77,7 +77,7 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, uint32_t *resume_handle, uint32_t acct_flags, uint32_t max_size, - struct samr_SamArray *sam, + struct samr_SamArray **sam, uint32_t *num_entries); NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 5848e3b800..f257c17864 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -2529,6 +2529,90 @@ _PUBLIC_ void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r) +{ + ndr_print_struct(ndr, name, "samr_Password"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_array_uint8(ndr, "hash", r->hash, 16); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_samr_UserInfo18(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo18 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 1)); + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd)); + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_pwd_active)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_pwd_active)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_samr_UserInfo18(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo18 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lm_pwd)); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->nt_pwd)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_pwd_active)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_pwd_active)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r) +{ + ndr_print_struct(ndr, name, "samr_UserInfo18"); + ndr->depth++; + ndr_print_samr_Password(ndr, "lm_pwd", &r->lm_pwd); + ndr_print_samr_Password(ndr, "nt_pwd", &r->nt_pwd); + ndr_print_uint8(ndr, "lm_pwd_active", r->lm_pwd_active); + ndr_print_uint8(ndr, "nt_pwd_active", r->nt_pwd_active); + ndr->depth--; +} + static enum ndr_err_code ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo20 *r) { if (ndr_flags & NDR_SCALARS) { @@ -3092,6 +3176,10 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); break; + case 18: + NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18)); + break; + case 20: NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); break; @@ -3184,6 +3272,9 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl case 17: break; + case 18: + break; + case 20: NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); break; @@ -3288,6 +3379,10 @@ static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); break; } + case 18: { + NDR_CHECK(ndr_pull_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18)); + break; } + case 20: { NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); break; } @@ -3379,6 +3474,9 @@ static enum ndr_err_code ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_fl case 17: break; + case 18: + break; + case 20: NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); break; @@ -3478,6 +3576,10 @@ _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, c ndr_print_samr_UserInfo17(ndr, "info17", &r->info17); break; + case 18: + ndr_print_samr_UserInfo18(ndr, "info18", &r->info18); + break; + case 20: ndr_print_samr_UserInfo20(ndr, "info20", &r->info20); break; @@ -3507,51 +3609,6 @@ _PUBLIC_ void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, c } } -_PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r) -{ - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 1)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); - } - if (ndr_flags & NDR_BUFFERS) { - } - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r) -{ - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 1)); - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16)); - } - if (ndr_flags & NDR_BUFFERS) { - } - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r) -{ - ndr_print_struct(ndr, name, "samr_Password"); - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); - ndr->depth++; - ndr_print_array_uint8(ndr, "hash", r->hash, 16); - ndr->depth--; - ndr->flags = _flags_save_STRUCT; - } -} - _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r) { if (ndr_flags & NDR_SCALARS) { @@ -6498,9 +6555,12 @@ static enum ndr_err_code ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, int return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sam)); - if (r->out.sam) { - NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + if (r->out.sam == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam)); + if (*r->out.sam) { + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); } if (r->out.num_entries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -6517,6 +6577,7 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_sam_1; TALLOC_CTX *_mem_save_num_entries_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6539,6 +6600,8 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); NDR_PULL_ALLOC(ndr, r->out.resume_handle); *r->out.resume_handle = *r->in.resume_handle; + NDR_PULL_ALLOC(ndr, r->out.sam); + ZERO_STRUCTP(r->out.sam); NDR_PULL_ALLOC(ndr, r->out.num_entries); ZERO_STRUCTP(r->out.num_entries); } @@ -6550,18 +6613,24 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.sam); + } + _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam)); if (_ptr_sam) { - NDR_PULL_ALLOC(ndr, r->out.sam); + NDR_PULL_ALLOC(ndr, *r->out.sam); } else { - r->out.sam = NULL; + *r->out.sam = NULL; } - if (r->out.sam) { - _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, 0); - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, 0); + if (*r->out.sam) { + _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_entries); } @@ -6605,10 +6674,13 @@ _PUBLIC_ void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char * ndr->depth--; ndr_print_ptr(ndr, "sam", r->out.sam); ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr_print_ptr(ndr, "sam", *r->out.sam); + ndr->depth++; + if (*r->out.sam) { + ndr_print_samr_SamArray(ndr, "sam", *r->out.sam); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "num_entries", r->out.num_entries); ndr->depth++; ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h index f769cddddb..c21b5455fb 100644 --- a/source3/librpc/gen_ndr/ndr_samr.h +++ b/source3/librpc/gen_ndr/ndr_samr.h @@ -206,6 +206,10 @@ void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const st void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r); void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r); void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r); +enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r); +enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r); +void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r); +void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r); void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r); void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r); @@ -218,9 +222,6 @@ void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, con void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r); void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r); void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r); -enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r); -enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r); -void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r); enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r); enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r); void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r); diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index d02b577612..376feae5d1 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -400,6 +400,17 @@ struct samr_UserInfo17 { NTTIME acct_expiry; }; +struct samr_Password { + uint8_t hash[16]; +}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct samr_UserInfo18 { + struct samr_Password lm_pwd; + struct samr_Password nt_pwd; + uint8_t lm_pwd_active; + uint8_t nt_pwd_active; +}; + struct samr_UserInfo20 { struct lsa_String parameters; }; @@ -518,6 +529,7 @@ union samr_UserInfo { struct samr_UserInfo14 info14;/* [case(14)] */ struct samr_UserInfo16 info16;/* [case(16)] */ struct samr_UserInfo17 info17;/* [case(17)] */ + struct samr_UserInfo18 info18;/* [case(18)] */ struct samr_UserInfo20 info20;/* [case(20)] */ struct samr_UserInfo21 info21;/* [case(21)] */ struct samr_UserInfo23 info23;/* [case(23)] */ @@ -526,10 +538,6 @@ union samr_UserInfo { struct samr_UserInfo26 info26;/* [case(26)] */ }/* [switch_type(uint16)] */; -struct samr_Password { - uint8_t hash[16]; -}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; - struct samr_RidWithAttribute { uint32_t rid; uint32_t attributes; @@ -939,7 +947,7 @@ struct samr_EnumDomainUsers { } in; struct { - struct samr_SamArray *sam;/* [unique] */ + struct samr_SamArray **sam;/* [ref] */ uint32_t *num_entries;/* [ref] */ uint32_t *resume_handle;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 24b1abb222..374df34a96 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -1086,7 +1086,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p) ZERO_STRUCT(r->out); r->out.resume_handle = r->in.resume_handle; - r->out.sam = talloc_zero(r, struct samr_SamArray); + r->out.sam = talloc_zero(r, struct samr_SamArray *); if (r->out.sam == NULL) { talloc_free(r); return false; -- cgit From ed43977f08491515a325e613c8e765c2abe69352 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 09:46:57 +0100 Subject: Re-run make idl. Guenther (This used to be commit 0ee299f040f73fdbae4c1c89ab6de4904f1f0fac) --- source3/librpc/gen_ndr/cli_lsa.c | 12 ++---- source3/librpc/gen_ndr/cli_lsa.h | 4 +- source3/librpc/gen_ndr/lsa.h | 4 +- source3/librpc/gen_ndr/ndr_lsa.c | 90 ++++++++++++++++++++++++++-------------- source3/librpc/gen_ndr/srv_lsa.c | 4 +- 5 files changed, 70 insertions(+), 44 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 3599d9fe9c..5fc1592bb1 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -303,7 +303,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, enum lsa_PolicyInfo level, - union lsa_PolicyInformation *info) + union lsa_PolicyInformation **info) { struct lsa_QueryInfoPolicy r; NTSTATUS status; @@ -336,9 +336,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(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; @@ -2002,7 +2000,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, enum lsa_PolicyInfo level, - union lsa_PolicyInformation *info) + union lsa_PolicyInformation **info) { struct lsa_QueryInfoPolicy2 r; NTSTATUS status; @@ -2035,9 +2033,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(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/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 4997f5cb35..cce629c138 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -35,7 +35,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, enum lsa_PolicyInfo level, - union lsa_PolicyInformation *info); + union lsa_PolicyInformation **info); NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, @@ -220,7 +220,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, enum lsa_PolicyInfo level, - union lsa_PolicyInformation *info); + union lsa_PolicyInformation **info); NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 32e6739095..86d4339599 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -676,7 +676,7 @@ struct lsa_QueryInfoPolicy { } in; struct { - union lsa_PolicyInformation *info;/* [unique,switch_is(level)] */ + union lsa_PolicyInformation **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; @@ -1199,7 +1199,7 @@ struct lsa_QueryInfoPolicy2 { } in; struct { - union lsa_PolicyInformation *info;/* [unique,switch_is(level)] */ + union lsa_PolicyInformation **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index e934ca87c2..0b246a9b1e 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -5090,10 +5090,13 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int NDR_CHECK(ndr_push_lsa_PolicyInfo(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_PolicyInformation(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_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } @@ -5105,6 +5108,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int uint32_t _ptr_info; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5116,21 +5120,29 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_PolicyInfo(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_PolicyInformation(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_PolicyInformation(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; @@ -5158,11 +5170,14 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *n 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_PolicyInformation(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_PolicyInformation(ndr, "info", *r->out.info); } ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } @@ -8722,10 +8737,13 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int NDR_CHECK(ndr_push_lsa_PolicyInfo(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_PolicyInformation(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_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } @@ -8737,6 +8755,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int uint32_t _ptr_info; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8748,21 +8767,29 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_PolicyInfo(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_PolicyInformation(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_PolicyInformation(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; @@ -8790,11 +8817,14 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char * 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_PolicyInformation(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_PolicyInformation(ndr, "info", *r->out.info); } ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index aa870a6d59..b46e892b04 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -580,7 +580,7 @@ static bool api_lsa_QueryInfoPolicy(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union lsa_PolicyInformation); + r->out.info = talloc_zero(r, union lsa_PolicyInformation *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -3584,7 +3584,7 @@ static bool api_lsa_QueryInfoPolicy2(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union lsa_PolicyInformation); + r->out.info = talloc_zero(r, union lsa_PolicyInformation *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From f02cae95ad46dfc836b938424618b3b9e90baed5 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 22:38:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit ea64f45818b206e4027fea1c7dafdef779b7261c) --- source3/librpc/gen_ndr/cli_lsa.c | 2 +- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 2 +- source3/librpc/gen_ndr/ndr_lsa.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/srv_lsa.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 5fc1592bb1..227ae809c9 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -427,7 +427,7 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle *acct_handle) + struct policy_handle **acct_handle) { struct lsa_CreateAccount r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index cce629c138..ec9abaf568 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -48,7 +48,7 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle *acct_handle); + struct policy_handle **acct_handle); NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 86d4339599..810ce945da 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -713,7 +713,7 @@ struct lsa_CreateAccount { } in; struct { - struct policy_handle *acct_handle;/* [ref] */ + struct policy_handle **acct_handle;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 0b246a9b1e..8c863085a9 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -5321,7 +5321,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int if (r->out.acct_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.acct_handle)); + if (*r->out.acct_handle) { + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5329,9 +5332,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r) { + uint32_t _ptr_acct_handle; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sid_0; TALLOC_CTX *_mem_save_acct_handle_0; + TALLOC_CTX *_mem_save_acct_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5359,7 +5364,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int } _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_handle)); + if (_ptr_acct_handle) { + NDR_PULL_ALLOC(ndr, *r->out.acct_handle); + } else { + *r->out.acct_handle = NULL; + } + if (*r->out.acct_handle) { + _mem_save_acct_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.acct_handle, 0); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5392,7 +5408,12 @@ _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); + ndr_print_ptr(ndr, "acct_handle", *r->out.acct_handle); + ndr->depth++; + if (*r->out.acct_handle) { + ndr_print_policy_handle(ndr, "acct_handle", *r->out.acct_handle); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index b46e892b04..9d41be35a8 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -806,7 +806,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.acct_handle = talloc_zero(r, struct policy_handle); + r->out.acct_handle = talloc_zero(r, struct policy_handle *); if (r->out.acct_handle == NULL) { talloc_free(r); return false; -- cgit From 026dddcbcd630a0f919af0e79fab9f8cf5c81e6c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 22:44:04 +0100 Subject: Re-run make idl. Guenther (This used to be commit eaead9ea470c296ff0ace353104a0ef31f11311c) --- source3/librpc/gen_ndr/cli_lsa.c | 2 +- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 2 +- source3/librpc/gen_ndr/ndr_lsa.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/srv_lsa.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 227ae809c9..edc7549011 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -762,7 +762,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle *acct_handle) + struct policy_handle **acct_handle) { struct lsa_OpenAccount r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index ec9abaf568..233154530f 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -95,7 +95,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle *acct_handle); + struct policy_handle **acct_handle); NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 810ce945da..03ffdd08ab 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -829,7 +829,7 @@ struct lsa_OpenAccount { } in; struct { - struct policy_handle *acct_handle;/* [ref] */ + struct policy_handle **acct_handle;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 8c863085a9..4e23040151 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -6208,7 +6208,10 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag if (r->out.acct_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.acct_handle)); + if (*r->out.acct_handle) { + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6216,9 +6219,11 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r) { + uint32_t _ptr_acct_handle; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sid_0; TALLOC_CTX *_mem_save_acct_handle_0; + TALLOC_CTX *_mem_save_acct_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6246,7 +6251,18 @@ static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flag } _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_handle)); + if (_ptr_acct_handle) { + NDR_PULL_ALLOC(ndr, *r->out.acct_handle); + } else { + *r->out.acct_handle = NULL; + } + if (*r->out.acct_handle) { + _mem_save_acct_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.acct_handle, 0); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -6279,7 +6295,12 @@ _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); + ndr_print_ptr(ndr, "acct_handle", *r->out.acct_handle); + ndr->depth++; + if (*r->out.acct_handle) { + ndr_print_policy_handle(ndr, "acct_handle", *r->out.acct_handle); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 9d41be35a8..f8ef1ad26b 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -1372,7 +1372,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.acct_handle = talloc_zero(r, struct policy_handle); + r->out.acct_handle = talloc_zero(r, struct policy_handle *); if (r->out.acct_handle == NULL) { talloc_free(r); return false; -- cgit From 023ea6fe026a1c355fef54fdaa3c6290cdead1f3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 22:51:34 +0100 Subject: Re-run make idl. Guenther (This used to be commit 71bc06fd5581aeb02f91aeae68d9572452b8ac1e) --- source3/librpc/gen_ndr/cli_lsa.c | 6 +++++- source3/librpc/gen_ndr/cli_lsa.h | 4 +++- source3/librpc/gen_ndr/lsa.h | 5 +++++ source3/librpc/gen_ndr/ndr_lsa.c | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index edc7549011..779f3e73aa 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -1041,12 +1041,16 @@ NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t access_mask) { struct lsa_SetSystemAccessAccount r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.access_mask = access_mask; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &r); diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 233154530f..26a37de7c7 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -116,7 +116,9 @@ NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t access_mask); NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 03ffdd08ab..131110c8e8 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -901,6 +901,11 @@ struct lsa_GetSystemAccessAccount { struct lsa_SetSystemAccessAccount { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t access_mask; + } in; + struct { NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 4e23040151..8ca4b65f0a 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -6674,6 +6674,11 @@ _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -6683,7 +6688,16 @@ static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *nd static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r) { + TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); @@ -6701,6 +6715,11 @@ _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_uint32(ndr, "access_mask", r->in.access_mask); ndr->depth--; } if (flags & NDR_OUT) { -- cgit From 5431ff4f6673be3aad3f6b230b5b9aa5a3591d0f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 22:54:28 +0100 Subject: Re-run make idl. Guenther (This used to be commit 5af6bf31d515c18b0b53237bf78f6c65c2606ca5) --- source3/librpc/gen_ndr/cli_lsa.c | 6 +++++- source3/librpc/gen_ndr/cli_lsa.h | 4 +++- source3/librpc/gen_ndr/lsa.h | 5 +++++ source3/librpc/gen_ndr/ndr_lsa.c | 36 ++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_lsa.c | 7 +++++++ 5 files changed, 56 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 779f3e73aa..9f963db49a 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -1004,12 +1004,15 @@ NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *access_mask) { struct lsa_GetSystemAccessAccount r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &r); @@ -1035,6 +1038,7 @@ NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, } /* Return variables */ + *access_mask = *r.out.access_mask; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 26a37de7c7..63e4d0288d 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -114,7 +114,9 @@ NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t *access_mask); NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 131110c8e8..8c2bab164d 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -894,6 +894,11 @@ struct lsa_SetQuotasForAccount { struct lsa_GetSystemAccessAccount { struct { + struct policy_handle *handle;/* [ref] */ + } in; + + struct { + uint32_t *access_mask;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 8ca4b65f0a..0d477eea6e 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -6633,8 +6633,16 @@ _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const cha static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { + if (r->out.access_mask == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_mask)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6642,9 +6650,29 @@ static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *nd static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_access_mask_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.access_mask); + ZERO_STRUCTP(r->out.access_mask); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.access_mask); + } + _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_mask)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -6660,11 +6688,19 @@ _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount"); ndr->depth++; + ndr_print_ptr(ndr, "access_mask", r->out.access_mask); + ndr->depth++; + ndr_print_uint32(ndr, "access_mask", *r->out.access_mask); + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index f8ef1ad26b..874cf4c410 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -1823,6 +1823,13 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, r); } + ZERO_STRUCT(r->out); + r->out.access_mask = talloc_zero(r, uint32_t); + if (r->out.access_mask == NULL) { + talloc_free(r); + return false; + } + r->out.result = _lsa_GetSystemAccessAccount(p, r); if (p->rng_fault_state) { -- cgit From 96e41bbf61101519b6b37a5a4bf5e723b4464bdc Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 22:57:47 +0100 Subject: Re-run make idl. Guenther (This used to be commit 0bfaf68e9fa6345511623132917debe2016cf29a) --- source3/librpc/gen_ndr/cli_lsa.c | 6 ++--- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 4 +-- source3/librpc/gen_ndr/ndr_lsa.c | 53 +++++++++++++++++++++++----------------- 4 files changed, 35 insertions(+), 30 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 9f963db49a..64da84d55f 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -2093,7 +2093,7 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_String trusted_domain, + struct lsa_String *trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info) { @@ -2129,9 +2129,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(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/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 63e4d0288d..396debaca8 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -233,7 +233,7 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_String trusted_domain, + struct lsa_String *trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info); NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 8c2bab164d..06f714acc8 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -1233,12 +1233,12 @@ struct lsa_SetInfoPolicy2 { struct lsa_QueryTrustedDomainInfoByName { struct { struct policy_handle *handle;/* [ref] */ - struct lsa_String trusted_domain; + struct lsa_String *trusted_domain;/* [ref] */ enum lsa_TrustDomInfoEnum level; } in; struct { - union lsa_TrustedDomainInfo *info;/* [unique,switch_is(level)] */ + union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 0d477eea6e..5ac4cbcb59 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -9014,15 +9014,18 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_pu return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain)); + if (r->in.trusted_domain == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain)); 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_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)); } return NDR_ERR_SUCCESS; @@ -9030,8 +9033,8 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_pu static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r) { - uint32_t _ptr_info; TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_trusted_domain_0; TALLOC_CTX *_mem_save_info_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9043,23 +9046,26 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pu NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.trusted_domain); + } + _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_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) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.info); - } else { - 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); } + _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_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, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -9079,7 +9085,10 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, ndr->depth++; ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; - ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain); + ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain); + ndr->depth++; + ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain); + ndr->depth--; ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level); ndr->depth--; } @@ -9088,10 +9097,8 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, 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_set_switch_value(ndr, r->out.info, r->in.level); + ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; -- cgit From b98f927fabb7218ac84e0c888707f5ef2a86286e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 23:01:09 +0100 Subject: Re-run make idl. Guenther (This used to be commit 10ce833cf0413811db13d9849b9c23fcc27f4526) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index c3cb5ad273..efedb00078 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -261,8 +261,8 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle, uint32_t *resume_handle, + struct samr_SamArray **sam, uint32_t buf_size, - struct samr_SamArray *sam, uint32_t *num_entries) { struct samr_EnumDomains r; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 5df5e3a70c..9eac177001 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -31,8 +31,8 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle, uint32_t *resume_handle, + struct samr_SamArray **sam, uint32_t buf_size, - struct samr_SamArray *sam, uint32_t *num_entries); NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index f257c17864..8c97ea1d95 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -5788,7 +5788,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla if (r->out.sam == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam)); + if (*r->out.sam) { + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + } if (r->out.num_entries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5800,9 +5803,11 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r) { + uint32_t _ptr_sam; TALLOC_CTX *_mem_save_connect_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_sam_1; TALLOC_CTX *_mem_save_num_entries_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5842,7 +5847,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int fla } _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam)); + if (_ptr_sam) { + NDR_PULL_ALLOC(ndr, *r->out.sam); + } else { + *r->out.sam = NULL; + } + if (*r->out.sam) { + _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_entries); @@ -5886,7 +5902,12 @@ _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name ndr->depth--; ndr_print_ptr(ndr, "sam", r->out.sam); ndr->depth++; - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr_print_ptr(ndr, "sam", *r->out.sam); + ndr->depth++; + if (*r->out.sam) { + ndr_print_samr_SamArray(ndr, "sam", *r->out.sam); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "num_entries", r->out.num_entries); ndr->depth++; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 376feae5d1..2d6126a3f4 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -837,7 +837,7 @@ struct samr_EnumDomains { } in; struct { - struct samr_SamArray *sam;/* [ref] */ + struct samr_SamArray **sam;/* [ref] */ uint32_t *num_entries;/* [ref] */ uint32_t *resume_handle;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 374df34a96..3312964178 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -507,7 +507,7 @@ static bool api_samr_EnumDomains(pipes_struct *p) ZERO_STRUCT(r->out); r->out.resume_handle = r->in.resume_handle; - r->out.sam = talloc_zero(r, struct samr_SamArray); + r->out.sam = talloc_zero(r, struct samr_SamArray *); if (r->out.sam == NULL) { talloc_free(r); return false; -- cgit From 559d6587a1d98246883f14bca633c3e660d2a4e8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 8 Feb 2008 23:37:45 +0100 Subject: Re-run make idl. Guenther (This used to be commit f113c340c80f8ecbec37fa8e8c59c7e36777ca64) --- source3/librpc/gen_ndr/cli_netlogon.c | 2 +- source3/librpc/gen_ndr/cli_netlogon.h | 2 +- source3/librpc/gen_ndr/ndr_netlogon.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/netlogon.h | 2 +- source3/librpc/gen_ndr/srv_netlogon.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index cac3962073..de04c21dc5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -1057,7 +1057,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror) { struct netr_DsRGetDCName r; diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index fa043233ea..4aa0f9fa73 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -178,7 +178,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, - struct netr_DsRGetDCNameInfo *info, + struct netr_DsRGetDCNameInfo **info, WERROR *werror); NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index eabbc337fc..dd1d2cf387 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -10983,7 +10983,10 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int fl if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info)); + if (*r->out.info) { + NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10995,11 +10998,13 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl uint32_t _ptr_domain_name; uint32_t _ptr_domain_guid; uint32_t _ptr_site_guid; + uint32_t _ptr_info; TALLOC_CTX *_mem_save_server_unc_0; TALLOC_CTX *_mem_save_domain_name_0; TALLOC_CTX *_mem_save_domain_guid_0; TALLOC_CTX *_mem_save_site_guid_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -11073,7 +11078,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl } _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_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_netr_DsRGetDCNameInfo(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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -11122,7 +11138,12 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info); + ndr_print_ptr(ndr, "info", *r->out.info); + ndr->depth++; + if (*r->out.info) { + ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info); + } + ndr->depth--; ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 612e30914a..ef2218c0f2 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1181,7 +1181,7 @@ struct netr_DsRGetDCName { } in; struct { - struct netr_DsRGetDCNameInfo *info;/* [ref] */ + struct netr_DsRGetDCNameInfo **info;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index b9e6ae69b1..673f9503df 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -1679,7 +1679,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo); + r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From da3e2d4c2797a9ea43312ba7bdb5bc9710c94004 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 9 Feb 2008 01:33:47 +0100 Subject: Testing revealed some errors, reverting some of the lsa changes. Guenther (This used to be commit ac1e4f1eb2c046def4fa30ab0bd98c49add8e8c8) --- source3/librpc/gen_ndr/cli_lsa.c | 6 +-- source3/librpc/gen_ndr/cli_lsa.h | 6 +-- source3/librpc/gen_ndr/lsa.h | 8 +-- source3/librpc/gen_ndr/ndr_lsa.c | 106 +++++---------------------------------- source3/librpc/gen_ndr/srv_lsa.c | 4 +- 5 files changed, 24 insertions(+), 106 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 64da84d55f..ddd0c7884d 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -427,7 +427,7 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle **acct_handle) + struct policy_handle *acct_handle) { struct lsa_CreateAccount r; NTSTATUS status; @@ -762,7 +762,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle **acct_handle) + struct policy_handle *acct_handle) { struct lsa_OpenAccount r; NTSTATUS status; @@ -1499,7 +1499,7 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - struct policy_handle **handle) + struct policy_handle *handle) { struct lsa_DeleteObject r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 396debaca8..3f64bb450d 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -48,7 +48,7 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle **acct_handle); + struct policy_handle *acct_handle); NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, @@ -95,7 +95,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, - struct policy_handle **acct_handle); + struct policy_handle *acct_handle); NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, @@ -171,7 +171,7 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, uint16_t unknown); NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - struct policy_handle **handle); + struct policy_handle *handle); NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 06f714acc8..0df0ddecc5 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -713,7 +713,7 @@ struct lsa_CreateAccount { } in; struct { - struct policy_handle **acct_handle;/* [ref] */ + struct policy_handle *acct_handle;/* [ref] */ NTSTATUS result; } out; @@ -829,7 +829,7 @@ struct lsa_OpenAccount { } in; struct { - struct policy_handle **acct_handle;/* [ref] */ + struct policy_handle *acct_handle;/* [ref] */ NTSTATUS result; } out; @@ -1051,11 +1051,11 @@ struct lsa_LookupPrivDisplayName { struct lsa_DeleteObject { struct { - struct policy_handle **handle;/* [ref] */ + struct policy_handle *handle;/* [ref] */ } in; struct { - struct policy_handle **handle;/* [ref] */ + struct policy_handle *handle;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 5ac4cbcb59..a3565c8f2c 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -5321,10 +5321,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int if (r->out.acct_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.acct_handle)); - if (*r->out.acct_handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5332,11 +5329,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r) { - uint32_t _ptr_acct_handle; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sid_0; TALLOC_CTX *_mem_save_acct_handle_0; - TALLOC_CTX *_mem_save_acct_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -5364,18 +5359,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int } _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_handle)); - if (_ptr_acct_handle) { - NDR_PULL_ALLOC(ndr, *r->out.acct_handle); - } else { - *r->out.acct_handle = NULL; - } - if (*r->out.acct_handle) { - _mem_save_acct_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.acct_handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_1, 0); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5408,12 +5392,7 @@ _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", *r->out.acct_handle); - ndr->depth++; - if (*r->out.acct_handle) { - ndr_print_policy_handle(ndr, "acct_handle", *r->out.acct_handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -6208,10 +6187,7 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag if (r->out.acct_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.acct_handle)); - if (*r->out.acct_handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6219,11 +6195,9 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r) { - uint32_t _ptr_acct_handle; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sid_0; TALLOC_CTX *_mem_save_acct_handle_0; - TALLOC_CTX *_mem_save_acct_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6251,18 +6225,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flag } _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_handle)); - if (_ptr_acct_handle) { - NDR_PULL_ALLOC(ndr, *r->out.acct_handle); - } else { - *r->out.acct_handle = NULL; - } - if (*r->out.acct_handle) { - _mem_save_acct_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.acct_handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_1, 0); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -6295,12 +6258,7 @@ _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", *r->out.acct_handle); - ndr->depth++; - if (*r->out.acct_handle) { - ndr_print_policy_handle(ndr, "acct_handle", *r->out.acct_handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -7757,19 +7715,13 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla if (r->in.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.handle)); - if (*r->in.handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.handle)); - if (*r->out.handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7777,9 +7729,7 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r) { - uint32_t _ptr_handle; TALLOC_CTX *_mem_save_handle_0; - TALLOC_CTX *_mem_save_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7788,18 +7738,7 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle)); - if (_ptr_handle) { - NDR_PULL_ALLOC(ndr, *r->in.handle); - } else { - *r->in.handle = NULL; - } - if (*r->in.handle) { - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.handle); *r->out.handle = *r->in.handle; @@ -7810,18 +7749,7 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle)); - if (_ptr_handle) { - NDR_PULL_ALLOC(ndr, *r->out.handle); - } else { - *r->out.handle = NULL; - } - if (*r->out.handle) { - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7840,12 +7768,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", r->in.handle); ndr->depth++; - ndr_print_ptr(ndr, "handle", *r->in.handle); - ndr->depth++; - if (*r->in.handle) { - ndr_print_policy_handle(ndr, "handle", *r->in.handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; ndr->depth--; } @@ -7854,12 +7777,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", r->out.handle); ndr->depth++; - ndr_print_ptr(ndr, "handle", *r->out.handle); - ndr->depth++; - if (*r->out.handle) { - ndr_print_policy_handle(ndr, "handle", *r->out.handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "handle", r->out.handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 874cf4c410..d02bdb786b 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -806,7 +806,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.acct_handle = talloc_zero(r, struct policy_handle *); + r->out.acct_handle = talloc_zero(r, struct policy_handle); if (r->out.acct_handle == NULL) { talloc_free(r); return false; @@ -1372,7 +1372,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.acct_handle = talloc_zero(r, struct policy_handle *); + r->out.acct_handle = talloc_zero(r, struct policy_handle); if (r->out.acct_handle == NULL) { talloc_free(r); return false; -- cgit From 485cb23b16e62a37180b95bd5c409de6ee162084 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 11 Feb 2008 09:15:30 +0100 Subject: rerun 'make idl' metze (This used to be commit 55c74832f3a4052d8b15f01b233aab97f7001bbe) --- source3/librpc/gen_ndr/ndr_dfs.c | 92 +++--- source3/librpc/gen_ndr/ndr_dssetup.c | 12 +- source3/librpc/gen_ndr/ndr_echo.c | 36 +-- source3/librpc/gen_ndr/ndr_epmapper.c | 108 +++---- source3/librpc/gen_ndr/ndr_lsa.c | 108 +++---- source3/librpc/gen_ndr/ndr_netlogon.c | 260 ++++++++-------- source3/librpc/gen_ndr/ndr_samr.c | 220 +++++++------- source3/librpc/gen_ndr/ndr_security.c | 36 +-- source3/librpc/gen_ndr/ndr_srvsvc.c | 472 +++++++++++++++--------------- source3/librpc/gen_ndr/ndr_wkssvc.c | 200 ++++++------- source3/librpc/gen_ndr/srv_dfs.c | 46 +-- source3/librpc/gen_ndr/srv_dssetup.c | 22 +- source3/librpc/gen_ndr/srv_echo.c | 20 +- source3/librpc/gen_ndr/srv_epmapper.c | 16 +- source3/librpc/gen_ndr/srv_eventlog.c | 48 +-- source3/librpc/gen_ndr/srv_initshutdown.c | 6 +- source3/librpc/gen_ndr/srv_lsa.c | 164 +++++------ source3/librpc/gen_ndr/srv_netlogon.c | 94 +++--- source3/librpc/gen_ndr/srv_samr.c | 136 ++++----- source3/librpc/gen_ndr/srv_srvsvc.c | 108 +++---- source3/librpc/gen_ndr/srv_svcctl.c | 88 +++--- source3/librpc/gen_ndr/srv_unixinfo.c | 10 +- source3/librpc/gen_ndr/srv_winreg.c | 70 ++--- source3/librpc/gen_ndr/srv_wkssvc.c | 62 ++-- 24 files changed, 1217 insertions(+), 1217 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index c373a4364c..f5ce913bd2 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -1562,65 +1562,65 @@ static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); - break; + break; } - case 7: + case 7: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7)); - break; + break; } - case 100: + case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); - break; + break; } - case 101: + case 101: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); - break; + break; } - case 102: + case 102: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); - break; + break; } - case 103: + case 103: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103)); - break; + break; } - case 104: + case 104: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104)); - break; + break; } - case 105: + case 105: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105)); - break; + break; } - case 106: + case 106: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -2898,37 +2898,37 @@ static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_fla int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6)); - break; + break; } - case 200: + case 200: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200)); - break; + break; } - case 300: + case 300: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_dssetup.c b/source3/librpc/gen_ndr/ndr_dssetup.c index 37586549a6..bdad3c44f6 100644 --- a/source3/librpc/gen_ndr/ndr_dssetup.c +++ b/source3/librpc/gen_ndr/ndr_dssetup.c @@ -365,17 +365,17 @@ static enum ndr_err_code ndr_push_dssetup_DsRoleInfo(struct ndr_push *ndr, int n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, level)); switch (level) { - case DS_ROLE_BASIC_INFORMATION: + case DS_ROLE_BASIC_INFORMATION: { NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic)); - break; + break; } - case DS_ROLE_UPGRADE_STATUS: + case DS_ROLE_UPGRADE_STATUS: { NDR_CHECK(ndr_push_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade)); - break; + break; } - case DS_ROLE_OP_STATUS: + case DS_ROLE_OP_STATUS: { NDR_CHECK(ndr_push_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c index dda9813e23..67ff0f2df4 100644 --- a/source3/librpc/gen_ndr/ndr_echo.c +++ b/source3/librpc/gen_ndr/ndr_echo.c @@ -228,33 +228,33 @@ static enum ndr_err_code ndr_push_echo_Info(struct ndr_push *ndr, int ndr_flags, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_echo_info2(ndr, NDR_SCALARS, &r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_echo_info3(ndr, NDR_SCALARS, &r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_echo_info5(ndr, NDR_SCALARS, &r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_echo_info6(ndr, NDR_SCALARS, &r->info6)); - break; + break; } - case 7: + case 7: { NDR_CHECK(ndr_push_echo_info7(ndr, NDR_SCALARS, &r->info7)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -492,13 +492,13 @@ static enum ndr_err_code ndr_push_echo_Enum3(struct ndr_push *ndr, int ndr_flags int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case ECHO_ENUM1: + case ECHO_ENUM1: { NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1)); - break; + break; } - case ECHO_ENUM2: + case ECHO_ENUM2: { NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, &r->e2)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c index 17f4426279..4f9422ea57 100644 --- a/source3/librpc/gen_ndr/ndr_epmapper.c +++ b/source3/librpc/gen_ndr/ndr_epmapper.c @@ -867,118 +867,118 @@ static enum ndr_err_code ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, c if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case EPM_PROTOCOL_DNET_NSP: + case EPM_PROTOCOL_DNET_NSP: { NDR_CHECK(ndr_push_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp)); - break; + break; } - case EPM_PROTOCOL_OSI_TP4: + case EPM_PROTOCOL_OSI_TP4: { NDR_CHECK(ndr_push_epm_rhs_osi_tp4(ndr, NDR_SCALARS, &r->osi_tp4)); - break; + break; } - case EPM_PROTOCOL_OSI_CLNS: + case EPM_PROTOCOL_OSI_CLNS: { NDR_CHECK(ndr_push_epm_rhs_osi_clns(ndr, NDR_SCALARS, &r->osi_clns)); - break; + break; } - case EPM_PROTOCOL_TCP: + case EPM_PROTOCOL_TCP: { NDR_CHECK(ndr_push_epm_rhs_tcp(ndr, NDR_SCALARS, &r->tcp)); - break; + break; } - case EPM_PROTOCOL_UDP: + case EPM_PROTOCOL_UDP: { NDR_CHECK(ndr_push_epm_rhs_udp(ndr, NDR_SCALARS, &r->udp)); - break; + break; } - case EPM_PROTOCOL_IP: + case EPM_PROTOCOL_IP: { NDR_CHECK(ndr_push_epm_rhs_ip(ndr, NDR_SCALARS, &r->ip)); - break; + break; } - case EPM_PROTOCOL_NCADG: + case EPM_PROTOCOL_NCADG: { NDR_CHECK(ndr_push_epm_rhs_ncadg(ndr, NDR_SCALARS, &r->ncadg)); - break; + break; } - case EPM_PROTOCOL_NCACN: + case EPM_PROTOCOL_NCACN: { NDR_CHECK(ndr_push_epm_rhs_ncacn(ndr, NDR_SCALARS, &r->ncacn)); - break; + break; } - case EPM_PROTOCOL_NCALRPC: + case EPM_PROTOCOL_NCALRPC: { NDR_CHECK(ndr_push_epm_rhs_ncalrpc(ndr, NDR_SCALARS, &r->ncalrpc)); - break; + break; } - case EPM_PROTOCOL_UUID: + case EPM_PROTOCOL_UUID: { NDR_CHECK(ndr_push_epm_rhs_uuid(ndr, NDR_SCALARS, &r->uuid)); - break; + break; } - case EPM_PROTOCOL_IPX: + case EPM_PROTOCOL_IPX: { NDR_CHECK(ndr_push_epm_rhs_ipx(ndr, NDR_SCALARS, &r->ipx)); - break; + break; } - case EPM_PROTOCOL_SMB: + case EPM_PROTOCOL_SMB: { NDR_CHECK(ndr_push_epm_rhs_smb(ndr, NDR_SCALARS, &r->smb)); - break; + break; } - case EPM_PROTOCOL_PIPE: + case EPM_PROTOCOL_PIPE: { NDR_CHECK(ndr_push_epm_rhs_pipe(ndr, NDR_SCALARS, &r->pipe)); - break; + break; } - case EPM_PROTOCOL_NETBIOS: + case EPM_PROTOCOL_NETBIOS: { NDR_CHECK(ndr_push_epm_rhs_netbios(ndr, NDR_SCALARS, &r->netbios)); - break; + break; } - case EPM_PROTOCOL_NETBEUI: + case EPM_PROTOCOL_NETBEUI: { NDR_CHECK(ndr_push_epm_rhs_netbeui(ndr, NDR_SCALARS, &r->netbeui)); - break; + break; } - case EPM_PROTOCOL_SPX: + case EPM_PROTOCOL_SPX: { NDR_CHECK(ndr_push_epm_rhs_spx(ndr, NDR_SCALARS, &r->spx)); - break; + break; } - case EPM_PROTOCOL_NB_IPX: + case EPM_PROTOCOL_NB_IPX: { NDR_CHECK(ndr_push_epm_rhs_nb_ipx(ndr, NDR_SCALARS, &r->nb_ipx)); - break; + break; } - case EPM_PROTOCOL_DSP: + case EPM_PROTOCOL_DSP: { NDR_CHECK(ndr_push_epm_rhs_atalk_stream(ndr, NDR_SCALARS, &r->atalk_stream)); - break; + break; } - case EPM_PROTOCOL_DDP: + case EPM_PROTOCOL_DDP: { NDR_CHECK(ndr_push_epm_rhs_atalk_datagram(ndr, NDR_SCALARS, &r->atalk_datagram)); - break; + break; } - case EPM_PROTOCOL_APPLETALK: + case EPM_PROTOCOL_APPLETALK: { NDR_CHECK(ndr_push_epm_rhs_appletalk(ndr, NDR_SCALARS, &r->appletalk)); - break; + break; } - case EPM_PROTOCOL_VINES_SPP: + case EPM_PROTOCOL_VINES_SPP: { NDR_CHECK(ndr_push_epm_rhs_vines_spp(ndr, NDR_SCALARS, &r->vines_spp)); - break; + break; } - case EPM_PROTOCOL_VINES_IPC: + case EPM_PROTOCOL_VINES_IPC: { NDR_CHECK(ndr_push_epm_rhs_vines_ipc(ndr, NDR_SCALARS, &r->vines_ipc)); - break; + break; } - case EPM_PROTOCOL_STREETTALK: + case EPM_PROTOCOL_STREETTALK: { NDR_CHECK(ndr_push_epm_rhs_streettalk(ndr, NDR_SCALARS, &r->streettalk)); - break; + break; } - case EPM_PROTOCOL_HTTP: + case EPM_PROTOCOL_HTTP: { NDR_CHECK(ndr_push_epm_rhs_http(ndr, NDR_SCALARS, &r->http)); - break; + break; } - case EPM_PROTOCOL_UNIX_DS: + case EPM_PROTOCOL_UNIX_DS: { NDR_CHECK(ndr_push_epm_rhs_unix_ds(ndr, NDR_SCALARS, &r->unix_ds)); - break; + break; } - case EPM_PROTOCOL_NULL: + case EPM_PROTOCOL_NULL: { NDR_CHECK(ndr_push_epm_rhs_null(ndr, NDR_SCALARS, &r->null)); - break; + break; } - default: + default: { { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown)); ndr->flags = _flags_save_DATA_BLOB; } - break; + break; } } } diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index a3565c8f2c..ef93d6b60c 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -1216,53 +1216,53 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case LSA_POLICY_INFO_AUDIT_LOG: + case LSA_POLICY_INFO_AUDIT_LOG: { NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log)); - break; + break; } - case LSA_POLICY_INFO_AUDIT_EVENTS: + case LSA_POLICY_INFO_AUDIT_EVENTS: { NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events)); - break; + break; } - case LSA_POLICY_INFO_DOMAIN: + case LSA_POLICY_INFO_DOMAIN: { NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain)); - break; + break; } - case LSA_POLICY_INFO_PD: + case LSA_POLICY_INFO_PD: { NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd)); - break; + break; } - case LSA_POLICY_INFO_ACCOUNT_DOMAIN: + case LSA_POLICY_INFO_ACCOUNT_DOMAIN: { NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain)); - break; + break; } - case LSA_POLICY_INFO_ROLE: + case LSA_POLICY_INFO_ROLE: { NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role)); - break; + break; } - case LSA_POLICY_INFO_REPLICA: + case LSA_POLICY_INFO_REPLICA: { NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica)); - break; + break; } - case LSA_POLICY_INFO_QUOTA: + case LSA_POLICY_INFO_QUOTA: { NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota)); - break; + break; } - case LSA_POLICY_INFO_DB: + case LSA_POLICY_INFO_DB: { NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db)); - break; + break; } - case LSA_POLICY_INFO_AUDIT_FULL_SET: + case LSA_POLICY_INFO_AUDIT_FULL_SET: { NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset)); - break; + break; } - case LSA_POLICY_INFO_AUDIT_FULL_QUERY: + case LSA_POLICY_INFO_AUDIT_FULL_QUERY: { NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery)); - break; + break; } - case LSA_POLICY_INFO_DNS: + case LSA_POLICY_INFO_DNS: { NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -2979,41 +2979,41 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level)); switch (level) { - case LSA_TRUSTED_DOMAIN_INFO_NAME: + case LSA_TRUSTED_DOMAIN_INFO_NAME: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: + case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_BASIC: + case LSA_TRUSTED_DOMAIN_INFO_BASIC: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_11: + case LSA_TRUSTED_DOMAIN_INFO_11: { NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11)); - break; + break; } - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: + case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -3593,13 +3593,13 @@ static enum ndr_err_code ndr_push_lsa_DomainInformationPolicy(struct ndr_push *n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case LSA_DOMAIN_INFO_POLICY_EFS: + case LSA_DOMAIN_INFO_POLICY_EFS: { NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info)); - break; + break; } - case LSA_DOMAIN_INFO_POLICY_KERBEROS: + case LSA_DOMAIN_INFO_POLICY_KERBEROS: { NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4214,21 +4214,21 @@ static enum ndr_err_code ndr_push_lsa_ForestTrustData(struct ndr_push *ndr, int int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case LSA_FOREST_TRUST_TOP_LEVEL_NAME: + case LSA_FOREST_TRUST_TOP_LEVEL_NAME: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->top_level_name)); - break; + break; } - case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: + case LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX: { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->top_level_name_ex)); - break; + break; } - case LSA_FOREST_TRUST_DOMAIN_INFO: + case LSA_FOREST_TRUST_DOMAIN_INFO: { NDR_CHECK(ndr_push_lsa_ForestTrustDomainInfo(ndr, NDR_SCALARS, &r->domain_info)); - break; + break; } - default: + default: { NDR_CHECK(ndr_push_lsa_ForestTrustBinaryData(ndr, NDR_SCALARS, &r->data)); - break; + break; } } } diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index dd1d2cf387..b12a347ded 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -600,25 +600,25 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->network)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->network)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -1578,25 +1578,25 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -3790,90 +3790,90 @@ static enum ndr_err_code ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level)); switch (level) { - case NETR_DELTA_DOMAIN: + case NETR_DELTA_DOMAIN: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); - break; + break; } - case NETR_DELTA_GROUP: + case NETR_DELTA_GROUP: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->group)); - break; + break; } - case NETR_DELTA_DELETE_GROUP: - break; + case NETR_DELTA_DELETE_GROUP: { + break; } - case NETR_DELTA_RENAME_GROUP: + case NETR_DELTA_RENAME_GROUP: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group)); - break; + break; } - case NETR_DELTA_USER: + case NETR_DELTA_USER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->user)); - break; + break; } - case NETR_DELTA_DELETE_USER: - break; + case NETR_DELTA_DELETE_USER: { + break; } - case NETR_DELTA_RENAME_USER: + case NETR_DELTA_RENAME_USER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user)); - break; + break; } - case NETR_DELTA_GROUP_MEMBER: + case NETR_DELTA_GROUP_MEMBER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member)); - break; + break; } - case NETR_DELTA_ALIAS: + case NETR_DELTA_ALIAS: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias)); - break; + break; } - case NETR_DELTA_DELETE_ALIAS: - break; + case NETR_DELTA_DELETE_ALIAS: { + break; } - case NETR_DELTA_RENAME_ALIAS: + case NETR_DELTA_RENAME_ALIAS: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias)); - break; + break; } - case NETR_DELTA_ALIAS_MEMBER: + case NETR_DELTA_ALIAS_MEMBER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member)); - break; + break; } - case NETR_DELTA_POLICY: + case NETR_DELTA_POLICY: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy)); - break; + break; } - case NETR_DELTA_TRUSTED_DOMAIN: + case NETR_DELTA_TRUSTED_DOMAIN: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain)); - break; + break; } - case NETR_DELTA_DELETE_TRUST: + case NETR_DELTA_DELETE_TRUST: { NDR_CHECK(ndr_push_netr_DELTA_DELETE_TRUST(ndr, NDR_SCALARS, &r->delete_trust)); - break; + break; } - case NETR_DELTA_ACCOUNT: + case NETR_DELTA_ACCOUNT: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->account)); - break; + break; } - case NETR_DELTA_DELETE_ACCOUNT: + case NETR_DELTA_DELETE_ACCOUNT: { NDR_CHECK(ndr_push_netr_DELTA_DELETE_ACCOUNT(ndr, NDR_SCALARS, &r->delete_account)); - break; + break; } - case NETR_DELTA_SECRET: + case NETR_DELTA_SECRET: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret)); - break; + break; } - case NETR_DELTA_DELETE_SECRET: + case NETR_DELTA_DELETE_SECRET: { NDR_CHECK(ndr_push_netr_DELTA_DELETE_SECRET(ndr, NDR_SCALARS, &r->delete_secret)); - break; + break; } - case NETR_DELTA_DELETE_GROUP2: + case NETR_DELTA_DELETE_GROUP2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group)); - break; + break; } - case NETR_DELTA_DELETE_USER2: + case NETR_DELTA_DELETE_USER2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user)); - break; + break; } - case NETR_DELTA_MODIFY_COUNT: + case NETR_DELTA_MODIFY_COUNT: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4568,92 +4568,92 @@ static enum ndr_err_code ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level)); switch (level) { - case NETR_DELTA_DOMAIN: + case NETR_DELTA_DOMAIN: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_GROUP: + case NETR_DELTA_GROUP: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_DELETE_GROUP: + case NETR_DELTA_DELETE_GROUP: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_RENAME_GROUP: + case NETR_DELTA_RENAME_GROUP: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_USER: + case NETR_DELTA_USER: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_DELETE_USER: + case NETR_DELTA_DELETE_USER: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_RENAME_USER: + case NETR_DELTA_RENAME_USER: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_GROUP_MEMBER: + case NETR_DELTA_GROUP_MEMBER: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_ALIAS: + case NETR_DELTA_ALIAS: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_DELETE_ALIAS: + case NETR_DELTA_DELETE_ALIAS: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_RENAME_ALIAS: + case NETR_DELTA_RENAME_ALIAS: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_ALIAS_MEMBER: + case NETR_DELTA_ALIAS_MEMBER: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_POLICY: + case NETR_DELTA_POLICY: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - break; + break; } - case NETR_DELTA_TRUSTED_DOMAIN: + case NETR_DELTA_TRUSTED_DOMAIN: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - break; + break; } - case NETR_DELTA_DELETE_TRUST: + case NETR_DELTA_DELETE_TRUST: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - break; + break; } - case NETR_DELTA_ACCOUNT: + case NETR_DELTA_ACCOUNT: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - break; + break; } - case NETR_DELTA_DELETE_ACCOUNT: + case NETR_DELTA_DELETE_ACCOUNT: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - break; + break; } - case NETR_DELTA_SECRET: + case NETR_DELTA_SECRET: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); - break; + break; } - case NETR_DELTA_DELETE_SECRET: + case NETR_DELTA_DELETE_SECRET: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); - break; + break; } - case NETR_DELTA_DELETE_GROUP2: + case NETR_DELTA_DELETE_GROUP2: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_DELETE_USER2: + case NETR_DELTA_DELETE_USER2: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid)); - break; + break; } - case NETR_DELTA_MODIFY_COUNT: - break; + case NETR_DELTA_MODIFY_COUNT: { + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -5529,17 +5529,17 @@ static enum ndr_err_code ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -5728,21 +5728,21 @@ static enum ndr_err_code ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case NETLOGON_CONTROL_REDISCOVER: + case NETLOGON_CONTROL_REDISCOVER: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); - break; + break; } - case NETLOGON_CONTROL_TC_QUERY: + case NETLOGON_CONTROL_TC_QUERY: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); - break; + break; } - case NETLOGON_CONTROL_TRANSPORT_NOTIFY: + case NETLOGON_CONTROL_TRANSPORT_NOTIFY: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain)); - break; + break; } - case NETLOGON_CONTROL_SET_DBFLAG: + case NETLOGON_CONTROL_SET_DBFLAG: { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -6718,13 +6718,13 @@ static enum ndr_err_code ndr_push_netr_DomainQuery(struct ndr_push *ndr, int ndr int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->query1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->query1)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -7079,13 +7079,13 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_ int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 8c97ea1d95..13227f75d1 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -814,53 +814,53 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6)); - break; + break; } - case 7: + case 7: { NDR_CHECK(ndr_push_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7)); - break; + break; } - case 8: + case 8: { NDR_CHECK(ndr_push_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8)); - break; + break; } - case 9: + case 9: { NDR_CHECK(ndr_push_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); - break; + break; } - case 11: + case 11: { NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); - break; + break; } - case 12: + case 12: { NDR_CHECK(ndr_push_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12)); - break; + break; } - case 13: + case 13: { NDR_CHECK(ndr_push_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -1308,25 +1308,25 @@ static enum ndr_err_code ndr_push_samr_GroupInfo(struct ndr_push *ndr, int ndr_f int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_samr_GroupInfoEnum(ndr, NDR_SCALARS, level)); switch (level) { - case GROUPINFOALL: + case GROUPINFOALL: { NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); - break; + break; } - case GROUPINFONAME: + case GROUPINFONAME: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); - break; + break; } - case GROUPINFOATTRIBUTES: + case GROUPINFOATTRIBUTES: { NDR_CHECK(ndr_push_samr_GroupInfoAttributes(ndr, NDR_SCALARS, &r->attributes)); - break; + break; } - case GROUPINFODESCRIPTION: + case GROUPINFODESCRIPTION: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); - break; + break; } - case GROUPINFOALL2: + case GROUPINFOALL2: { NDR_CHECK(ndr_push_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all2)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -1659,17 +1659,17 @@ static enum ndr_err_code ndr_push_samr_AliasInfo(struct ndr_push *ndr, int ndr_f int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_samr_AliasInfoEnum(ndr, NDR_SCALARS, level)); switch (level) { - case ALIASINFOALL: + case ALIASINFOALL: { NDR_CHECK(ndr_push_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); - break; + break; } - case ALIASINFONAME: + case ALIASINFONAME: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name)); - break; + break; } - case ALIASINFODESCRIPTION: + case ALIASINFODESCRIPTION: { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -3112,97 +3112,97 @@ static enum ndr_err_code ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_fl int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); - break; + break; } - case 6: + case 6: { NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); - break; + break; } - case 7: + case 7: { NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); - break; + break; } - case 8: + case 8: { NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); - break; + break; } - case 9: + case 9: { NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); - break; + break; } - case 10: + case 10: { NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); - break; + break; } - case 11: + case 11: { NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); - break; + break; } - case 12: + case 12: { NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); - break; + break; } - case 13: + case 13: { NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); - break; + break; } - case 14: + case 14: { NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); - break; + break; } - case 16: + case 16: { NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); - break; + break; } - case 17: + case 17: { NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); - break; + break; } - case 18: + case 18: { NDR_CHECK(ndr_push_samr_UserInfo18(ndr, NDR_SCALARS, &r->info18)); - break; + break; } - case 20: + case 20: { NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); - break; + break; } - case 21: + case 21: { NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); - break; + break; } - case 23: + case 23: { NDR_CHECK(ndr_push_samr_UserInfo23(ndr, NDR_SCALARS, &r->info23)); - break; + break; } - case 24: + case 24: { NDR_CHECK(ndr_push_samr_UserInfo24(ndr, NDR_SCALARS, &r->info24)); - break; + break; } - case 25: + case 25: { NDR_CHECK(ndr_push_samr_UserInfo25(ndr, NDR_SCALARS, &r->info25)); - break; + break; } - case 26: + case 26: { NDR_CHECK(ndr_push_samr_UserInfo26(ndr, NDR_SCALARS, &r->info26)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4255,25 +4255,25 @@ static enum ndr_err_code ndr_push_samr_DispInfo(struct ndr_push *ndr, int ndr_fl int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_DispInfoGeneral(ndr, NDR_SCALARS, &r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_samr_DispInfoFull(ndr, NDR_SCALARS, &r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_samr_DispInfoFullGroups(ndr, NDR_SCALARS, &r->info3)); - break; + break; } - case 4: + case 4: { NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info4)); - break; + break; } - case 5: + case 5: { NDR_CHECK(ndr_push_samr_DispInfoAscii(ndr, NDR_SCALARS, &r->info5)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4538,9 +4538,9 @@ static enum ndr_err_code ndr_push_samr_ConnectInfo(struct ndr_push *ndr, int ndr int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_ConnectInfo1(ndr, NDR_SCALARS, &r->info1)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4893,17 +4893,17 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordRep(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_samr_ValidatePasswordRepCtr(ndr, NDR_SCALARS, &r->ctr3)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -5146,17 +5146,17 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordReq(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); switch (level) { - case 1: + case 1: { NDR_CHECK(ndr_push_samr_ValidatePasswordReq1(ndr, NDR_SCALARS, &r->req1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_samr_ValidatePasswordReq2(ndr, NDR_SCALARS, &r->req2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_samr_ValidatePasswordReq3(ndr, NDR_SCALARS, &r->req3)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c index a6ee1a5ddb..8ab56dd914 100644 --- a/source3/librpc/gen_ndr/ndr_security.c +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -93,12 +93,12 @@ static enum ndr_err_code ndr_push_security_ace_object_type(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case SEC_ACE_OBJECT_TYPE_PRESENT: + case SEC_ACE_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->type)); - break; + break; } - default: - break; + default: { + break; } } } @@ -165,12 +165,12 @@ static enum ndr_err_code ndr_push_security_ace_object_inherited_type(struct ndr_ if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: + case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: { NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->inherited_type)); - break; + break; } - default: - break; + default: { + break; } } } @@ -283,24 +283,24 @@ static enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: + case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: { NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); - break; + break; } - case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: + case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: { NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); - break; + break; } - case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: + case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: { NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); - break; + break; } - case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: + case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: { NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object)); - break; + break; } - default: - break; + default: { + break; } } } diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c index 2675ac2206..86d47a856c 100644 --- a/source3/librpc/gen_ndr/ndr_srvsvc.c +++ b/source3/librpc/gen_ndr/ndr_srvsvc.c @@ -344,16 +344,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, in int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - default: - break; + default: { + break; } } } @@ -482,16 +482,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - default: - break; + default: { + break; } } } @@ -956,16 +956,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, i int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - default: - break; + default: { + break; } } } @@ -1094,16 +1094,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, in int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - default: - break; + default: { + break; } } } @@ -1538,16 +1538,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - default: - break; + default: { + break; } } } @@ -1976,16 +1976,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } - default: - break; + default: { + break; } } } @@ -2114,16 +2114,16 @@ static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3)); - break; + break; } - default: - break; + default: { + break; } } } @@ -3260,28 +3260,28 @@ static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); - break; + break; } - case 10: + case 10: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10)); - break; + break; } - case 502: + case 502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502)); - break; + break; } - default: - break; + default: { + break; } } } @@ -5263,48 +5263,48 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 501: + case 501: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501)); - break; + break; } - case 502: + case 502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502)); - break; + break; } - case 1004: + case 1004: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004)); - break; + break; } - case 1005: + case 1005: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005)); - break; + break; } - case 1006: + case 1006: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006)); - break; + break; } - case 1007: + case 1007: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007)); - break; + break; } - case 1501: + case 1501: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501)); - break; + break; } - default: - break; + default: { + break; } } } @@ -5713,48 +5713,48 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); - break; + break; } - case 501: + case 501: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501)); - break; + break; } - case 502: + case 502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502)); - break; + break; } - case 1004: + case 1004: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004)); - break; + break; } - case 1005: + case 1005: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005)); - break; + break; } - case 1006: + case 1006: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006)); - break; + break; } - case 1007: + case 1007: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007)); - break; + break; } - case 1501: + case 1501: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501)); - break; + break; } - default: - break; + default: { + break; } } } @@ -9014,244 +9014,244 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int nd int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 100: + case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); - break; + break; } - case 101: + case 101: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); - break; + break; } - case 102: + case 102: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); - break; + break; } - case 402: + case 402: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402)); - break; + break; } - case 403: + case 403: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403)); - break; + break; } - case 502: + case 502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502)); - break; + break; } - case 503: + case 503: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503)); - break; + break; } - case 599: + case 599: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599)); - break; + break; } - case 1005: + case 1005: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005)); - break; + break; } - case 1010: + case 1010: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010)); - break; + break; } - case 1016: + case 1016: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016)); - break; + break; } - case 1017: + case 1017: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017)); - break; + break; } - case 1018: + case 1018: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018)); - break; + break; } - case 1107: + case 1107: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107)); - break; + break; } - case 1501: + case 1501: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501)); - break; + break; } - case 1502: + case 1502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502)); - break; + break; } - case 1503: + case 1503: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503)); - break; + break; } - case 1506: + case 1506: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506)); - break; + break; } - case 1509: + case 1509: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509)); - break; + break; } - case 1510: + case 1510: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510)); - break; + break; } - case 1511: + case 1511: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511)); - break; + break; } - case 1512: + case 1512: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512)); - break; + break; } - case 1513: + case 1513: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513)); - break; + break; } - case 1514: + case 1514: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514)); - break; + break; } - case 1515: + case 1515: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515)); - break; + break; } - case 1516: + case 1516: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516)); - break; + break; } - case 1518: + case 1518: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518)); - break; + break; } - case 1520: + case 1520: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520)); - break; + break; } - case 1521: + case 1521: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521)); - break; + break; } - case 1522: + case 1522: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522)); - break; + break; } - case 1523: + case 1523: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523)); - break; + break; } - case 1524: + case 1524: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524)); - break; + break; } - case 1525: + case 1525: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525)); - break; + break; } - case 1528: + case 1528: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528)); - break; + break; } - case 1529: + case 1529: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529)); - break; + break; } - case 1530: + case 1530: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530)); - break; + break; } - case 1533: + case 1533: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533)); - break; + break; } - case 1534: + case 1534: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534)); - break; + break; } - case 1535: + case 1535: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535)); - break; + break; } - case 1536: + case 1536: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536)); - break; + break; } - case 1537: + case 1537: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537)); - break; + break; } - case 1538: + case 1538: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538)); - break; + break; } - case 1539: + case 1539: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539)); - break; + break; } - case 1540: + case 1540: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540)); - break; + break; } - case 1541: + case 1541: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541)); - break; + break; } - case 1542: + case 1542: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542)); - break; + break; } - case 1543: + case 1543: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543)); - break; + break; } - case 1544: + case 1544: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544)); - break; + break; } - case 1545: + case 1545: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545)); - break; + break; } - case 1546: + case 1546: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546)); - break; + break; } - case 1547: + case 1547: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547)); - break; + break; } - case 1548: + case 1548: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548)); - break; + break; } - case 1549: + case 1549: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549)); - break; + break; } - case 1550: + case 1550: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550)); - break; + break; } - case 1552: + case 1552: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552)); - break; + break; } - case 1553: + case 1553: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553)); - break; + break; } - case 1554: + case 1554: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554)); - break; + break; } - case 1555: + case 1555: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555)); - break; + break; } - case 1556: + case 1556: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556)); - break; + break; } - default: - break; + default: { + break; } } } @@ -12558,24 +12558,24 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, i int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3)); - break; + break; } - default: - break; + default: { + break; } } } @@ -12837,21 +12837,21 @@ static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c index e96a980705..096c0b2c72 100644 --- a/source3/librpc/gen_ndr/ndr_wkssvc.c +++ b/source3/librpc/gen_ndr/ndr_wkssvc.c @@ -1478,152 +1478,152 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaInfo(struct ndr_push *ndr, int int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 100: + case 100: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100)); - break; + break; } - case 101: + case 101: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101)); - break; + break; } - case 102: + case 102: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102)); - break; + break; } - case 502: + case 502: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502)); - break; + break; } - case 1010: + case 1010: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010)); - break; + break; } - case 1011: + case 1011: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1011)); - break; + break; } - case 1012: + case 1012: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1012)); - break; + break; } - case 1013: + case 1013: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1013)); - break; + break; } - case 1018: + case 1018: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018)); - break; + break; } - case 1023: + case 1023: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1023)); - break; + break; } - case 1027: + case 1027: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1027)); - break; + break; } - case 1028: + case 1028: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1028)); - break; + break; } - case 1032: + case 1032: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1032)); - break; + break; } - case 1033: + case 1033: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1033)); - break; + break; } - case 1041: + case 1041: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1041)); - break; + break; } - case 1042: + case 1042: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1042)); - break; + break; } - case 1043: + case 1043: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1043)); - break; + break; } - case 1044: + case 1044: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1044)); - break; + break; } - case 1045: + case 1045: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1045)); - break; + break; } - case 1046: + case 1046: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1046)); - break; + break; } - case 1047: + case 1047: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1047)); - break; + break; } - case 1048: + case 1048: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1048)); - break; + break; } - case 1049: + case 1049: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1049)); - break; + break; } - case 1050: + case 1050: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1050)); - break; + break; } - case 1051: + case 1051: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1051)); - break; + break; } - case 1052: + case 1052: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1052)); - break; + break; } - case 1053: + case 1053: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1053)); - break; + break; } - case 1054: + case 1054: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1054)); - break; + break; } - case 1055: + case 1055: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1055)); - break; + break; } - case 1056: + case 1056: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1056)); - break; + break; } - case 1057: + case 1057: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1057)); - break; + break; } - case 1058: + case 1058: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1058)); - break; + break; } - case 1059: + case 1059: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1059)); - break; + break; } - case 1060: + case 1060: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1060)); - break; + break; } - case 1061: + case 1061: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1061)); - break; + break; } - case 1062: + case 1062: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1062)); - break; + break; } - default: - break; + default: { + break; } } } @@ -3335,13 +3335,13 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaEnumUsersCtr(struct ndr_push *n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->user0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->user1)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -3566,17 +3566,17 @@ static enum ndr_err_code ndr_push_wkssvc_NetrWkstaUserInfo(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 1101: + case 1101: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1101)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -3927,9 +3927,9 @@ static enum ndr_err_code ndr_push_wkssvc_NetWkstaTransportCtr(struct ndr_push *n int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -4587,21 +4587,21 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseGetInfoCtr(struct ndr_push *ndr, int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); - break; + break; } - case 3: + case 3: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); @@ -5059,17 +5059,17 @@ static enum ndr_err_code ndr_push_wkssvc_NetrUseEnumCtr(struct ndr_push *ndr, in int level = ndr_push_get_switch_value(ndr, r); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level)); switch (level) { - case 0: + case 0: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0)); - break; + break; } - case 1: + case 1: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); - break; + break; } - case 2: + case 2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2)); - break; + break; } default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index ad6e0af059..1ecd687e3a 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -17,7 +17,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION]; - r = talloc(NULL, struct dfs_GetManagerVersion); + r = talloc(talloc_tos(), struct dfs_GetManagerVersion); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_dfs_Add(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADD]; - r = talloc(NULL, struct dfs_Add); + r = talloc(talloc_tos(), struct dfs_Add); if (r == NULL) { return false; } @@ -170,7 +170,7 @@ static bool api_dfs_Remove(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE]; - r = talloc(NULL, struct dfs_Remove); + r = talloc(talloc_tos(), struct dfs_Remove); if (r == NULL) { return false; } @@ -243,7 +243,7 @@ static bool api_dfs_SetInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO]; - r = talloc(NULL, struct dfs_SetInfo); + r = talloc(talloc_tos(), struct dfs_SetInfo); if (r == NULL) { return false; } @@ -316,7 +316,7 @@ static bool api_dfs_GetInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO]; - r = talloc(NULL, struct dfs_GetInfo); + r = talloc(talloc_tos(), struct dfs_GetInfo); if (r == NULL) { return false; } @@ -396,7 +396,7 @@ static bool api_dfs_Enum(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ENUM]; - r = talloc(NULL, struct dfs_Enum); + r = talloc(talloc_tos(), struct dfs_Enum); if (r == NULL) { return false; } @@ -472,7 +472,7 @@ static bool api_dfs_Rename(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_RENAME]; - r = talloc(NULL, struct dfs_Rename); + r = talloc(talloc_tos(), struct dfs_Rename); if (r == NULL) { return false; } @@ -545,7 +545,7 @@ static bool api_dfs_Move(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MOVE]; - r = talloc(NULL, struct dfs_Move); + r = talloc(talloc_tos(), struct dfs_Move); if (r == NULL) { return false; } @@ -618,7 +618,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO]; - r = talloc(NULL, struct dfs_ManagerGetConfigInfo); + r = talloc(talloc_tos(), struct dfs_ManagerGetConfigInfo); if (r == NULL) { return false; } @@ -691,7 +691,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO]; - r = talloc(NULL, struct dfs_ManagerSendSiteInfo); + r = talloc(talloc_tos(), struct dfs_ManagerSendSiteInfo); if (r == NULL) { return false; } @@ -764,7 +764,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT]; - r = talloc(NULL, struct dfs_AddFtRoot); + r = talloc(talloc_tos(), struct dfs_AddFtRoot); if (r == NULL) { return false; } @@ -839,7 +839,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT]; - r = talloc(NULL, struct dfs_RemoveFtRoot); + r = talloc(talloc_tos(), struct dfs_RemoveFtRoot); if (r == NULL) { return false; } @@ -914,7 +914,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT]; - r = talloc(NULL, struct dfs_AddStdRoot); + r = talloc(talloc_tos(), struct dfs_AddStdRoot); if (r == NULL) { return false; } @@ -987,7 +987,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT]; - r = talloc(NULL, struct dfs_RemoveStdRoot); + r = talloc(talloc_tos(), struct dfs_RemoveStdRoot); if (r == NULL) { return false; } @@ -1060,7 +1060,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE]; - r = talloc(NULL, struct dfs_ManagerInitialize); + r = talloc(talloc_tos(), struct dfs_ManagerInitialize); if (r == NULL) { return false; } @@ -1133,7 +1133,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED]; - r = talloc(NULL, struct dfs_AddStdRootForced); + r = talloc(talloc_tos(), struct dfs_AddStdRootForced); if (r == NULL) { return false; } @@ -1206,7 +1206,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS]; - r = talloc(NULL, struct dfs_GetDcAddress); + r = talloc(talloc_tos(), struct dfs_GetDcAddress); if (r == NULL) { return false; } @@ -1283,7 +1283,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS]; - r = talloc(NULL, struct dfs_SetDcAddress); + r = talloc(talloc_tos(), struct dfs_SetDcAddress); if (r == NULL) { return false; } @@ -1356,7 +1356,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE]; - r = talloc(NULL, struct dfs_FlushFtTable); + r = talloc(talloc_tos(), struct dfs_FlushFtTable); if (r == NULL) { return false; } @@ -1429,7 +1429,7 @@ static bool api_dfs_Add2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ADD2]; - r = talloc(NULL, struct dfs_Add2); + r = talloc(talloc_tos(), struct dfs_Add2); if (r == NULL) { return false; } @@ -1502,7 +1502,7 @@ static bool api_dfs_Remove2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2]; - r = talloc(NULL, struct dfs_Remove2); + r = talloc(talloc_tos(), struct dfs_Remove2); if (r == NULL) { return false; } @@ -1575,7 +1575,7 @@ static bool api_dfs_EnumEx(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX]; - r = talloc(NULL, struct dfs_EnumEx); + r = talloc(talloc_tos(), struct dfs_EnumEx); if (r == NULL) { return false; } @@ -1651,7 +1651,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p) call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2]; - r = talloc(NULL, struct dfs_SetInfo2); + r = talloc(talloc_tos(), struct dfs_SetInfo2); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_dssetup.c b/source3/librpc/gen_ndr/srv_dssetup.c index 9043566718..7a1cae9b5a 100644 --- a/source3/librpc/gen_ndr/srv_dssetup.c +++ b/source3/librpc/gen_ndr/srv_dssetup.c @@ -17,7 +17,7 @@ static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION]; - r = talloc(NULL, struct dssetup_DsRoleGetPrimaryDomainInformation); + r = talloc(talloc_tos(), struct dssetup_DsRoleGetPrimaryDomainInformation); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME]; - r = talloc(NULL, struct dssetup_DsRoleDnsNameToFlatName); + r = talloc(talloc_tos(), struct dssetup_DsRoleDnsNameToFlatName); if (r == NULL) { return false; } @@ -170,7 +170,7 @@ static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASDC]; - r = talloc(NULL, struct dssetup_DsRoleDcAsDc); + r = talloc(talloc_tos(), struct dssetup_DsRoleDcAsDc); if (r == NULL) { return false; } @@ -243,7 +243,7 @@ static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASREPLICA]; - r = talloc(NULL, struct dssetup_DsRoleDcAsReplica); + r = talloc(talloc_tos(), struct dssetup_DsRoleDcAsReplica); if (r == NULL) { return false; } @@ -316,7 +316,7 @@ static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDEMOTEDC]; - r = talloc(NULL, struct dssetup_DsRoleDemoteDc); + r = talloc(talloc_tos(), struct dssetup_DsRoleDemoteDc); if (r == NULL) { return false; } @@ -389,7 +389,7 @@ static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS]; - r = talloc(NULL, struct dssetup_DsRoleGetDcOperationProgress); + r = talloc(talloc_tos(), struct dssetup_DsRoleGetDcOperationProgress); if (r == NULL) { return false; } @@ -462,7 +462,7 @@ static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS]; - r = talloc(NULL, struct dssetup_DsRoleGetDcOperationResults); + r = talloc(talloc_tos(), struct dssetup_DsRoleGetDcOperationResults); if (r == NULL) { return false; } @@ -535,7 +535,7 @@ static bool api_dssetup_DsRoleCancel(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLECANCEL]; - r = talloc(NULL, struct dssetup_DsRoleCancel); + r = talloc(talloc_tos(), struct dssetup_DsRoleCancel); if (r == NULL) { return false; } @@ -608,7 +608,7 @@ static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE]; - r = talloc(NULL, struct dssetup_DsRoleServerSaveStateForUpgrade); + r = talloc(talloc_tos(), struct dssetup_DsRoleServerSaveStateForUpgrade); if (r == NULL) { return false; } @@ -681,7 +681,7 @@ static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER]; - r = talloc(NULL, struct dssetup_DsRoleUpgradeDownlevelServer); + r = talloc(talloc_tos(), struct dssetup_DsRoleUpgradeDownlevelServer); if (r == NULL) { return false; } @@ -754,7 +754,7 @@ static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p) call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE]; - r = talloc(NULL, struct dssetup_DsRoleAbortDownlevelServerUpgrade); + r = talloc(talloc_tos(), struct dssetup_DsRoleAbortDownlevelServerUpgrade); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_echo.c b/source3/librpc/gen_ndr/srv_echo.c index de5fc9cd46..3f725049cd 100644 --- a/source3/librpc/gen_ndr/srv_echo.c +++ b/source3/librpc/gen_ndr/srv_echo.c @@ -17,7 +17,7 @@ static bool api_echo_AddOne(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_ADDONE]; - r = talloc(NULL, struct echo_AddOne); + r = talloc(talloc_tos(), struct echo_AddOne); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_echo_EchoData(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_ECHODATA]; - r = talloc(NULL, struct echo_EchoData); + r = talloc(talloc_tos(), struct echo_EchoData); if (r == NULL) { return false; } @@ -177,7 +177,7 @@ static bool api_echo_SinkData(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_SINKDATA]; - r = talloc(NULL, struct echo_SinkData); + r = talloc(talloc_tos(), struct echo_SinkData); if (r == NULL) { return false; } @@ -250,7 +250,7 @@ static bool api_echo_SourceData(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_SOURCEDATA]; - r = talloc(NULL, struct echo_SourceData); + r = talloc(talloc_tos(), struct echo_SourceData); if (r == NULL) { return false; } @@ -330,7 +330,7 @@ static bool api_echo_TestCall(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTCALL]; - r = talloc(NULL, struct echo_TestCall); + r = talloc(talloc_tos(), struct echo_TestCall); if (r == NULL) { return false; } @@ -410,7 +410,7 @@ static bool api_echo_TestCall2(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTCALL2]; - r = talloc(NULL, struct echo_TestCall2); + r = talloc(talloc_tos(), struct echo_TestCall2); if (r == NULL) { return false; } @@ -490,7 +490,7 @@ static bool api_echo_TestSleep(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTSLEEP]; - r = talloc(NULL, struct echo_TestSleep); + r = talloc(talloc_tos(), struct echo_TestSleep); if (r == NULL) { return false; } @@ -563,7 +563,7 @@ static bool api_echo_TestEnum(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTENUM]; - r = talloc(NULL, struct echo_TestEnum); + r = talloc(talloc_tos(), struct echo_TestEnum); if (r == NULL) { return false; } @@ -640,7 +640,7 @@ static bool api_echo_TestSurrounding(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTSURROUNDING]; - r = talloc(NULL, struct echo_TestSurrounding); + r = talloc(talloc_tos(), struct echo_TestSurrounding); if (r == NULL) { return false; } @@ -715,7 +715,7 @@ static bool api_echo_TestDoublePointer(pipes_struct *p) call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTDOUBLEPOINTER]; - r = talloc(NULL, struct echo_TestDoublePointer); + r = talloc(talloc_tos(), struct echo_TestDoublePointer); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_epmapper.c b/source3/librpc/gen_ndr/srv_epmapper.c index af768d9555..e6c89a553f 100644 --- a/source3/librpc/gen_ndr/srv_epmapper.c +++ b/source3/librpc/gen_ndr/srv_epmapper.c @@ -17,7 +17,7 @@ static bool api_epm_Insert(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_INSERT]; - r = talloc(NULL, struct epm_Insert); + r = talloc(talloc_tos(), struct epm_Insert); if (r == NULL) { return false; } @@ -90,7 +90,7 @@ static bool api_epm_Delete(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_DELETE]; - r = talloc(NULL, struct epm_Delete); + r = talloc(talloc_tos(), struct epm_Delete); if (r == NULL) { return false; } @@ -163,7 +163,7 @@ static bool api_epm_Lookup(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_LOOKUP]; - r = talloc(NULL, struct epm_Lookup); + r = talloc(talloc_tos(), struct epm_Lookup); if (r == NULL) { return false; } @@ -250,7 +250,7 @@ static bool api_epm_Map(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_MAP]; - r = talloc(NULL, struct epm_Map); + r = talloc(talloc_tos(), struct epm_Map); if (r == NULL) { return false; } @@ -337,7 +337,7 @@ static bool api_epm_LookupHandleFree(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_LOOKUPHANDLEFREE]; - r = talloc(NULL, struct epm_LookupHandleFree); + r = talloc(talloc_tos(), struct epm_LookupHandleFree); if (r == NULL) { return false; } @@ -412,7 +412,7 @@ static bool api_epm_InqObject(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_INQOBJECT]; - r = talloc(NULL, struct epm_InqObject); + r = talloc(talloc_tos(), struct epm_InqObject); if (r == NULL) { return false; } @@ -485,7 +485,7 @@ static bool api_epm_MgmtDelete(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_MGMTDELETE]; - r = talloc(NULL, struct epm_MgmtDelete); + r = talloc(talloc_tos(), struct epm_MgmtDelete); if (r == NULL) { return false; } @@ -558,7 +558,7 @@ static bool api_epm_MapAuth(pipes_struct *p) call = &ndr_table_epmapper.calls[NDR_EPM_MAPAUTH]; - r = talloc(NULL, struct epm_MapAuth); + r = talloc(talloc_tos(), struct epm_MapAuth); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index fc94993cee..4d0722bdd7 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -17,7 +17,7 @@ static bool api_eventlog_ClearEventLogW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLEAREVENTLOGW]; - r = talloc(NULL, struct eventlog_ClearEventLogW); + r = talloc(talloc_tos(), struct eventlog_ClearEventLogW); if (r == NULL) { return false; } @@ -90,7 +90,7 @@ static bool api_eventlog_BackupEventLogW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_BACKUPEVENTLOGW]; - r = talloc(NULL, struct eventlog_BackupEventLogW); + r = talloc(talloc_tos(), struct eventlog_BackupEventLogW); if (r == NULL) { return false; } @@ -163,7 +163,7 @@ static bool api_eventlog_CloseEventLog(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLOSEEVENTLOG]; - r = talloc(NULL, struct eventlog_CloseEventLog); + r = talloc(talloc_tos(), struct eventlog_CloseEventLog); if (r == NULL) { return false; } @@ -238,7 +238,7 @@ static bool api_eventlog_DeregisterEventSource(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_DEREGISTEREVENTSOURCE]; - r = talloc(NULL, struct eventlog_DeregisterEventSource); + r = talloc(talloc_tos(), struct eventlog_DeregisterEventSource); if (r == NULL) { return false; } @@ -311,7 +311,7 @@ static bool api_eventlog_GetNumRecords(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETNUMRECORDS]; - r = talloc(NULL, struct eventlog_GetNumRecords); + r = talloc(talloc_tos(), struct eventlog_GetNumRecords); if (r == NULL) { return false; } @@ -391,7 +391,7 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETOLDESTRECORD]; - r = talloc(NULL, struct eventlog_GetOldestRecord); + r = talloc(talloc_tos(), struct eventlog_GetOldestRecord); if (r == NULL) { return false; } @@ -471,7 +471,7 @@ static bool api_eventlog_ChangeNotify(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CHANGENOTIFY]; - r = talloc(NULL, struct eventlog_ChangeNotify); + r = talloc(talloc_tos(), struct eventlog_ChangeNotify); if (r == NULL) { return false; } @@ -544,7 +544,7 @@ static bool api_eventlog_OpenEventLogW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENEVENTLOGW]; - r = talloc(NULL, struct eventlog_OpenEventLogW); + r = talloc(talloc_tos(), struct eventlog_OpenEventLogW); if (r == NULL) { return false; } @@ -624,7 +624,7 @@ static bool api_eventlog_RegisterEventSourceW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTEREVENTSOURCEW]; - r = talloc(NULL, struct eventlog_RegisterEventSourceW); + r = talloc(talloc_tos(), struct eventlog_RegisterEventSourceW); if (r == NULL) { return false; } @@ -697,7 +697,7 @@ static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENBACKUPEVENTLOGW]; - r = talloc(NULL, struct eventlog_OpenBackupEventLogW); + r = talloc(talloc_tos(), struct eventlog_OpenBackupEventLogW); if (r == NULL) { return false; } @@ -770,7 +770,7 @@ static bool api_eventlog_ReadEventLogW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_READEVENTLOGW]; - r = talloc(NULL, struct eventlog_ReadEventLogW); + r = talloc(talloc_tos(), struct eventlog_ReadEventLogW); if (r == NULL) { return false; } @@ -862,7 +862,7 @@ static bool api_eventlog_ReportEventW(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REPORTEVENTW]; - r = talloc(NULL, struct eventlog_ReportEventW); + r = talloc(talloc_tos(), struct eventlog_ReportEventW); if (r == NULL) { return false; } @@ -935,7 +935,7 @@ static bool api_eventlog_ClearEventLogA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_CLEAREVENTLOGA]; - r = talloc(NULL, struct eventlog_ClearEventLogA); + r = talloc(talloc_tos(), struct eventlog_ClearEventLogA); if (r == NULL) { return false; } @@ -1008,7 +1008,7 @@ static bool api_eventlog_BackupEventLogA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_BACKUPEVENTLOGA]; - r = talloc(NULL, struct eventlog_BackupEventLogA); + r = talloc(talloc_tos(), struct eventlog_BackupEventLogA); if (r == NULL) { return false; } @@ -1081,7 +1081,7 @@ static bool api_eventlog_OpenEventLogA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENEVENTLOGA]; - r = talloc(NULL, struct eventlog_OpenEventLogA); + r = talloc(talloc_tos(), struct eventlog_OpenEventLogA); if (r == NULL) { return false; } @@ -1154,7 +1154,7 @@ static bool api_eventlog_RegisterEventSourceA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTEREVENTSOURCEA]; - r = talloc(NULL, struct eventlog_RegisterEventSourceA); + r = talloc(talloc_tos(), struct eventlog_RegisterEventSourceA); if (r == NULL) { return false; } @@ -1227,7 +1227,7 @@ static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_OPENBACKUPEVENTLOGA]; - r = talloc(NULL, struct eventlog_OpenBackupEventLogA); + r = talloc(talloc_tos(), struct eventlog_OpenBackupEventLogA); if (r == NULL) { return false; } @@ -1300,7 +1300,7 @@ static bool api_eventlog_ReadEventLogA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_READEVENTLOGA]; - r = talloc(NULL, struct eventlog_ReadEventLogA); + r = talloc(talloc_tos(), struct eventlog_ReadEventLogA); if (r == NULL) { return false; } @@ -1373,7 +1373,7 @@ static bool api_eventlog_ReportEventA(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REPORTEVENTA]; - r = talloc(NULL, struct eventlog_ReportEventA); + r = talloc(talloc_tos(), struct eventlog_ReportEventA); if (r == NULL) { return false; } @@ -1446,7 +1446,7 @@ static bool api_eventlog_RegisterClusterSvc(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_REGISTERCLUSTERSVC]; - r = talloc(NULL, struct eventlog_RegisterClusterSvc); + r = talloc(talloc_tos(), struct eventlog_RegisterClusterSvc); if (r == NULL) { return false; } @@ -1519,7 +1519,7 @@ static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_DEREGISTERCLUSTERSVC]; - r = talloc(NULL, struct eventlog_DeregisterClusterSvc); + r = talloc(talloc_tos(), struct eventlog_DeregisterClusterSvc); if (r == NULL) { return false; } @@ -1592,7 +1592,7 @@ static bool api_eventlog_WriteClusterEvents(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_WRITECLUSTEREVENTS]; - r = talloc(NULL, struct eventlog_WriteClusterEvents); + r = talloc(talloc_tos(), struct eventlog_WriteClusterEvents); if (r == NULL) { return false; } @@ -1665,7 +1665,7 @@ static bool api_eventlog_GetLogIntormation(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_GETLOGINTORMATION]; - r = talloc(NULL, struct eventlog_GetLogIntormation); + r = talloc(talloc_tos(), struct eventlog_GetLogIntormation); if (r == NULL) { return false; } @@ -1738,7 +1738,7 @@ static bool api_eventlog_FlushEventLog(pipes_struct *p) call = &ndr_table_eventlog.calls[NDR_EVENTLOG_FLUSHEVENTLOG]; - r = talloc(NULL, struct eventlog_FlushEventLog); + r = talloc(talloc_tos(), struct eventlog_FlushEventLog); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_initshutdown.c b/source3/librpc/gen_ndr/srv_initshutdown.c index 794adea81b..f24530c1c1 100644 --- a/source3/librpc/gen_ndr/srv_initshutdown.c +++ b/source3/librpc/gen_ndr/srv_initshutdown.c @@ -17,7 +17,7 @@ static bool api_initshutdown_Init(pipes_struct *p) call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INIT]; - r = talloc(NULL, struct initshutdown_Init); + r = talloc(talloc_tos(), struct initshutdown_Init); if (r == NULL) { return false; } @@ -90,7 +90,7 @@ static bool api_initshutdown_Abort(pipes_struct *p) call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_ABORT]; - r = talloc(NULL, struct initshutdown_Abort); + r = talloc(talloc_tos(), struct initshutdown_Abort); if (r == NULL) { return false; } @@ -163,7 +163,7 @@ static bool api_initshutdown_InitEx(pipes_struct *p) call = &ndr_table_initshutdown.calls[NDR_INITSHUTDOWN_INITEX]; - r = talloc(NULL, struct initshutdown_InitEx); + r = talloc(talloc_tos(), struct initshutdown_InitEx); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index d02bdb786b..50830ff545 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -17,7 +17,7 @@ static bool api_lsa_Close(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CLOSE]; - r = talloc(NULL, struct lsa_Close); + r = talloc(talloc_tos(), struct lsa_Close); if (r == NULL) { return false; } @@ -92,7 +92,7 @@ static bool api_lsa_Delete(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_DELETE]; - r = talloc(NULL, struct lsa_Delete); + r = talloc(talloc_tos(), struct lsa_Delete); if (r == NULL) { return false; } @@ -165,7 +165,7 @@ static bool api_lsa_EnumPrivs(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMPRIVS]; - r = talloc(NULL, struct lsa_EnumPrivs); + r = talloc(talloc_tos(), struct lsa_EnumPrivs); if (r == NULL) { return false; } @@ -246,7 +246,7 @@ static bool api_lsa_QuerySecurity(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYSECURITY]; - r = talloc(NULL, struct lsa_QuerySecurity); + r = talloc(talloc_tos(), struct lsa_QuerySecurity); if (r == NULL) { return false; } @@ -326,7 +326,7 @@ static bool api_lsa_SetSecObj(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETSECOBJ]; - r = talloc(NULL, struct lsa_SetSecObj); + r = talloc(talloc_tos(), struct lsa_SetSecObj); if (r == NULL) { return false; } @@ -399,7 +399,7 @@ static bool api_lsa_ChangePassword(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CHANGEPASSWORD]; - r = talloc(NULL, struct lsa_ChangePassword); + r = talloc(talloc_tos(), struct lsa_ChangePassword); if (r == NULL) { return false; } @@ -472,7 +472,7 @@ static bool api_lsa_OpenPolicy(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENPOLICY]; - r = talloc(NULL, struct lsa_OpenPolicy); + r = talloc(talloc_tos(), struct lsa_OpenPolicy); if (r == NULL) { return false; } @@ -552,7 +552,7 @@ static bool api_lsa_QueryInfoPolicy(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYINFOPOLICY]; - r = talloc(NULL, struct lsa_QueryInfoPolicy); + r = talloc(talloc_tos(), struct lsa_QueryInfoPolicy); if (r == NULL) { return false; } @@ -632,7 +632,7 @@ static bool api_lsa_SetInfoPolicy(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFOPOLICY]; - r = talloc(NULL, struct lsa_SetInfoPolicy); + r = talloc(talloc_tos(), struct lsa_SetInfoPolicy); if (r == NULL) { return false; } @@ -705,7 +705,7 @@ static bool api_lsa_ClearAuditLog(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CLEARAUDITLOG]; - r = talloc(NULL, struct lsa_ClearAuditLog); + r = talloc(talloc_tos(), struct lsa_ClearAuditLog); if (r == NULL) { return false; } @@ -778,7 +778,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREATEACCOUNT]; - r = talloc(NULL, struct lsa_CreateAccount); + r = talloc(talloc_tos(), struct lsa_CreateAccount); if (r == NULL) { return false; } @@ -858,7 +858,7 @@ static bool api_lsa_EnumAccounts(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTS]; - r = talloc(NULL, struct lsa_EnumAccounts); + r = talloc(talloc_tos(), struct lsa_EnumAccounts); if (r == NULL) { return false; } @@ -939,7 +939,7 @@ static bool api_lsa_CreateTrustedDomain(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAIN]; - r = talloc(NULL, struct lsa_CreateTrustedDomain); + r = talloc(talloc_tos(), struct lsa_CreateTrustedDomain); if (r == NULL) { return false; } @@ -1019,7 +1019,7 @@ static bool api_lsa_EnumTrustDom(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMTRUSTDOM]; - r = talloc(NULL, struct lsa_EnumTrustDom); + r = talloc(talloc_tos(), struct lsa_EnumTrustDom); if (r == NULL) { return false; } @@ -1100,7 +1100,7 @@ static bool api_lsa_LookupNames(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES]; - r = talloc(NULL, struct lsa_LookupNames); + r = talloc(talloc_tos(), struct lsa_LookupNames); if (r == NULL) { return false; } @@ -1182,7 +1182,7 @@ static bool api_lsa_LookupSids(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS]; - r = talloc(NULL, struct lsa_LookupSids); + r = talloc(talloc_tos(), struct lsa_LookupSids); if (r == NULL) { return false; } @@ -1264,7 +1264,7 @@ static bool api_lsa_CreateSecret(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREATESECRET]; - r = talloc(NULL, struct lsa_CreateSecret); + r = talloc(talloc_tos(), struct lsa_CreateSecret); if (r == NULL) { return false; } @@ -1344,7 +1344,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENACCOUNT]; - r = talloc(NULL, struct lsa_OpenAccount); + r = talloc(talloc_tos(), struct lsa_OpenAccount); if (r == NULL) { return false; } @@ -1424,7 +1424,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMPRIVSACCOUNT]; - r = talloc(NULL, struct lsa_EnumPrivsAccount); + r = talloc(talloc_tos(), struct lsa_EnumPrivsAccount); if (r == NULL) { return false; } @@ -1504,7 +1504,7 @@ static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ADDPRIVILEGESTOACCOUNT]; - r = talloc(NULL, struct lsa_AddPrivilegesToAccount); + r = talloc(talloc_tos(), struct lsa_AddPrivilegesToAccount); if (r == NULL) { return false; } @@ -1577,7 +1577,7 @@ static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT]; - r = talloc(NULL, struct lsa_RemovePrivilegesFromAccount); + r = talloc(talloc_tos(), struct lsa_RemovePrivilegesFromAccount); if (r == NULL) { return false; } @@ -1650,7 +1650,7 @@ static bool api_lsa_GetQuotasForAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_GETQUOTASFORACCOUNT]; - r = talloc(NULL, struct lsa_GetQuotasForAccount); + r = talloc(talloc_tos(), struct lsa_GetQuotasForAccount); if (r == NULL) { return false; } @@ -1723,7 +1723,7 @@ static bool api_lsa_SetQuotasForAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETQUOTASFORACCOUNT]; - r = talloc(NULL, struct lsa_SetQuotasForAccount); + r = talloc(talloc_tos(), struct lsa_SetQuotasForAccount); if (r == NULL) { return false; } @@ -1796,7 +1796,7 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_GETSYSTEMACCESSACCOUNT]; - r = talloc(NULL, struct lsa_GetSystemAccessAccount); + r = talloc(talloc_tos(), struct lsa_GetSystemAccessAccount); if (r == NULL) { return false; } @@ -1876,7 +1876,7 @@ static bool api_lsa_SetSystemAccessAccount(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETSYSTEMACCESSACCOUNT]; - r = talloc(NULL, struct lsa_SetSystemAccessAccount); + r = talloc(talloc_tos(), struct lsa_SetSystemAccessAccount); if (r == NULL) { return false; } @@ -1949,7 +1949,7 @@ static bool api_lsa_OpenTrustedDomain(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENTRUSTEDDOMAIN]; - r = talloc(NULL, struct lsa_OpenTrustedDomain); + r = talloc(talloc_tos(), struct lsa_OpenTrustedDomain); if (r == NULL) { return false; } @@ -2029,7 +2029,7 @@ static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFO]; - r = talloc(NULL, struct lsa_QueryTrustedDomainInfo); + r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfo); if (r == NULL) { return false; } @@ -2109,7 +2109,7 @@ static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN]; - r = talloc(NULL, struct lsa_SetInformationTrustedDomain); + r = talloc(talloc_tos(), struct lsa_SetInformationTrustedDomain); if (r == NULL) { return false; } @@ -2182,7 +2182,7 @@ static bool api_lsa_OpenSecret(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENSECRET]; - r = talloc(NULL, struct lsa_OpenSecret); + r = talloc(talloc_tos(), struct lsa_OpenSecret); if (r == NULL) { return false; } @@ -2262,7 +2262,7 @@ static bool api_lsa_SetSecret(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETSECRET]; - r = talloc(NULL, struct lsa_SetSecret); + r = talloc(talloc_tos(), struct lsa_SetSecret); if (r == NULL) { return false; } @@ -2335,7 +2335,7 @@ static bool api_lsa_QuerySecret(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYSECRET]; - r = talloc(NULL, struct lsa_QuerySecret); + r = talloc(talloc_tos(), struct lsa_QuerySecret); if (r == NULL) { return false; } @@ -2413,7 +2413,7 @@ static bool api_lsa_LookupPrivValue(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVVALUE]; - r = talloc(NULL, struct lsa_LookupPrivValue); + r = talloc(talloc_tos(), struct lsa_LookupPrivValue); if (r == NULL) { return false; } @@ -2493,7 +2493,7 @@ static bool api_lsa_LookupPrivName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVNAME]; - r = talloc(NULL, struct lsa_LookupPrivName); + r = talloc(talloc_tos(), struct lsa_LookupPrivName); if (r == NULL) { return false; } @@ -2573,7 +2573,7 @@ static bool api_lsa_LookupPrivDisplayName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVDISPLAYNAME]; - r = talloc(NULL, struct lsa_LookupPrivDisplayName); + r = talloc(talloc_tos(), struct lsa_LookupPrivDisplayName); if (r == NULL) { return false; } @@ -2654,7 +2654,7 @@ static bool api_lsa_DeleteObject(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_DELETEOBJECT]; - r = talloc(NULL, struct lsa_DeleteObject); + r = talloc(talloc_tos(), struct lsa_DeleteObject); if (r == NULL) { return false; } @@ -2729,7 +2729,7 @@ static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT]; - r = talloc(NULL, struct lsa_EnumAccountsWithUserRight); + r = talloc(talloc_tos(), struct lsa_EnumAccountsWithUserRight); if (r == NULL) { return false; } @@ -2809,7 +2809,7 @@ static bool api_lsa_EnumAccountRights(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTRIGHTS]; - r = talloc(NULL, struct lsa_EnumAccountRights); + r = talloc(talloc_tos(), struct lsa_EnumAccountRights); if (r == NULL) { return false; } @@ -2889,7 +2889,7 @@ static bool api_lsa_AddAccountRights(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ADDACCOUNTRIGHTS]; - r = talloc(NULL, struct lsa_AddAccountRights); + r = talloc(talloc_tos(), struct lsa_AddAccountRights); if (r == NULL) { return false; } @@ -2962,7 +2962,7 @@ static bool api_lsa_RemoveAccountRights(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_REMOVEACCOUNTRIGHTS]; - r = talloc(NULL, struct lsa_RemoveAccountRights); + r = talloc(talloc_tos(), struct lsa_RemoveAccountRights); if (r == NULL) { return false; } @@ -3035,7 +3035,7 @@ static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID]; - r = talloc(NULL, struct lsa_QueryTrustedDomainInfoBySid); + r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfoBySid); if (r == NULL) { return false; } @@ -3115,7 +3115,7 @@ static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETTRUSTEDDOMAININFO]; - r = talloc(NULL, struct lsa_SetTrustedDomainInfo); + r = talloc(talloc_tos(), struct lsa_SetTrustedDomainInfo); if (r == NULL) { return false; } @@ -3188,7 +3188,7 @@ static bool api_lsa_DeleteTrustedDomain(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_DELETETRUSTEDDOMAIN]; - r = talloc(NULL, struct lsa_DeleteTrustedDomain); + r = talloc(talloc_tos(), struct lsa_DeleteTrustedDomain); if (r == NULL) { return false; } @@ -3261,7 +3261,7 @@ static bool api_lsa_StorePrivateData(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_STOREPRIVATEDATA]; - r = talloc(NULL, struct lsa_StorePrivateData); + r = talloc(talloc_tos(), struct lsa_StorePrivateData); if (r == NULL) { return false; } @@ -3334,7 +3334,7 @@ static bool api_lsa_RetrievePrivateData(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_RETRIEVEPRIVATEDATA]; - r = talloc(NULL, struct lsa_RetrievePrivateData); + r = talloc(talloc_tos(), struct lsa_RetrievePrivateData); if (r == NULL) { return false; } @@ -3407,7 +3407,7 @@ static bool api_lsa_OpenPolicy2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENPOLICY2]; - r = talloc(NULL, struct lsa_OpenPolicy2); + r = talloc(talloc_tos(), struct lsa_OpenPolicy2); if (r == NULL) { return false; } @@ -3487,7 +3487,7 @@ static bool api_lsa_GetUserName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_GETUSERNAME]; - r = talloc(NULL, struct lsa_GetUserName); + r = talloc(talloc_tos(), struct lsa_GetUserName); if (r == NULL) { return false; } @@ -3563,7 +3563,7 @@ static bool api_lsa_QueryInfoPolicy2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYINFOPOLICY2]; - r = talloc(NULL, struct lsa_QueryInfoPolicy2); + r = talloc(talloc_tos(), struct lsa_QueryInfoPolicy2); if (r == NULL) { return false; } @@ -3643,7 +3643,7 @@ static bool api_lsa_SetInfoPolicy2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFOPOLICY2]; - r = talloc(NULL, struct lsa_SetInfoPolicy2); + r = talloc(talloc_tos(), struct lsa_SetInfoPolicy2); if (r == NULL) { return false; } @@ -3716,7 +3716,7 @@ static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME]; - r = talloc(NULL, struct lsa_QueryTrustedDomainInfoByName); + r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfoByName); if (r == NULL) { return false; } @@ -3796,7 +3796,7 @@ static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETTRUSTEDDOMAININFOBYNAME]; - r = talloc(NULL, struct lsa_SetTrustedDomainInfoByName); + r = talloc(talloc_tos(), struct lsa_SetTrustedDomainInfoByName); if (r == NULL) { return false; } @@ -3869,7 +3869,7 @@ static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMTRUSTEDDOMAINSEX]; - r = talloc(NULL, struct lsa_EnumTrustedDomainsEx); + r = talloc(talloc_tos(), struct lsa_EnumTrustedDomainsEx); if (r == NULL) { return false; } @@ -3950,7 +3950,7 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAINEX]; - r = talloc(NULL, struct lsa_CreateTrustedDomainEx); + r = talloc(talloc_tos(), struct lsa_CreateTrustedDomainEx); if (r == NULL) { return false; } @@ -4023,7 +4023,7 @@ static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CLOSETRUSTEDDOMAINEX]; - r = talloc(NULL, struct lsa_CloseTrustedDomainEx); + r = talloc(talloc_tos(), struct lsa_CloseTrustedDomainEx); if (r == NULL) { return false; } @@ -4098,7 +4098,7 @@ static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYDOMAININFORMATIONPOLICY]; - r = talloc(NULL, struct lsa_QueryDomainInformationPolicy); + r = talloc(talloc_tos(), struct lsa_QueryDomainInformationPolicy); if (r == NULL) { return false; } @@ -4178,7 +4178,7 @@ static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_SETDOMAININFORMATIONPOLICY]; - r = talloc(NULL, struct lsa_SetDomainInformationPolicy); + r = talloc(talloc_tos(), struct lsa_SetDomainInformationPolicy); if (r == NULL) { return false; } @@ -4251,7 +4251,7 @@ static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_OPENTRUSTEDDOMAINBYNAME]; - r = talloc(NULL, struct lsa_OpenTrustedDomainByName); + r = talloc(talloc_tos(), struct lsa_OpenTrustedDomainByName); if (r == NULL) { return false; } @@ -4331,7 +4331,7 @@ static bool api_lsa_TestCall(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_TESTCALL]; - r = talloc(NULL, struct lsa_TestCall); + r = talloc(talloc_tos(), struct lsa_TestCall); if (r == NULL) { return false; } @@ -4404,7 +4404,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS2]; - r = talloc(NULL, struct lsa_LookupSids2); + r = talloc(talloc_tos(), struct lsa_LookupSids2); if (r == NULL) { return false; } @@ -4486,7 +4486,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES2]; - r = talloc(NULL, struct lsa_LookupNames2); + r = talloc(talloc_tos(), struct lsa_LookupNames2); if (r == NULL) { return false; } @@ -4568,7 +4568,7 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAINEX2]; - r = talloc(NULL, struct lsa_CreateTrustedDomainEx2); + r = talloc(talloc_tos(), struct lsa_CreateTrustedDomainEx2); if (r == NULL) { return false; } @@ -4641,7 +4641,7 @@ static bool api_lsa_CREDRWRITE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRWRITE]; - r = talloc(NULL, struct lsa_CREDRWRITE); + r = talloc(talloc_tos(), struct lsa_CREDRWRITE); if (r == NULL) { return false; } @@ -4714,7 +4714,7 @@ static bool api_lsa_CREDRREAD(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRREAD]; - r = talloc(NULL, struct lsa_CREDRREAD); + r = talloc(talloc_tos(), struct lsa_CREDRREAD); if (r == NULL) { return false; } @@ -4787,7 +4787,7 @@ static bool api_lsa_CREDRENUMERATE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRENUMERATE]; - r = talloc(NULL, struct lsa_CREDRENUMERATE); + r = talloc(talloc_tos(), struct lsa_CREDRENUMERATE); if (r == NULL) { return false; } @@ -4860,7 +4860,7 @@ static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRWRITEDOMAINCREDENTIALS]; - r = talloc(NULL, struct lsa_CREDRWRITEDOMAINCREDENTIALS); + r = talloc(talloc_tos(), struct lsa_CREDRWRITEDOMAINCREDENTIALS); if (r == NULL) { return false; } @@ -4933,7 +4933,7 @@ static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRREADDOMAINCREDENTIALS]; - r = talloc(NULL, struct lsa_CREDRREADDOMAINCREDENTIALS); + r = talloc(talloc_tos(), struct lsa_CREDRREADDOMAINCREDENTIALS); if (r == NULL) { return false; } @@ -5006,7 +5006,7 @@ static bool api_lsa_CREDRDELETE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRDELETE]; - r = talloc(NULL, struct lsa_CREDRDELETE); + r = talloc(talloc_tos(), struct lsa_CREDRDELETE); if (r == NULL) { return false; } @@ -5079,7 +5079,7 @@ static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRGETTARGETINFO]; - r = talloc(NULL, struct lsa_CREDRGETTARGETINFO); + r = talloc(talloc_tos(), struct lsa_CREDRGETTARGETINFO); if (r == NULL) { return false; } @@ -5152,7 +5152,7 @@ static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRPROFILELOADED]; - r = talloc(NULL, struct lsa_CREDRPROFILELOADED); + r = talloc(talloc_tos(), struct lsa_CREDRPROFILELOADED); if (r == NULL) { return false; } @@ -5225,7 +5225,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES3]; - r = talloc(NULL, struct lsa_LookupNames3); + r = talloc(talloc_tos(), struct lsa_LookupNames3); if (r == NULL) { return false; } @@ -5307,7 +5307,7 @@ static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRGETSESSIONTYPES]; - r = talloc(NULL, struct lsa_CREDRGETSESSIONTYPES); + r = talloc(talloc_tos(), struct lsa_CREDRGETSESSIONTYPES); if (r == NULL) { return false; } @@ -5380,7 +5380,7 @@ static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARREGISTERAUDITEVENT]; - r = talloc(NULL, struct lsa_LSARREGISTERAUDITEVENT); + r = talloc(talloc_tos(), struct lsa_LSARREGISTERAUDITEVENT); if (r == NULL) { return false; } @@ -5453,7 +5453,7 @@ static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARGENAUDITEVENT]; - r = talloc(NULL, struct lsa_LSARGENAUDITEVENT); + r = talloc(talloc_tos(), struct lsa_LSARGENAUDITEVENT); if (r == NULL) { return false; } @@ -5526,7 +5526,7 @@ static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARUNREGISTERAUDITEVENT]; - r = talloc(NULL, struct lsa_LSARUNREGISTERAUDITEVENT); + r = talloc(talloc_tos(), struct lsa_LSARUNREGISTERAUDITEVENT); if (r == NULL) { return false; } @@ -5599,7 +5599,7 @@ static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct lsa_lsaRQueryForestTrustInformation); + r = talloc(talloc_tos(), struct lsa_lsaRQueryForestTrustInformation); if (r == NULL) { return false; } @@ -5679,7 +5679,7 @@ static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARSETFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct lsa_LSARSETFORESTTRUSTINFORMATION); + r = talloc(talloc_tos(), struct lsa_LSARSETFORESTTRUSTINFORMATION); if (r == NULL) { return false; } @@ -5752,7 +5752,7 @@ static bool api_lsa_CREDRRENAME(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRRENAME]; - r = talloc(NULL, struct lsa_CREDRRENAME); + r = talloc(talloc_tos(), struct lsa_CREDRRENAME); if (r == NULL) { return false; } @@ -5825,7 +5825,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS3]; - r = talloc(NULL, struct lsa_LookupSids3); + r = talloc(talloc_tos(), struct lsa_LookupSids3); if (r == NULL) { return false; } @@ -5907,7 +5907,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES4]; - r = talloc(NULL, struct lsa_LookupNames4); + r = talloc(talloc_tos(), struct lsa_LookupNames4); if (r == NULL) { return false; } @@ -5989,7 +5989,7 @@ static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSAROPENPOLICYSCE]; - r = talloc(NULL, struct lsa_LSAROPENPOLICYSCE); + r = talloc(talloc_tos(), struct lsa_LSAROPENPOLICYSCE); if (r == NULL) { return false; } @@ -6062,7 +6062,7 @@ static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE]; - r = talloc(NULL, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE); + r = talloc(talloc_tos(), struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE); if (r == NULL) { return false; } @@ -6135,7 +6135,7 @@ static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE]; - r = talloc(NULL, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE); + r = talloc(talloc_tos(), struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE); if (r == NULL) { return false; } @@ -6208,7 +6208,7 @@ static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p) call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTREPORTSECURITYEVENT]; - r = talloc(NULL, struct lsa_LSARADTREPORTSECURITYEVENT); + r = talloc(talloc_tos(), struct lsa_LSARADTREPORTSECURITYEVENT); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 673f9503df..808493463a 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -17,7 +17,7 @@ static bool api_netr_LogonUasLogon(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGON]; - r = talloc(NULL, struct netr_LogonUasLogon); + r = talloc(talloc_tos(), struct netr_LogonUasLogon); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_netr_LogonUasLogoff(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGOFF]; - r = talloc(NULL, struct netr_LogonUasLogoff); + r = talloc(talloc_tos(), struct netr_LogonUasLogoff); if (r == NULL) { return false; } @@ -177,7 +177,7 @@ static bool api_netr_LogonSamLogon(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGON]; - r = talloc(NULL, struct netr_LogonSamLogon); + r = talloc(talloc_tos(), struct netr_LogonSamLogon); if (r == NULL) { return false; } @@ -264,7 +264,7 @@ static bool api_netr_LogonSamLogoff(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGOFF]; - r = talloc(NULL, struct netr_LogonSamLogoff); + r = talloc(talloc_tos(), struct netr_LogonSamLogoff); if (r == NULL) { return false; } @@ -339,7 +339,7 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERREQCHALLENGE]; - r = talloc(NULL, struct netr_ServerReqChallenge); + r = talloc(talloc_tos(), struct netr_ServerReqChallenge); if (r == NULL) { return false; } @@ -414,7 +414,7 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE]; - r = talloc(NULL, struct netr_ServerAuthenticate); + r = talloc(talloc_tos(), struct netr_ServerAuthenticate); if (r == NULL) { return false; } @@ -489,7 +489,7 @@ static bool api_netr_ServerPasswordSet(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET]; - r = talloc(NULL, struct netr_ServerPasswordSet); + r = talloc(talloc_tos(), struct netr_ServerPasswordSet); if (r == NULL) { return false; } @@ -569,7 +569,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEDELTAS]; - r = talloc(NULL, struct netr_DatabaseDeltas); + r = talloc(talloc_tos(), struct netr_DatabaseDeltas); if (r == NULL) { return false; } @@ -651,7 +651,7 @@ static bool api_netr_DatabaseSync(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC]; - r = talloc(NULL, struct netr_DatabaseSync); + r = talloc(talloc_tos(), struct netr_DatabaseSync); if (r == NULL) { return false; } @@ -733,7 +733,7 @@ static bool api_netr_AccountDeltas(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTDELTAS]; - r = talloc(NULL, struct netr_AccountDeltas); + r = talloc(talloc_tos(), struct netr_AccountDeltas); if (r == NULL) { return false; } @@ -832,7 +832,7 @@ static bool api_netr_AccountSync(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTSYNC]; - r = talloc(NULL, struct netr_AccountSync); + r = talloc(talloc_tos(), struct netr_AccountSync); if (r == NULL) { return false; } @@ -932,7 +932,7 @@ static bool api_netr_GetDcName(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_GETDCNAME]; - r = talloc(NULL, struct netr_GetDcName); + r = talloc(talloc_tos(), struct netr_GetDcName); if (r == NULL) { return false; } @@ -1012,7 +1012,7 @@ static bool api_netr_LogonControl(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL]; - r = talloc(NULL, struct netr_LogonControl); + r = talloc(talloc_tos(), struct netr_LogonControl); if (r == NULL) { return false; } @@ -1092,7 +1092,7 @@ static bool api_netr_GetAnyDCName(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_GETANYDCNAME]; - r = talloc(NULL, struct netr_GetAnyDCName); + r = talloc(talloc_tos(), struct netr_GetAnyDCName); if (r == NULL) { return false; } @@ -1172,7 +1172,7 @@ static bool api_netr_LogonControl2(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2]; - r = talloc(NULL, struct netr_LogonControl2); + r = talloc(talloc_tos(), struct netr_LogonControl2); if (r == NULL) { return false; } @@ -1252,7 +1252,7 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE2]; - r = talloc(NULL, struct netr_ServerAuthenticate2); + r = talloc(talloc_tos(), struct netr_ServerAuthenticate2); if (r == NULL) { return false; } @@ -1328,7 +1328,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC2]; - r = talloc(NULL, struct netr_DatabaseSync2); + r = talloc(talloc_tos(), struct netr_DatabaseSync2); if (r == NULL) { return false; } @@ -1410,7 +1410,7 @@ static bool api_netr_DatabaseRedo(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEREDO]; - r = talloc(NULL, struct netr_DatabaseRedo); + r = talloc(talloc_tos(), struct netr_DatabaseRedo); if (r == NULL) { return false; } @@ -1491,7 +1491,7 @@ static bool api_netr_LogonControl2Ex(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2EX]; - r = talloc(NULL, struct netr_LogonControl2Ex); + r = talloc(talloc_tos(), struct netr_LogonControl2Ex); if (r == NULL) { return false; } @@ -1571,7 +1571,7 @@ static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINS]; - r = talloc(NULL, struct netr_NetrEnumerateTrustedDomains); + r = talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomains); if (r == NULL) { return false; } @@ -1651,7 +1651,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAME]; - r = talloc(NULL, struct netr_DsRGetDCName); + r = talloc(talloc_tos(), struct netr_DsRGetDCName); if (r == NULL) { return false; } @@ -1731,7 +1731,7 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONDUMMYROUTINE1]; - r = talloc(NULL, struct netr_NETRLOGONDUMMYROUTINE1); + r = talloc(talloc_tos(), struct netr_NETRLOGONDUMMYROUTINE1); if (r == NULL) { return false; } @@ -1804,7 +1804,7 @@ static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSETSERVICEBITS]; - r = talloc(NULL, struct netr_NETRLOGONSETSERVICEBITS); + r = talloc(talloc_tos(), struct netr_NETRLOGONSETSERVICEBITS); if (r == NULL) { return false; } @@ -1877,7 +1877,7 @@ static bool api_netr_LogonGetTrustRid(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETTRUSTRID]; - r = talloc(NULL, struct netr_LogonGetTrustRid); + r = talloc(talloc_tos(), struct netr_LogonGetTrustRid); if (r == NULL) { return false; } @@ -1957,7 +1957,7 @@ static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST]; - r = talloc(NULL, struct netr_NETRLOGONCOMPUTESERVERDIGEST); + r = talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTESERVERDIGEST); if (r == NULL) { return false; } @@ -2030,7 +2030,7 @@ static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST]; - r = talloc(NULL, struct netr_NETRLOGONCOMPUTECLIENTDIGEST); + r = talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTECLIENTDIGEST); if (r == NULL) { return false; } @@ -2103,7 +2103,7 @@ static bool api_netr_ServerAuthenticate3(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE3]; - r = talloc(NULL, struct netr_ServerAuthenticate3); + r = talloc(talloc_tos(), struct netr_ServerAuthenticate3); if (r == NULL) { return false; } @@ -2185,7 +2185,7 @@ static bool api_netr_DsRGetDCNameEx(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX]; - r = talloc(NULL, struct netr_DsRGetDCNameEx); + r = talloc(talloc_tos(), struct netr_DsRGetDCNameEx); if (r == NULL) { return false; } @@ -2265,7 +2265,7 @@ static bool api_netr_DsRGetSiteName(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETSITENAME]; - r = talloc(NULL, struct netr_DsRGetSiteName); + r = talloc(talloc_tos(), struct netr_DsRGetSiteName); if (r == NULL) { return false; } @@ -2345,7 +2345,7 @@ static bool api_netr_LogonGetDomainInfo(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETDOMAININFO]; - r = talloc(NULL, struct netr_LogonGetDomainInfo); + r = talloc(talloc_tos(), struct netr_LogonGetDomainInfo); if (r == NULL) { return false; } @@ -2426,7 +2426,7 @@ static bool api_netr_ServerPasswordSet2(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET2]; - r = talloc(NULL, struct netr_ServerPasswordSet2); + r = talloc(talloc_tos(), struct netr_ServerPasswordSet2); if (r == NULL) { return false; } @@ -2506,7 +2506,7 @@ static bool api_netr_ServerPasswordGet(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDGET]; - r = talloc(NULL, struct netr_ServerPasswordGet); + r = talloc(talloc_tos(), struct netr_ServerPasswordGet); if (r == NULL) { return false; } @@ -2592,7 +2592,7 @@ static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSENDTOSAM]; - r = talloc(NULL, struct netr_NETRLOGONSENDTOSAM); + r = talloc(talloc_tos(), struct netr_NETRLOGONSENDTOSAM); if (r == NULL) { return false; } @@ -2665,7 +2665,7 @@ static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESW]; - r = talloc(NULL, struct netr_DsRAddressToSitenamesW); + r = talloc(talloc_tos(), struct netr_DsRAddressToSitenamesW); if (r == NULL) { return false; } @@ -2745,7 +2745,7 @@ static bool api_netr_DsRGetDCNameEx2(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX2]; - r = talloc(NULL, struct netr_DsRGetDCNameEx2); + r = talloc(talloc_tos(), struct netr_DsRGetDCNameEx2); if (r == NULL) { return false; } @@ -2825,7 +2825,7 @@ static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN]; - r = talloc(NULL, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN); + r = talloc(talloc_tos(), struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN); if (r == NULL) { return false; } @@ -2898,7 +2898,7 @@ static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX]; - r = talloc(NULL, struct netr_NetrEnumerateTrustedDomainsEx); + r = talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomainsEx); if (r == NULL) { return false; } @@ -2978,7 +2978,7 @@ static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESEXW]; - r = talloc(NULL, struct netr_DsRAddressToSitenamesExW); + r = talloc(talloc_tos(), struct netr_DsRAddressToSitenamesExW); if (r == NULL) { return false; } @@ -3058,7 +3058,7 @@ static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCSITECOVERAGEW]; - r = talloc(NULL, struct netr_DsrGetDcSiteCoverageW); + r = talloc(talloc_tos(), struct netr_DsrGetDcSiteCoverageW); if (r == NULL) { return false; } @@ -3138,7 +3138,7 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONEX]; - r = talloc(NULL, struct netr_LogonSamLogonEx); + r = talloc(talloc_tos(), struct netr_LogonSamLogonEx); if (r == NULL) { return false; } @@ -3225,7 +3225,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRENUMERATEDOMAINTRUSTS]; - r = talloc(NULL, struct netr_DsrEnumerateDomainTrusts); + r = talloc(talloc_tos(), struct netr_DsrEnumerateDomainTrusts); if (r == NULL) { return false; } @@ -3305,7 +3305,7 @@ static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS]; - r = talloc(NULL, struct netr_DsrDeregisterDNSHostRecords); + r = talloc(talloc_tos(), struct netr_DsrDeregisterDNSHostRecords); if (r == NULL) { return false; } @@ -3378,7 +3378,7 @@ static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_SERVERTRUSTPASSWORDSGET]; - r = talloc(NULL, struct netr_ServerTrustPasswordsGet); + r = talloc(talloc_tos(), struct netr_ServerTrustPasswordsGet); if (r == NULL) { return false; } @@ -3470,7 +3470,7 @@ static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct netr_DsRGetForestTrustInformation); + r = talloc(talloc_tos(), struct netr_DsRGetForestTrustInformation); if (r == NULL) { return false; } @@ -3550,7 +3550,7 @@ static bool api_netr_GetForestTrustInformation(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_GETFORESTTRUSTINFORMATION]; - r = talloc(NULL, struct netr_GetForestTrustInformation); + r = talloc(talloc_tos(), struct netr_GetForestTrustInformation); if (r == NULL) { return false; } @@ -3636,7 +3636,7 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONWITHFLAGS]; - r = talloc(NULL, struct netr_LogonSamLogonWithFlags); + r = talloc(talloc_tos(), struct netr_LogonSamLogonWithFlags); if (r == NULL) { return false; } @@ -3724,7 +3724,7 @@ static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p) call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERGETTRUSTINFO]; - r = talloc(NULL, struct netr_NETRSERVERGETTRUSTINFO); + r = talloc(talloc_tos(), struct netr_NETRSERVERGETTRUSTINFO); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 3312964178..47a51ed410 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -17,7 +17,7 @@ static bool api_samr_Connect(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CONNECT]; - r = talloc(NULL, struct samr_Connect); + r = talloc(talloc_tos(), struct samr_Connect); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_samr_Close(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CLOSE]; - r = talloc(NULL, struct samr_Close); + r = talloc(talloc_tos(), struct samr_Close); if (r == NULL) { return false; } @@ -172,7 +172,7 @@ static bool api_samr_SetSecurity(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETSECURITY]; - r = talloc(NULL, struct samr_SetSecurity); + r = talloc(talloc_tos(), struct samr_SetSecurity); if (r == NULL) { return false; } @@ -245,7 +245,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYSECURITY]; - r = talloc(NULL, struct samr_QuerySecurity); + r = talloc(talloc_tos(), struct samr_QuerySecurity); if (r == NULL) { return false; } @@ -325,7 +325,7 @@ static bool api_samr_Shutdown(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SHUTDOWN]; - r = talloc(NULL, struct samr_Shutdown); + r = talloc(talloc_tos(), struct samr_Shutdown); if (r == NULL) { return false; } @@ -398,7 +398,7 @@ static bool api_samr_LookupDomain(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPDOMAIN]; - r = talloc(NULL, struct samr_LookupDomain); + r = talloc(talloc_tos(), struct samr_LookupDomain); if (r == NULL) { return false; } @@ -478,7 +478,7 @@ static bool api_samr_EnumDomains(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINS]; - r = talloc(NULL, struct samr_EnumDomains); + r = talloc(talloc_tos(), struct samr_EnumDomains); if (r == NULL) { return false; } @@ -565,7 +565,7 @@ static bool api_samr_OpenDomain(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_OPENDOMAIN]; - r = talloc(NULL, struct samr_OpenDomain); + r = talloc(talloc_tos(), struct samr_OpenDomain); if (r == NULL) { return false; } @@ -645,7 +645,7 @@ static bool api_samr_QueryDomainInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYDOMAININFO]; - r = talloc(NULL, struct samr_QueryDomainInfo); + r = talloc(talloc_tos(), struct samr_QueryDomainInfo); if (r == NULL) { return false; } @@ -725,7 +725,7 @@ static bool api_samr_SetDomainInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETDOMAININFO]; - r = talloc(NULL, struct samr_SetDomainInfo); + r = talloc(talloc_tos(), struct samr_SetDomainInfo); if (r == NULL) { return false; } @@ -798,7 +798,7 @@ static bool api_samr_CreateDomainGroup(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CREATEDOMAINGROUP]; - r = talloc(NULL, struct samr_CreateDomainGroup); + r = talloc(talloc_tos(), struct samr_CreateDomainGroup); if (r == NULL) { return false; } @@ -884,7 +884,7 @@ static bool api_samr_EnumDomainGroups(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINGROUPS]; - r = talloc(NULL, struct samr_EnumDomainGroups); + r = talloc(talloc_tos(), struct samr_EnumDomainGroups); if (r == NULL) { return false; } @@ -971,7 +971,7 @@ static bool api_samr_CreateUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CREATEUSER]; - r = talloc(NULL, struct samr_CreateUser); + r = talloc(talloc_tos(), struct samr_CreateUser); if (r == NULL) { return false; } @@ -1057,7 +1057,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINUSERS]; - r = talloc(NULL, struct samr_EnumDomainUsers); + r = talloc(talloc_tos(), struct samr_EnumDomainUsers); if (r == NULL) { return false; } @@ -1144,7 +1144,7 @@ static bool api_samr_CreateDomAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CREATEDOMALIAS]; - r = talloc(NULL, struct samr_CreateDomAlias); + r = talloc(talloc_tos(), struct samr_CreateDomAlias); if (r == NULL) { return false; } @@ -1230,7 +1230,7 @@ static bool api_samr_EnumDomainAliases(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ENUMDOMAINALIASES]; - r = talloc(NULL, struct samr_EnumDomainAliases); + r = talloc(talloc_tos(), struct samr_EnumDomainAliases); if (r == NULL) { return false; } @@ -1317,7 +1317,7 @@ static bool api_samr_GetAliasMembership(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETALIASMEMBERSHIP]; - r = talloc(NULL, struct samr_GetAliasMembership); + r = talloc(talloc_tos(), struct samr_GetAliasMembership); if (r == NULL) { return false; } @@ -1397,7 +1397,7 @@ static bool api_samr_LookupNames(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPNAMES]; - r = talloc(NULL, struct samr_LookupNames); + r = talloc(talloc_tos(), struct samr_LookupNames); if (r == NULL) { return false; } @@ -1483,7 +1483,7 @@ static bool api_samr_LookupRids(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_LOOKUPRIDS]; - r = talloc(NULL, struct samr_LookupRids); + r = talloc(talloc_tos(), struct samr_LookupRids); if (r == NULL) { return false; } @@ -1569,7 +1569,7 @@ static bool api_samr_OpenGroup(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_OPENGROUP]; - r = talloc(NULL, struct samr_OpenGroup); + r = talloc(talloc_tos(), struct samr_OpenGroup); if (r == NULL) { return false; } @@ -1649,7 +1649,7 @@ static bool api_samr_QueryGroupInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYGROUPINFO]; - r = talloc(NULL, struct samr_QueryGroupInfo); + r = talloc(talloc_tos(), struct samr_QueryGroupInfo); if (r == NULL) { return false; } @@ -1729,7 +1729,7 @@ static bool api_samr_SetGroupInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETGROUPINFO]; - r = talloc(NULL, struct samr_SetGroupInfo); + r = talloc(talloc_tos(), struct samr_SetGroupInfo); if (r == NULL) { return false; } @@ -1802,7 +1802,7 @@ static bool api_samr_AddGroupMember(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ADDGROUPMEMBER]; - r = talloc(NULL, struct samr_AddGroupMember); + r = talloc(talloc_tos(), struct samr_AddGroupMember); if (r == NULL) { return false; } @@ -1875,7 +1875,7 @@ static bool api_samr_DeleteDomainGroup(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_DELETEDOMAINGROUP]; - r = talloc(NULL, struct samr_DeleteDomainGroup); + r = talloc(talloc_tos(), struct samr_DeleteDomainGroup); if (r == NULL) { return false; } @@ -1950,7 +1950,7 @@ static bool api_samr_DeleteGroupMember(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_DELETEGROUPMEMBER]; - r = talloc(NULL, struct samr_DeleteGroupMember); + r = talloc(talloc_tos(), struct samr_DeleteGroupMember); if (r == NULL) { return false; } @@ -2023,7 +2023,7 @@ static bool api_samr_QueryGroupMember(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYGROUPMEMBER]; - r = talloc(NULL, struct samr_QueryGroupMember); + r = talloc(talloc_tos(), struct samr_QueryGroupMember); if (r == NULL) { return false; } @@ -2103,7 +2103,7 @@ static bool api_samr_SetMemberAttributesOfGroup(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP]; - r = talloc(NULL, struct samr_SetMemberAttributesOfGroup); + r = talloc(talloc_tos(), struct samr_SetMemberAttributesOfGroup); if (r == NULL) { return false; } @@ -2176,7 +2176,7 @@ static bool api_samr_OpenAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_OPENALIAS]; - r = talloc(NULL, struct samr_OpenAlias); + r = talloc(talloc_tos(), struct samr_OpenAlias); if (r == NULL) { return false; } @@ -2256,7 +2256,7 @@ static bool api_samr_QueryAliasInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYALIASINFO]; - r = talloc(NULL, struct samr_QueryAliasInfo); + r = talloc(talloc_tos(), struct samr_QueryAliasInfo); if (r == NULL) { return false; } @@ -2336,7 +2336,7 @@ static bool api_samr_SetAliasInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETALIASINFO]; - r = talloc(NULL, struct samr_SetAliasInfo); + r = talloc(talloc_tos(), struct samr_SetAliasInfo); if (r == NULL) { return false; } @@ -2409,7 +2409,7 @@ static bool api_samr_DeleteDomAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_DELETEDOMALIAS]; - r = talloc(NULL, struct samr_DeleteDomAlias); + r = talloc(talloc_tos(), struct samr_DeleteDomAlias); if (r == NULL) { return false; } @@ -2484,7 +2484,7 @@ static bool api_samr_AddAliasMember(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ADDALIASMEMBER]; - r = talloc(NULL, struct samr_AddAliasMember); + r = talloc(talloc_tos(), struct samr_AddAliasMember); if (r == NULL) { return false; } @@ -2557,7 +2557,7 @@ static bool api_samr_DeleteAliasMember(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_DELETEALIASMEMBER]; - r = talloc(NULL, struct samr_DeleteAliasMember); + r = talloc(talloc_tos(), struct samr_DeleteAliasMember); if (r == NULL) { return false; } @@ -2630,7 +2630,7 @@ static bool api_samr_GetMembersInAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETMEMBERSINALIAS]; - r = talloc(NULL, struct samr_GetMembersInAlias); + r = talloc(talloc_tos(), struct samr_GetMembersInAlias); if (r == NULL) { return false; } @@ -2710,7 +2710,7 @@ static bool api_samr_OpenUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_OPENUSER]; - r = talloc(NULL, struct samr_OpenUser); + r = talloc(talloc_tos(), struct samr_OpenUser); if (r == NULL) { return false; } @@ -2790,7 +2790,7 @@ static bool api_samr_DeleteUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_DELETEUSER]; - r = talloc(NULL, struct samr_DeleteUser); + r = talloc(talloc_tos(), struct samr_DeleteUser); if (r == NULL) { return false; } @@ -2865,7 +2865,7 @@ static bool api_samr_QueryUserInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYUSERINFO]; - r = talloc(NULL, struct samr_QueryUserInfo); + r = talloc(talloc_tos(), struct samr_QueryUserInfo); if (r == NULL) { return false; } @@ -2945,7 +2945,7 @@ static bool api_samr_SetUserInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETUSERINFO]; - r = talloc(NULL, struct samr_SetUserInfo); + r = talloc(talloc_tos(), struct samr_SetUserInfo); if (r == NULL) { return false; } @@ -3018,7 +3018,7 @@ static bool api_samr_ChangePasswordUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER]; - r = talloc(NULL, struct samr_ChangePasswordUser); + r = talloc(talloc_tos(), struct samr_ChangePasswordUser); if (r == NULL) { return false; } @@ -3091,7 +3091,7 @@ static bool api_samr_GetGroupsForUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETGROUPSFORUSER]; - r = talloc(NULL, struct samr_GetGroupsForUser); + r = talloc(talloc_tos(), struct samr_GetGroupsForUser); if (r == NULL) { return false; } @@ -3171,7 +3171,7 @@ static bool api_samr_QueryDisplayInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO]; - r = talloc(NULL, struct samr_QueryDisplayInfo); + r = talloc(talloc_tos(), struct samr_QueryDisplayInfo); if (r == NULL) { return false; } @@ -3263,7 +3263,7 @@ static bool api_samr_GetDisplayEnumerationIndex(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETDISPLAYENUMERATIONINDEX]; - r = talloc(NULL, struct samr_GetDisplayEnumerationIndex); + r = talloc(talloc_tos(), struct samr_GetDisplayEnumerationIndex); if (r == NULL) { return false; } @@ -3343,7 +3343,7 @@ static bool api_samr_TestPrivateFunctionsDomain(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN]; - r = talloc(NULL, struct samr_TestPrivateFunctionsDomain); + r = talloc(talloc_tos(), struct samr_TestPrivateFunctionsDomain); if (r == NULL) { return false; } @@ -3416,7 +3416,7 @@ static bool api_samr_TestPrivateFunctionsUser(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_TESTPRIVATEFUNCTIONSUSER]; - r = talloc(NULL, struct samr_TestPrivateFunctionsUser); + r = talloc(talloc_tos(), struct samr_TestPrivateFunctionsUser); if (r == NULL) { return false; } @@ -3489,7 +3489,7 @@ static bool api_samr_GetUserPwInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETUSERPWINFO]; - r = talloc(NULL, struct samr_GetUserPwInfo); + r = talloc(talloc_tos(), struct samr_GetUserPwInfo); if (r == NULL) { return false; } @@ -3569,7 +3569,7 @@ static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN]; - r = talloc(NULL, struct samr_RemoveMemberFromForeignDomain); + r = talloc(talloc_tos(), struct samr_RemoveMemberFromForeignDomain); if (r == NULL) { return false; } @@ -3642,7 +3642,7 @@ static bool api_samr_QueryDomainInfo2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYDOMAININFO2]; - r = talloc(NULL, struct samr_QueryDomainInfo2); + r = talloc(talloc_tos(), struct samr_QueryDomainInfo2); if (r == NULL) { return false; } @@ -3722,7 +3722,7 @@ static bool api_samr_QueryUserInfo2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYUSERINFO2]; - r = talloc(NULL, struct samr_QueryUserInfo2); + r = talloc(talloc_tos(), struct samr_QueryUserInfo2); if (r == NULL) { return false; } @@ -3802,7 +3802,7 @@ static bool api_samr_QueryDisplayInfo2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO2]; - r = talloc(NULL, struct samr_QueryDisplayInfo2); + r = talloc(talloc_tos(), struct samr_QueryDisplayInfo2); if (r == NULL) { return false; } @@ -3894,7 +3894,7 @@ static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETDISPLAYENUMERATIONINDEX2]; - r = talloc(NULL, struct samr_GetDisplayEnumerationIndex2); + r = talloc(talloc_tos(), struct samr_GetDisplayEnumerationIndex2); if (r == NULL) { return false; } @@ -3974,7 +3974,7 @@ static bool api_samr_CreateUser2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CREATEUSER2]; - r = talloc(NULL, struct samr_CreateUser2); + r = talloc(talloc_tos(), struct samr_CreateUser2); if (r == NULL) { return false; } @@ -4066,7 +4066,7 @@ static bool api_samr_QueryDisplayInfo3(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_QUERYDISPLAYINFO3]; - r = talloc(NULL, struct samr_QueryDisplayInfo3); + r = talloc(talloc_tos(), struct samr_QueryDisplayInfo3); if (r == NULL) { return false; } @@ -4158,7 +4158,7 @@ static bool api_samr_AddMultipleMembersToAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS]; - r = talloc(NULL, struct samr_AddMultipleMembersToAlias); + r = talloc(talloc_tos(), struct samr_AddMultipleMembersToAlias); if (r == NULL) { return false; } @@ -4231,7 +4231,7 @@ static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS]; - r = talloc(NULL, struct samr_RemoveMultipleMembersFromAlias); + r = talloc(talloc_tos(), struct samr_RemoveMultipleMembersFromAlias); if (r == NULL) { return false; } @@ -4304,7 +4304,7 @@ static bool api_samr_OemChangePasswordUser2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_OEMCHANGEPASSWORDUSER2]; - r = talloc(NULL, struct samr_OemChangePasswordUser2); + r = talloc(talloc_tos(), struct samr_OemChangePasswordUser2); if (r == NULL) { return false; } @@ -4377,7 +4377,7 @@ static bool api_samr_ChangePasswordUser2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER2]; - r = talloc(NULL, struct samr_ChangePasswordUser2); + r = talloc(talloc_tos(), struct samr_ChangePasswordUser2); if (r == NULL) { return false; } @@ -4450,7 +4450,7 @@ static bool api_samr_GetDomPwInfo(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETDOMPWINFO]; - r = talloc(NULL, struct samr_GetDomPwInfo); + r = talloc(talloc_tos(), struct samr_GetDomPwInfo); if (r == NULL) { return false; } @@ -4530,7 +4530,7 @@ static bool api_samr_Connect2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CONNECT2]; - r = talloc(NULL, struct samr_Connect2); + r = talloc(talloc_tos(), struct samr_Connect2); if (r == NULL) { return false; } @@ -4610,7 +4610,7 @@ static bool api_samr_SetUserInfo2(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETUSERINFO2]; - r = talloc(NULL, struct samr_SetUserInfo2); + r = talloc(talloc_tos(), struct samr_SetUserInfo2); if (r == NULL) { return false; } @@ -4683,7 +4683,7 @@ static bool api_samr_SetBootKeyInformation(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETBOOTKEYINFORMATION]; - r = talloc(NULL, struct samr_SetBootKeyInformation); + r = talloc(talloc_tos(), struct samr_SetBootKeyInformation); if (r == NULL) { return false; } @@ -4756,7 +4756,7 @@ static bool api_samr_GetBootKeyInformation(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_GETBOOTKEYINFORMATION]; - r = talloc(NULL, struct samr_GetBootKeyInformation); + r = talloc(talloc_tos(), struct samr_GetBootKeyInformation); if (r == NULL) { return false; } @@ -4836,7 +4836,7 @@ static bool api_samr_Connect3(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CONNECT3]; - r = talloc(NULL, struct samr_Connect3); + r = talloc(talloc_tos(), struct samr_Connect3); if (r == NULL) { return false; } @@ -4916,7 +4916,7 @@ static bool api_samr_Connect4(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CONNECT4]; - r = talloc(NULL, struct samr_Connect4); + r = talloc(talloc_tos(), struct samr_Connect4); if (r == NULL) { return false; } @@ -4996,7 +4996,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CHANGEPASSWORDUSER3]; - r = talloc(NULL, struct samr_ChangePasswordUser3); + r = talloc(talloc_tos(), struct samr_ChangePasswordUser3); if (r == NULL) { return false; } @@ -5082,7 +5082,7 @@ static bool api_samr_Connect5(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_CONNECT5]; - r = talloc(NULL, struct samr_Connect5); + r = talloc(talloc_tos(), struct samr_Connect5); if (r == NULL) { return false; } @@ -5174,7 +5174,7 @@ static bool api_samr_RidToSid(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_RIDTOSID]; - r = talloc(NULL, struct samr_RidToSid); + r = talloc(talloc_tos(), struct samr_RidToSid); if (r == NULL) { return false; } @@ -5254,7 +5254,7 @@ static bool api_samr_SetDsrmPassword(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_SETDSRMPASSWORD]; - r = talloc(NULL, struct samr_SetDsrmPassword); + r = talloc(talloc_tos(), struct samr_SetDsrmPassword); if (r == NULL) { return false; } @@ -5327,7 +5327,7 @@ static bool api_samr_ValidatePassword(pipes_struct *p) call = &ndr_table_samr.calls[NDR_SAMR_VALIDATEPASSWORD]; - r = talloc(NULL, struct samr_ValidatePassword); + r = talloc(talloc_tos(), struct samr_ValidatePassword); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c index 44fe358a84..afd458765e 100644 --- a/source3/librpc/gen_ndr/srv_srvsvc.c +++ b/source3/librpc/gen_ndr/srv_srvsvc.c @@ -17,7 +17,7 @@ static bool api_srvsvc_NetCharDevEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVENUM]; - r = talloc(NULL, struct srvsvc_NetCharDevEnum); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevEnum); if (r == NULL) { return false; } @@ -100,7 +100,7 @@ static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVGETINFO]; - r = talloc(NULL, struct srvsvc_NetCharDevGetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevGetInfo); if (r == NULL) { return false; } @@ -180,7 +180,7 @@ static bool api_srvsvc_NetCharDevControl(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVCONTROL]; - r = talloc(NULL, struct srvsvc_NetCharDevControl); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevControl); if (r == NULL) { return false; } @@ -253,7 +253,7 @@ static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQENUM]; - r = talloc(NULL, struct srvsvc_NetCharDevQEnum); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevQEnum); if (r == NULL) { return false; } @@ -336,7 +336,7 @@ static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQGETINFO]; - r = talloc(NULL, struct srvsvc_NetCharDevQGetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevQGetInfo); if (r == NULL) { return false; } @@ -416,7 +416,7 @@ static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQSETINFO]; - r = talloc(NULL, struct srvsvc_NetCharDevQSetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevQSetInfo); if (r == NULL) { return false; } @@ -491,7 +491,7 @@ static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQPURGE]; - r = talloc(NULL, struct srvsvc_NetCharDevQPurge); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevQPurge); if (r == NULL) { return false; } @@ -564,7 +564,7 @@ static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQPURGESELF]; - r = talloc(NULL, struct srvsvc_NetCharDevQPurgeSelf); + r = talloc(talloc_tos(), struct srvsvc_NetCharDevQPurgeSelf); if (r == NULL) { return false; } @@ -637,7 +637,7 @@ static bool api_srvsvc_NetConnEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCONNENUM]; - r = talloc(NULL, struct srvsvc_NetConnEnum); + r = talloc(talloc_tos(), struct srvsvc_NetConnEnum); if (r == NULL) { return false; } @@ -720,7 +720,7 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILEENUM]; - r = talloc(NULL, struct srvsvc_NetFileEnum); + r = talloc(talloc_tos(), struct srvsvc_NetFileEnum); if (r == NULL) { return false; } @@ -803,7 +803,7 @@ static bool api_srvsvc_NetFileGetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILEGETINFO]; - r = talloc(NULL, struct srvsvc_NetFileGetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetFileGetInfo); if (r == NULL) { return false; } @@ -883,7 +883,7 @@ static bool api_srvsvc_NetFileClose(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILECLOSE]; - r = talloc(NULL, struct srvsvc_NetFileClose); + r = talloc(talloc_tos(), struct srvsvc_NetFileClose); if (r == NULL) { return false; } @@ -956,7 +956,7 @@ static bool api_srvsvc_NetSessEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSESSENUM]; - r = talloc(NULL, struct srvsvc_NetSessEnum); + r = talloc(talloc_tos(), struct srvsvc_NetSessEnum); if (r == NULL) { return false; } @@ -1039,7 +1039,7 @@ static bool api_srvsvc_NetSessDel(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSESSDEL]; - r = talloc(NULL, struct srvsvc_NetSessDel); + r = talloc(talloc_tos(), struct srvsvc_NetSessDel); if (r == NULL) { return false; } @@ -1112,7 +1112,7 @@ static bool api_srvsvc_NetShareAdd(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREADD]; - r = talloc(NULL, struct srvsvc_NetShareAdd); + r = talloc(talloc_tos(), struct srvsvc_NetShareAdd); if (r == NULL) { return false; } @@ -1187,7 +1187,7 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREENUMALL]; - r = talloc(NULL, struct srvsvc_NetShareEnumAll); + r = talloc(talloc_tos(), struct srvsvc_NetShareEnumAll); if (r == NULL) { return false; } @@ -1270,7 +1270,7 @@ static bool api_srvsvc_NetShareGetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREGETINFO]; - r = talloc(NULL, struct srvsvc_NetShareGetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetShareGetInfo); if (r == NULL) { return false; } @@ -1350,7 +1350,7 @@ static bool api_srvsvc_NetShareSetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHARESETINFO]; - r = talloc(NULL, struct srvsvc_NetShareSetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetShareSetInfo); if (r == NULL) { return false; } @@ -1425,7 +1425,7 @@ static bool api_srvsvc_NetShareDel(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDEL]; - r = talloc(NULL, struct srvsvc_NetShareDel); + r = talloc(talloc_tos(), struct srvsvc_NetShareDel); if (r == NULL) { return false; } @@ -1498,7 +1498,7 @@ static bool api_srvsvc_NetShareDelSticky(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELSTICKY]; - r = talloc(NULL, struct srvsvc_NetShareDelSticky); + r = talloc(talloc_tos(), struct srvsvc_NetShareDelSticky); if (r == NULL) { return false; } @@ -1571,7 +1571,7 @@ static bool api_srvsvc_NetShareCheck(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHARECHECK]; - r = talloc(NULL, struct srvsvc_NetShareCheck); + r = talloc(talloc_tos(), struct srvsvc_NetShareCheck); if (r == NULL) { return false; } @@ -1651,7 +1651,7 @@ static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSRVGETINFO]; - r = talloc(NULL, struct srvsvc_NetSrvGetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetSrvGetInfo); if (r == NULL) { return false; } @@ -1731,7 +1731,7 @@ static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSRVSETINFO]; - r = talloc(NULL, struct srvsvc_NetSrvSetInfo); + r = talloc(talloc_tos(), struct srvsvc_NetSrvSetInfo); if (r == NULL) { return false; } @@ -1806,7 +1806,7 @@ static bool api_srvsvc_NetDiskEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETDISKENUM]; - r = talloc(NULL, struct srvsvc_NetDiskEnum); + r = talloc(talloc_tos(), struct srvsvc_NetDiskEnum); if (r == NULL) { return false; } @@ -1888,7 +1888,7 @@ static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERSTATISTICSGET]; - r = talloc(NULL, struct srvsvc_NetServerStatisticsGet); + r = talloc(talloc_tos(), struct srvsvc_NetServerStatisticsGet); if (r == NULL) { return false; } @@ -1968,7 +1968,7 @@ static bool api_srvsvc_NetTransportAdd(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTADD]; - r = talloc(NULL, struct srvsvc_NetTransportAdd); + r = talloc(talloc_tos(), struct srvsvc_NetTransportAdd); if (r == NULL) { return false; } @@ -2041,7 +2041,7 @@ static bool api_srvsvc_NetTransportEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTENUM]; - r = talloc(NULL, struct srvsvc_NetTransportEnum); + r = talloc(talloc_tos(), struct srvsvc_NetTransportEnum); if (r == NULL) { return false; } @@ -2124,7 +2124,7 @@ static bool api_srvsvc_NetTransportDel(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTDEL]; - r = talloc(NULL, struct srvsvc_NetTransportDel); + r = talloc(talloc_tos(), struct srvsvc_NetTransportDel); if (r == NULL) { return false; } @@ -2197,7 +2197,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETREMOTETOD]; - r = talloc(NULL, struct srvsvc_NetRemoteTOD); + r = talloc(talloc_tos(), struct srvsvc_NetRemoteTOD); if (r == NULL) { return false; } @@ -2277,7 +2277,7 @@ static bool api_srvsvc_NetSetServiceBits(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSETSERVICEBITS]; - r = talloc(NULL, struct srvsvc_NetSetServiceBits); + r = talloc(talloc_tos(), struct srvsvc_NetSetServiceBits); if (r == NULL) { return false; } @@ -2350,7 +2350,7 @@ static bool api_srvsvc_NetPathType(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHTYPE]; - r = talloc(NULL, struct srvsvc_NetPathType); + r = talloc(talloc_tos(), struct srvsvc_NetPathType); if (r == NULL) { return false; } @@ -2430,7 +2430,7 @@ static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHCANONICALIZE]; - r = talloc(NULL, struct srvsvc_NetPathCanonicalize); + r = talloc(talloc_tos(), struct srvsvc_NetPathCanonicalize); if (r == NULL) { return false; } @@ -2511,7 +2511,7 @@ static bool api_srvsvc_NetPathCompare(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHCOMPARE]; - r = talloc(NULL, struct srvsvc_NetPathCompare); + r = talloc(talloc_tos(), struct srvsvc_NetPathCompare); if (r == NULL) { return false; } @@ -2584,7 +2584,7 @@ static bool api_srvsvc_NetNameValidate(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETNAMEVALIDATE]; - r = talloc(NULL, struct srvsvc_NetNameValidate); + r = talloc(talloc_tos(), struct srvsvc_NetNameValidate); if (r == NULL) { return false; } @@ -2657,7 +2657,7 @@ static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRPRNAMECANONICALIZE]; - r = talloc(NULL, struct srvsvc_NETRPRNAMECANONICALIZE); + r = talloc(talloc_tos(), struct srvsvc_NETRPRNAMECANONICALIZE); if (r == NULL) { return false; } @@ -2730,7 +2730,7 @@ static bool api_srvsvc_NetPRNameCompare(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPRNAMECOMPARE]; - r = talloc(NULL, struct srvsvc_NetPRNameCompare); + r = talloc(talloc_tos(), struct srvsvc_NetPRNameCompare); if (r == NULL) { return false; } @@ -2803,7 +2803,7 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREENUM]; - r = talloc(NULL, struct srvsvc_NetShareEnum); + r = talloc(talloc_tos(), struct srvsvc_NetShareEnum); if (r == NULL) { return false; } @@ -2886,7 +2886,7 @@ static bool api_srvsvc_NetShareDelStart(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELSTART]; - r = talloc(NULL, struct srvsvc_NetShareDelStart); + r = talloc(talloc_tos(), struct srvsvc_NetShareDelStart); if (r == NULL) { return false; } @@ -2966,7 +2966,7 @@ static bool api_srvsvc_NetShareDelCommit(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELCOMMIT]; - r = talloc(NULL, struct srvsvc_NetShareDelCommit); + r = talloc(talloc_tos(), struct srvsvc_NetShareDelCommit); if (r == NULL) { return false; } @@ -3041,7 +3041,7 @@ static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETGETFILESECURITY]; - r = talloc(NULL, struct srvsvc_NetGetFileSecurity); + r = talloc(talloc_tos(), struct srvsvc_NetGetFileSecurity); if (r == NULL) { return false; } @@ -3121,7 +3121,7 @@ static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSETFILESECURITY]; - r = talloc(NULL, struct srvsvc_NetSetFileSecurity); + r = talloc(talloc_tos(), struct srvsvc_NetSetFileSecurity); if (r == NULL) { return false; } @@ -3194,7 +3194,7 @@ static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERTRANSPORTADDEX]; - r = talloc(NULL, struct srvsvc_NetServerTransportAddEx); + r = talloc(talloc_tos(), struct srvsvc_NetServerTransportAddEx); if (r == NULL) { return false; } @@ -3267,7 +3267,7 @@ static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERSETSERVICEBITSEX]; - r = talloc(NULL, struct srvsvc_NetServerSetServiceBitsEx); + r = talloc(talloc_tos(), struct srvsvc_NetServerSetServiceBitsEx); if (r == NULL) { return false; } @@ -3340,7 +3340,7 @@ static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSGETVERSION]; - r = talloc(NULL, struct srvsvc_NETRDFSGETVERSION); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSGETVERSION); if (r == NULL) { return false; } @@ -3413,7 +3413,7 @@ static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSCREATELOCALPARTITION]; - r = talloc(NULL, struct srvsvc_NETRDFSCREATELOCALPARTITION); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSCREATELOCALPARTITION); if (r == NULL) { return false; } @@ -3486,7 +3486,7 @@ static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSDELETELOCALPARTITION]; - r = talloc(NULL, struct srvsvc_NETRDFSDELETELOCALPARTITION); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSDELETELOCALPARTITION); if (r == NULL) { return false; } @@ -3559,7 +3559,7 @@ static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE]; - r = talloc(NULL, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSSETLOCALVOLUMESTATE); if (r == NULL) { return false; } @@ -3632,7 +3632,7 @@ static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSSETSERVERINFO]; - r = talloc(NULL, struct srvsvc_NETRDFSSETSERVERINFO); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSSETSERVERINFO); if (r == NULL) { return false; } @@ -3705,7 +3705,7 @@ static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSCREATEEXITPOINT]; - r = talloc(NULL, struct srvsvc_NETRDFSCREATEEXITPOINT); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSCREATEEXITPOINT); if (r == NULL) { return false; } @@ -3778,7 +3778,7 @@ static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSDELETEEXITPOINT]; - r = talloc(NULL, struct srvsvc_NETRDFSDELETEEXITPOINT); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSDELETEEXITPOINT); if (r == NULL) { return false; } @@ -3851,7 +3851,7 @@ static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSMODIFYPREFIX]; - r = talloc(NULL, struct srvsvc_NETRDFSMODIFYPREFIX); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSMODIFYPREFIX); if (r == NULL) { return false; } @@ -3924,7 +3924,7 @@ static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSFIXLOCALVOLUME]; - r = talloc(NULL, struct srvsvc_NETRDFSFIXLOCALVOLUME); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSFIXLOCALVOLUME); if (r == NULL) { return false; } @@ -3997,7 +3997,7 @@ static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO]; - r = talloc(NULL, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO); + r = talloc(talloc_tos(), struct srvsvc_NETRDFSMANAGERREPORTSITEINFO); if (r == NULL) { return false; } @@ -4070,7 +4070,7 @@ static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p) call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRSERVERTRANSPORTDELEX]; - r = talloc(NULL, struct srvsvc_NETRSERVERTRANSPORTDELEX); + r = talloc(talloc_tos(), struct srvsvc_NETRSERVERTRANSPORTDELEX); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 4a0a2591ab..a7163917bd 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -17,7 +17,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CLOSESERVICEHANDLE]; - r = talloc(NULL, struct svcctl_CloseServiceHandle); + r = talloc(talloc_tos(), struct svcctl_CloseServiceHandle); if (r == NULL) { return false; } @@ -92,7 +92,7 @@ static bool api_svcctl_ControlService(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CONTROLSERVICE]; - r = talloc(NULL, struct svcctl_ControlService); + r = talloc(talloc_tos(), struct svcctl_ControlService); if (r == NULL) { return false; } @@ -172,7 +172,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_DELETESERVICE]; - r = talloc(NULL, struct svcctl_DeleteService); + r = talloc(talloc_tos(), struct svcctl_DeleteService); if (r == NULL) { return false; } @@ -245,7 +245,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_LOCKSERVICEDATABASE]; - r = talloc(NULL, struct svcctl_LockServiceDatabase); + r = talloc(talloc_tos(), struct svcctl_LockServiceDatabase); if (r == NULL) { return false; } @@ -325,7 +325,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY]; - r = talloc(NULL, struct svcctl_QueryServiceObjectSecurity); + r = talloc(talloc_tos(), struct svcctl_QueryServiceObjectSecurity); if (r == NULL) { return false; } @@ -398,7 +398,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICEOBJECTSECURITY]; - r = talloc(NULL, struct svcctl_SetServiceObjectSecurity); + r = talloc(talloc_tos(), struct svcctl_SetServiceObjectSecurity); if (r == NULL) { return false; } @@ -471,7 +471,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUS]; - r = talloc(NULL, struct svcctl_QueryServiceStatus); + r = talloc(talloc_tos(), struct svcctl_QueryServiceStatus); if (r == NULL) { return false; } @@ -551,7 +551,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SETSERVICESTATUS]; - r = talloc(NULL, struct svcctl_SetServiceStatus); + r = talloc(talloc_tos(), struct svcctl_SetServiceStatus); if (r == NULL) { return false; } @@ -624,7 +624,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_UNLOCKSERVICEDATABASE]; - r = talloc(NULL, struct svcctl_UnlockServiceDatabase); + r = talloc(talloc_tos(), struct svcctl_UnlockServiceDatabase); if (r == NULL) { return false; } @@ -699,7 +699,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS]; - r = talloc(NULL, struct svcctl_NotifyBootConfigStatus); + r = talloc(talloc_tos(), struct svcctl_NotifyBootConfigStatus); if (r == NULL) { return false; } @@ -772,7 +772,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSW]; - r = talloc(NULL, struct svcctl_SCSetServiceBitsW); + r = talloc(talloc_tos(), struct svcctl_SCSetServiceBitsW); if (r == NULL) { return false; } @@ -845,7 +845,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGW]; - r = talloc(NULL, struct svcctl_ChangeServiceConfigW); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfigW); if (r == NULL) { return false; } @@ -925,7 +925,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEW]; - r = talloc(NULL, struct svcctl_CreateServiceW); + r = talloc(talloc_tos(), struct svcctl_CreateServiceW); if (r == NULL) { return false; } @@ -1006,7 +1006,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESW]; - r = talloc(NULL, struct svcctl_EnumDependentServicesW); + r = talloc(talloc_tos(), struct svcctl_EnumDependentServicesW); if (r == NULL) { return false; } @@ -1098,7 +1098,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSW]; - r = talloc(NULL, struct svcctl_EnumServicesStatusW); + r = talloc(talloc_tos(), struct svcctl_EnumServicesStatusW); if (r == NULL) { return false; } @@ -1191,7 +1191,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERW]; - r = talloc(NULL, struct svcctl_OpenSCManagerW); + r = talloc(talloc_tos(), struct svcctl_OpenSCManagerW); if (r == NULL) { return false; } @@ -1271,7 +1271,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEW]; - r = talloc(NULL, struct svcctl_OpenServiceW); + r = talloc(talloc_tos(), struct svcctl_OpenServiceW); if (r == NULL) { return false; } @@ -1351,7 +1351,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGW]; - r = talloc(NULL, struct svcctl_QueryServiceConfigW); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfigW); if (r == NULL) { return false; } @@ -1437,7 +1437,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSW]; - r = talloc(NULL, struct svcctl_QueryServiceLockStatusW); + r = talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusW); if (r == NULL) { return false; } @@ -1523,7 +1523,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEW]; - r = talloc(NULL, struct svcctl_StartServiceW); + r = talloc(talloc_tos(), struct svcctl_StartServiceW); if (r == NULL) { return false; } @@ -1596,7 +1596,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEW]; - r = talloc(NULL, struct svcctl_GetServiceDisplayNameW); + r = talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameW); if (r == NULL) { return false; } @@ -1677,7 +1677,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEW]; - r = talloc(NULL, struct svcctl_GetServiceKeyNameW); + r = talloc(talloc_tos(), struct svcctl_GetServiceKeyNameW); if (r == NULL) { return false; } @@ -1758,7 +1758,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSETSERVICEBITSA]; - r = talloc(NULL, struct svcctl_SCSetServiceBitsA); + r = talloc(talloc_tos(), struct svcctl_SCSetServiceBitsA); if (r == NULL) { return false; } @@ -1831,7 +1831,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIGA]; - r = talloc(NULL, struct svcctl_ChangeServiceConfigA); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfigA); if (r == NULL) { return false; } @@ -1911,7 +1911,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CREATESERVICEA]; - r = talloc(NULL, struct svcctl_CreateServiceA); + r = talloc(talloc_tos(), struct svcctl_CreateServiceA); if (r == NULL) { return false; } @@ -1991,7 +1991,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMDEPENDENTSERVICESA]; - r = talloc(NULL, struct svcctl_EnumDependentServicesA); + r = talloc(talloc_tos(), struct svcctl_EnumDependentServicesA); if (r == NULL) { return false; } @@ -2083,7 +2083,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICESSTATUSA]; - r = talloc(NULL, struct svcctl_EnumServicesStatusA); + r = talloc(talloc_tos(), struct svcctl_EnumServicesStatusA); if (r == NULL) { return false; } @@ -2176,7 +2176,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSCMANAGERA]; - r = talloc(NULL, struct svcctl_OpenSCManagerA); + r = talloc(talloc_tos(), struct svcctl_OpenSCManagerA); if (r == NULL) { return false; } @@ -2256,7 +2256,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_OPENSERVICEA]; - r = talloc(NULL, struct svcctl_OpenServiceA); + r = talloc(talloc_tos(), struct svcctl_OpenServiceA); if (r == NULL) { return false; } @@ -2329,7 +2329,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIGA]; - r = talloc(NULL, struct svcctl_QueryServiceConfigA); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfigA); if (r == NULL) { return false; } @@ -2415,7 +2415,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICELOCKSTATUSA]; - r = talloc(NULL, struct svcctl_QueryServiceLockStatusA); + r = talloc(talloc_tos(), struct svcctl_QueryServiceLockStatusA); if (r == NULL) { return false; } @@ -2501,7 +2501,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_STARTSERVICEA]; - r = talloc(NULL, struct svcctl_StartServiceA); + r = talloc(talloc_tos(), struct svcctl_StartServiceA); if (r == NULL) { return false; } @@ -2574,7 +2574,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEDISPLAYNAMEA]; - r = talloc(NULL, struct svcctl_GetServiceDisplayNameA); + r = talloc(talloc_tos(), struct svcctl_GetServiceDisplayNameA); if (r == NULL) { return false; } @@ -2655,7 +2655,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETSERVICEKEYNAMEA]; - r = talloc(NULL, struct svcctl_GetServiceKeyNameA); + r = talloc(talloc_tos(), struct svcctl_GetServiceKeyNameA); if (r == NULL) { return false; } @@ -2736,7 +2736,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_GETCURRENTGROUPESTATEW]; - r = talloc(NULL, struct svcctl_GetCurrentGroupeStateW); + r = talloc(talloc_tos(), struct svcctl_GetCurrentGroupeStateW); if (r == NULL) { return false; } @@ -2809,7 +2809,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_ENUMSERVICEGROUPW]; - r = talloc(NULL, struct svcctl_EnumServiceGroupW); + r = talloc(talloc_tos(), struct svcctl_EnumServiceGroupW); if (r == NULL) { return false; } @@ -2882,7 +2882,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2A]; - r = talloc(NULL, struct svcctl_ChangeServiceConfig2A); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2A); if (r == NULL) { return false; } @@ -2955,7 +2955,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_CHANGESERVICECONFIG2W]; - r = talloc(NULL, struct svcctl_ChangeServiceConfig2W); + r = talloc(talloc_tos(), struct svcctl_ChangeServiceConfig2W); if (r == NULL) { return false; } @@ -3028,7 +3028,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2A]; - r = talloc(NULL, struct svcctl_QueryServiceConfig2A); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfig2A); if (r == NULL) { return false; } @@ -3114,7 +3114,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICECONFIG2W]; - r = talloc(NULL, struct svcctl_QueryServiceConfig2W); + r = talloc(talloc_tos(), struct svcctl_QueryServiceConfig2W); if (r == NULL) { return false; } @@ -3200,7 +3200,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_QUERYSERVICESTATUSEX]; - r = talloc(NULL, struct svcctl_QueryServiceStatusEx); + r = talloc(talloc_tos(), struct svcctl_QueryServiceStatusEx); if (r == NULL) { return false; } @@ -3286,7 +3286,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXA]; - r = talloc(NULL, struct EnumServicesStatusExA); + r = talloc(talloc_tos(), struct EnumServicesStatusExA); if (r == NULL) { return false; } @@ -3385,7 +3385,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_ENUMSERVICESSTATUSEXW]; - r = talloc(NULL, struct EnumServicesStatusExW); + r = talloc(talloc_tos(), struct EnumServicesStatusExW); if (r == NULL) { return false; } @@ -3484,7 +3484,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) call = &ndr_table_svcctl.calls[NDR_SVCCTL_SCSENDTSMESSAGE]; - r = talloc(NULL, struct svcctl_SCSendTSMessage); + r = talloc(talloc_tos(), struct svcctl_SCSendTSMessage); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c index 36a6250ad0..6142bb113f 100644 --- a/source3/librpc/gen_ndr/srv_unixinfo.c +++ b/source3/librpc/gen_ndr/srv_unixinfo.c @@ -17,7 +17,7 @@ static bool api_unixinfo_SidToUid(pipes_struct *p) call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID]; - r = talloc(NULL, struct unixinfo_SidToUid); + r = talloc(talloc_tos(), struct unixinfo_SidToUid); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_unixinfo_UidToSid(pipes_struct *p) call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID]; - r = talloc(NULL, struct unixinfo_UidToSid); + r = talloc(talloc_tos(), struct unixinfo_UidToSid); if (r == NULL) { return false; } @@ -177,7 +177,7 @@ static bool api_unixinfo_SidToGid(pipes_struct *p) call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID]; - r = talloc(NULL, struct unixinfo_SidToGid); + r = talloc(talloc_tos(), struct unixinfo_SidToGid); if (r == NULL) { return false; } @@ -257,7 +257,7 @@ static bool api_unixinfo_GidToSid(pipes_struct *p) call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID]; - r = talloc(NULL, struct unixinfo_GidToSid); + r = talloc(talloc_tos(), struct unixinfo_GidToSid); if (r == NULL) { return false; } @@ -337,7 +337,7 @@ static bool api_unixinfo_GetPWUid(pipes_struct *p) call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID]; - r = talloc(NULL, struct unixinfo_GetPWUid); + r = talloc(talloc_tos(), struct unixinfo_GetPWUid); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c index ecce99f67a..4672944ad0 100644 --- a/source3/librpc/gen_ndr/srv_winreg.c +++ b/source3/librpc/gen_ndr/srv_winreg.c @@ -17,7 +17,7 @@ static bool api_winreg_OpenHKCR(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCR]; - r = talloc(NULL, struct winreg_OpenHKCR); + r = talloc(talloc_tos(), struct winreg_OpenHKCR); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_winreg_OpenHKCU(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCU]; - r = talloc(NULL, struct winreg_OpenHKCU); + r = talloc(talloc_tos(), struct winreg_OpenHKCU); if (r == NULL) { return false; } @@ -177,7 +177,7 @@ static bool api_winreg_OpenHKLM(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKLM]; - r = talloc(NULL, struct winreg_OpenHKLM); + r = talloc(talloc_tos(), struct winreg_OpenHKLM); if (r == NULL) { return false; } @@ -257,7 +257,7 @@ static bool api_winreg_OpenHKPD(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPD]; - r = talloc(NULL, struct winreg_OpenHKPD); + r = talloc(talloc_tos(), struct winreg_OpenHKPD); if (r == NULL) { return false; } @@ -337,7 +337,7 @@ static bool api_winreg_OpenHKU(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKU]; - r = talloc(NULL, struct winreg_OpenHKU); + r = talloc(talloc_tos(), struct winreg_OpenHKU); if (r == NULL) { return false; } @@ -417,7 +417,7 @@ static bool api_winreg_CloseKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_CLOSEKEY]; - r = talloc(NULL, struct winreg_CloseKey); + r = talloc(talloc_tos(), struct winreg_CloseKey); if (r == NULL) { return false; } @@ -492,7 +492,7 @@ static bool api_winreg_CreateKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_CREATEKEY]; - r = talloc(NULL, struct winreg_CreateKey); + r = talloc(talloc_tos(), struct winreg_CreateKey); if (r == NULL) { return false; } @@ -573,7 +573,7 @@ static bool api_winreg_DeleteKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_DELETEKEY]; - r = talloc(NULL, struct winreg_DeleteKey); + r = talloc(talloc_tos(), struct winreg_DeleteKey); if (r == NULL) { return false; } @@ -646,7 +646,7 @@ static bool api_winreg_DeleteValue(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_DELETEVALUE]; - r = talloc(NULL, struct winreg_DeleteValue); + r = talloc(talloc_tos(), struct winreg_DeleteValue); if (r == NULL) { return false; } @@ -719,7 +719,7 @@ static bool api_winreg_EnumKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_ENUMKEY]; - r = talloc(NULL, struct winreg_EnumKey); + r = talloc(talloc_tos(), struct winreg_EnumKey); if (r == NULL) { return false; } @@ -796,7 +796,7 @@ static bool api_winreg_EnumValue(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_ENUMVALUE]; - r = talloc(NULL, struct winreg_EnumValue); + r = talloc(talloc_tos(), struct winreg_EnumValue); if (r == NULL) { return false; } @@ -875,7 +875,7 @@ static bool api_winreg_FlushKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_FLUSHKEY]; - r = talloc(NULL, struct winreg_FlushKey); + r = talloc(talloc_tos(), struct winreg_FlushKey); if (r == NULL) { return false; } @@ -948,7 +948,7 @@ static bool api_winreg_GetKeySecurity(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_GETKEYSECURITY]; - r = talloc(NULL, struct winreg_GetKeySecurity); + r = talloc(talloc_tos(), struct winreg_GetKeySecurity); if (r == NULL) { return false; } @@ -1023,7 +1023,7 @@ static bool api_winreg_LoadKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_LOADKEY]; - r = talloc(NULL, struct winreg_LoadKey); + r = talloc(talloc_tos(), struct winreg_LoadKey); if (r == NULL) { return false; } @@ -1096,7 +1096,7 @@ static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_NOTIFYCHANGEKEYVALUE]; - r = talloc(NULL, struct winreg_NotifyChangeKeyValue); + r = talloc(talloc_tos(), struct winreg_NotifyChangeKeyValue); if (r == NULL) { return false; } @@ -1169,7 +1169,7 @@ static bool api_winreg_OpenKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENKEY]; - r = talloc(NULL, struct winreg_OpenKey); + r = talloc(talloc_tos(), struct winreg_OpenKey); if (r == NULL) { return false; } @@ -1249,7 +1249,7 @@ static bool api_winreg_QueryInfoKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_QUERYINFOKEY]; - r = talloc(NULL, struct winreg_QueryInfoKey); + r = talloc(talloc_tos(), struct winreg_QueryInfoKey); if (r == NULL) { return false; } @@ -1372,7 +1372,7 @@ static bool api_winreg_QueryValue(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_QUERYVALUE]; - r = talloc(NULL, struct winreg_QueryValue); + r = talloc(talloc_tos(), struct winreg_QueryValue); if (r == NULL) { return false; } @@ -1450,7 +1450,7 @@ static bool api_winreg_ReplaceKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_REPLACEKEY]; - r = talloc(NULL, struct winreg_ReplaceKey); + r = talloc(talloc_tos(), struct winreg_ReplaceKey); if (r == NULL) { return false; } @@ -1523,7 +1523,7 @@ static bool api_winreg_RestoreKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_RESTOREKEY]; - r = talloc(NULL, struct winreg_RestoreKey); + r = talloc(talloc_tos(), struct winreg_RestoreKey); if (r == NULL) { return false; } @@ -1596,7 +1596,7 @@ static bool api_winreg_SaveKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_SAVEKEY]; - r = talloc(NULL, struct winreg_SaveKey); + r = talloc(talloc_tos(), struct winreg_SaveKey); if (r == NULL) { return false; } @@ -1669,7 +1669,7 @@ static bool api_winreg_SetKeySecurity(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_SETKEYSECURITY]; - r = talloc(NULL, struct winreg_SetKeySecurity); + r = talloc(talloc_tos(), struct winreg_SetKeySecurity); if (r == NULL) { return false; } @@ -1742,7 +1742,7 @@ static bool api_winreg_SetValue(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_SETVALUE]; - r = talloc(NULL, struct winreg_SetValue); + r = talloc(talloc_tos(), struct winreg_SetValue); if (r == NULL) { return false; } @@ -1815,7 +1815,7 @@ static bool api_winreg_UnLoadKey(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_UNLOADKEY]; - r = talloc(NULL, struct winreg_UnLoadKey); + r = talloc(talloc_tos(), struct winreg_UnLoadKey); if (r == NULL) { return false; } @@ -1888,7 +1888,7 @@ static bool api_winreg_InitiateSystemShutdown(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_INITIATESYSTEMSHUTDOWN]; - r = talloc(NULL, struct winreg_InitiateSystemShutdown); + r = talloc(talloc_tos(), struct winreg_InitiateSystemShutdown); if (r == NULL) { return false; } @@ -1961,7 +1961,7 @@ static bool api_winreg_AbortSystemShutdown(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_ABORTSYSTEMSHUTDOWN]; - r = talloc(NULL, struct winreg_AbortSystemShutdown); + r = talloc(talloc_tos(), struct winreg_AbortSystemShutdown); if (r == NULL) { return false; } @@ -2034,7 +2034,7 @@ static bool api_winreg_GetVersion(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_GETVERSION]; - r = talloc(NULL, struct winreg_GetVersion); + r = talloc(talloc_tos(), struct winreg_GetVersion); if (r == NULL) { return false; } @@ -2114,7 +2114,7 @@ static bool api_winreg_OpenHKCC(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKCC]; - r = talloc(NULL, struct winreg_OpenHKCC); + r = talloc(talloc_tos(), struct winreg_OpenHKCC); if (r == NULL) { return false; } @@ -2194,7 +2194,7 @@ static bool api_winreg_OpenHKDD(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKDD]; - r = talloc(NULL, struct winreg_OpenHKDD); + r = talloc(talloc_tos(), struct winreg_OpenHKDD); if (r == NULL) { return false; } @@ -2274,7 +2274,7 @@ static bool api_winreg_QueryMultipleValues(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_QUERYMULTIPLEVALUES]; - r = talloc(NULL, struct winreg_QueryMultipleValues); + r = talloc(talloc_tos(), struct winreg_QueryMultipleValues); if (r == NULL) { return false; } @@ -2351,7 +2351,7 @@ static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_INITIATESYSTEMSHUTDOWNEX]; - r = talloc(NULL, struct winreg_InitiateSystemShutdownEx); + r = talloc(talloc_tos(), struct winreg_InitiateSystemShutdownEx); if (r == NULL) { return false; } @@ -2424,7 +2424,7 @@ static bool api_winreg_SaveKeyEx(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_SAVEKEYEX]; - r = talloc(NULL, struct winreg_SaveKeyEx); + r = talloc(talloc_tos(), struct winreg_SaveKeyEx); if (r == NULL) { return false; } @@ -2497,7 +2497,7 @@ static bool api_winreg_OpenHKPT(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPT]; - r = talloc(NULL, struct winreg_OpenHKPT); + r = talloc(talloc_tos(), struct winreg_OpenHKPT); if (r == NULL) { return false; } @@ -2577,7 +2577,7 @@ static bool api_winreg_OpenHKPN(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_OPENHKPN]; - r = talloc(NULL, struct winreg_OpenHKPN); + r = talloc(talloc_tos(), struct winreg_OpenHKPN); if (r == NULL) { return false; } @@ -2657,7 +2657,7 @@ static bool api_winreg_QueryMultipleValues2(pipes_struct *p) call = &ndr_table_winreg.calls[NDR_WINREG_QUERYMULTIPLEVALUES2]; - r = talloc(NULL, struct winreg_QueryMultipleValues2); + r = talloc(talloc_tos(), struct winreg_QueryMultipleValues2); if (r == NULL) { return false; } diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c index da2279001d..90e6f482f4 100644 --- a/source3/librpc/gen_ndr/srv_wkssvc.c +++ b/source3/librpc/gen_ndr/srv_wkssvc.c @@ -17,7 +17,7 @@ static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTAGETINFO]; - r = talloc(NULL, struct wkssvc_NetWkstaGetInfo); + r = talloc(talloc_tos(), struct wkssvc_NetWkstaGetInfo); if (r == NULL) { return false; } @@ -97,7 +97,7 @@ static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTASETINFO]; - r = talloc(NULL, struct wkssvc_NetWkstaSetInfo); + r = talloc(talloc_tos(), struct wkssvc_NetWkstaSetInfo); if (r == NULL) { return false; } @@ -172,7 +172,7 @@ static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTAENUMUSERS]; - r = talloc(NULL, struct wkssvc_NetWkstaEnumUsers); + r = talloc(talloc_tos(), struct wkssvc_NetWkstaEnumUsers); if (r == NULL) { return false; } @@ -254,7 +254,7 @@ static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTAUSERGETINFO]; - r = talloc(NULL, struct wkssvc_NetrWkstaUserGetInfo); + r = talloc(talloc_tos(), struct wkssvc_NetrWkstaUserGetInfo); if (r == NULL) { return false; } @@ -334,7 +334,7 @@ static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTAUSERSETINFO]; - r = talloc(NULL, struct wkssvc_NetrWkstaUserSetInfo); + r = talloc(talloc_tos(), struct wkssvc_NetrWkstaUserSetInfo); if (r == NULL) { return false; } @@ -409,7 +409,7 @@ static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTATRANSPORTENUM]; - r = talloc(NULL, struct wkssvc_NetWkstaTransportEnum); + r = talloc(talloc_tos(), struct wkssvc_NetWkstaTransportEnum); if (r == NULL) { return false; } @@ -491,7 +491,7 @@ static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTATRANSPORTADD]; - r = talloc(NULL, struct wkssvc_NetrWkstaTransportAdd); + r = talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportAdd); if (r == NULL) { return false; } @@ -566,7 +566,7 @@ static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTATRANSPORTDEL]; - r = talloc(NULL, struct wkssvc_NetrWkstaTransportDel); + r = talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportDel); if (r == NULL) { return false; } @@ -639,7 +639,7 @@ static bool api_wkssvc_NetrUseAdd(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEADD]; - r = talloc(NULL, struct wkssvc_NetrUseAdd); + r = talloc(talloc_tos(), struct wkssvc_NetrUseAdd); if (r == NULL) { return false; } @@ -714,7 +714,7 @@ static bool api_wkssvc_NetrUseGetInfo(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEGETINFO]; - r = talloc(NULL, struct wkssvc_NetrUseGetInfo); + r = talloc(talloc_tos(), struct wkssvc_NetrUseGetInfo); if (r == NULL) { return false; } @@ -794,7 +794,7 @@ static bool api_wkssvc_NetrUseDel(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEDEL]; - r = talloc(NULL, struct wkssvc_NetrUseDel); + r = talloc(talloc_tos(), struct wkssvc_NetrUseDel); if (r == NULL) { return false; } @@ -867,7 +867,7 @@ static bool api_wkssvc_NetrUseEnum(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEENUM]; - r = talloc(NULL, struct wkssvc_NetrUseEnum); + r = talloc(talloc_tos(), struct wkssvc_NetrUseEnum); if (r == NULL) { return false; } @@ -949,7 +949,7 @@ static bool api_wkssvc_NetrMessageBufferSend(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRMESSAGEBUFFERSEND]; - r = talloc(NULL, struct wkssvc_NetrMessageBufferSend); + r = talloc(talloc_tos(), struct wkssvc_NetrMessageBufferSend); if (r == NULL) { return false; } @@ -1022,7 +1022,7 @@ static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET]; - r = talloc(NULL, struct wkssvc_NetrWorkstationStatisticsGet); + r = talloc(talloc_tos(), struct wkssvc_NetrWorkstationStatisticsGet); if (r == NULL) { return false; } @@ -1102,7 +1102,7 @@ static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRLOGONDOMAINNAMEADD]; - r = talloc(NULL, struct wkssvc_NetrLogonDomainNameAdd); + r = talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameAdd); if (r == NULL) { return false; } @@ -1175,7 +1175,7 @@ static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL]; - r = talloc(NULL, struct wkssvc_NetrLogonDomainNameDel); + r = talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameDel); if (r == NULL) { return false; } @@ -1248,7 +1248,7 @@ static bool api_wkssvc_NetrJoinDomain(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRJOINDOMAIN]; - r = talloc(NULL, struct wkssvc_NetrJoinDomain); + r = talloc(talloc_tos(), struct wkssvc_NetrJoinDomain); if (r == NULL) { return false; } @@ -1321,7 +1321,7 @@ static bool api_wkssvc_NetrUnjoinDomain(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUNJOINDOMAIN]; - r = talloc(NULL, struct wkssvc_NetrUnjoinDomain); + r = talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain); if (r == NULL) { return false; } @@ -1394,7 +1394,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN]; - r = talloc(NULL, struct wkssvc_NetrRenameMachineInDomain); + r = talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain); if (r == NULL) { return false; } @@ -1467,7 +1467,7 @@ static bool api_wkssvc_NetrValidateName(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRVALIDATENAME]; - r = talloc(NULL, struct wkssvc_NetrValidateName); + r = talloc(talloc_tos(), struct wkssvc_NetrValidateName); if (r == NULL) { return false; } @@ -1540,7 +1540,7 @@ static bool api_wkssvc_NetrGetJoinInformation(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOININFORMATION]; - r = talloc(NULL, struct wkssvc_NetrGetJoinInformation); + r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinInformation); if (r == NULL) { return false; } @@ -1621,7 +1621,7 @@ static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOINABLEOUS]; - r = talloc(NULL, struct wkssvc_NetrGetJoinableOus); + r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus); if (r == NULL) { return false; } @@ -1702,7 +1702,7 @@ static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRJOINDOMAIN2]; - r = talloc(NULL, struct wkssvc_NetrJoinDomain2); + r = talloc(talloc_tos(), struct wkssvc_NetrJoinDomain2); if (r == NULL) { return false; } @@ -1775,7 +1775,7 @@ static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUNJOINDOMAIN2]; - r = talloc(NULL, struct wkssvc_NetrUnjoinDomain2); + r = talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain2); if (r == NULL) { return false; } @@ -1848,7 +1848,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2]; - r = talloc(NULL, struct wkssvc_NetrRenameMachineInDomain2); + r = talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain2); if (r == NULL) { return false; } @@ -1921,7 +1921,7 @@ static bool api_wkssvc_NetrValidateName2(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRVALIDATENAME2]; - r = talloc(NULL, struct wkssvc_NetrValidateName2); + r = talloc(talloc_tos(), struct wkssvc_NetrValidateName2); if (r == NULL) { return false; } @@ -1994,7 +1994,7 @@ static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOINABLEOUS2]; - r = talloc(NULL, struct wkssvc_NetrGetJoinableOus2); + r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus2); if (r == NULL) { return false; } @@ -2075,7 +2075,7 @@ static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME]; - r = talloc(NULL, struct wkssvc_NetrAddAlternateComputerName); + r = talloc(talloc_tos(), struct wkssvc_NetrAddAlternateComputerName); if (r == NULL) { return false; } @@ -2148,7 +2148,7 @@ static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME]; - r = talloc(NULL, struct wkssvc_NetrRemoveAlternateComputerName); + r = talloc(talloc_tos(), struct wkssvc_NetrRemoveAlternateComputerName); if (r == NULL) { return false; } @@ -2221,7 +2221,7 @@ static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME]; - r = talloc(NULL, struct wkssvc_NetrSetPrimaryComputername); + r = talloc(talloc_tos(), struct wkssvc_NetrSetPrimaryComputername); if (r == NULL) { return false; } @@ -2294,7 +2294,7 @@ static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct *p) call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES]; - r = talloc(NULL, struct wkssvc_NetrEnumerateComputerNames); + r = talloc(talloc_tos(), struct wkssvc_NetrEnumerateComputerNames); if (r == NULL) { return false; } -- cgit From ffffd3e3c3b45f0bd9b96d62e896373633e00656 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 11 Feb 2008 10:49:15 +0100 Subject: Re-run make idl. Guenther (This used to be commit bc04816028bfd75d4bb080085dcc953d7f511211) --- source3/librpc/gen_ndr/cli_lsa.c | 4 ++-- source3/librpc/gen_ndr/cli_lsa.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index ddd0c7884d..5ff1d147ea 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -89,8 +89,8 @@ NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t max_count, - struct lsa_PrivArray *privs) + struct lsa_PrivArray *privs, + uint32_t max_count) { struct lsa_EnumPrivs r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 3f64bb450d..f86819722c 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -11,8 +11,8 @@ NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t max_count, - struct lsa_PrivArray *privs); + struct lsa_PrivArray *privs, + uint32_t max_count); NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, -- cgit From 095d12ed39a2b1f70f786c39a3cc2d1ab4b5541b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 11 Feb 2008 17:56:22 +0100 Subject: Re-run make idl. Guenther (This used to be commit 73e34102b68518ec45986869c20b2356909d67c0) --- source3/librpc/gen_ndr/cli_lsa.c | 15 ++++--- source3/librpc/gen_ndr/cli_lsa.h | 7 ++-- source3/librpc/gen_ndr/lsa.h | 8 ++-- source3/librpc/gen_ndr/ndr_lsa.c | 87 +++++++++++++++++++++------------------- source3/librpc/gen_ndr/srv_lsa.c | 9 ++++- 5 files changed, 67 insertions(+), 59 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 5ff1d147ea..d2c54efff9 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -1451,9 +1451,10 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, - struct lsa_StringLarge *disp_name, - uint16_t *language_id, - uint16_t unknown) + uint16_t language_id, + uint16_t language_id_sys, + struct lsa_StringLarge **disp_name, + uint16_t *returned_language_id) { struct lsa_LookupPrivDisplayName r; NTSTATUS status; @@ -1462,7 +1463,7 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, r.in.handle = handle; r.in.name = name; r.in.language_id = language_id; - r.in.unknown = unknown; + r.in.language_id_sys = language_id_sys; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r); @@ -1488,10 +1489,8 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, } /* Return variables */ - if (disp_name && r.out.disp_name) { - *disp_name = *r.out.disp_name; - } - *language_id = *r.out.language_id; + *disp_name = *r.out.disp_name; + *returned_language_id = *r.out.returned_language_id; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index f86819722c..5e40a17a92 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -166,9 +166,10 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, - struct lsa_StringLarge *disp_name, - uint16_t *language_id, - uint16_t unknown); + uint16_t language_id, + uint16_t language_id_sys, + struct lsa_StringLarge **disp_name, + uint16_t *returned_language_id); NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle); diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 0df0ddecc5..d829c1f00a 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -1036,13 +1036,13 @@ struct lsa_LookupPrivDisplayName { struct { struct policy_handle *handle;/* [ref] */ struct lsa_String *name;/* [ref] */ - uint16_t unknown; - uint16_t *language_id;/* [ref] */ + uint16_t language_id; + uint16_t language_id_sys; } in; struct { - struct lsa_StringLarge *disp_name;/* [unique] */ - uint16_t *language_id;/* [ref] */ + struct lsa_StringLarge **disp_name;/* [ref] */ + uint16_t *returned_language_id;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index ef93d6b60c..69feaedc6b 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -7585,21 +7585,21 @@ static enum ndr_err_code ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); - if (r->in.language_id == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.language_id)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.language_id_sys)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.disp_name)); - if (r->out.disp_name) { - NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.disp_name)); + if (r->out.disp_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.disp_name)); + if (*r->out.disp_name) { + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name)); } - if (r->out.language_id == NULL) { + if (r->out.returned_language_id == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.language_id)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.returned_language_id)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7611,7 +7611,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_name_0; TALLOC_CTX *_mem_save_disp_name_0; - TALLOC_CTX *_mem_save_language_id_0; + TALLOC_CTX *_mem_save_disp_name_1; + TALLOC_CTX *_mem_save_returned_language_id_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7629,37 +7630,39 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.language_id); - } - _mem_save_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.language_id, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.language_id)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_id_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown)); - NDR_PULL_ALLOC(ndr, r->out.language_id); - *r->out.language_id = *r->in.language_id; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.language_id_sys)); + NDR_PULL_ALLOC(ndr, r->out.disp_name); + ZERO_STRUCTP(r->out.disp_name); + NDR_PULL_ALLOC(ndr, r->out.returned_language_id); + ZERO_STRUCTP(r->out.returned_language_id); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.disp_name); + } + _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name)); if (_ptr_disp_name) { - NDR_PULL_ALLOC(ndr, r->out.disp_name); + NDR_PULL_ALLOC(ndr, *r->out.disp_name); } else { - r->out.disp_name = NULL; + *r->out.disp_name = NULL; } - if (r->out.disp_name) { - _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, 0); - NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.disp_name)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, 0); + if (*r->out.disp_name) { + _mem_save_disp_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.disp_name, 0); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.disp_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.language_id); + NDR_PULL_ALLOC(ndr, r->out.returned_language_id); } - _mem_save_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.language_id, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.language_id)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_id_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_returned_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.returned_language_id, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.returned_language_id)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_returned_language_id_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -7683,11 +7686,8 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const c ndr->depth++; ndr_print_lsa_String(ndr, "name", r->in.name); ndr->depth--; - ndr_print_ptr(ndr, "language_id", r->in.language_id); - ndr->depth++; - ndr_print_uint16(ndr, "language_id", *r->in.language_id); - ndr->depth--; - ndr_print_uint16(ndr, "unknown", r->in.unknown); + ndr_print_uint16(ndr, "language_id", r->in.language_id); + ndr_print_uint16(ndr, "language_id_sys", r->in.language_id_sys); ndr->depth--; } if (flags & NDR_OUT) { @@ -7695,13 +7695,16 @@ _PUBLIC_ void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const c ndr->depth++; ndr_print_ptr(ndr, "disp_name", r->out.disp_name); ndr->depth++; - if (r->out.disp_name) { - ndr_print_lsa_StringLarge(ndr, "disp_name", r->out.disp_name); + ndr_print_ptr(ndr, "disp_name", *r->out.disp_name); + ndr->depth++; + if (*r->out.disp_name) { + ndr_print_lsa_StringLarge(ndr, "disp_name", *r->out.disp_name); } ndr->depth--; - ndr_print_ptr(ndr, "language_id", r->out.language_id); + ndr->depth--; + ndr_print_ptr(ndr, "returned_language_id", r->out.returned_language_id); ndr->depth++; - ndr_print_uint16(ndr, "language_id", *r->out.language_id); + ndr_print_uint16(ndr, "returned_language_id", *r->out.returned_language_id); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 50830ff545..b4600017bc 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -2601,13 +2601,18 @@ static bool api_lsa_LookupPrivDisplayName(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.disp_name = talloc_zero(r, struct lsa_StringLarge); + r->out.disp_name = talloc_zero(r, struct lsa_StringLarge *); if (r->out.disp_name == NULL) { talloc_free(r); return false; } - r->out.language_id = r->in.language_id; + r->out.returned_language_id = talloc_zero(r, uint16_t); + if (r->out.returned_language_id == NULL) { + talloc_free(r); + return false; + } + r->out.result = _lsa_LookupPrivDisplayName(p, r); if (p->rng_fault_state) { -- cgit From 9129d20447a0d181d20dae337d32a9f73c6b12f3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 11 Feb 2008 20:49:24 +0100 Subject: Re-run make idl. Guenther (This used to be commit 4d9f48f918ac5a0e7df0f4e55673c5b285efc4d5) --- source3/librpc/gen_ndr/cli_lsa.c | 8 +- source3/librpc/gen_ndr/cli_lsa.h | 4 +- source3/librpc/gen_ndr/lsa.h | 12 +-- source3/librpc/gen_ndr/ndr_lsa.c | 177 +++++++++++++++++++++------------------ source3/librpc/gen_ndr/ndr_lsa.h | 1 - 5 files changed, 105 insertions(+), 97 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index d2c54efff9..f910a82f35 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -1957,8 +1957,8 @@ NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, - struct lsa_String *account_name, - struct lsa_StringPointer *authority_name) + struct lsa_String **account_name, + struct lsa_String **authority_name) { struct lsa_GetUserName r; NTSTATUS status; @@ -1992,9 +1992,7 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, } /* Return variables */ - if (account_name && r.out.account_name) { - *account_name = *r.out.account_name; - } + *account_name = *r.out.account_name; if (authority_name && r.out.authority_name) { *authority_name = *r.out.authority_name; } diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 5e40a17a92..49f4633bf2 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -219,8 +219,8 @@ NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, - struct lsa_String *account_name, - struct lsa_StringPointer *authority_name); + struct lsa_String **account_name, + struct lsa_String **authority_name); NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index d829c1f00a..14d46a6542 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -452,10 +452,6 @@ struct lsa_RightSet { struct lsa_StringLarge *names;/* [unique,size_is(count)] */ }; -struct lsa_StringPointer { - struct lsa_String *string;/* [unique] */ -}; - struct lsa_DomainListEx { uint32_t count; struct lsa_TrustDomainInfoInfoEx *domains;/* [unique,size_is(count)] */ @@ -1189,13 +1185,13 @@ struct lsa_OpenPolicy2 { struct lsa_GetUserName { struct { const char *system_name;/* [unique,charset(UTF16)] */ - struct lsa_String *account_name;/* [unique] */ - struct lsa_StringPointer *authority_name;/* [unique] */ + struct lsa_String **account_name;/* [ref] */ + struct lsa_String **authority_name;/* [unique] */ } in; struct { - struct lsa_String *account_name;/* [unique] */ - struct lsa_StringPointer *authority_name;/* [unique] */ + struct lsa_String **account_name;/* [ref] */ + struct lsa_String **authority_name;/* [unique] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 69feaedc6b..84f99749fe 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -3344,57 +3344,6 @@ _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, co ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_StringPointer(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringPointer *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->string) { - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->string)); - } - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_lsa_StringPointer(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringPointer *r) -{ - uint32_t _ptr_string; - TALLOC_CTX *_mem_save_string_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string)); - if (_ptr_string) { - NDR_PULL_ALLOC(ndr, r->string); - } else { - r->string = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->string) { - _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->string, 0); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->string)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_lsa_StringPointer(struct ndr_print *ndr, const char *name, const struct lsa_StringPointer *r) -{ - ndr_print_struct(ndr, name, "lsa_StringPointer"); - ndr->depth++; - ndr_print_ptr(ndr, "string", r->string); - ndr->depth++; - if (r->string) { - ndr_print_lsa_String(ndr, "string", r->string); - } - ndr->depth--; - ndr->depth--; -} - static enum ndr_err_code ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r) { uint32_t cntr_domains_1; @@ -8587,23 +8536,35 @@ static enum ndr_err_code ndr_push_lsa_GetUserName(struct ndr_push *ndr, int flag NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.account_name)); - if (r->in.account_name) { - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); + if (r->in.account_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.account_name)); + if (*r->in.account_name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name)); if (r->in.authority_name) { - NDR_CHECK(ndr_push_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.authority_name)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.authority_name)); + if (*r->in.authority_name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name)); + } } } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.account_name)); - if (r->out.account_name) { - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.account_name)); + if (r->out.account_name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.account_name)); + if (*r->out.account_name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name)); if (r->out.authority_name) { - NDR_CHECK(ndr_push_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.authority_name)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.authority_name)); + if (*r->out.authority_name) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name)); + } } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } @@ -8617,7 +8578,9 @@ static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flag uint32_t _ptr_authority_name; TALLOC_CTX *_mem_save_system_name_0; TALLOC_CTX *_mem_save_account_name_0; + TALLOC_CTX *_mem_save_account_name_1; TALLOC_CTX *_mem_save_authority_name_0; + TALLOC_CTX *_mem_save_authority_name_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8639,18 +8602,24 @@ static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flag NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0); } + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.account_name); + } + _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name)); if (_ptr_account_name) { - NDR_PULL_ALLOC(ndr, r->in.account_name); + NDR_PULL_ALLOC(ndr, *r->in.account_name); } else { - r->in.account_name = NULL; + *r->in.account_name = NULL; } - if (r->in.account_name) { - _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, 0); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0); + if (*r->in.account_name) { + _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.account_name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.account_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name)); if (_ptr_authority_name) { NDR_PULL_ALLOC(ndr, r->in.authority_name); @@ -8660,23 +8629,42 @@ static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flag if (r->in.authority_name) { _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0); - NDR_CHECK(ndr_pull_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.authority_name)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name)); + if (_ptr_authority_name) { + NDR_PULL_ALLOC(ndr, *r->in.authority_name); + } else { + *r->in.authority_name = NULL; + } + if (*r->in.authority_name) { + _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->in.authority_name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.authority_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0); } + NDR_PULL_ALLOC(ndr, r->out.account_name); + *r->out.account_name = *r->in.account_name; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.account_name); + } + _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name)); if (_ptr_account_name) { - NDR_PULL_ALLOC(ndr, r->out.account_name); + NDR_PULL_ALLOC(ndr, *r->out.account_name); } else { - r->out.account_name = NULL; + *r->out.account_name = NULL; } - if (r->out.account_name) { - _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, 0); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.account_name)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0); + if (*r->out.account_name) { + _mem_save_account_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.account_name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.account_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name)); if (_ptr_authority_name) { NDR_PULL_ALLOC(ndr, r->out.authority_name); @@ -8686,7 +8674,18 @@ static enum ndr_err_code ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flag if (r->out.authority_name) { _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0); - NDR_CHECK(ndr_pull_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.authority_name)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name)); + if (_ptr_authority_name) { + NDR_PULL_ALLOC(ndr, *r->out.authority_name); + } else { + *r->out.authority_name = NULL; + } + if (*r->out.authority_name) { + _mem_save_authority_name_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.authority_name, 0); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.authority_name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0); } NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); @@ -8712,14 +8711,22 @@ _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, ndr->depth--; ndr_print_ptr(ndr, "account_name", r->in.account_name); ndr->depth++; - if (r->in.account_name) { - ndr_print_lsa_String(ndr, "account_name", r->in.account_name); + ndr_print_ptr(ndr, "account_name", *r->in.account_name); + ndr->depth++; + if (*r->in.account_name) { + ndr_print_lsa_String(ndr, "account_name", *r->in.account_name); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "authority_name", r->in.authority_name); ndr->depth++; if (r->in.authority_name) { - ndr_print_lsa_StringPointer(ndr, "authority_name", r->in.authority_name); + ndr_print_ptr(ndr, "authority_name", *r->in.authority_name); + ndr->depth++; + if (*r->in.authority_name) { + ndr_print_lsa_String(ndr, "authority_name", *r->in.authority_name); + } + ndr->depth--; } ndr->depth--; ndr->depth--; @@ -8729,14 +8736,22 @@ _PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "account_name", r->out.account_name); ndr->depth++; - if (r->out.account_name) { - ndr_print_lsa_String(ndr, "account_name", r->out.account_name); + ndr_print_ptr(ndr, "account_name", *r->out.account_name); + ndr->depth++; + if (*r->out.account_name) { + ndr_print_lsa_String(ndr, "account_name", *r->out.account_name); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "authority_name", r->out.authority_name); ndr->depth++; if (r->out.authority_name) { - ndr_print_lsa_StringPointer(ndr, "authority_name", r->out.authority_name); + ndr_print_ptr(ndr, "authority_name", *r->out.authority_name); + ndr->depth++; + if (*r->out.authority_name) { + ndr_print_lsa_String(ndr, "authority_name", *r->out.authority_name); + } + ndr->depth--; } ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h index ab4043f2a1..76add459c2 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.h +++ b/source3/librpc/gen_ndr/ndr_lsa.h @@ -237,7 +237,6 @@ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *nam void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r); void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r); void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r); -void ndr_print_lsa_StringPointer(struct ndr_print *ndr, const char *name, const struct lsa_StringPointer *r); void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r); void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r); void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r); -- cgit From 0006052dfe5cb7e68f1b4009695296fdb2913afa Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Feb 2008 09:52:46 +0100 Subject: Re-run make idl. Guenther (This used to be commit 604e1ec5a603fd151bd1e7f303e308169ae80de3) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 27 ++++++++++++++++++++++++--- source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index efedb00078..f4282142a0 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -487,8 +487,8 @@ NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint32_t *resume_handle, + struct samr_SamArray **sam, uint32_t max_size, - struct samr_SamArray *sam, uint32_t *num_entries) { struct samr_EnumDomainGroups r; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 9eac177001..a2db39bd74 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -61,8 +61,8 @@ NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint32_t *resume_handle, + struct samr_SamArray **sam, uint32_t max_size, - struct samr_SamArray *sam, uint32_t *num_entries); NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 13227f75d1..cb9cef915a 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -6333,7 +6333,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, in if (r->out.sam == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam)); + if (*r->out.sam) { + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + } if (r->out.num_entries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6345,9 +6348,11 @@ static enum ndr_err_code ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, int flags, struct samr_EnumDomainGroups *r) { + uint32_t _ptr_sam; TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_sam_1; TALLOC_CTX *_mem_save_num_entries_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6387,7 +6392,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, in } _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam)); + if (_ptr_sam) { + NDR_PULL_ALLOC(ndr, *r->out.sam); + } else { + *r->out.sam = NULL; + } + if (*r->out.sam) { + _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_entries); @@ -6431,7 +6447,12 @@ _PUBLIC_ void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char ndr->depth--; ndr_print_ptr(ndr, "sam", r->out.sam); ndr->depth++; - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr_print_ptr(ndr, "sam", *r->out.sam); + ndr->depth++; + if (*r->out.sam) { + ndr_print_samr_SamArray(ndr, "sam", *r->out.sam); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "num_entries", r->out.num_entries); ndr->depth++; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 2d6126a3f4..5a436fb0db 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -913,7 +913,7 @@ struct samr_EnumDomainGroups { } in; struct { - struct samr_SamArray *sam;/* [ref] */ + struct samr_SamArray **sam;/* [ref] */ uint32_t *num_entries;/* [ref] */ uint32_t *resume_handle;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 47a51ed410..768c3b7ee3 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -913,7 +913,7 @@ static bool api_samr_EnumDomainGroups(pipes_struct *p) ZERO_STRUCT(r->out); r->out.resume_handle = r->in.resume_handle; - r->out.sam = talloc_zero(r, struct samr_SamArray); + r->out.sam = talloc_zero(r, struct samr_SamArray *); if (r->out.sam == NULL) { talloc_free(r); return false; -- cgit From 2d4d27c0d459b8463636d8bdfb8bc4a97c00fa7b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Feb 2008 09:54:11 +0100 Subject: Re-run make idl. Guenther (This used to be commit 82993e9cd46ff9327fd0f4848f18b533a3f27b20) --- source3/librpc/gen_ndr/cli_samr.c | 6 +++--- source3/librpc/gen_ndr/cli_samr.h | 4 ++-- source3/librpc/gen_ndr/ndr_samr.c | 33 +++++++++++++++++++++++++++------ source3/librpc/gen_ndr/samr.h | 4 ++-- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 35 insertions(+), 14 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index f4282142a0..4d0b963918 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -679,8 +679,8 @@ NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint32_t *resume_handle, - uint32_t acct_flags, - struct samr_SamArray *sam, + struct samr_SamArray **sam, + uint32_t max_size, uint32_t *num_entries) { struct samr_EnumDomainAliases r; @@ -689,7 +689,7 @@ NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, /* In parameters */ r.in.domain_handle = domain_handle; r.in.resume_handle = resume_handle; - r.in.acct_flags = acct_flags; + r.in.max_size = max_size; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(samr_EnumDomainAliases, &r); diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index a2db39bd74..4c4371fb92 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -90,8 +90,8 @@ NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle, uint32_t *resume_handle, - uint32_t acct_flags, - struct samr_SamArray *sam, + struct samr_SamArray **sam, + uint32_t max_size, uint32_t *num_entries); NTSTATUS rpccli_samr_GetAliasMembership(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index cb9cef915a..cc66ff8a87 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -6858,7 +6858,7 @@ static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, i return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle)); - NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->in.acct_flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_size)); } if (flags & NDR_OUT) { if (r->out.resume_handle == NULL) { @@ -6868,7 +6868,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, i if (r->out.sam == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam)); + if (*r->out.sam) { + NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + } if (r->out.num_entries == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6880,9 +6883,11 @@ static enum ndr_err_code ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, i static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, int flags, struct samr_EnumDomainAliases *r) { + uint32_t _ptr_sam; TALLOC_CTX *_mem_save_domain_handle_0; TALLOC_CTX *_mem_save_resume_handle_0; TALLOC_CTX *_mem_save_sam_0; + TALLOC_CTX *_mem_save_sam_1; TALLOC_CTX *_mem_save_num_entries_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6901,7 +6906,7 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, i NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->in.acct_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_size)); NDR_PULL_ALLOC(ndr, r->out.resume_handle); *r->out.resume_handle = *r->in.resume_handle; NDR_PULL_ALLOC(ndr, r->out.sam); @@ -6922,7 +6927,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, i } _mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam)); + if (_ptr_sam) { + NDR_PULL_ALLOC(ndr, *r->out.sam); + } else { + *r->out.sam = NULL; + } + if (*r->out.sam) { + _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0); + NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_entries); @@ -6954,7 +6970,7 @@ _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char ndr->depth++; ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); ndr->depth--; - ndr_print_samr_AcctFlags(ndr, "acct_flags", r->in.acct_flags); + ndr_print_uint32(ndr, "max_size", r->in.max_size); ndr->depth--; } if (flags & NDR_OUT) { @@ -6966,7 +6982,12 @@ _PUBLIC_ void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char ndr->depth--; ndr_print_ptr(ndr, "sam", r->out.sam); ndr->depth++; - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); + ndr_print_ptr(ndr, "sam", *r->out.sam); + ndr->depth++; + if (*r->out.sam) { + ndr_print_samr_SamArray(ndr, "sam", *r->out.sam); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "num_entries", r->out.num_entries); ndr->depth++; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 5a436fb0db..a0390aca30 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -975,12 +975,12 @@ struct samr_CreateDomAlias { struct samr_EnumDomainAliases { struct { struct policy_handle *domain_handle;/* [ref] */ - uint32_t acct_flags; + uint32_t max_size; uint32_t *resume_handle;/* [ref] */ } in; struct { - struct samr_SamArray *sam;/* [ref] */ + struct samr_SamArray **sam;/* [ref] */ uint32_t *num_entries;/* [ref] */ uint32_t *resume_handle;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 768c3b7ee3..dcc6a197fa 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -1259,7 +1259,7 @@ static bool api_samr_EnumDomainAliases(pipes_struct *p) ZERO_STRUCT(r->out); r->out.resume_handle = r->in.resume_handle; - r->out.sam = talloc_zero(r, struct samr_SamArray); + r->out.sam = talloc_zero(r, struct samr_SamArray *); if (r->out.sam == NULL) { talloc_free(r); return false; -- cgit From be252325cfbaf25ba982a3a5ed5d09eff18f3444 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Feb 2008 10:02:02 +0100 Subject: Re-run make idl. Guenther (This used to be commit c7620b094bf972d9cb4d4596a5e06fb7bbe23815) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index 4d0b963918..a2119e9068 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -583,8 +583,8 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, struct policy_handle *domain_handle, uint32_t *resume_handle, uint32_t acct_flags, - uint32_t max_size, struct samr_SamArray **sam, + uint32_t max_size, uint32_t *num_entries) { struct samr_EnumDomainUsers r; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index 4c4371fb92..f8d98db10b 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -76,8 +76,8 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, struct policy_handle *domain_handle, uint32_t *resume_handle, uint32_t acct_flags, - uint32_t max_size, struct samr_SamArray **sam, + uint32_t max_size, uint32_t *num_entries); NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, -- cgit From cd9cea1a63f2b8ff215fa5370254340f67d75b19 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Feb 2008 10:07:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit 88575187e2b18f7a2d2fb689b4a41ab39bd48373) --- source3/librpc/gen_ndr/cli_samr.c | 2 +- source3/librpc/gen_ndr/cli_samr.h | 2 +- source3/librpc/gen_ndr/ndr_samr.c | 33 +++++++++++++++++++++++++++------ source3/librpc/gen_ndr/samr.h | 2 +- source3/librpc/gen_ndr/srv_samr.c | 2 +- 5 files changed, 31 insertions(+), 10 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c index a2119e9068..663d620d67 100644 --- a/source3/librpc/gen_ndr/cli_samr.c +++ b/source3/librpc/gen_ndr/cli_samr.c @@ -1582,7 +1582,7 @@ NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, uint16_t level, - union samr_UserInfo *info) + union samr_UserInfo **info) { struct samr_QueryUserInfo r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h index f8d98db10b..92fcf73536 100644 --- a/source3/librpc/gen_ndr/cli_samr.h +++ b/source3/librpc/gen_ndr/cli_samr.h @@ -193,7 +193,7 @@ NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, uint16_t level, - union samr_UserInfo *info); + union samr_UserInfo **info); NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle, diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index cc66ff8a87..eaa38e3a1f 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -8741,8 +8741,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int if (r->out.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + 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_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -8750,8 +8753,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r) { + uint32_t _ptr_info; TALLOC_CTX *_mem_save_user_handle_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_info_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8772,8 +8777,19 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int } _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_set_switch_value(ndr, r->out.info, r->in.level)); - NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, *r->out.info); + } else { + *r->out.info = NULL; + } + 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_samr_UserInfo(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)); } @@ -8802,8 +8818,13 @@ _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_ptr(ndr, "info", r->out.info); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_samr_UserInfo(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_samr_UserInfo(ndr, "info", *r->out.info); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index a0390aca30..dff4bf80f0 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -1275,7 +1275,7 @@ struct samr_QueryUserInfo { } in; struct { - union samr_UserInfo *info;/* [ref,switch_is(level)] */ + union samr_UserInfo **info;/* [ref,switch_is(level)] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index dcc6a197fa..3994587981 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -2893,7 +2893,7 @@ static bool api_samr_QueryUserInfo(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.info = talloc_zero(r, union samr_UserInfo); + r->out.info = talloc_zero(r, union samr_UserInfo *); if (r->out.info == NULL) { talloc_free(r); return false; -- cgit From ba934cc6c1ba48b8d6d976876ae023e6b5b4c1bb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 13 Feb 2008 00:28:12 +0100 Subject: Re-run make idl. Guenther (This used to be commit 4473255f06bcd96166e61cfa751d32fddf120e16) --- source3/librpc/gen_ndr/cli_lsa.c | 4 ++-- source3/librpc/gen_ndr/cli_lsa.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index f910a82f35..27ed572a19 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -562,8 +562,8 @@ NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t max_size, - struct lsa_DomainList *domains) + struct lsa_DomainList *domains, + uint32_t max_size) { struct lsa_EnumTrustDom r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 49f4633bf2..ddcd161413 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -65,8 +65,8 @@ NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t max_size, - struct lsa_DomainList *domains); + struct lsa_DomainList *domains, + uint32_t max_size); NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, -- cgit From 120939d5d6ec0bae3a92b18ac3707fd9d3f36e46 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 13 Feb 2008 14:12:29 +0100 Subject: Re-run make idl. Guenther (This used to be commit 782ad12e3c100cf74ca0bc353379efe90da69b98) --- source3/librpc/gen_ndr/cli_netlogon.c | 2 +- source3/librpc/gen_ndr/cli_netlogon.h | 2 +- source3/librpc/gen_ndr/ndr_netlogon.c | 25 +++++++++++++++++++------ source3/librpc/gen_ndr/netlogon.h | 2 +- 4 files changed, 22 insertions(+), 9 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index de04c21dc5..f355856fd5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -745,7 +745,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, const char *logon_server, uint32_t function_code, uint32_t level, - union netr_CONTROL_DATA_INFORMATION data, + union netr_CONTROL_DATA_INFORMATION *data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror) { diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 4aa0f9fa73..0b6ed869c5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -127,7 +127,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, const char *logon_server, uint32_t function_code, uint32_t level, - union netr_CONTROL_DATA_INFORMATION data, + union netr_CONTROL_DATA_INFORMATION *data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror); NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index b12a347ded..624c9acc69 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -10166,8 +10166,11 @@ static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, int f } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.function_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.data, r->in.function_code)); - NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data)); + if (r->in.data == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code)); + NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data)); } if (flags & NDR_OUT) { if (r->out.query == NULL) { @@ -10184,6 +10187,7 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f { uint32_t _ptr_logon_server; TALLOC_CTX *_mem_save_logon_server_0; + TALLOC_CTX *_mem_save_data_0; TALLOC_CTX *_mem_save_query_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10208,8 +10212,14 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.function_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.data, r->in.function_code)); - NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.data); + } + _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code)); + NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.query); ZERO_STRUCTP(r->out.query); } @@ -10245,8 +10255,11 @@ _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *na ndr->depth--; ndr_print_uint32(ndr, "function_code", r->in.function_code); ndr_print_uint32(ndr, "level", r->in.level); - ndr_print_set_switch_value(ndr, &r->in.data, r->in.function_code); - ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", &r->in.data); + ndr_print_ptr(ndr, "data", r->in.data); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code); + ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index ef2218c0f2..36380f1498 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1071,7 +1071,7 @@ struct netr_LogonControl2 { const char *logon_server;/* [unique,charset(UTF16)] */ uint32_t function_code; uint32_t level; - union netr_CONTROL_DATA_INFORMATION data;/* [switch_is(function_code)] */ + union netr_CONTROL_DATA_INFORMATION *data;/* [ref,switch_is(function_code)] */ } in; struct { -- cgit From a15db9cadaedd000687a9dab1b027f0093f764a7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 13 Feb 2008 23:00:36 +0100 Subject: Re-run make idl. Guenther (This used to be commit a111167062f0bee9477b5988a3ce796af81407fc) --- source3/librpc/gen_ndr/cli_netlogon.c | 6 +++--- source3/librpc/gen_ndr/cli_netlogon.h | 6 +++--- source3/librpc/gen_ndr/ndr_netlogon.c | 38 +++++++++++++++++++++++++++++------ source3/librpc/gen_ndr/netlogon.h | 4 ++-- 4 files changed, 40 insertions(+), 14 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index f355856fd5..7efcae2c56 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -314,9 +314,9 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, - struct netr_Authenticator credential, - struct samr_Password new_password, - struct netr_Authenticator *return_authenticator) + struct netr_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *new_password) { struct netr_ServerPasswordSet r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 0b6ed869c5..f07c429224 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -52,9 +52,9 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, - struct netr_Authenticator credential, - struct samr_Password new_password, - struct netr_Authenticator *return_authenticator); + struct netr_Authenticator *credential, + struct netr_Authenticator *return_authenticator, + struct samr_Password *new_password); NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 624c9acc69..d31e19a9cc 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -8864,8 +8864,14 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, i NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + if (r->in.new_password == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password)); } if (flags & NDR_OUT) { if (r->out.return_authenticator == NULL) { @@ -8881,7 +8887,9 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i { uint32_t _ptr_server_name; TALLOC_CTX *_mem_save_server_name_0; + TALLOC_CTX *_mem_save_credential_0; TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_new_password_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -8918,8 +8926,20 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i } NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.new_password); + } + _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.return_authenticator); ZERO_STRUCTP(r->out.return_authenticator); } @@ -8955,8 +8975,14 @@ _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char ndr_print_string(ndr, "account_name", r->in.account_name); ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type); ndr_print_string(ndr, "computer_name", r->in.computer_name); - ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential); - ndr_print_samr_Password(ndr, "new_password", &r->in.new_password); + ndr_print_ptr(ndr, "credential", r->in.credential); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; + ndr_print_ptr(ndr, "new_password", r->in.new_password); + ndr->depth++; + ndr_print_samr_Password(ndr, "new_password", r->in.new_password); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 36380f1498..97089d45f7 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -920,8 +920,8 @@ struct netr_ServerPasswordSet { const char *account_name;/* [charset(UTF16)] */ enum netr_SchannelType secure_channel_type; const char *computer_name;/* [charset(UTF16)] */ - struct netr_Authenticator credential; - struct samr_Password new_password; + struct netr_Authenticator *credential;/* [ref] */ + struct samr_Password *new_password;/* [ref] */ } in; struct { -- cgit From f14ff502d87182ab5bbb182a460b47f90d7295e3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Feb 2008 01:07:54 +0100 Subject: Re-run make idl. Guenther (This used to be commit debf51aa966d1f243894d458069346a60c76714b) --- source3/librpc/gen_ndr/cli_lsa.c | 4 ++-- source3/librpc/gen_ndr/cli_lsa.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 27ed572a19..5b277ca50c 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -471,8 +471,8 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t num_entries, - struct lsa_SidArray *sids) + struct lsa_SidArray *sids, + uint32_t num_entries) { struct lsa_EnumAccounts r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index ddcd161413..3e1a8445f1 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -53,8 +53,8 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, - uint32_t num_entries, - struct lsa_SidArray *sids); + struct lsa_SidArray *sids, + uint32_t num_entries); NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, -- cgit From 306061370b71a7234c476247bf5c920dde731de4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Feb 2008 01:55:22 +0100 Subject: Re-run make idl. Guenther (This used to be commit e75283178dee42a64ec3963f64652c202f0dbd0b) --- source3/librpc/gen_ndr/cli_lsa.c | 6 ++---- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 2 +- source3/librpc/gen_ndr/ndr_lsa.c | 39 +++++++++++++++++++++++++++------------ source3/librpc/gen_ndr/srv_lsa.c | 2 +- 5 files changed, 32 insertions(+), 19 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 5b277ca50c..205faa6e07 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -805,7 +805,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_PrivilegeSet *privs) + struct lsa_PrivilegeSet **privs) { struct lsa_EnumPrivsAccount r; NTSTATUS status; @@ -837,9 +837,7 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, } /* Return variables */ - if (privs && r.out.privs) { - *privs = *r.out.privs; - } + *privs = *r.out.privs; /* Return result */ return r.out.result; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 3e1a8445f1..67aafe3d1a 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -99,7 +99,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, - struct lsa_PrivilegeSet *privs); + struct lsa_PrivilegeSet **privs); NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 14d46a6542..a948f6d5e8 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -838,7 +838,7 @@ struct lsa_EnumPrivsAccount { } in; struct { - struct lsa_PrivilegeSet *privs;/* [unique] */ + struct lsa_PrivilegeSet **privs;/* [ref] */ NTSTATUS result; } out; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 84f99749fe..12544b1b72 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -6224,9 +6224,12 @@ static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.privs)); - if (r->out.privs) { - NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs)); + if (r->out.privs == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs)); + if (*r->out.privs) { + NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs)); } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } @@ -6238,6 +6241,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int uint32_t _ptr_privs; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_privs_0; + TALLOC_CTX *_mem_save_privs_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -6248,20 +6252,28 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.privs); + ZERO_STRUCTP(r->out.privs); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.privs); + } + _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs)); if (_ptr_privs) { - NDR_PULL_ALLOC(ndr, r->out.privs); + NDR_PULL_ALLOC(ndr, *r->out.privs); } else { - r->out.privs = NULL; + *r->out.privs = NULL; } - if (r->out.privs) { - _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, 0); - NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0); + if (*r->out.privs) { + _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0); + NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -6288,10 +6300,13 @@ _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_ptr(ndr, "privs", r->out.privs); ndr->depth++; - if (r->out.privs) { - ndr_print_lsa_PrivilegeSet(ndr, "privs", r->out.privs); + ndr_print_ptr(ndr, "privs", *r->out.privs); + ndr->depth++; + if (*r->out.privs) { + ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs); } ndr->depth--; + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index b4600017bc..183cd355c0 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -1452,7 +1452,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet); + r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet *); if (r->out.privs == NULL) { talloc_free(r); return false; -- cgit From 01f5d15b2c0e988e9f9cea36bcdd776be2536b71 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Feb 2008 14:36:30 +0100 Subject: Re-run make idl. Guenther (This used to be commit 5137ebe068c32ce7cb204cff049ba7f7f2d86abc) --- source3/librpc/gen_ndr/ndr_lsa.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 12544b1b72..a95665f0fa 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -3288,6 +3288,9 @@ static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_fla if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + if (r->count < 0 || r->count > 256) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names)); if (_ptr_names) { NDR_PULL_ALLOC(ndr, r->names); -- cgit From 1592cc3df2a38d47f5e215b12ef5fff3698561b4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Feb 2008 15:21:54 +0100 Subject: Re-run make idl. Guenther (This used to be commit 3436a54662fad1c69cfd1211f1afaa5a9d3d6d36) --- source3/librpc/gen_ndr/cli_lsa.c | 4 ++-- source3/librpc/gen_ndr/cli_lsa.h | 2 +- source3/librpc/gen_ndr/lsa.h | 4 ++-- source3/librpc/gen_ndr/ndr_lsa.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 205faa6e07..7484edca49 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -1667,7 +1667,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, - uint32_t unknown, + uint8_t remove_all, struct lsa_RightSet *rights) { struct lsa_RemoveAccountRights r; @@ -1676,7 +1676,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, /* In parameters */ r.in.handle = handle; r.in.sid = sid; - r.in.unknown = unknown; + r.in.remove_all = remove_all; r.in.rights = rights; if (DEBUGLEVEL >= 10) { diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 67aafe3d1a..e4bf43a1e8 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -192,7 +192,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, - uint32_t unknown, + uint8_t remove_all, struct lsa_RightSet *rights); NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index a948f6d5e8..4a1ebdb7a9 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -448,7 +448,7 @@ struct lsa_RightAttribute { }; struct lsa_RightSet { - uint32_t count; + uint32_t count;/* [range(0,256)] */ struct lsa_StringLarge *names;/* [unique,size_is(count)] */ }; @@ -1104,7 +1104,7 @@ struct lsa_RemoveAccountRights { struct { struct policy_handle *handle;/* [ref] */ struct dom_sid2 *sid;/* [ref] */ - uint32_t unknown; + uint8_t remove_all; struct lsa_RightSet *rights;/* [ref] */ } in; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index a95665f0fa..74d8a314e1 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -8049,7 +8049,7 @@ static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all)); if (r->in.rights == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8081,7 +8081,7 @@ static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.rights); } @@ -8114,7 +8114,7 @@ _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const cha ndr->depth++; ndr_print_dom_sid2(ndr, "sid", r->in.sid); ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->in.unknown); + ndr_print_uint8(ndr, "remove_all", r->in.remove_all); ndr_print_ptr(ndr, "rights", r->in.rights); ndr->depth++; ndr_print_lsa_RightSet(ndr, "rights", r->in.rights); -- cgit From 1976c7acc7f98914be50c0dd5d5c259511e273fa Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 15 Feb 2008 14:04:08 +0100 Subject: Re-run make idl. Guenther (This used to be commit 06f2f4c4707d13bfc5510f3ff068534a01456fe5) --- source3/librpc/gen_ndr/cli_netlogon.c | 6 ++--- source3/librpc/gen_ndr/cli_netlogon.h | 6 ++--- source3/librpc/gen_ndr/ndr_netlogon.c | 46 ++++++++++++++++++++++++++++++----- source3/librpc/gen_ndr/netlogon.h | 4 +-- source3/librpc/gen_ndr/srv_netlogon.c | 2 +- 5 files changed, 49 insertions(+), 15 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 7efcae2c56..5e1593249d 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -363,12 +363,12 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, - struct netr_Authenticator credential, + struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, - uint32_t preferredmaximumlength, - struct netr_DELTA_ENUM_ARRAY *delta_enum_array) + struct netr_DELTA_ENUM_ARRAY **delta_enum_array, + uint32_t preferredmaximumlength) { struct netr_DatabaseDeltas r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index f07c429224..034594147a 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -59,12 +59,12 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, - struct netr_Authenticator credential, + struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, - uint32_t preferredmaximumlength, - struct netr_DELTA_ENUM_ARRAY *delta_enum_array); + struct netr_DELTA_ENUM_ARRAY **delta_enum_array, + uint32_t preferredmaximumlength); NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index d31e19a9cc..43a077f7f9 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -9009,7 +9009,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); if (r->in.return_authenticator == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -9033,7 +9036,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int if (r->out.delta_enum_array == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array)); + if (*r->out.delta_enum_array) { + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9041,9 +9047,12 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r) { + uint32_t _ptr_delta_enum_array; + TALLOC_CTX *_mem_save_credential_0; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_sequence_num_0; TALLOC_CTX *_mem_save_delta_enum_array_0; + TALLOC_CTX *_mem_save_delta_enum_array_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9061,7 +9070,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int } NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.return_authenticator); } @@ -9105,7 +9120,18 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int } _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); + if (_ptr_delta_enum_array) { + NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array); + } else { + *r->out.delta_enum_array = NULL; + } + if (*r->out.delta_enum_array) { + _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -9124,7 +9150,10 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_string(ndr, "logon_server", r->in.logon_server); ndr_print_string(ndr, "computername", r->in.computername); - ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential); + ndr_print_ptr(ndr, "credential", r->in.credential); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator); ndr->depth++; ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); @@ -9150,7 +9179,12 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); + ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array); + ndr->depth++; + if (*r->out.delta_enum_array) { + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 97089d45f7..83879e2c21 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -936,7 +936,7 @@ struct netr_DatabaseDeltas { struct { const char *logon_server;/* [charset(UTF16)] */ const char *computername;/* [charset(UTF16)] */ - struct netr_Authenticator credential; + struct netr_Authenticator *credential;/* [ref] */ enum netr_SamDatabaseID database_id; uint32_t preferredmaximumlength; struct netr_Authenticator *return_authenticator;/* [ref] */ @@ -944,7 +944,7 @@ struct netr_DatabaseDeltas { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ + struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ uint64_t *sequence_num;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 808493463a..5965490e24 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -599,7 +599,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p) ZERO_STRUCT(r->out); r->out.return_authenticator = r->in.return_authenticator; r->out.sequence_num = r->in.sequence_num; - r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY); + r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *); if (r->out.delta_enum_array == NULL) { talloc_free(r); return false; -- cgit From 13f9cd938d2cfc8dc270314aa3ee6a8b80de90fd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 15 Feb 2008 14:08:24 +0100 Subject: Re-run make idl. Guenther (This used to be commit 2add8790199079753c21ec2797e14b8bed2d8278) --- source3/librpc/gen_ndr/cli_netlogon.c | 6 ++--- source3/librpc/gen_ndr/cli_netlogon.h | 6 ++--- source3/librpc/gen_ndr/ndr_netlogon.c | 46 ++++++++++++++++++++++++++++++----- source3/librpc/gen_ndr/netlogon.h | 4 +-- source3/librpc/gen_ndr/srv_netlogon.c | 2 +- 5 files changed, 49 insertions(+), 15 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 5e1593249d..ef9eeaf7c2 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -847,13 +847,13 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, - struct netr_Authenticator credential, + struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, - uint32_t preferredmaximumlength, - struct netr_DELTA_ENUM_ARRAY *delta_enum_array) + struct netr_DELTA_ENUM_ARRAY **delta_enum_array, + uint32_t preferredmaximumlength) { struct netr_DatabaseSync2 r; NTSTATUS status; diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 034594147a..35f903267d 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -142,13 +142,13 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, - struct netr_Authenticator credential, + struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, - uint32_t preferredmaximumlength, - struct netr_DELTA_ENUM_ARRAY *delta_enum_array); + struct netr_DELTA_ENUM_ARRAY **delta_enum_array, + uint32_t preferredmaximumlength); NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 43a077f7f9..e5766487b3 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -10516,7 +10516,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); + if (r->in.credential == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); if (r->in.return_authenticator == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -10541,7 +10544,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f if (r->out.delta_enum_array == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array)); + if (*r->out.delta_enum_array) { + NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array)); + } NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10549,9 +10555,12 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r) { + uint32_t _ptr_delta_enum_array; + TALLOC_CTX *_mem_save_credential_0; TALLOC_CTX *_mem_save_return_authenticator_0; TALLOC_CTX *_mem_save_sync_context_0; TALLOC_CTX *_mem_save_delta_enum_array_0; + TALLOC_CTX *_mem_save_delta_enum_array_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10569,7 +10578,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f } NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16)); - NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.credential); + } + _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.return_authenticator); } @@ -10614,7 +10629,18 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f } _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array)); + if (_ptr_delta_enum_array) { + NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array); + } else { + *r->out.delta_enum_array = NULL; + } + if (*r->out.delta_enum_array) { + _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0); + NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -10633,7 +10659,10 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na ndr->depth++; ndr_print_string(ndr, "logon_server", r->in.logon_server); ndr_print_string(ndr, "computername", r->in.computername); - ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential); + ndr_print_ptr(ndr, "credential", r->in.credential); + ndr->depth++; + ndr_print_netr_Authenticator(ndr, "credential", r->in.credential); + ndr->depth--; ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator); ndr->depth++; ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); @@ -10660,7 +10689,12 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na ndr->depth--; ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array); ndr->depth++; - ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array); + ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array); + ndr->depth++; + if (*r->out.delta_enum_array) { + ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array); + } + ndr->depth--; ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 83879e2c21..c18527da00 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -1105,7 +1105,7 @@ struct netr_DatabaseSync2 { struct { const char *logon_server;/* [charset(UTF16)] */ const char *computername;/* [charset(UTF16)] */ - struct netr_Authenticator credential; + struct netr_Authenticator *credential;/* [ref] */ enum netr_SamDatabaseID database_id; uint16_t restart_state; uint32_t preferredmaximumlength; @@ -1114,7 +1114,7 @@ struct netr_DatabaseSync2 { } in; struct { - struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */ + struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */ struct netr_Authenticator *return_authenticator;/* [ref] */ uint32_t *sync_context;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 5965490e24..98ba48aa17 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -1358,7 +1358,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p) ZERO_STRUCT(r->out); r->out.return_authenticator = r->in.return_authenticator; r->out.sync_context = r->in.sync_context; - r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY); + r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *); if (r->out.delta_enum_array == NULL) { talloc_free(r); return false; -- cgit From bc69f754001f6c999b1f914bde97648abe8f488d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 15 Feb 2008 23:32:02 +0100 Subject: Re-run make idl. Guenther (This used to be commit b7818ec598fc942ba9c86dac0d47e239a6953301) --- source3/librpc/gen_ndr/cli_netlogon.c | 13 ++++--- source3/librpc/gen_ndr/cli_netlogon.h | 7 +++- source3/librpc/gen_ndr/ndr_netlogon.c | 69 ++++++++++++++++++----------------- source3/librpc/gen_ndr/ndr_winreg.c | 2 +- source3/librpc/gen_ndr/netlogon.h | 6 +-- source3/librpc/gen_ndr/srv_netlogon.c | 21 +++++++++-- 6 files changed, 71 insertions(+), 47 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index ef9eeaf7c2..e8b4243713 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/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/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 35f903267d..706b7942b6 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/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/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index e5766487b3..a81ae097d6 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/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/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c index b63d410587..ed511a62db 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.c +++ b/source3/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/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index c18527da00..80434a1578 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/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/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 98ba48aa17..67876f11ef 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/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); -- cgit From 0e70c5eea86138f24452db80e39a8d1d1b505c33 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 16 Feb 2008 13:59:55 +0100 Subject: Re-run make idl. Guenther (This used to be commit 3a200957b2028198b9ee59f71da0f0b6601c95e2) --- source3/librpc/gen_ndr/cli_netlogon.c | 4 +-- source3/librpc/gen_ndr/cli_netlogon.h | 4 +-- source3/librpc/gen_ndr/ndr_netlogon.c | 50 ++++++++++++++++++++++++++--------- source3/librpc/gen_ndr/netlogon.h | 4 +-- 4 files changed, 44 insertions(+), 18 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index e8b4243713..2937cc09b9 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -113,7 +113,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative) @@ -1974,7 +1974,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, const char *server_name, const char *computer_name, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 706b7942b6..1fdc1f6c46 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -22,7 +22,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative); @@ -298,7 +298,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, const char *server_name, const char *computer_name, uint16_t logon_level, - union netr_LogonLevel logon, + union netr_LogonLevel *logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index a81ae097d6..3968bcd2ae 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -8196,8 +8196,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); } NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (r->in.logon == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level)); } if (flags & NDR_OUT) { @@ -8229,6 +8232,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f TALLOC_CTX *_mem_save_computer_name_0; TALLOC_CTX *_mem_save_credential_0; TALLOC_CTX *_mem_save_return_authenticator_0; + TALLOC_CTX *_mem_save_logon_0; TALLOC_CTX *_mem_save_validation_0; TALLOC_CTX *_mem_save_authoritative_0; if (flags & NDR_IN) { @@ -8295,8 +8299,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0); } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.logon); + } + _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level)); NDR_PULL_ALLOC(ndr, r->out.validation); ZERO_STRUCTP(r->out.validation); @@ -8371,8 +8381,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na } ndr->depth--; ndr_print_uint16(ndr, "logon_level", r->in.logon_level); - ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); + ndr_print_ptr(ndr, "logon", r->in.logon); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon); + ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr->depth--; } @@ -13382,8 +13395,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (r->in.logon == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level)); if (r->in.flags == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -13415,6 +13431,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int uint32_t _ptr_computer_name; TALLOC_CTX *_mem_save_server_name_0; TALLOC_CTX *_mem_save_computer_name_0; + TALLOC_CTX *_mem_save_logon_0; TALLOC_CTX *_mem_save_validation_0; TALLOC_CTX *_mem_save_authoritative_0; TALLOC_CTX *_mem_save_flags_0; @@ -13458,8 +13475,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0); } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level)); - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.logon); + } + _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.flags); @@ -13526,8 +13549,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char * } ndr->depth--; ndr_print_uint16(ndr, "logon_level", r->in.logon_level); - ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); + ndr_print_ptr(ndr, "logon", r->in.logon); + ndr->depth++; + ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level); + ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon); + ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr_print_ptr(ndr, "flags", r->in.flags); ndr->depth++; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 80434a1578..bff2d91a03 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -849,7 +849,7 @@ struct netr_LogonSamLogon { const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -1435,7 +1435,7 @@ struct netr_LogonSamLogonEx { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ uint16_t logon_level; - union netr_LogonLevel logon;/* [switch_is(logon_level)] */ + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; uint32_t *flags;/* [ref] */ } in; -- cgit From 9416ec9e54f69a5bdf303f1c5551e4de138b6c08 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 16 Feb 2008 14:02:03 +0100 Subject: Add generated ndr_eventlog leftover produced by recent pidl changes. Guenther (This used to be commit 0efaf76eecacd26edbc6e020230159eb5dd44b15) --- source3/librpc/gen_ndr/ndr_eventlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index c6a77c54e5..1b58eb66b8 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -878,7 +878,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes); - memset(r->out.data, 0, r->in.number_of_bytes * sizeof(*r->out.data)); + memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out.sent_size); ZERO_STRUCTP(r->out.sent_size); NDR_PULL_ALLOC(ndr, r->out.real_size); -- cgit From f47d642ca71ff5e257638f77c826cc213969a005 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 16 Feb 2008 17:06:23 +0100 Subject: Add krb5pac IDL from samba4. Guenther (This used to be commit dc2e563e1fe5a18dc799e195d89199a59e3e05a7) --- source3/librpc/gen_ndr/krb5pac.h | 116 +++++ source3/librpc/gen_ndr/ndr_krb5pac.c | 840 +++++++++++++++++++++++++++++++++++ 2 files changed, 956 insertions(+) create mode 100644 source3/librpc/gen_ndr/krb5pac.h create mode 100644 source3/librpc/gen_ndr/ndr_krb5pac.c (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/krb5pac.h b/source3/librpc/gen_ndr/krb5pac.h new file mode 100644 index 0000000000..a0d75fdd88 --- /dev/null +++ b/source3/librpc/gen_ndr/krb5pac.h @@ -0,0 +1,116 @@ +/* header auto-generated by pidl */ + +#include + +#include "librpc/gen_ndr/security.h" +#include "librpc/gen_ndr/netlogon.h" +#include "librpc/gen_ndr/samr.h" +#ifndef _HEADER_krb5pac +#define _HEADER_krb5pac + +struct PAC_LOGON_NAME { + NTTIME logon_time; + uint16_t size;/* [value(2*strlen_m(account_name))] */ + const char *account_name;/* [charset(UTF16)] */ +}; + +struct PAC_SIGNATURE_DATA { + uint32_t type; + DATA_BLOB signature;/* [flag(LIBNDR_FLAG_REMAINING)] */ +}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +struct PAC_LOGON_INFO { + struct netr_SamInfo3 info3; + struct dom_sid2 *res_group_dom_sid;/* [unique] */ + struct samr_RidWithAttributeArray res_groups; +}/* [gensize] */; + +struct PAC_LOGON_INFO_CTR { + uint32_t unknown1;/* [value(0x00081001)] */ + uint32_t unknown2;/* [value(0xCCCCCCCC)] */ + uint32_t _ndr_size;/* [value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info,ndr->flags)+4,8))] */ + uint32_t unknown3;/* [value(0x00000000)] */ + struct PAC_LOGON_INFO *info;/* [unique] */ +}/* [public] */; + +enum PAC_TYPE +#ifndef USE_UINT_ENUMS + { + PAC_TYPE_LOGON_INFO=1, + PAC_TYPE_SRV_CHECKSUM=6, + PAC_TYPE_KDC_CHECKSUM=7, + PAC_TYPE_LOGON_NAME=10, + PAC_TYPE_CONSTRAINED_DELEGATION=11 +} +#else + { __donnot_use_enum_PAC_TYPE=0x7FFFFFFF} +#define PAC_TYPE_LOGON_INFO ( 1 ) +#define PAC_TYPE_SRV_CHECKSUM ( 6 ) +#define PAC_TYPE_KDC_CHECKSUM ( 7 ) +#define PAC_TYPE_LOGON_NAME ( 10 ) +#define PAC_TYPE_CONSTRAINED_DELEGATION ( 11 ) +#endif +; + +union PAC_INFO { + struct PAC_LOGON_INFO_CTR logon_info;/* [case(PAC_TYPE_LOGON_INFO)] */ + struct PAC_SIGNATURE_DATA srv_cksum;/* [case(PAC_TYPE_SRV_CHECKSUM)] */ + struct PAC_SIGNATURE_DATA kdc_cksum;/* [case(PAC_TYPE_KDC_CHECKSUM)] */ + struct PAC_LOGON_NAME logon_name;/* [case(PAC_TYPE_LOGON_NAME)] */ +}/* [gensize,nodiscriminant,public] */; + +struct PAC_BUFFER { + enum PAC_TYPE type; + uint32_t _ndr_size;/* [value(_ndr_size_PAC_INFO(info,type,0))] */ + union PAC_INFO *info;/* [relative,subcontext_size(_subcontext_size_PAC_INFO(r,ndr->flags)),subcontext(0),switch_is(type),flag(LIBNDR_FLAG_ALIGN8)] */ + uint32_t _pad;/* [value(0)] */ +}/* [noprint,nopull,public,nopush] */; + +struct PAC_DATA { + uint32_t num_buffers; + uint32_t version; + struct PAC_BUFFER *buffers; +}/* [public] */; + +struct DATA_BLOB_REM { + DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */ +}; + +struct PAC_BUFFER_RAW { + enum PAC_TYPE type; + uint32_t ndr_size; + struct DATA_BLOB_REM *info;/* [relative,subcontext_size(NDR_ROUND(ndr_size,8)),subcontext(0),flag(LIBNDR_FLAG_ALIGN8)] */ + uint32_t _pad;/* [value(0)] */ +}/* [public] */; + +struct PAC_DATA_RAW { + uint32_t num_buffers; + uint32_t version; + struct PAC_BUFFER_RAW *buffers; +}/* [public] */; + + +struct decode_pac { + struct { + struct PAC_DATA pac; + } in; + +}; + + +struct decode_pac_raw { + struct { + struct PAC_DATA_RAW pac; + } in; + +}; + + +struct decode_login_info { + struct { + struct PAC_LOGON_INFO logon_info; + } in; + +}; + +#endif /* _HEADER_krb5pac */ diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c new file mode 100644 index 0000000000..722e7acf84 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_krb5pac.c @@ -0,0 +1,840 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_krb5pac.h" + +#include "librpc/gen_ndr/ndr_security.h" +#include "librpc/gen_ndr/ndr_netlogon.h" +#include "librpc/gen_ndr/ndr_samr.h" +static enum ndr_err_code ndr_push_PAC_LOGON_NAME(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_NAME *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->account_name))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, 2 * strlen_m(r->account_name), sizeof(uint8_t), CH_UTF16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PAC_LOGON_NAME(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_NAME *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, r->size, sizeof(uint8_t), CH_UTF16)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r) +{ + ndr_print_struct(ndr, name, "PAC_LOGON_NAME"); + ndr->depth++; + ndr_print_NTTIME(ndr, "logon_time", r->logon_time); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->account_name):r->size); + ndr_print_string(ndr, "account_name", r->account_name); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type)); + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signature)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r) +{ + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type)); + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signature)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r) +{ + ndr_print_struct(ndr, name, "PAC_SIGNATURE_DATA"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_uint32(ndr, "type", r->type); + ndr_print_DATA_BLOB(ndr, "signature", r->signature); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_PAC_LOGON_INFO(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->res_group_dom_sid)); + NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); + if (r->res_group_dom_sid) { + NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid)); + } + NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r) +{ + uint32_t _ptr_res_group_dom_sid; + TALLOC_CTX *_mem_save_res_group_dom_sid_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid)); + if (_ptr_res_group_dom_sid) { + NDR_PULL_ALLOC(ndr, r->res_group_dom_sid); + } else { + r->res_group_dom_sid = NULL; + } + NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); + if (r->res_group_dom_sid) { + _mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0); + } + NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r) +{ + ndr_print_struct(ndr, name, "PAC_LOGON_INFO"); + ndr->depth++; + ndr_print_netr_SamInfo3(ndr, "info3", &r->info3); + ndr_print_ptr(ndr, "res_group_dom_sid", r->res_group_dom_sid); + ndr->depth++; + if (r->res_group_dom_sid) { + ndr_print_dom_sid2(ndr, "res_group_dom_sid", r->res_group_dom_sid); + } + ndr->depth--; + ndr_print_samr_RidWithAttributeArray(ndr, "res_groups", &r->res_groups); + ndr->depth--; +} + +static size_t ndr_size_PAC_LOGON_INFO(const struct PAC_LOGON_INFO *r, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_PAC_LOGON_INFO); +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00081001)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0xCCCCCCCC)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NDR_ROUND(ndr_size_PAC_LOGON_INFO(r->info, ndr->flags) + 4, 8))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000000)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->info) { + NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r) +{ + uint32_t _ptr_info; + TALLOC_CTX *_mem_save_info_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->info); + } else { + r->info = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->info) { + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info, 0); + NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r) +{ + ndr_print_struct(ndr, name, "PAC_LOGON_INFO_CTR"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00081001:r->unknown1); + ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0xCCCCCCCC:r->unknown2); + ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NDR_ROUND(ndr_size_PAC_LOGON_INFO(r->info, ndr->flags) + 4, 8):r->_ndr_size); + ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000000:r->unknown3); + ndr_print_ptr(ndr, "info", r->info); + ndr->depth++; + if (r->info) { + ndr_print_PAC_LOGON_INFO(ndr, "info", r->info); + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r) +{ + const char *val = NULL; + + switch (r) { + case PAC_TYPE_LOGON_INFO: val = "PAC_TYPE_LOGON_INFO"; break; + case PAC_TYPE_SRV_CHECKSUM: val = "PAC_TYPE_SRV_CHECKSUM"; break; + case PAC_TYPE_KDC_CHECKSUM: val = "PAC_TYPE_KDC_CHECKSUM"; break; + case PAC_TYPE_LOGON_NAME: val = "PAC_TYPE_LOGON_NAME"; break; + case PAC_TYPE_CONSTRAINED_DELEGATION: val = "PAC_TYPE_CONSTRAINED_DELEGATION"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case PAC_TYPE_LOGON_INFO: { + NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(ndr, NDR_SCALARS, &r->logon_info)); + break; } + + case PAC_TYPE_SRV_CHECKSUM: { + NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum)); + break; } + + case PAC_TYPE_KDC_CHECKSUM: { + NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum)); + break; } + + case PAC_TYPE_LOGON_NAME: { + NDR_CHECK(ndr_push_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name)); + break; } + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case PAC_TYPE_LOGON_INFO: + NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(ndr, NDR_BUFFERS, &r->logon_info)); + break; + + case PAC_TYPE_SRV_CHECKSUM: + break; + + case PAC_TYPE_KDC_CHECKSUM: + break; + + case PAC_TYPE_LOGON_NAME: + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case PAC_TYPE_LOGON_INFO: { + NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_SCALARS, &r->logon_info)); + break; } + + case PAC_TYPE_SRV_CHECKSUM: { + NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum)); + break; } + + case PAC_TYPE_KDC_CHECKSUM: { + NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum)); + break; } + + case PAC_TYPE_LOGON_NAME: { + NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case PAC_TYPE_LOGON_INFO: + NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_BUFFERS, &r->logon_info)); + break; + + case PAC_TYPE_SRV_CHECKSUM: + break; + + case PAC_TYPE_KDC_CHECKSUM: + break; + + case PAC_TYPE_LOGON_NAME: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "PAC_INFO"); + switch (level) { + case PAC_TYPE_LOGON_INFO: + ndr_print_PAC_LOGON_INFO_CTR(ndr, "logon_info", &r->logon_info); + break; + + case PAC_TYPE_SRV_CHECKSUM: + ndr_print_PAC_SIGNATURE_DATA(ndr, "srv_cksum", &r->srv_cksum); + break; + + case PAC_TYPE_KDC_CHECKSUM: + ndr_print_PAC_SIGNATURE_DATA(ndr, "kdc_cksum", &r->kdc_cksum); + break; + + case PAC_TYPE_LOGON_NAME: + ndr_print_PAC_LOGON_NAME(ndr, "logon_name", &r->logon_name); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +_PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags) +{ + return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO); +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r) +{ + uint32_t cntr_buffers_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0])); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r) +{ + uint32_t cntr_buffers_0; + TALLOC_CTX *_mem_save_buffers_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers); + _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r) +{ + uint32_t cntr_buffers_0; + ndr_print_struct(ndr, name, "PAC_DATA"); + ndr->depth++; + ndr_print_uint32(ndr, "num_buffers", r->num_buffers); + ndr_print_uint32(ndr, "version", r->version); + ndr->print(ndr, "%s: ARRAY(%d)", "buffers", r->num_buffers); + ndr->depth++; + for (cntr_buffers_0=0;cntr_buffers_0num_buffers;cntr_buffers_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_buffers_0); + if (idx_0) { + ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_DATA_BLOB_REM(struct ndr_push *ndr, int ndr_flags, const struct DATA_BLOB_REM *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_DATA_BLOB_REM(struct ndr_pull *ndr, int ndr_flags, struct DATA_BLOB_REM *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r) +{ + ndr_print_struct(ndr, name, "DATA_BLOB_REM"); + ndr->depth++; + ndr_print_DATA_BLOB(ndr, "remaining", r->remaining); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ndr_size)); + { + uint32_t _flags_save_DATA_BLOB_REM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info)); + ndr->flags = _flags_save_DATA_BLOB_REM; + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + } + if (ndr_flags & NDR_BUFFERS) { + { + uint32_t _flags_save_DATA_BLOB_REM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); + if (r->info) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info)); + { + struct ndr_push *_ndr_info; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8))); + NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8))); + } + } + ndr->flags = _flags_save_DATA_BLOB_REM; + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r) +{ + uint32_t _ptr_info; + TALLOC_CTX *_mem_save_info_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ndr_size)); + { + uint32_t _flags_save_DATA_BLOB_REM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); + if (_ptr_info) { + NDR_PULL_ALLOC(ndr, r->info); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info)); + } else { + r->info = NULL; + } + ndr->flags = _flags_save_DATA_BLOB_REM; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); + } + if (ndr_flags & NDR_BUFFERS) { + { + uint32_t _flags_save_DATA_BLOB_REM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); + if (r->info) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info)); + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info, 0); + { + struct ndr_pull *_ndr_info; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8))); + NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8))); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + ndr->offset = _relative_save_offset; + } + ndr->flags = _flags_save_DATA_BLOB_REM; + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r) +{ + ndr_print_struct(ndr, name, "PAC_BUFFER_RAW"); + ndr->depth++; + ndr_print_PAC_TYPE(ndr, "type", r->type); + ndr_print_uint32(ndr, "ndr_size", r->ndr_size); + ndr_print_ptr(ndr, "info", r->info); + ndr->depth++; + if (r->info) { + ndr_print_DATA_BLOB_REM(ndr, "info", r->info); + } + ndr->depth--; + ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r) +{ + uint32_t cntr_buffers_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0])); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r) +{ + uint32_t cntr_buffers_0; + TALLOC_CTX *_mem_save_buffers_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers); + _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0); + for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) { + NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r) +{ + uint32_t cntr_buffers_0; + ndr_print_struct(ndr, name, "PAC_DATA_RAW"); + ndr->depth++; + ndr_print_uint32(ndr, "num_buffers", r->num_buffers); + ndr_print_uint32(ndr, "version", r->version); + ndr->print(ndr, "%s: ARRAY(%d)", "buffers", r->num_buffers); + ndr->depth++; + for (cntr_buffers_0=0;cntr_buffers_0num_buffers;cntr_buffers_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_buffers_0); + if (idx_0) { + ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_decode_pac(struct ndr_pull *ndr, int flags, struct decode_pac *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r) +{ + ndr_print_struct(ndr, name, "decode_pac"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "decode_pac"); + ndr->depth++; + ndr_print_PAC_DATA(ndr, "pac", &r->in.pac); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "decode_pac"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_decode_pac_raw(struct ndr_push *ndr, int flags, const struct decode_pac_raw *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_decode_pac_raw(struct ndr_pull *ndr, int flags, struct decode_pac_raw *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r) +{ + ndr_print_struct(ndr, name, "decode_pac_raw"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "decode_pac_raw"); + ndr->depth++; + ndr_print_PAC_DATA_RAW(ndr, "pac", &r->in.pac); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "decode_pac_raw"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_decode_login_info(struct ndr_push *ndr, int flags, const struct decode_login_info *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_decode_login_info(struct ndr_pull *ndr, int flags, struct decode_login_info *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r) +{ + ndr_print_struct(ndr, name, "decode_login_info"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "decode_login_info"); + ndr->depth++; + ndr_print_PAC_LOGON_INFO(ndr, "logon_info", &r->in.logon_info); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "decode_login_info"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static const struct ndr_interface_call krb5pac_calls[] = { + { + "decode_pac", + sizeof(struct decode_pac), + (ndr_push_flags_fn_t) ndr_push_decode_pac, + (ndr_pull_flags_fn_t) ndr_pull_decode_pac, + (ndr_print_function_t) ndr_print_decode_pac, + false, + }, + { + "decode_pac_raw", + sizeof(struct decode_pac_raw), + (ndr_push_flags_fn_t) ndr_push_decode_pac_raw, + (ndr_pull_flags_fn_t) ndr_pull_decode_pac_raw, + (ndr_print_function_t) ndr_print_decode_pac_raw, + false, + }, + { + "decode_login_info", + sizeof(struct decode_login_info), + (ndr_push_flags_fn_t) ndr_push_decode_login_info, + (ndr_pull_flags_fn_t) ndr_pull_decode_login_info, + (ndr_print_function_t) ndr_print_decode_login_info, + false, + }, + { NULL, 0, NULL, NULL, NULL, false } +}; + +static const char * const krb5pac_endpoint_strings[] = { + "ncacn_np:[\\pipe\\krb5pac]", +}; + +static const struct ndr_interface_string_array krb5pac_endpoints = { + .count = 1, + .names = krb5pac_endpoint_strings +}; + +static const char * const krb5pac_authservice_strings[] = { + "host", +}; + +static const struct ndr_interface_string_array krb5pac_authservices = { + .count = 1, + .names = krb5pac_authservice_strings +}; + + +const struct ndr_interface_table ndr_table_krb5pac = { + .name = "krb5pac", + .syntax_id = { + {0x12345778,0x1234,0xabcd,{0x00,0x00},{0x00,0x00,0x00,0x00}}, + NDR_KRB5PAC_VERSION + }, + .helpstring = NDR_KRB5PAC_HELPSTRING, + .num_calls = 3, + .calls = krb5pac_calls, + .endpoints = &krb5pac_endpoints, + .authservices = &krb5pac_authservices +}; + -- cgit From 46a3beefde93a5c4dd4e256b4a8938caac117787 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 01:33:46 +0100 Subject: Re-run make idl. Guenther (This used to be commit d0ceb482eb3ee1f8d8253152bab9de8b086ee76e) --- source3/librpc/gen_ndr/krb5pac.h | 5 +++++ source3/librpc/gen_ndr/ndr_krb5pac.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/krb5pac.h b/source3/librpc/gen_ndr/krb5pac.h index a0d75fdd88..b8b9054bb6 100644 --- a/source3/librpc/gen_ndr/krb5pac.h +++ b/source3/librpc/gen_ndr/krb5pac.h @@ -89,6 +89,11 @@ struct PAC_DATA_RAW { struct PAC_BUFFER_RAW *buffers; }/* [public] */; +struct netsamlogoncache_entry { + time_t timestamp; + struct netr_SamInfo3 info3; +}/* [public] */; + struct decode_pac { struct { diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c index 722e7acf84..82b7803f80 100644 --- a/source3/librpc/gen_ndr/ndr_krb5pac.c +++ b/source3/librpc/gen_ndr/ndr_krb5pac.c @@ -655,6 +655,41 @@ _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, co ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp)); + NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp)); + NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r) +{ + ndr_print_struct(ndr, name, "netsamlogoncache_entry"); + ndr->depth++; + ndr_print_time_t(ndr, "timestamp", r->timestamp); + ndr_print_netr_SamInfo3(ndr, "info3", &r->info3); + ndr->depth--; +} + static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r) { if (flags & NDR_IN) { -- cgit From 38da19f7f24f4cab6ffd32baf3e49ca851d64d71 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 01:44:39 +0100 Subject: Add missing header file. Guenther (This used to be commit 5095c59f8930212c20a0713464c9620220388aeb) --- source3/librpc/gen_ndr/ndr_krb5pac.h | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 source3/librpc/gen_ndr/ndr_krb5pac.h (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.h b/source3/librpc/gen_ndr/ndr_krb5pac.h new file mode 100644 index 0000000000..f23505d4f0 --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_krb5pac.h @@ -0,0 +1,55 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/krb5pac.h" + +#ifndef _HEADER_NDR_krb5pac +#define _HEADER_NDR_krb5pac + +#define NDR_KRB5PAC_UUID "12345778-1234-abcd-0000-00000000" +#define NDR_KRB5PAC_VERSION 0.0 +#define NDR_KRB5PAC_NAME "krb5pac" +#define NDR_KRB5PAC_HELPSTRING "Active Directory KRB5 PAC" +extern const struct ndr_interface_table ndr_table_krb5pac; +#define NDR_DECODE_PAC (0x00) + +#define NDR_DECODE_PAC_RAW (0x01) + +#define NDR_DECODE_LOGIN_INFO (0x02) + +#define NDR_KRB5PAC_CALL_COUNT (3) +void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r); +enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r); +enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r); +void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r); +void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r); +enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r); +enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r); +void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r); +enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r); +enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r); +void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r); +enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r); +enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r); +void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r); +size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags); +enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r); +enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r); +void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r); +enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r); +enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r); +void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r); +void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r); +enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r); +enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r); +void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r); +enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r); +enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r); +void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r); +enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r); +enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r); +void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r); +void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r); +void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r); +void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r); +#endif /* _HEADER_NDR_krb5pac */ -- cgit From 59163ba5153a82a621c6e194c7d654fdacab64c3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 02:56:09 +0100 Subject: Re-run make idl. Guenther (This used to be commit ee22ac6bb8e8c5281fc3dd35cb724f6c7a610933) --- source3/librpc/gen_ndr/ndr_netlogon.c | 1 + source3/librpc/gen_ndr/netlogon.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index 3968bcd2ae..fb5c4603ee 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -5714,6 +5714,7 @@ _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char const char *val = NULL; switch (r) { + case NETLOGON_CONTROL_SYNC: val = "NETLOGON_CONTROL_SYNC"; break; case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break; case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break; case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break; diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index bff2d91a03..058e5e7fb0 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -603,6 +603,7 @@ union netr_CONTROL_QUERY_INFORMATION { enum netr_LogonControlCode #ifndef USE_UINT_ENUMS { + NETLOGON_CONTROL_SYNC=2, NETLOGON_CONTROL_REDISCOVER=5, NETLOGON_CONTROL_TC_QUERY=6, NETLOGON_CONTROL_TRANSPORT_NOTIFY=7, @@ -610,6 +611,7 @@ enum netr_LogonControlCode } #else { __donnot_use_enum_netr_LogonControlCode=0x7FFFFFFF} +#define NETLOGON_CONTROL_SYNC ( 2 ) #define NETLOGON_CONTROL_REDISCOVER ( 5 ) #define NETLOGON_CONTROL_TC_QUERY ( 6 ) #define NETLOGON_CONTROL_TRANSPORT_NOTIFY ( 7 ) -- cgit From 0ad7db900e376229e7e7fe17f3103354e401797a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 20:10:54 +0100 Subject: Re-run make idl. Guenther (This used to be commit 66e6f97e8bb3ba18055ecd33a5ddb8aab7080236) --- source3/librpc/gen_ndr/cli_lsa.c | 38 ++---- source3/librpc/gen_ndr/cli_lsa.h | 10 +- source3/librpc/gen_ndr/lsa.h | 14 +-- source3/librpc/gen_ndr/ndr_lsa.c | 251 ++++++++++++++++++++++++--------------- source3/librpc/gen_ndr/srv_lsa.c | 10 +- 5 files changed, 186 insertions(+), 137 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 7484edca49..7f784622b5 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -609,7 +609,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray *sids, enum lsa_LookupNamesLevel level, uint32_t *count) @@ -649,9 +649,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *sids = *r.out.sids; *count = *r.out.count; @@ -663,7 +661,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray *names, uint16_t level, uint32_t *count) @@ -702,9 +700,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *names = *r.out.names; *count = *r.out.count; @@ -2472,7 +2468,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, @@ -2515,9 +2511,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *names = *r.out.names; *count = *r.out.count; @@ -2530,7 +2524,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray2 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, @@ -2574,9 +2568,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *sids = *r.out.sids; *count = *r.out.count; @@ -2966,9 +2958,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *sids = *r.out.sids; *count = *r.out.count; @@ -3246,7 +3236,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, @@ -3288,9 +3278,7 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *names = *r.out.names; *count = *r.out.count; @@ -3345,9 +3333,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, } /* Return variables */ - if (domains && r.out.domains) { - *domains = *r.out.domains; - } + *domains = *r.out.domains; *sids = *r.out.sids; *count = *r.out.count; diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index e4bf43a1e8..8513a9d035 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -72,7 +72,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray *sids, enum lsa_LookupNamesLevel level, uint32_t *count); @@ -80,7 +80,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray *names, uint16_t level, uint32_t *count); @@ -276,7 +276,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, @@ -287,7 +287,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray2 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, @@ -343,7 +343,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 4a1ebdb7a9..62f8f2c74a 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -774,7 +774,7 @@ struct lsa_LookupNames { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransSidArray *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -793,7 +793,7 @@ struct lsa_LookupSids { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransNameArray *names;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1356,7 +1356,7 @@ struct lsa_LookupSids2 { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransNameArray2 *names;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1378,7 +1378,7 @@ struct lsa_LookupNames2 { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransSidArray2 *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1472,7 +1472,7 @@ struct lsa_LookupNames3 { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList *domains;/* [ref] */ struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1555,7 +1555,7 @@ struct lsa_LookupSids3 { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransNameArray2 *names;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1576,7 +1576,7 @@ struct lsa_LookupNames4 { } in; struct { - struct lsa_RefDomainList *domains;/* [unique] */ + struct lsa_RefDomainList *domains;/* [ref] */ struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 74d8a314e1..d5cbc0ec21 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -5704,9 +5704,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); } if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -5728,6 +5731,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -5770,6 +5774,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); *r->out.sids = *r->in.sids; NDR_PULL_ALLOC(ndr, r->out.count); @@ -5779,18 +5785,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl } } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domains); + } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); if (_ptr_domains) { - NDR_PULL_ALLOC(ndr, r->out.domains); + NDR_PULL_ALLOC(ndr, *r->out.domains); } else { - r->out.domains = NULL; + *r->out.domains = NULL; } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); } @@ -5853,10 +5865,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids); @@ -5893,9 +5908,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int fla NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); } if (r->out.names == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -5916,6 +5934,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -5950,24 +5969,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.names); *r->out.names = *r->in.names; NDR_PULL_ALLOC(ndr, r->out.count); *r->out.count = *r->in.count; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domains); + } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); if (_ptr_domains) { - NDR_PULL_ALLOC(ndr, r->out.domains); + NDR_PULL_ALLOC(ndr, *r->out.domains); } else { - r->out.domains = NULL; + *r->out.domains = NULL; } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.names); } @@ -6021,10 +6048,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "names", r->out.names); ndr->depth++; ndr_print_lsa_TransNameArray(ndr, "names", r->out.names); @@ -9704,9 +9734,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); } if (r->out.names == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -9727,6 +9760,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -9763,24 +9797,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.names); *r->out.names = *r->in.names; NDR_PULL_ALLOC(ndr, r->out.count); *r->out.count = *r->in.count; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domains); + } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); if (_ptr_domains) { - NDR_PULL_ALLOC(ndr, r->out.domains); + NDR_PULL_ALLOC(ndr, *r->out.domains); } else { - r->out.domains = NULL; + *r->out.domains = NULL; } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.names); } @@ -9836,10 +9878,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "names", r->out.names); ndr->depth++; ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names); @@ -9883,9 +9928,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); } if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -9907,6 +9955,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -9951,6 +10000,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); *r->out.sids = *r->in.sids; NDR_PULL_ALLOC(ndr, r->out.count); @@ -9960,18 +10011,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f } } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domains); + } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); if (_ptr_domains) { - NDR_PULL_ALLOC(ndr, r->out.domains); + NDR_PULL_ALLOC(ndr, *r->out.domains); } else { - r->out.domains = NULL; + *r->out.domains = NULL; } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); } @@ -10036,10 +10093,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids); @@ -10452,10 +10512,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -10472,7 +10532,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r) { uint32_t cntr_names_0; - uint32_t _ptr_domains; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; @@ -10520,6 +10579,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); *r->out.sids = *r->in.sids; NDR_PULL_ALLOC(ndr, r->out.count); @@ -10529,18 +10590,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f } } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); - if (_ptr_domains) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.domains); - } else { - r->out.domains = NULL; - } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); } @@ -10605,9 +10661,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); - } + ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; @@ -11006,9 +11060,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); } if (r->out.names == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -11028,6 +11085,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl uint32_t _ptr_domains; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -11057,24 +11115,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.names); *r->out.names = *r->in.names; NDR_PULL_ALLOC(ndr, r->out.count); *r->out.count = *r->in.count; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.domains); + } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); if (_ptr_domains) { - NDR_PULL_ALLOC(ndr, r->out.domains); + NDR_PULL_ALLOC(ndr, *r->out.domains); } else { - r->out.domains = NULL; + *r->out.domains = NULL; } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.names); } @@ -11126,10 +11192,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); } ndr->depth--; + ndr->depth--; ndr_print_ptr(ndr, "names", r->out.names); ndr->depth++; ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names); @@ -11169,10 +11238,10 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains)); - if (r->out.domains) { - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + if (r->out.domains == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -11189,7 +11258,6 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r) { uint32_t cntr_names_0; - uint32_t _ptr_domains; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; TALLOC_CTX *_mem_save_sids_0; @@ -11229,6 +11297,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.domains); + ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); *r->out.sids = *r->in.sids; NDR_PULL_ALLOC(ndr, r->out.count); @@ -11238,18 +11308,13 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla } } if (flags & NDR_OUT) { - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); - if (_ptr_domains) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.domains); - } else { - r->out.domains = NULL; - } - if (r->out.domains) { - _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0); } + _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); } @@ -11310,9 +11375,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - if (r->out.domains) { - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); - } + ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 183cd355c0..b21a825682 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -1128,7 +1128,7 @@ static bool api_lsa_LookupNames(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; @@ -1210,7 +1210,7 @@ static bool api_lsa_LookupSids(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; @@ -4437,7 +4437,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; @@ -4519,7 +4519,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; @@ -5858,7 +5858,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; -- cgit From 082392d975808747ce1f485e6abf3a796e7ae233 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 20:25:05 +0100 Subject: Use pidl for NTSVCS. Guenther (This used to be commit 84a9bf0b7372bd7b7d4a1490c45e68b69889af8a) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 2413 +++++++++++++++++ source3/librpc/gen_ndr/cli_ntsvcs.h | 134 + source3/librpc/gen_ndr/ndr_ntsvcs.c | 3031 ++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_ntsvcs.h | 210 ++ source3/librpc/gen_ndr/ntsvcs.h | 333 +++ source3/librpc/gen_ndr/srv_ntsvcs.c | 4834 +++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_ntsvcs.h | 71 + 7 files changed, 11026 insertions(+) create mode 100644 source3/librpc/gen_ndr/cli_ntsvcs.c create mode 100644 source3/librpc/gen_ndr/cli_ntsvcs.h create mode 100644 source3/librpc/gen_ndr/ndr_ntsvcs.c create mode 100644 source3/librpc/gen_ndr/ndr_ntsvcs.h create mode 100644 source3/librpc/gen_ndr/ntsvcs.h create mode 100644 source3/librpc/gen_ndr/srv_ntsvcs.c create mode 100644 source3/librpc/gen_ndr/srv_ntsvcs.h (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c new file mode 100644 index 0000000000..7795962c3f --- /dev/null +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -0,0 +1,2413 @@ +/* + * Unix SMB/CIFS implementation. + * client auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/cli_ntsvcs.h" + +NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_Disconnect r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Disconnect, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DISCONNECT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_Connect r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Connect, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_CONNECT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Connect, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetVersion r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersion, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETVERSION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetGlobalState r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETGLOBALSTATE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_InitDetection r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_InitDetection, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_INITDETECTION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_ReportLogOn r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REPORTLOGON, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_ValidateDeviceInstance r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_VALIDATEDEVICEINSTANCE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetRootDeviceInstance r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETROOTDEVICEINSTANCE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetRelatedDeviceInstance r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETRELATEDDEVICEINSTANCE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_EnumerateSubKeys r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_ENUMERATESUBKEYS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetDeviceList r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETDEVICELIST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetDeviceListSize r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETDEVICELISTSIZE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetDepth r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDepth, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETDEPTH, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetDeviceRegProp r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETDEVICEREGPROP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_SetDeviceRegProp r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_SETDEVICEREGPROP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetClassInstance r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSINSTANCE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_CreateKey r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateKey, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_CREATEKEY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_DeleteRegistryKey r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DELETEREGISTRYKEY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetClassCount r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSCOUNT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetClassName r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassName, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSNAME, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_DeleteClassKey r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DELETECLASSKEY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetInterfaceDeviceAlias r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICEALIAS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetInterfaceDeviceList r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICELIST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetInterfaceDeviceListSize r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICELISTSIZE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RegisterDeviceClassAssociation r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERDEVICECLASSASSOCIATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_UnregisterDeviceClassAssociation r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetClassRegProp r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSREGPROP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_SetClassRegProp r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_SETCLASSREGPROP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_CreateDevInst r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_CREATEDEVINST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_DeviceInstanceAction r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DEVICEINSTANCEACTION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetDeviceStatus r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETDEVICESTATUS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_SetDeviceProblem r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_SETDEVICEPROBLEM, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_DisableDevInst r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DISABLEDEVINST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_UninstallDevInst r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_UNINSTALLDEVINST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_AddID r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddID, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_ADDID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddID, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RegisterDriver r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERDRIVER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_QueryRemove r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_QUERYREMOVE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RequestDeviceEject r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REQUESTDEVICEEJECT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_IsDockStationPresent r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_ISDOCKSTATIONPRESENT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RequestEjectPC r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REQUESTEJECTPC, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_HwProfFlags r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_HWPROFFLAGS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetHwProfInfo r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETHWPROFINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_AddEmptyLogConf r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_ADDEMPTYLOGCONF, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_FreeLogConf r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_FREELOGCONF, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetFirstLogConf r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETFIRSTLOGCONF, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetNextLogConf r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETNEXTLOGCONF, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetLogConfPriority r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETLOGCONFPRIORITY, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_AddResDes r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddResDes, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_ADDRESDES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_FreeResDes r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_FREERESDES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetNextResDes r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETNEXTRESDES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetResDesData r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETRESDESDATA, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetResDesDataSize r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETRESDESDATASIZE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_ModifyResDes r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_MODIFYRESDES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_DetectResourceLimit r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_DETECTRESOURCELIMIT, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_QueryResConfList r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_QUERYRESCONFLIST, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_SetHwProf r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_SETHWPROF, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_QueryArbitratorFreeData r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_QUERYARBITRATORFREEDATA, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_QueryArbitratorFreeSize r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_QUERYARBITRATORFREESIZE, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RunDetection r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RunDetection, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_RUNDETECTION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_RegisterNotification r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERNOTIFICATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_UnregisterNotification r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_UNREGISTERNOTIFICATION, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetCustomDevProp r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETCUSTOMDEVPROP, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetVersionInternal r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETVERSIONINTERNAL, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetBlockedDriverInfo r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETBLOCKEDDRIVERINFO, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + +NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx) +{ + struct PNP_GetServerSideDeviceInstallFlags r; + NTSTATUS status; + + /* In parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r); + } + + status = cli_do_rpc_ndr(cli, + mem_ctx, + PI_NTSVCS, + &ndr_table_ntsvcs, + NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + + /* Return result */ + return NT_STATUS_OK; +} + diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h new file mode 100644 index 0000000000..ab2aead1ea --- /dev/null +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -0,0 +1,134 @@ +#include "librpc/gen_ndr/ndr_ntsvcs.h" +#ifndef __CLI_NTSVCS__ +#define __CLI_NTSVCS__ +NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx); +#endif /* __CLI_NTSVCS__ */ diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c new file mode 100644 index 0000000000..8e6176c56c --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -0,0 +1,3031 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_ntsvcs.h" + +static enum ndr_err_code ndr_push_PNP_Disconnect(struct ndr_push *ndr, int flags, const struct PNP_Disconnect *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_Disconnect(struct ndr_pull *ndr, int flags, struct PNP_Disconnect *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r) +{ + ndr_print_struct(ndr, name, "PNP_Disconnect"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_Disconnect"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_Disconnect"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_Connect(struct ndr_push *ndr, int flags, const struct PNP_Connect *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_Connect(struct ndr_pull *ndr, int flags, struct PNP_Connect *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r) +{ + ndr_print_struct(ndr, name, "PNP_Connect"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_Connect"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_Connect"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetVersion(struct ndr_push *ndr, int flags, const struct PNP_GetVersion *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetVersion(struct ndr_pull *ndr, int flags, struct PNP_GetVersion *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r) +{ + ndr_print_struct(ndr, name, "PNP_GetVersion"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetVersion"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetVersion"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetGlobalState(struct ndr_push *ndr, int flags, const struct PNP_GetGlobalState *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetGlobalState(struct ndr_pull *ndr, int flags, struct PNP_GetGlobalState *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r) +{ + ndr_print_struct(ndr, name, "PNP_GetGlobalState"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetGlobalState"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetGlobalState"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_InitDetection(struct ndr_push *ndr, int flags, const struct PNP_InitDetection *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_InitDetection(struct ndr_pull *ndr, int flags, struct PNP_InitDetection *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r) +{ + ndr_print_struct(ndr, name, "PNP_InitDetection"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_InitDetection"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_InitDetection"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_ReportLogOn(struct ndr_push *ndr, int flags, const struct PNP_ReportLogOn *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_ReportLogOn(struct ndr_pull *ndr, int flags, struct PNP_ReportLogOn *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r) +{ + ndr_print_struct(ndr, name, "PNP_ReportLogOn"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_ReportLogOn"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_ReportLogOn"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_ValidateDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_ValidateDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_ValidateDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_ValidateDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r) +{ + ndr_print_struct(ndr, name, "PNP_ValidateDeviceInstance"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_ValidateDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_ValidateDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetRootDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_GetRootDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetRootDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_GetRootDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r) +{ + ndr_print_struct(ndr, name, "PNP_GetRootDeviceInstance"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetRootDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetRootDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetRelatedDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_GetRelatedDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetRelatedDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_GetRelatedDeviceInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r) +{ + ndr_print_struct(ndr, name, "PNP_GetRelatedDeviceInstance"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetRelatedDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetRelatedDeviceInstance"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_EnumerateSubKeys(struct ndr_push *ndr, int flags, const struct PNP_EnumerateSubKeys *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_EnumerateSubKeys(struct ndr_pull *ndr, int flags, struct PNP_EnumerateSubKeys *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r) +{ + ndr_print_struct(ndr, name, "PNP_EnumerateSubKeys"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_EnumerateSubKeys"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_EnumerateSubKeys"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r) +{ + ndr_print_struct(ndr, name, "PNP_GetDeviceList"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetDeviceList"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetDeviceList"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceListSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceListSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r) +{ + ndr_print_struct(ndr, name, "PNP_GetDeviceListSize"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetDeviceListSize"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetDeviceListSize"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetDepth(struct ndr_push *ndr, int flags, const struct PNP_GetDepth *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetDepth(struct ndr_pull *ndr, int flags, struct PNP_GetDepth *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r) +{ + ndr_print_struct(ndr, name, "PNP_GetDepth"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetDepth"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetDepth"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r) +{ + ndr_print_struct(ndr, name, "PNP_GetDeviceRegProp"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetDeviceRegProp"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_SetDeviceRegProp(struct ndr_push *ndr, int flags, const struct PNP_SetDeviceRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_SetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_SetDeviceRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r) +{ + ndr_print_struct(ndr, name, "PNP_SetDeviceRegProp"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_SetDeviceRegProp"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_SetDeviceRegProp"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetClassInstance(struct ndr_push *ndr, int flags, const struct PNP_GetClassInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetClassInstance(struct ndr_pull *ndr, int flags, struct PNP_GetClassInstance *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r) +{ + ndr_print_struct(ndr, name, "PNP_GetClassInstance"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetClassInstance"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetClassInstance"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_CreateKey(struct ndr_push *ndr, int flags, const struct PNP_CreateKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_CreateKey(struct ndr_pull *ndr, int flags, struct PNP_CreateKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r) +{ + ndr_print_struct(ndr, name, "PNP_CreateKey"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_CreateKey"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_CreateKey"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_DeleteRegistryKey(struct ndr_push *ndr, int flags, const struct PNP_DeleteRegistryKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_DeleteRegistryKey(struct ndr_pull *ndr, int flags, struct PNP_DeleteRegistryKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r) +{ + ndr_print_struct(ndr, name, "PNP_DeleteRegistryKey"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_DeleteRegistryKey"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_DeleteRegistryKey"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetClassCount(struct ndr_push *ndr, int flags, const struct PNP_GetClassCount *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetClassCount(struct ndr_pull *ndr, int flags, struct PNP_GetClassCount *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r) +{ + ndr_print_struct(ndr, name, "PNP_GetClassCount"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetClassCount"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetClassCount"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetClassName(struct ndr_push *ndr, int flags, const struct PNP_GetClassName *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetClassName(struct ndr_pull *ndr, int flags, struct PNP_GetClassName *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r) +{ + ndr_print_struct(ndr, name, "PNP_GetClassName"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetClassName"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetClassName"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_DeleteClassKey(struct ndr_push *ndr, int flags, const struct PNP_DeleteClassKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_DeleteClassKey(struct ndr_pull *ndr, int flags, struct PNP_DeleteClassKey *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r) +{ + ndr_print_struct(ndr, name, "PNP_DeleteClassKey"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_DeleteClassKey"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_DeleteClassKey"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceAlias(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceAlias *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceAlias(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceAlias *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r) +{ + ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceAlias"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceAlias"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceAlias"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r) +{ + ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceList"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceList"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceList"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceListSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceListSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r) +{ + ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceListSize"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceListSize"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceListSize"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RegisterDeviceClassAssociation(struct ndr_push *ndr, int flags, const struct PNP_RegisterDeviceClassAssociation *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RegisterDeviceClassAssociation(struct ndr_pull *ndr, int flags, struct PNP_RegisterDeviceClassAssociation *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r) +{ + ndr_print_struct(ndr, name, "PNP_RegisterDeviceClassAssociation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RegisterDeviceClassAssociation"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RegisterDeviceClassAssociation"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_UnregisterDeviceClassAssociation(struct ndr_push *ndr, int flags, const struct PNP_UnregisterDeviceClassAssociation *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_UnregisterDeviceClassAssociation(struct ndr_pull *ndr, int flags, struct PNP_UnregisterDeviceClassAssociation *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r) +{ + ndr_print_struct(ndr, name, "PNP_UnregisterDeviceClassAssociation"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_UnregisterDeviceClassAssociation"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_UnregisterDeviceClassAssociation"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetClassRegProp(struct ndr_push *ndr, int flags, const struct PNP_GetClassRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetClassRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetClassRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r) +{ + ndr_print_struct(ndr, name, "PNP_GetClassRegProp"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetClassRegProp"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetClassRegProp"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_SetClassRegProp(struct ndr_push *ndr, int flags, const struct PNP_SetClassRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_SetClassRegProp(struct ndr_pull *ndr, int flags, struct PNP_SetClassRegProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r) +{ + ndr_print_struct(ndr, name, "PNP_SetClassRegProp"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_SetClassRegProp"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_SetClassRegProp"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_CreateDevInst(struct ndr_push *ndr, int flags, const struct PNP_CreateDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_CreateDevInst(struct ndr_pull *ndr, int flags, struct PNP_CreateDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r) +{ + ndr_print_struct(ndr, name, "PNP_CreateDevInst"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_CreateDevInst"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_CreateDevInst"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_DeviceInstanceAction(struct ndr_push *ndr, int flags, const struct PNP_DeviceInstanceAction *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_DeviceInstanceAction(struct ndr_pull *ndr, int flags, struct PNP_DeviceInstanceAction *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r) +{ + ndr_print_struct(ndr, name, "PNP_DeviceInstanceAction"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_DeviceInstanceAction"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_DeviceInstanceAction"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetDeviceStatus(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceStatus *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetDeviceStatus(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceStatus *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r) +{ + ndr_print_struct(ndr, name, "PNP_GetDeviceStatus"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetDeviceStatus"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetDeviceStatus"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_SetDeviceProblem(struct ndr_push *ndr, int flags, const struct PNP_SetDeviceProblem *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_SetDeviceProblem(struct ndr_pull *ndr, int flags, struct PNP_SetDeviceProblem *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r) +{ + ndr_print_struct(ndr, name, "PNP_SetDeviceProblem"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_SetDeviceProblem"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_SetDeviceProblem"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_DisableDevInst(struct ndr_push *ndr, int flags, const struct PNP_DisableDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_DisableDevInst(struct ndr_pull *ndr, int flags, struct PNP_DisableDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r) +{ + ndr_print_struct(ndr, name, "PNP_DisableDevInst"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_DisableDevInst"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_DisableDevInst"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_UninstallDevInst(struct ndr_push *ndr, int flags, const struct PNP_UninstallDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_UninstallDevInst(struct ndr_pull *ndr, int flags, struct PNP_UninstallDevInst *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r) +{ + ndr_print_struct(ndr, name, "PNP_UninstallDevInst"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_UninstallDevInst"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_UninstallDevInst"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_AddID(struct ndr_push *ndr, int flags, const struct PNP_AddID *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_AddID(struct ndr_pull *ndr, int flags, struct PNP_AddID *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r) +{ + ndr_print_struct(ndr, name, "PNP_AddID"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_AddID"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_AddID"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RegisterDriver(struct ndr_push *ndr, int flags, const struct PNP_RegisterDriver *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RegisterDriver(struct ndr_pull *ndr, int flags, struct PNP_RegisterDriver *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r) +{ + ndr_print_struct(ndr, name, "PNP_RegisterDriver"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RegisterDriver"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RegisterDriver"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_QueryRemove(struct ndr_push *ndr, int flags, const struct PNP_QueryRemove *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_QueryRemove(struct ndr_pull *ndr, int flags, struct PNP_QueryRemove *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r) +{ + ndr_print_struct(ndr, name, "PNP_QueryRemove"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_QueryRemove"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_QueryRemove"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RequestDeviceEject(struct ndr_push *ndr, int flags, const struct PNP_RequestDeviceEject *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RequestDeviceEject(struct ndr_pull *ndr, int flags, struct PNP_RequestDeviceEject *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r) +{ + ndr_print_struct(ndr, name, "PNP_RequestDeviceEject"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RequestDeviceEject"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RequestDeviceEject"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_IsDockStationPresent(struct ndr_push *ndr, int flags, const struct PNP_IsDockStationPresent *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_IsDockStationPresent(struct ndr_pull *ndr, int flags, struct PNP_IsDockStationPresent *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r) +{ + ndr_print_struct(ndr, name, "PNP_IsDockStationPresent"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_IsDockStationPresent"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_IsDockStationPresent"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RequestEjectPC(struct ndr_push *ndr, int flags, const struct PNP_RequestEjectPC *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RequestEjectPC(struct ndr_pull *ndr, int flags, struct PNP_RequestEjectPC *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r) +{ + ndr_print_struct(ndr, name, "PNP_RequestEjectPC"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RequestEjectPC"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RequestEjectPC"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flags, const struct PNP_HwProfFlags *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flags, struct PNP_HwProfFlags *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r) +{ + ndr_print_struct(ndr, name, "PNP_HwProfFlags"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_HwProfFlags"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_HwProfFlags"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int flags, const struct PNP_GetHwProfInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetHwProfInfo(struct ndr_pull *ndr, int flags, struct PNP_GetHwProfInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r) +{ + ndr_print_struct(ndr, name, "PNP_GetHwProfInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetHwProfInfo"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetHwProfInfo"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_AddEmptyLogConf(struct ndr_push *ndr, int flags, const struct PNP_AddEmptyLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_AddEmptyLogConf(struct ndr_pull *ndr, int flags, struct PNP_AddEmptyLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r) +{ + ndr_print_struct(ndr, name, "PNP_AddEmptyLogConf"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_AddEmptyLogConf"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_AddEmptyLogConf"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_FreeLogConf(struct ndr_push *ndr, int flags, const struct PNP_FreeLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_FreeLogConf(struct ndr_pull *ndr, int flags, struct PNP_FreeLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r) +{ + ndr_print_struct(ndr, name, "PNP_FreeLogConf"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_FreeLogConf"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_FreeLogConf"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetFirstLogConf(struct ndr_push *ndr, int flags, const struct PNP_GetFirstLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetFirstLogConf(struct ndr_pull *ndr, int flags, struct PNP_GetFirstLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r) +{ + ndr_print_struct(ndr, name, "PNP_GetFirstLogConf"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetFirstLogConf"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetFirstLogConf"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetNextLogConf(struct ndr_push *ndr, int flags, const struct PNP_GetNextLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetNextLogConf(struct ndr_pull *ndr, int flags, struct PNP_GetNextLogConf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r) +{ + ndr_print_struct(ndr, name, "PNP_GetNextLogConf"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetNextLogConf"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetNextLogConf"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetLogConfPriority(struct ndr_push *ndr, int flags, const struct PNP_GetLogConfPriority *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetLogConfPriority(struct ndr_pull *ndr, int flags, struct PNP_GetLogConfPriority *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r) +{ + ndr_print_struct(ndr, name, "PNP_GetLogConfPriority"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetLogConfPriority"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetLogConfPriority"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_AddResDes(struct ndr_push *ndr, int flags, const struct PNP_AddResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_AddResDes(struct ndr_pull *ndr, int flags, struct PNP_AddResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r) +{ + ndr_print_struct(ndr, name, "PNP_AddResDes"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_AddResDes"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_AddResDes"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_FreeResDes(struct ndr_push *ndr, int flags, const struct PNP_FreeResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_FreeResDes(struct ndr_pull *ndr, int flags, struct PNP_FreeResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r) +{ + ndr_print_struct(ndr, name, "PNP_FreeResDes"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_FreeResDes"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_FreeResDes"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetNextResDes(struct ndr_push *ndr, int flags, const struct PNP_GetNextResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetNextResDes(struct ndr_pull *ndr, int flags, struct PNP_GetNextResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r) +{ + ndr_print_struct(ndr, name, "PNP_GetNextResDes"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetNextResDes"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetNextResDes"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetResDesData(struct ndr_push *ndr, int flags, const struct PNP_GetResDesData *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetResDesData(struct ndr_pull *ndr, int flags, struct PNP_GetResDesData *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r) +{ + ndr_print_struct(ndr, name, "PNP_GetResDesData"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetResDesData"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetResDesData"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetResDesDataSize(struct ndr_push *ndr, int flags, const struct PNP_GetResDesDataSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetResDesDataSize(struct ndr_pull *ndr, int flags, struct PNP_GetResDesDataSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r) +{ + ndr_print_struct(ndr, name, "PNP_GetResDesDataSize"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetResDesDataSize"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetResDesDataSize"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_ModifyResDes(struct ndr_push *ndr, int flags, const struct PNP_ModifyResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_ModifyResDes(struct ndr_pull *ndr, int flags, struct PNP_ModifyResDes *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r) +{ + ndr_print_struct(ndr, name, "PNP_ModifyResDes"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_ModifyResDes"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_ModifyResDes"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_DetectResourceLimit(struct ndr_push *ndr, int flags, const struct PNP_DetectResourceLimit *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_DetectResourceLimit(struct ndr_pull *ndr, int flags, struct PNP_DetectResourceLimit *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r) +{ + ndr_print_struct(ndr, name, "PNP_DetectResourceLimit"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_DetectResourceLimit"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_DetectResourceLimit"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_QueryResConfList(struct ndr_push *ndr, int flags, const struct PNP_QueryResConfList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_QueryResConfList(struct ndr_pull *ndr, int flags, struct PNP_QueryResConfList *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r) +{ + ndr_print_struct(ndr, name, "PNP_QueryResConfList"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_QueryResConfList"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_QueryResConfList"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_SetHwProf(struct ndr_push *ndr, int flags, const struct PNP_SetHwProf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_SetHwProf(struct ndr_pull *ndr, int flags, struct PNP_SetHwProf *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r) +{ + ndr_print_struct(ndr, name, "PNP_SetHwProf"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_SetHwProf"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_SetHwProf"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeData(struct ndr_push *ndr, int flags, const struct PNP_QueryArbitratorFreeData *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeData(struct ndr_pull *ndr, int flags, struct PNP_QueryArbitratorFreeData *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r) +{ + ndr_print_struct(ndr, name, "PNP_QueryArbitratorFreeData"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_QueryArbitratorFreeData"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeData"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeSize(struct ndr_push *ndr, int flags, const struct PNP_QueryArbitratorFreeSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeSize(struct ndr_pull *ndr, int flags, struct PNP_QueryArbitratorFreeSize *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r) +{ + ndr_print_struct(ndr, name, "PNP_QueryArbitratorFreeSize"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_QueryArbitratorFreeSize"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeSize"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RunDetection(struct ndr_push *ndr, int flags, const struct PNP_RunDetection *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RunDetection(struct ndr_pull *ndr, int flags, struct PNP_RunDetection *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r) +{ + ndr_print_struct(ndr, name, "PNP_RunDetection"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RunDetection"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RunDetection"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_RegisterNotification(struct ndr_push *ndr, int flags, const struct PNP_RegisterNotification *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_RegisterNotification(struct ndr_pull *ndr, int flags, struct PNP_RegisterNotification *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r) +{ + ndr_print_struct(ndr, name, "PNP_RegisterNotification"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_RegisterNotification"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_RegisterNotification"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_UnregisterNotification(struct ndr_push *ndr, int flags, const struct PNP_UnregisterNotification *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_UnregisterNotification(struct ndr_pull *ndr, int flags, struct PNP_UnregisterNotification *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r) +{ + ndr_print_struct(ndr, name, "PNP_UnregisterNotification"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_UnregisterNotification"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_UnregisterNotification"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetCustomDevProp(struct ndr_push *ndr, int flags, const struct PNP_GetCustomDevProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetCustomDevProp(struct ndr_pull *ndr, int flags, struct PNP_GetCustomDevProp *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r) +{ + ndr_print_struct(ndr, name, "PNP_GetCustomDevProp"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetCustomDevProp"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetCustomDevProp"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetVersionInternal(struct ndr_push *ndr, int flags, const struct PNP_GetVersionInternal *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetVersionInternal(struct ndr_pull *ndr, int flags, struct PNP_GetVersionInternal *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r) +{ + ndr_print_struct(ndr, name, "PNP_GetVersionInternal"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetVersionInternal"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetVersionInternal"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetBlockedDriverInfo(struct ndr_push *ndr, int flags, const struct PNP_GetBlockedDriverInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetBlockedDriverInfo(struct ndr_pull *ndr, int flags, struct PNP_GetBlockedDriverInfo *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r) +{ + ndr_print_struct(ndr, name, "PNP_GetBlockedDriverInfo"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetBlockedDriverInfo"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetBlockedDriverInfo"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_PNP_GetServerSideDeviceInstallFlags(struct ndr_push *ndr, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetServerSideDeviceInstallFlags(struct ndr_pull *ndr, int flags, struct PNP_GetServerSideDeviceInstallFlags *r) +{ + if (flags & NDR_IN) { + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r) +{ + ndr_print_struct(ndr, name, "PNP_GetServerSideDeviceInstallFlags"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "PNP_GetServerSideDeviceInstallFlags"); + ndr->depth++; + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "PNP_GetServerSideDeviceInstallFlags"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static const struct ndr_interface_call ntsvcs_calls[] = { + { + "PNP_Disconnect", + sizeof(struct PNP_Disconnect), + (ndr_push_flags_fn_t) ndr_push_PNP_Disconnect, + (ndr_pull_flags_fn_t) ndr_pull_PNP_Disconnect, + (ndr_print_function_t) ndr_print_PNP_Disconnect, + false, + }, + { + "PNP_Connect", + sizeof(struct PNP_Connect), + (ndr_push_flags_fn_t) ndr_push_PNP_Connect, + (ndr_pull_flags_fn_t) ndr_pull_PNP_Connect, + (ndr_print_function_t) ndr_print_PNP_Connect, + false, + }, + { + "PNP_GetVersion", + sizeof(struct PNP_GetVersion), + (ndr_push_flags_fn_t) ndr_push_PNP_GetVersion, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetVersion, + (ndr_print_function_t) ndr_print_PNP_GetVersion, + false, + }, + { + "PNP_GetGlobalState", + sizeof(struct PNP_GetGlobalState), + (ndr_push_flags_fn_t) ndr_push_PNP_GetGlobalState, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetGlobalState, + (ndr_print_function_t) ndr_print_PNP_GetGlobalState, + false, + }, + { + "PNP_InitDetection", + sizeof(struct PNP_InitDetection), + (ndr_push_flags_fn_t) ndr_push_PNP_InitDetection, + (ndr_pull_flags_fn_t) ndr_pull_PNP_InitDetection, + (ndr_print_function_t) ndr_print_PNP_InitDetection, + false, + }, + { + "PNP_ReportLogOn", + sizeof(struct PNP_ReportLogOn), + (ndr_push_flags_fn_t) ndr_push_PNP_ReportLogOn, + (ndr_pull_flags_fn_t) ndr_pull_PNP_ReportLogOn, + (ndr_print_function_t) ndr_print_PNP_ReportLogOn, + false, + }, + { + "PNP_ValidateDeviceInstance", + sizeof(struct PNP_ValidateDeviceInstance), + (ndr_push_flags_fn_t) ndr_push_PNP_ValidateDeviceInstance, + (ndr_pull_flags_fn_t) ndr_pull_PNP_ValidateDeviceInstance, + (ndr_print_function_t) ndr_print_PNP_ValidateDeviceInstance, + false, + }, + { + "PNP_GetRootDeviceInstance", + sizeof(struct PNP_GetRootDeviceInstance), + (ndr_push_flags_fn_t) ndr_push_PNP_GetRootDeviceInstance, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetRootDeviceInstance, + (ndr_print_function_t) ndr_print_PNP_GetRootDeviceInstance, + false, + }, + { + "PNP_GetRelatedDeviceInstance", + sizeof(struct PNP_GetRelatedDeviceInstance), + (ndr_push_flags_fn_t) ndr_push_PNP_GetRelatedDeviceInstance, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetRelatedDeviceInstance, + (ndr_print_function_t) ndr_print_PNP_GetRelatedDeviceInstance, + false, + }, + { + "PNP_EnumerateSubKeys", + sizeof(struct PNP_EnumerateSubKeys), + (ndr_push_flags_fn_t) ndr_push_PNP_EnumerateSubKeys, + (ndr_pull_flags_fn_t) ndr_pull_PNP_EnumerateSubKeys, + (ndr_print_function_t) ndr_print_PNP_EnumerateSubKeys, + false, + }, + { + "PNP_GetDeviceList", + sizeof(struct PNP_GetDeviceList), + (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceList, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceList, + (ndr_print_function_t) ndr_print_PNP_GetDeviceList, + false, + }, + { + "PNP_GetDeviceListSize", + sizeof(struct PNP_GetDeviceListSize), + (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceListSize, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceListSize, + (ndr_print_function_t) ndr_print_PNP_GetDeviceListSize, + false, + }, + { + "PNP_GetDepth", + sizeof(struct PNP_GetDepth), + (ndr_push_flags_fn_t) ndr_push_PNP_GetDepth, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDepth, + (ndr_print_function_t) ndr_print_PNP_GetDepth, + false, + }, + { + "PNP_GetDeviceRegProp", + sizeof(struct PNP_GetDeviceRegProp), + (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceRegProp, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceRegProp, + (ndr_print_function_t) ndr_print_PNP_GetDeviceRegProp, + false, + }, + { + "PNP_SetDeviceRegProp", + sizeof(struct PNP_SetDeviceRegProp), + (ndr_push_flags_fn_t) ndr_push_PNP_SetDeviceRegProp, + (ndr_pull_flags_fn_t) ndr_pull_PNP_SetDeviceRegProp, + (ndr_print_function_t) ndr_print_PNP_SetDeviceRegProp, + false, + }, + { + "PNP_GetClassInstance", + sizeof(struct PNP_GetClassInstance), + (ndr_push_flags_fn_t) ndr_push_PNP_GetClassInstance, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassInstance, + (ndr_print_function_t) ndr_print_PNP_GetClassInstance, + false, + }, + { + "PNP_CreateKey", + sizeof(struct PNP_CreateKey), + (ndr_push_flags_fn_t) ndr_push_PNP_CreateKey, + (ndr_pull_flags_fn_t) ndr_pull_PNP_CreateKey, + (ndr_print_function_t) ndr_print_PNP_CreateKey, + false, + }, + { + "PNP_DeleteRegistryKey", + sizeof(struct PNP_DeleteRegistryKey), + (ndr_push_flags_fn_t) ndr_push_PNP_DeleteRegistryKey, + (ndr_pull_flags_fn_t) ndr_pull_PNP_DeleteRegistryKey, + (ndr_print_function_t) ndr_print_PNP_DeleteRegistryKey, + false, + }, + { + "PNP_GetClassCount", + sizeof(struct PNP_GetClassCount), + (ndr_push_flags_fn_t) ndr_push_PNP_GetClassCount, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassCount, + (ndr_print_function_t) ndr_print_PNP_GetClassCount, + false, + }, + { + "PNP_GetClassName", + sizeof(struct PNP_GetClassName), + (ndr_push_flags_fn_t) ndr_push_PNP_GetClassName, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassName, + (ndr_print_function_t) ndr_print_PNP_GetClassName, + false, + }, + { + "PNP_DeleteClassKey", + sizeof(struct PNP_DeleteClassKey), + (ndr_push_flags_fn_t) ndr_push_PNP_DeleteClassKey, + (ndr_pull_flags_fn_t) ndr_pull_PNP_DeleteClassKey, + (ndr_print_function_t) ndr_print_PNP_DeleteClassKey, + false, + }, + { + "PNP_GetInterfaceDeviceAlias", + sizeof(struct PNP_GetInterfaceDeviceAlias), + (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceAlias, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceAlias, + (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceAlias, + false, + }, + { + "PNP_GetInterfaceDeviceList", + sizeof(struct PNP_GetInterfaceDeviceList), + (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceList, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceList, + (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceList, + false, + }, + { + "PNP_GetInterfaceDeviceListSize", + sizeof(struct PNP_GetInterfaceDeviceListSize), + (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceListSize, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceListSize, + (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceListSize, + false, + }, + { + "PNP_RegisterDeviceClassAssociation", + sizeof(struct PNP_RegisterDeviceClassAssociation), + (ndr_push_flags_fn_t) ndr_push_PNP_RegisterDeviceClassAssociation, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterDeviceClassAssociation, + (ndr_print_function_t) ndr_print_PNP_RegisterDeviceClassAssociation, + false, + }, + { + "PNP_UnregisterDeviceClassAssociation", + sizeof(struct PNP_UnregisterDeviceClassAssociation), + (ndr_push_flags_fn_t) ndr_push_PNP_UnregisterDeviceClassAssociation, + (ndr_pull_flags_fn_t) ndr_pull_PNP_UnregisterDeviceClassAssociation, + (ndr_print_function_t) ndr_print_PNP_UnregisterDeviceClassAssociation, + false, + }, + { + "PNP_GetClassRegProp", + sizeof(struct PNP_GetClassRegProp), + (ndr_push_flags_fn_t) ndr_push_PNP_GetClassRegProp, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassRegProp, + (ndr_print_function_t) ndr_print_PNP_GetClassRegProp, + false, + }, + { + "PNP_SetClassRegProp", + sizeof(struct PNP_SetClassRegProp), + (ndr_push_flags_fn_t) ndr_push_PNP_SetClassRegProp, + (ndr_pull_flags_fn_t) ndr_pull_PNP_SetClassRegProp, + (ndr_print_function_t) ndr_print_PNP_SetClassRegProp, + false, + }, + { + "PNP_CreateDevInst", + sizeof(struct PNP_CreateDevInst), + (ndr_push_flags_fn_t) ndr_push_PNP_CreateDevInst, + (ndr_pull_flags_fn_t) ndr_pull_PNP_CreateDevInst, + (ndr_print_function_t) ndr_print_PNP_CreateDevInst, + false, + }, + { + "PNP_DeviceInstanceAction", + sizeof(struct PNP_DeviceInstanceAction), + (ndr_push_flags_fn_t) ndr_push_PNP_DeviceInstanceAction, + (ndr_pull_flags_fn_t) ndr_pull_PNP_DeviceInstanceAction, + (ndr_print_function_t) ndr_print_PNP_DeviceInstanceAction, + false, + }, + { + "PNP_GetDeviceStatus", + sizeof(struct PNP_GetDeviceStatus), + (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceStatus, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceStatus, + (ndr_print_function_t) ndr_print_PNP_GetDeviceStatus, + false, + }, + { + "PNP_SetDeviceProblem", + sizeof(struct PNP_SetDeviceProblem), + (ndr_push_flags_fn_t) ndr_push_PNP_SetDeviceProblem, + (ndr_pull_flags_fn_t) ndr_pull_PNP_SetDeviceProblem, + (ndr_print_function_t) ndr_print_PNP_SetDeviceProblem, + false, + }, + { + "PNP_DisableDevInst", + sizeof(struct PNP_DisableDevInst), + (ndr_push_flags_fn_t) ndr_push_PNP_DisableDevInst, + (ndr_pull_flags_fn_t) ndr_pull_PNP_DisableDevInst, + (ndr_print_function_t) ndr_print_PNP_DisableDevInst, + false, + }, + { + "PNP_UninstallDevInst", + sizeof(struct PNP_UninstallDevInst), + (ndr_push_flags_fn_t) ndr_push_PNP_UninstallDevInst, + (ndr_pull_flags_fn_t) ndr_pull_PNP_UninstallDevInst, + (ndr_print_function_t) ndr_print_PNP_UninstallDevInst, + false, + }, + { + "PNP_AddID", + sizeof(struct PNP_AddID), + (ndr_push_flags_fn_t) ndr_push_PNP_AddID, + (ndr_pull_flags_fn_t) ndr_pull_PNP_AddID, + (ndr_print_function_t) ndr_print_PNP_AddID, + false, + }, + { + "PNP_RegisterDriver", + sizeof(struct PNP_RegisterDriver), + (ndr_push_flags_fn_t) ndr_push_PNP_RegisterDriver, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterDriver, + (ndr_print_function_t) ndr_print_PNP_RegisterDriver, + false, + }, + { + "PNP_QueryRemove", + sizeof(struct PNP_QueryRemove), + (ndr_push_flags_fn_t) ndr_push_PNP_QueryRemove, + (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryRemove, + (ndr_print_function_t) ndr_print_PNP_QueryRemove, + false, + }, + { + "PNP_RequestDeviceEject", + sizeof(struct PNP_RequestDeviceEject), + (ndr_push_flags_fn_t) ndr_push_PNP_RequestDeviceEject, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RequestDeviceEject, + (ndr_print_function_t) ndr_print_PNP_RequestDeviceEject, + false, + }, + { + "PNP_IsDockStationPresent", + sizeof(struct PNP_IsDockStationPresent), + (ndr_push_flags_fn_t) ndr_push_PNP_IsDockStationPresent, + (ndr_pull_flags_fn_t) ndr_pull_PNP_IsDockStationPresent, + (ndr_print_function_t) ndr_print_PNP_IsDockStationPresent, + false, + }, + { + "PNP_RequestEjectPC", + sizeof(struct PNP_RequestEjectPC), + (ndr_push_flags_fn_t) ndr_push_PNP_RequestEjectPC, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RequestEjectPC, + (ndr_print_function_t) ndr_print_PNP_RequestEjectPC, + false, + }, + { + "PNP_HwProfFlags", + sizeof(struct PNP_HwProfFlags), + (ndr_push_flags_fn_t) ndr_push_PNP_HwProfFlags, + (ndr_pull_flags_fn_t) ndr_pull_PNP_HwProfFlags, + (ndr_print_function_t) ndr_print_PNP_HwProfFlags, + false, + }, + { + "PNP_GetHwProfInfo", + sizeof(struct PNP_GetHwProfInfo), + (ndr_push_flags_fn_t) ndr_push_PNP_GetHwProfInfo, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetHwProfInfo, + (ndr_print_function_t) ndr_print_PNP_GetHwProfInfo, + false, + }, + { + "PNP_AddEmptyLogConf", + sizeof(struct PNP_AddEmptyLogConf), + (ndr_push_flags_fn_t) ndr_push_PNP_AddEmptyLogConf, + (ndr_pull_flags_fn_t) ndr_pull_PNP_AddEmptyLogConf, + (ndr_print_function_t) ndr_print_PNP_AddEmptyLogConf, + false, + }, + { + "PNP_FreeLogConf", + sizeof(struct PNP_FreeLogConf), + (ndr_push_flags_fn_t) ndr_push_PNP_FreeLogConf, + (ndr_pull_flags_fn_t) ndr_pull_PNP_FreeLogConf, + (ndr_print_function_t) ndr_print_PNP_FreeLogConf, + false, + }, + { + "PNP_GetFirstLogConf", + sizeof(struct PNP_GetFirstLogConf), + (ndr_push_flags_fn_t) ndr_push_PNP_GetFirstLogConf, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetFirstLogConf, + (ndr_print_function_t) ndr_print_PNP_GetFirstLogConf, + false, + }, + { + "PNP_GetNextLogConf", + sizeof(struct PNP_GetNextLogConf), + (ndr_push_flags_fn_t) ndr_push_PNP_GetNextLogConf, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetNextLogConf, + (ndr_print_function_t) ndr_print_PNP_GetNextLogConf, + false, + }, + { + "PNP_GetLogConfPriority", + sizeof(struct PNP_GetLogConfPriority), + (ndr_push_flags_fn_t) ndr_push_PNP_GetLogConfPriority, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetLogConfPriority, + (ndr_print_function_t) ndr_print_PNP_GetLogConfPriority, + false, + }, + { + "PNP_AddResDes", + sizeof(struct PNP_AddResDes), + (ndr_push_flags_fn_t) ndr_push_PNP_AddResDes, + (ndr_pull_flags_fn_t) ndr_pull_PNP_AddResDes, + (ndr_print_function_t) ndr_print_PNP_AddResDes, + false, + }, + { + "PNP_FreeResDes", + sizeof(struct PNP_FreeResDes), + (ndr_push_flags_fn_t) ndr_push_PNP_FreeResDes, + (ndr_pull_flags_fn_t) ndr_pull_PNP_FreeResDes, + (ndr_print_function_t) ndr_print_PNP_FreeResDes, + false, + }, + { + "PNP_GetNextResDes", + sizeof(struct PNP_GetNextResDes), + (ndr_push_flags_fn_t) ndr_push_PNP_GetNextResDes, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetNextResDes, + (ndr_print_function_t) ndr_print_PNP_GetNextResDes, + false, + }, + { + "PNP_GetResDesData", + sizeof(struct PNP_GetResDesData), + (ndr_push_flags_fn_t) ndr_push_PNP_GetResDesData, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetResDesData, + (ndr_print_function_t) ndr_print_PNP_GetResDesData, + false, + }, + { + "PNP_GetResDesDataSize", + sizeof(struct PNP_GetResDesDataSize), + (ndr_push_flags_fn_t) ndr_push_PNP_GetResDesDataSize, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetResDesDataSize, + (ndr_print_function_t) ndr_print_PNP_GetResDesDataSize, + false, + }, + { + "PNP_ModifyResDes", + sizeof(struct PNP_ModifyResDes), + (ndr_push_flags_fn_t) ndr_push_PNP_ModifyResDes, + (ndr_pull_flags_fn_t) ndr_pull_PNP_ModifyResDes, + (ndr_print_function_t) ndr_print_PNP_ModifyResDes, + false, + }, + { + "PNP_DetectResourceLimit", + sizeof(struct PNP_DetectResourceLimit), + (ndr_push_flags_fn_t) ndr_push_PNP_DetectResourceLimit, + (ndr_pull_flags_fn_t) ndr_pull_PNP_DetectResourceLimit, + (ndr_print_function_t) ndr_print_PNP_DetectResourceLimit, + false, + }, + { + "PNP_QueryResConfList", + sizeof(struct PNP_QueryResConfList), + (ndr_push_flags_fn_t) ndr_push_PNP_QueryResConfList, + (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryResConfList, + (ndr_print_function_t) ndr_print_PNP_QueryResConfList, + false, + }, + { + "PNP_SetHwProf", + sizeof(struct PNP_SetHwProf), + (ndr_push_flags_fn_t) ndr_push_PNP_SetHwProf, + (ndr_pull_flags_fn_t) ndr_pull_PNP_SetHwProf, + (ndr_print_function_t) ndr_print_PNP_SetHwProf, + false, + }, + { + "PNP_QueryArbitratorFreeData", + sizeof(struct PNP_QueryArbitratorFreeData), + (ndr_push_flags_fn_t) ndr_push_PNP_QueryArbitratorFreeData, + (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryArbitratorFreeData, + (ndr_print_function_t) ndr_print_PNP_QueryArbitratorFreeData, + false, + }, + { + "PNP_QueryArbitratorFreeSize", + sizeof(struct PNP_QueryArbitratorFreeSize), + (ndr_push_flags_fn_t) ndr_push_PNP_QueryArbitratorFreeSize, + (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryArbitratorFreeSize, + (ndr_print_function_t) ndr_print_PNP_QueryArbitratorFreeSize, + false, + }, + { + "PNP_RunDetection", + sizeof(struct PNP_RunDetection), + (ndr_push_flags_fn_t) ndr_push_PNP_RunDetection, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RunDetection, + (ndr_print_function_t) ndr_print_PNP_RunDetection, + false, + }, + { + "PNP_RegisterNotification", + sizeof(struct PNP_RegisterNotification), + (ndr_push_flags_fn_t) ndr_push_PNP_RegisterNotification, + (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterNotification, + (ndr_print_function_t) ndr_print_PNP_RegisterNotification, + false, + }, + { + "PNP_UnregisterNotification", + sizeof(struct PNP_UnregisterNotification), + (ndr_push_flags_fn_t) ndr_push_PNP_UnregisterNotification, + (ndr_pull_flags_fn_t) ndr_pull_PNP_UnregisterNotification, + (ndr_print_function_t) ndr_print_PNP_UnregisterNotification, + false, + }, + { + "PNP_GetCustomDevProp", + sizeof(struct PNP_GetCustomDevProp), + (ndr_push_flags_fn_t) ndr_push_PNP_GetCustomDevProp, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetCustomDevProp, + (ndr_print_function_t) ndr_print_PNP_GetCustomDevProp, + false, + }, + { + "PNP_GetVersionInternal", + sizeof(struct PNP_GetVersionInternal), + (ndr_push_flags_fn_t) ndr_push_PNP_GetVersionInternal, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetVersionInternal, + (ndr_print_function_t) ndr_print_PNP_GetVersionInternal, + false, + }, + { + "PNP_GetBlockedDriverInfo", + sizeof(struct PNP_GetBlockedDriverInfo), + (ndr_push_flags_fn_t) ndr_push_PNP_GetBlockedDriverInfo, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetBlockedDriverInfo, + (ndr_print_function_t) ndr_print_PNP_GetBlockedDriverInfo, + false, + }, + { + "PNP_GetServerSideDeviceInstallFlags", + sizeof(struct PNP_GetServerSideDeviceInstallFlags), + (ndr_push_flags_fn_t) ndr_push_PNP_GetServerSideDeviceInstallFlags, + (ndr_pull_flags_fn_t) ndr_pull_PNP_GetServerSideDeviceInstallFlags, + (ndr_print_function_t) ndr_print_PNP_GetServerSideDeviceInstallFlags, + false, + }, + { NULL, 0, NULL, NULL, NULL, false } +}; + +static const char * const ntsvcs_endpoint_strings[] = { + "ncacn_np:[\\pipe\\ntsvcs]", +}; + +static const struct ndr_interface_string_array ntsvcs_endpoints = { + .count = 1, + .names = ntsvcs_endpoint_strings +}; + +static const char * const ntsvcs_authservice_strings[] = { + "host", +}; + +static const struct ndr_interface_string_array ntsvcs_authservices = { + .count = 1, + .names = ntsvcs_authservice_strings +}; + + +const struct ndr_interface_table ndr_table_ntsvcs = { + .name = "ntsvcs", + .syntax_id = { + {0x8d9f4e40,0xa03d,0x11ce,{0x8f,0x69},{0x08,0x00,0x3e,0x30,0x05,0x1b}}, + NDR_NTSVCS_VERSION + }, + .helpstring = NDR_NTSVCS_HELPSTRING, + .num_calls = 65, + .calls = ntsvcs_calls, + .endpoints = &ntsvcs_endpoints, + .authservices = &ntsvcs_authservices +}; + diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.h b/source3/librpc/gen_ndr/ndr_ntsvcs.h new file mode 100644 index 0000000000..b415d6056b --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.h @@ -0,0 +1,210 @@ +/* header auto-generated by pidl */ + +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/ntsvcs.h" + +#ifndef _HEADER_NDR_ntsvcs +#define _HEADER_NDR_ntsvcs + +#define NDR_NTSVCS_UUID "8d9f4e40-a03d-11ce-8f69-08003e30051b" +#define NDR_NTSVCS_VERSION 1.0 +#define NDR_NTSVCS_NAME "ntsvcs" +#define NDR_NTSVCS_HELPSTRING "Plug and Play services" +extern const struct ndr_interface_table ndr_table_ntsvcs; +#define NDR_PNP_DISCONNECT (0x00) + +#define NDR_PNP_CONNECT (0x01) + +#define NDR_PNP_GETVERSION (0x02) + +#define NDR_PNP_GETGLOBALSTATE (0x03) + +#define NDR_PNP_INITDETECTION (0x04) + +#define NDR_PNP_REPORTLOGON (0x05) + +#define NDR_PNP_VALIDATEDEVICEINSTANCE (0x06) + +#define NDR_PNP_GETROOTDEVICEINSTANCE (0x07) + +#define NDR_PNP_GETRELATEDDEVICEINSTANCE (0x08) + +#define NDR_PNP_ENUMERATESUBKEYS (0x09) + +#define NDR_PNP_GETDEVICELIST (0x0a) + +#define NDR_PNP_GETDEVICELISTSIZE (0x0b) + +#define NDR_PNP_GETDEPTH (0x0c) + +#define NDR_PNP_GETDEVICEREGPROP (0x0d) + +#define NDR_PNP_SETDEVICEREGPROP (0x0e) + +#define NDR_PNP_GETCLASSINSTANCE (0x0f) + +#define NDR_PNP_CREATEKEY (0x10) + +#define NDR_PNP_DELETEREGISTRYKEY (0x11) + +#define NDR_PNP_GETCLASSCOUNT (0x12) + +#define NDR_PNP_GETCLASSNAME (0x13) + +#define NDR_PNP_DELETECLASSKEY (0x14) + +#define NDR_PNP_GETINTERFACEDEVICEALIAS (0x15) + +#define NDR_PNP_GETINTERFACEDEVICELIST (0x16) + +#define NDR_PNP_GETINTERFACEDEVICELISTSIZE (0x17) + +#define NDR_PNP_REGISTERDEVICECLASSASSOCIATION (0x18) + +#define NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION (0x19) + +#define NDR_PNP_GETCLASSREGPROP (0x1a) + +#define NDR_PNP_SETCLASSREGPROP (0x1b) + +#define NDR_PNP_CREATEDEVINST (0x1c) + +#define NDR_PNP_DEVICEINSTANCEACTION (0x1d) + +#define NDR_PNP_GETDEVICESTATUS (0x1e) + +#define NDR_PNP_SETDEVICEPROBLEM (0x1f) + +#define NDR_PNP_DISABLEDEVINST (0x20) + +#define NDR_PNP_UNINSTALLDEVINST (0x21) + +#define NDR_PNP_ADDID (0x22) + +#define NDR_PNP_REGISTERDRIVER (0x23) + +#define NDR_PNP_QUERYREMOVE (0x24) + +#define NDR_PNP_REQUESTDEVICEEJECT (0x25) + +#define NDR_PNP_ISDOCKSTATIONPRESENT (0x26) + +#define NDR_PNP_REQUESTEJECTPC (0x27) + +#define NDR_PNP_HWPROFFLAGS (0x28) + +#define NDR_PNP_GETHWPROFINFO (0x29) + +#define NDR_PNP_ADDEMPTYLOGCONF (0x2a) + +#define NDR_PNP_FREELOGCONF (0x2b) + +#define NDR_PNP_GETFIRSTLOGCONF (0x2c) + +#define NDR_PNP_GETNEXTLOGCONF (0x2d) + +#define NDR_PNP_GETLOGCONFPRIORITY (0x2e) + +#define NDR_PNP_ADDRESDES (0x2f) + +#define NDR_PNP_FREERESDES (0x30) + +#define NDR_PNP_GETNEXTRESDES (0x31) + +#define NDR_PNP_GETRESDESDATA (0x32) + +#define NDR_PNP_GETRESDESDATASIZE (0x33) + +#define NDR_PNP_MODIFYRESDES (0x34) + +#define NDR_PNP_DETECTRESOURCELIMIT (0x35) + +#define NDR_PNP_QUERYRESCONFLIST (0x36) + +#define NDR_PNP_SETHWPROF (0x37) + +#define NDR_PNP_QUERYARBITRATORFREEDATA (0x38) + +#define NDR_PNP_QUERYARBITRATORFREESIZE (0x39) + +#define NDR_PNP_RUNDETECTION (0x3a) + +#define NDR_PNP_REGISTERNOTIFICATION (0x3b) + +#define NDR_PNP_UNREGISTERNOTIFICATION (0x3c) + +#define NDR_PNP_GETCUSTOMDEVPROP (0x3d) + +#define NDR_PNP_GETVERSIONINTERNAL (0x3e) + +#define NDR_PNP_GETBLOCKEDDRIVERINFO (0x3f) + +#define NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS (0x40) + +#define NDR_NTSVCS_CALL_COUNT (65) +void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r); +void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r); +void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r); +void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r); +void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r); +void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r); +void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r); +void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r); +void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r); +void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r); +void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r); +void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r); +void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r); +void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r); +void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r); +void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r); +void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r); +void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r); +void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r); +void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r); +void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r); +void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r); +void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r); +void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r); +void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r); +void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r); +void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r); +void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r); +void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r); +void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r); +void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r); +void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r); +void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r); +void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r); +void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r); +void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r); +void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r); +void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r); +void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r); +void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r); +void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r); +void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r); +void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r); +void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r); +void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r); +void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r); +void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r); +void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r); +void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r); +void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r); +void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r); +void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r); +void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r); +void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r); +void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r); +void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r); +void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r); +void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r); +void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r); +void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r); +void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r); +void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r); +void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r); +void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r); +void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r); +#endif /* _HEADER_NDR_ntsvcs */ diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h new file mode 100644 index 0000000000..43867c1bea --- /dev/null +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -0,0 +1,333 @@ +/* header auto-generated by pidl */ + +#include + +#ifndef _HEADER_ntsvcs +#define _HEADER_ntsvcs + + +struct PNP_Disconnect { + int _dummy_element; +}; + + +struct PNP_Connect { + int _dummy_element; +}; + + +struct PNP_GetVersion { + int _dummy_element; +}; + + +struct PNP_GetGlobalState { + int _dummy_element; +}; + + +struct PNP_InitDetection { + int _dummy_element; +}; + + +struct PNP_ReportLogOn { + int _dummy_element; +}; + + +struct PNP_ValidateDeviceInstance { + int _dummy_element; +}; + + +struct PNP_GetRootDeviceInstance { + int _dummy_element; +}; + + +struct PNP_GetRelatedDeviceInstance { + int _dummy_element; +}; + + +struct PNP_EnumerateSubKeys { + int _dummy_element; +}; + + +struct PNP_GetDeviceList { + int _dummy_element; +}; + + +struct PNP_GetDeviceListSize { + int _dummy_element; +}; + + +struct PNP_GetDepth { + int _dummy_element; +}; + + +struct PNP_GetDeviceRegProp { + int _dummy_element; +}; + + +struct PNP_SetDeviceRegProp { + int _dummy_element; +}; + + +struct PNP_GetClassInstance { + int _dummy_element; +}; + + +struct PNP_CreateKey { + int _dummy_element; +}; + + +struct PNP_DeleteRegistryKey { + int _dummy_element; +}; + + +struct PNP_GetClassCount { + int _dummy_element; +}; + + +struct PNP_GetClassName { + int _dummy_element; +}; + + +struct PNP_DeleteClassKey { + int _dummy_element; +}; + + +struct PNP_GetInterfaceDeviceAlias { + int _dummy_element; +}; + + +struct PNP_GetInterfaceDeviceList { + int _dummy_element; +}; + + +struct PNP_GetInterfaceDeviceListSize { + int _dummy_element; +}; + + +struct PNP_RegisterDeviceClassAssociation { + int _dummy_element; +}; + + +struct PNP_UnregisterDeviceClassAssociation { + int _dummy_element; +}; + + +struct PNP_GetClassRegProp { + int _dummy_element; +}; + + +struct PNP_SetClassRegProp { + int _dummy_element; +}; + + +struct PNP_CreateDevInst { + int _dummy_element; +}; + + +struct PNP_DeviceInstanceAction { + int _dummy_element; +}; + + +struct PNP_GetDeviceStatus { + int _dummy_element; +}; + + +struct PNP_SetDeviceProblem { + int _dummy_element; +}; + + +struct PNP_DisableDevInst { + int _dummy_element; +}; + + +struct PNP_UninstallDevInst { + int _dummy_element; +}; + + +struct PNP_AddID { + int _dummy_element; +}; + + +struct PNP_RegisterDriver { + int _dummy_element; +}; + + +struct PNP_QueryRemove { + int _dummy_element; +}; + + +struct PNP_RequestDeviceEject { + int _dummy_element; +}; + + +struct PNP_IsDockStationPresent { + int _dummy_element; +}; + + +struct PNP_RequestEjectPC { + int _dummy_element; +}; + + +struct PNP_HwProfFlags { + int _dummy_element; +}; + + +struct PNP_GetHwProfInfo { + int _dummy_element; +}; + + +struct PNP_AddEmptyLogConf { + int _dummy_element; +}; + + +struct PNP_FreeLogConf { + int _dummy_element; +}; + + +struct PNP_GetFirstLogConf { + int _dummy_element; +}; + + +struct PNP_GetNextLogConf { + int _dummy_element; +}; + + +struct PNP_GetLogConfPriority { + int _dummy_element; +}; + + +struct PNP_AddResDes { + int _dummy_element; +}; + + +struct PNP_FreeResDes { + int _dummy_element; +}; + + +struct PNP_GetNextResDes { + int _dummy_element; +}; + + +struct PNP_GetResDesData { + int _dummy_element; +}; + + +struct PNP_GetResDesDataSize { + int _dummy_element; +}; + + +struct PNP_ModifyResDes { + int _dummy_element; +}; + + +struct PNP_DetectResourceLimit { + int _dummy_element; +}; + + +struct PNP_QueryResConfList { + int _dummy_element; +}; + + +struct PNP_SetHwProf { + int _dummy_element; +}; + + +struct PNP_QueryArbitratorFreeData { + int _dummy_element; +}; + + +struct PNP_QueryArbitratorFreeSize { + int _dummy_element; +}; + + +struct PNP_RunDetection { + int _dummy_element; +}; + + +struct PNP_RegisterNotification { + int _dummy_element; +}; + + +struct PNP_UnregisterNotification { + int _dummy_element; +}; + + +struct PNP_GetCustomDevProp { + int _dummy_element; +}; + + +struct PNP_GetVersionInternal { + int _dummy_element; +}; + + +struct PNP_GetBlockedDriverInfo { + int _dummy_element; +}; + + +struct PNP_GetServerSideDeviceInstallFlags { + int _dummy_element; +}; + +#endif /* _HEADER_ntsvcs */ diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c new file mode 100644 index 0000000000..f4689e0bbb --- /dev/null +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -0,0 +1,4834 @@ +/* + * Unix SMB/CIFS implementation. + * server auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/srv_ntsvcs.h" + +static bool api_PNP_Disconnect(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_Disconnect *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DISCONNECT]; + + r = talloc(talloc_tos(), struct PNP_Disconnect); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Disconnect, r); + } + + _PNP_Disconnect(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_Connect(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_Connect *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_CONNECT]; + + r = talloc(talloc_tos(), struct PNP_Connect); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Connect, r); + } + + _PNP_Connect(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Connect, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetVersion(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetVersion *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSION]; + + r = talloc(talloc_tos(), struct PNP_GetVersion); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersion, r); + } + + _PNP_GetVersion(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetGlobalState(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetGlobalState *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETGLOBALSTATE]; + + r = talloc(talloc_tos(), struct PNP_GetGlobalState); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, r); + } + + _PNP_GetGlobalState(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_InitDetection(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_InitDetection *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_INITDETECTION]; + + r = talloc(talloc_tos(), struct PNP_InitDetection); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_InitDetection, r); + } + + _PNP_InitDetection(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_ReportLogOn(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_ReportLogOn *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REPORTLOGON]; + + r = talloc(talloc_tos(), struct PNP_ReportLogOn); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, r); + } + + _PNP_ReportLogOn(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_ValidateDeviceInstance(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_ValidateDeviceInstance *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_VALIDATEDEVICEINSTANCE]; + + r = talloc(talloc_tos(), struct PNP_ValidateDeviceInstance); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, r); + } + + _PNP_ValidateDeviceInstance(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetRootDeviceInstance(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetRootDeviceInstance *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETROOTDEVICEINSTANCE]; + + r = talloc(talloc_tos(), struct PNP_GetRootDeviceInstance); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, r); + } + + _PNP_GetRootDeviceInstance(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetRelatedDeviceInstance *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRELATEDDEVICEINSTANCE]; + + r = talloc(talloc_tos(), struct PNP_GetRelatedDeviceInstance); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, r); + } + + _PNP_GetRelatedDeviceInstance(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_EnumerateSubKeys(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_EnumerateSubKeys *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_ENUMERATESUBKEYS]; + + r = talloc(talloc_tos(), struct PNP_EnumerateSubKeys); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, r); + } + + _PNP_EnumerateSubKeys(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetDeviceList(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetDeviceList *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELIST]; + + r = talloc(talloc_tos(), struct PNP_GetDeviceList); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r); + } + + _PNP_GetDeviceList(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetDeviceListSize(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetDeviceListSize *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELISTSIZE]; + + r = talloc(talloc_tos(), struct PNP_GetDeviceListSize); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r); + } + + _PNP_GetDeviceListSize(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetDepth(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetDepth *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEPTH]; + + r = talloc(talloc_tos(), struct PNP_GetDepth); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDepth, r); + } + + _PNP_GetDepth(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetDeviceRegProp(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetDeviceRegProp *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICEREGPROP]; + + r = talloc(talloc_tos(), struct PNP_GetDeviceRegProp); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r); + } + + _PNP_GetDeviceRegProp(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_SetDeviceRegProp(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_SetDeviceRegProp *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEREGPROP]; + + r = talloc(talloc_tos(), struct PNP_SetDeviceRegProp); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r); + } + + _PNP_SetDeviceRegProp(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetClassInstance(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetClassInstance *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSINSTANCE]; + + r = talloc(talloc_tos(), struct PNP_GetClassInstance); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r); + } + + _PNP_GetClassInstance(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_CreateKey(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_CreateKey *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEKEY]; + + r = talloc(talloc_tos(), struct PNP_CreateKey); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateKey, r); + } + + _PNP_CreateKey(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_DeleteRegistryKey(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_DeleteRegistryKey *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETEREGISTRYKEY]; + + r = talloc(talloc_tos(), struct PNP_DeleteRegistryKey); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r); + } + + _PNP_DeleteRegistryKey(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetClassCount(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetClassCount *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSCOUNT]; + + r = talloc(talloc_tos(), struct PNP_GetClassCount); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r); + } + + _PNP_GetClassCount(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetClassName(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetClassName *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSNAME]; + + r = talloc(talloc_tos(), struct PNP_GetClassName); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassName, r); + } + + _PNP_GetClassName(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_DeleteClassKey(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_DeleteClassKey *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETECLASSKEY]; + + r = talloc(talloc_tos(), struct PNP_DeleteClassKey); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r); + } + + _PNP_DeleteClassKey(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetInterfaceDeviceAlias *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICEALIAS]; + + r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceAlias); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r); + } + + _PNP_GetInterfaceDeviceAlias(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetInterfaceDeviceList *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELIST]; + + r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceList); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r); + } + + _PNP_GetInterfaceDeviceList(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetInterfaceDeviceListSize *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELISTSIZE]; + + r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceListSize); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r); + } + + _PNP_GetInterfaceDeviceListSize(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RegisterDeviceClassAssociation *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDEVICECLASSASSOCIATION]; + + r = talloc(talloc_tos(), struct PNP_RegisterDeviceClassAssociation); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r); + } + + _PNP_RegisterDeviceClassAssociation(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_UnregisterDeviceClassAssociation *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION]; + + r = talloc(talloc_tos(), struct PNP_UnregisterDeviceClassAssociation); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r); + } + + _PNP_UnregisterDeviceClassAssociation(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetClassRegProp(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetClassRegProp *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSREGPROP]; + + r = talloc(talloc_tos(), struct PNP_GetClassRegProp); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r); + } + + _PNP_GetClassRegProp(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_SetClassRegProp(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_SetClassRegProp *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_SETCLASSREGPROP]; + + r = talloc(talloc_tos(), struct PNP_SetClassRegProp); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r); + } + + _PNP_SetClassRegProp(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_CreateDevInst(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_CreateDevInst *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEDEVINST]; + + r = talloc(talloc_tos(), struct PNP_CreateDevInst); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r); + } + + _PNP_CreateDevInst(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_DeviceInstanceAction(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_DeviceInstanceAction *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DEVICEINSTANCEACTION]; + + r = talloc(talloc_tos(), struct PNP_DeviceInstanceAction); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r); + } + + _PNP_DeviceInstanceAction(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetDeviceStatus(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetDeviceStatus *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICESTATUS]; + + r = talloc(talloc_tos(), struct PNP_GetDeviceStatus); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r); + } + + _PNP_GetDeviceStatus(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_SetDeviceProblem(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_SetDeviceProblem *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEPROBLEM]; + + r = talloc(talloc_tos(), struct PNP_SetDeviceProblem); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r); + } + + _PNP_SetDeviceProblem(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_DisableDevInst(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_DisableDevInst *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DISABLEDEVINST]; + + r = talloc(talloc_tos(), struct PNP_DisableDevInst); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r); + } + + _PNP_DisableDevInst(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_UninstallDevInst(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_UninstallDevInst *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_UNINSTALLDEVINST]; + + r = talloc(talloc_tos(), struct PNP_UninstallDevInst); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r); + } + + _PNP_UninstallDevInst(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_AddID(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_AddID *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDID]; + + r = talloc(talloc_tos(), struct PNP_AddID); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddID, r); + } + + _PNP_AddID(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddID, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RegisterDriver(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RegisterDriver *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDRIVER]; + + r = talloc(talloc_tos(), struct PNP_RegisterDriver); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r); + } + + _PNP_RegisterDriver(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_QueryRemove(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_QueryRemove *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYREMOVE]; + + r = talloc(talloc_tos(), struct PNP_QueryRemove); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r); + } + + _PNP_QueryRemove(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RequestDeviceEject(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RequestDeviceEject *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTDEVICEEJECT]; + + r = talloc(talloc_tos(), struct PNP_RequestDeviceEject); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r); + } + + _PNP_RequestDeviceEject(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_IsDockStationPresent(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_IsDockStationPresent *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_ISDOCKSTATIONPRESENT]; + + r = talloc(talloc_tos(), struct PNP_IsDockStationPresent); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r); + } + + _PNP_IsDockStationPresent(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RequestEjectPC(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RequestEjectPC *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTEJECTPC]; + + r = talloc(talloc_tos(), struct PNP_RequestEjectPC); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r); + } + + _PNP_RequestEjectPC(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_HwProfFlags(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_HwProfFlags *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_HWPROFFLAGS]; + + r = talloc(talloc_tos(), struct PNP_HwProfFlags); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r); + } + + _PNP_HwProfFlags(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetHwProfInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetHwProfInfo *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETHWPROFINFO]; + + r = talloc(talloc_tos(), struct PNP_GetHwProfInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r); + } + + _PNP_GetHwProfInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_AddEmptyLogConf(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_AddEmptyLogConf *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDEMPTYLOGCONF]; + + r = talloc(talloc_tos(), struct PNP_AddEmptyLogConf); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r); + } + + _PNP_AddEmptyLogConf(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_FreeLogConf(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_FreeLogConf *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_FREELOGCONF]; + + r = talloc(talloc_tos(), struct PNP_FreeLogConf); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r); + } + + _PNP_FreeLogConf(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetFirstLogConf(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetFirstLogConf *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETFIRSTLOGCONF]; + + r = talloc(talloc_tos(), struct PNP_GetFirstLogConf); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r); + } + + _PNP_GetFirstLogConf(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetNextLogConf(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetNextLogConf *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTLOGCONF]; + + r = talloc(talloc_tos(), struct PNP_GetNextLogConf); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r); + } + + _PNP_GetNextLogConf(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetLogConfPriority(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetLogConfPriority *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETLOGCONFPRIORITY]; + + r = talloc(talloc_tos(), struct PNP_GetLogConfPriority); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r); + } + + _PNP_GetLogConfPriority(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_AddResDes(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_AddResDes *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDRESDES]; + + r = talloc(talloc_tos(), struct PNP_AddResDes); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddResDes, r); + } + + _PNP_AddResDes(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_FreeResDes(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_FreeResDes *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_FREERESDES]; + + r = talloc(talloc_tos(), struct PNP_FreeResDes); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r); + } + + _PNP_FreeResDes(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetNextResDes(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetNextResDes *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTRESDES]; + + r = talloc(talloc_tos(), struct PNP_GetNextResDes); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r); + } + + _PNP_GetNextResDes(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetResDesData(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetResDesData *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATA]; + + r = talloc(talloc_tos(), struct PNP_GetResDesData); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r); + } + + _PNP_GetResDesData(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetResDesDataSize(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetResDesDataSize *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATASIZE]; + + r = talloc(talloc_tos(), struct PNP_GetResDesDataSize); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r); + } + + _PNP_GetResDesDataSize(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_ModifyResDes(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_ModifyResDes *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_MODIFYRESDES]; + + r = talloc(talloc_tos(), struct PNP_ModifyResDes); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r); + } + + _PNP_ModifyResDes(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_DetectResourceLimit(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_DetectResourceLimit *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_DETECTRESOURCELIMIT]; + + r = talloc(talloc_tos(), struct PNP_DetectResourceLimit); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r); + } + + _PNP_DetectResourceLimit(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_QueryResConfList(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_QueryResConfList *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYRESCONFLIST]; + + r = talloc(talloc_tos(), struct PNP_QueryResConfList); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r); + } + + _PNP_QueryResConfList(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_SetHwProf(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_SetHwProf *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_SETHWPROF]; + + r = talloc(talloc_tos(), struct PNP_SetHwProf); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r); + } + + _PNP_SetHwProf(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_QueryArbitratorFreeData *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREEDATA]; + + r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeData); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r); + } + + _PNP_QueryArbitratorFreeData(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_QueryArbitratorFreeSize *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREESIZE]; + + r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeSize); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r); + } + + _PNP_QueryArbitratorFreeSize(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RunDetection(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RunDetection *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_RUNDETECTION]; + + r = talloc(talloc_tos(), struct PNP_RunDetection); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RunDetection, r); + } + + _PNP_RunDetection(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_RegisterNotification(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_RegisterNotification *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERNOTIFICATION]; + + r = talloc(talloc_tos(), struct PNP_RegisterNotification); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r); + } + + _PNP_RegisterNotification(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_UnregisterNotification(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_UnregisterNotification *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERNOTIFICATION]; + + r = talloc(talloc_tos(), struct PNP_UnregisterNotification); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r); + } + + _PNP_UnregisterNotification(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetCustomDevProp(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetCustomDevProp *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCUSTOMDEVPROP]; + + r = talloc(talloc_tos(), struct PNP_GetCustomDevProp); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r); + } + + _PNP_GetCustomDevProp(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetVersionInternal(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetVersionInternal *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSIONINTERNAL]; + + r = talloc(talloc_tos(), struct PNP_GetVersionInternal); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r); + } + + _PNP_GetVersionInternal(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetBlockedDriverInfo *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETBLOCKEDDRIVERINFO]; + + r = talloc(talloc_tos(), struct PNP_GetBlockedDriverInfo); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r); + } + + _PNP_GetBlockedDriverInfo(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + +static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p) +{ + const struct ndr_interface_call *call; + struct ndr_pull *pull; + struct ndr_push *push; + enum ndr_err_code ndr_err; + DATA_BLOB blob; + struct PNP_GetServerSideDeviceInstallFlags *r; + + call = &ndr_table_ntsvcs.calls[NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS]; + + r = talloc(talloc_tos(), struct PNP_GetServerSideDeviceInstallFlags); + if (r == NULL) { + return false; + } + + if (!prs_data_blob(&p->in_data.data, &blob, r)) { + talloc_free(r); + return false; + } + + pull = ndr_pull_init_blob(&blob, r); + if (pull == NULL) { + talloc_free(r); + return false; + } + + pull->flags |= LIBNDR_FLAG_REF_ALLOC; + ndr_err = call->ndr_pull(pull, NDR_IN, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r); + } + + _PNP_GetServerSideDeviceInstallFlags(p, r); + + if (p->rng_fault_state) { + talloc_free(r); + /* Return true here, srv_pipe_hnd.c will take care */ + return true; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r); + } + + push = ndr_push_init_ctx(r); + if (push == NULL) { + talloc_free(r); + return false; + } + + ndr_err = call->ndr_push(push, NDR_OUT, r); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + talloc_free(r); + return false; + } + + blob = ndr_push_blob(push); + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { + talloc_free(r); + return false; + } + + talloc_free(r); + + return true; +} + + +/* Tables */ +static struct api_struct api_ntsvcs_cmds[] = +{ + {"PNP_DISCONNECT", NDR_PNP_DISCONNECT, api_PNP_Disconnect}, + {"PNP_CONNECT", NDR_PNP_CONNECT, api_PNP_Connect}, + {"PNP_GETVERSION", NDR_PNP_GETVERSION, api_PNP_GetVersion}, + {"PNP_GETGLOBALSTATE", NDR_PNP_GETGLOBALSTATE, api_PNP_GetGlobalState}, + {"PNP_INITDETECTION", NDR_PNP_INITDETECTION, api_PNP_InitDetection}, + {"PNP_REPORTLOGON", NDR_PNP_REPORTLOGON, api_PNP_ReportLogOn}, + {"PNP_VALIDATEDEVICEINSTANCE", NDR_PNP_VALIDATEDEVICEINSTANCE, api_PNP_ValidateDeviceInstance}, + {"PNP_GETROOTDEVICEINSTANCE", NDR_PNP_GETROOTDEVICEINSTANCE, api_PNP_GetRootDeviceInstance}, + {"PNP_GETRELATEDDEVICEINSTANCE", NDR_PNP_GETRELATEDDEVICEINSTANCE, api_PNP_GetRelatedDeviceInstance}, + {"PNP_ENUMERATESUBKEYS", NDR_PNP_ENUMERATESUBKEYS, api_PNP_EnumerateSubKeys}, + {"PNP_GETDEVICELIST", NDR_PNP_GETDEVICELIST, api_PNP_GetDeviceList}, + {"PNP_GETDEVICELISTSIZE", NDR_PNP_GETDEVICELISTSIZE, api_PNP_GetDeviceListSize}, + {"PNP_GETDEPTH", NDR_PNP_GETDEPTH, api_PNP_GetDepth}, + {"PNP_GETDEVICEREGPROP", NDR_PNP_GETDEVICEREGPROP, api_PNP_GetDeviceRegProp}, + {"PNP_SETDEVICEREGPROP", NDR_PNP_SETDEVICEREGPROP, api_PNP_SetDeviceRegProp}, + {"PNP_GETCLASSINSTANCE", NDR_PNP_GETCLASSINSTANCE, api_PNP_GetClassInstance}, + {"PNP_CREATEKEY", NDR_PNP_CREATEKEY, api_PNP_CreateKey}, + {"PNP_DELETEREGISTRYKEY", NDR_PNP_DELETEREGISTRYKEY, api_PNP_DeleteRegistryKey}, + {"PNP_GETCLASSCOUNT", NDR_PNP_GETCLASSCOUNT, api_PNP_GetClassCount}, + {"PNP_GETCLASSNAME", NDR_PNP_GETCLASSNAME, api_PNP_GetClassName}, + {"PNP_DELETECLASSKEY", NDR_PNP_DELETECLASSKEY, api_PNP_DeleteClassKey}, + {"PNP_GETINTERFACEDEVICEALIAS", NDR_PNP_GETINTERFACEDEVICEALIAS, api_PNP_GetInterfaceDeviceAlias}, + {"PNP_GETINTERFACEDEVICELIST", NDR_PNP_GETINTERFACEDEVICELIST, api_PNP_GetInterfaceDeviceList}, + {"PNP_GETINTERFACEDEVICELISTSIZE", NDR_PNP_GETINTERFACEDEVICELISTSIZE, api_PNP_GetInterfaceDeviceListSize}, + {"PNP_REGISTERDEVICECLASSASSOCIATION", NDR_PNP_REGISTERDEVICECLASSASSOCIATION, api_PNP_RegisterDeviceClassAssociation}, + {"PNP_UNREGISTERDEVICECLASSASSOCIATION", NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, api_PNP_UnregisterDeviceClassAssociation}, + {"PNP_GETCLASSREGPROP", NDR_PNP_GETCLASSREGPROP, api_PNP_GetClassRegProp}, + {"PNP_SETCLASSREGPROP", NDR_PNP_SETCLASSREGPROP, api_PNP_SetClassRegProp}, + {"PNP_CREATEDEVINST", NDR_PNP_CREATEDEVINST, api_PNP_CreateDevInst}, + {"PNP_DEVICEINSTANCEACTION", NDR_PNP_DEVICEINSTANCEACTION, api_PNP_DeviceInstanceAction}, + {"PNP_GETDEVICESTATUS", NDR_PNP_GETDEVICESTATUS, api_PNP_GetDeviceStatus}, + {"PNP_SETDEVICEPROBLEM", NDR_PNP_SETDEVICEPROBLEM, api_PNP_SetDeviceProblem}, + {"PNP_DISABLEDEVINST", NDR_PNP_DISABLEDEVINST, api_PNP_DisableDevInst}, + {"PNP_UNINSTALLDEVINST", NDR_PNP_UNINSTALLDEVINST, api_PNP_UninstallDevInst}, + {"PNP_ADDID", NDR_PNP_ADDID, api_PNP_AddID}, + {"PNP_REGISTERDRIVER", NDR_PNP_REGISTERDRIVER, api_PNP_RegisterDriver}, + {"PNP_QUERYREMOVE", NDR_PNP_QUERYREMOVE, api_PNP_QueryRemove}, + {"PNP_REQUESTDEVICEEJECT", NDR_PNP_REQUESTDEVICEEJECT, api_PNP_RequestDeviceEject}, + {"PNP_ISDOCKSTATIONPRESENT", NDR_PNP_ISDOCKSTATIONPRESENT, api_PNP_IsDockStationPresent}, + {"PNP_REQUESTEJECTPC", NDR_PNP_REQUESTEJECTPC, api_PNP_RequestEjectPC}, + {"PNP_HWPROFFLAGS", NDR_PNP_HWPROFFLAGS, api_PNP_HwProfFlags}, + {"PNP_GETHWPROFINFO", NDR_PNP_GETHWPROFINFO, api_PNP_GetHwProfInfo}, + {"PNP_ADDEMPTYLOGCONF", NDR_PNP_ADDEMPTYLOGCONF, api_PNP_AddEmptyLogConf}, + {"PNP_FREELOGCONF", NDR_PNP_FREELOGCONF, api_PNP_FreeLogConf}, + {"PNP_GETFIRSTLOGCONF", NDR_PNP_GETFIRSTLOGCONF, api_PNP_GetFirstLogConf}, + {"PNP_GETNEXTLOGCONF", NDR_PNP_GETNEXTLOGCONF, api_PNP_GetNextLogConf}, + {"PNP_GETLOGCONFPRIORITY", NDR_PNP_GETLOGCONFPRIORITY, api_PNP_GetLogConfPriority}, + {"PNP_ADDRESDES", NDR_PNP_ADDRESDES, api_PNP_AddResDes}, + {"PNP_FREERESDES", NDR_PNP_FREERESDES, api_PNP_FreeResDes}, + {"PNP_GETNEXTRESDES", NDR_PNP_GETNEXTRESDES, api_PNP_GetNextResDes}, + {"PNP_GETRESDESDATA", NDR_PNP_GETRESDESDATA, api_PNP_GetResDesData}, + {"PNP_GETRESDESDATASIZE", NDR_PNP_GETRESDESDATASIZE, api_PNP_GetResDesDataSize}, + {"PNP_MODIFYRESDES", NDR_PNP_MODIFYRESDES, api_PNP_ModifyResDes}, + {"PNP_DETECTRESOURCELIMIT", NDR_PNP_DETECTRESOURCELIMIT, api_PNP_DetectResourceLimit}, + {"PNP_QUERYRESCONFLIST", NDR_PNP_QUERYRESCONFLIST, api_PNP_QueryResConfList}, + {"PNP_SETHWPROF", NDR_PNP_SETHWPROF, api_PNP_SetHwProf}, + {"PNP_QUERYARBITRATORFREEDATA", NDR_PNP_QUERYARBITRATORFREEDATA, api_PNP_QueryArbitratorFreeData}, + {"PNP_QUERYARBITRATORFREESIZE", NDR_PNP_QUERYARBITRATORFREESIZE, api_PNP_QueryArbitratorFreeSize}, + {"PNP_RUNDETECTION", NDR_PNP_RUNDETECTION, api_PNP_RunDetection}, + {"PNP_REGISTERNOTIFICATION", NDR_PNP_REGISTERNOTIFICATION, api_PNP_RegisterNotification}, + {"PNP_UNREGISTERNOTIFICATION", NDR_PNP_UNREGISTERNOTIFICATION, api_PNP_UnregisterNotification}, + {"PNP_GETCUSTOMDEVPROP", NDR_PNP_GETCUSTOMDEVPROP, api_PNP_GetCustomDevProp}, + {"PNP_GETVERSIONINTERNAL", NDR_PNP_GETVERSIONINTERNAL, api_PNP_GetVersionInternal}, + {"PNP_GETBLOCKEDDRIVERINFO", NDR_PNP_GETBLOCKEDDRIVERINFO, api_PNP_GetBlockedDriverInfo}, + {"PNP_GETSERVERSIDEDEVICEINSTALLFLAGS", NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, api_PNP_GetServerSideDeviceInstallFlags}, +}; + +void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns) +{ + *fns = api_ntsvcs_cmds; + *n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct); +} + +NTSTATUS rpc_ntsvcs_init(void) +{ + return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct)); +} diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.h b/source3/librpc/gen_ndr/srv_ntsvcs.h new file mode 100644 index 0000000000..0bcd09183e --- /dev/null +++ b/source3/librpc/gen_ndr/srv_ntsvcs.h @@ -0,0 +1,71 @@ +#include "librpc/gen_ndr/ndr_ntsvcs.h" +#ifndef __SRV_NTSVCS__ +#define __SRV_NTSVCS__ +void _PNP_Disconnect(pipes_struct *p, struct PNP_Disconnect *r); +void _PNP_Connect(pipes_struct *p, struct PNP_Connect *r); +void _PNP_GetVersion(pipes_struct *p, struct PNP_GetVersion *r); +void _PNP_GetGlobalState(pipes_struct *p, struct PNP_GetGlobalState *r); +void _PNP_InitDetection(pipes_struct *p, struct PNP_InitDetection *r); +void _PNP_ReportLogOn(pipes_struct *p, struct PNP_ReportLogOn *r); +void _PNP_ValidateDeviceInstance(pipes_struct *p, struct PNP_ValidateDeviceInstance *r); +void _PNP_GetRootDeviceInstance(pipes_struct *p, struct PNP_GetRootDeviceInstance *r); +void _PNP_GetRelatedDeviceInstance(pipes_struct *p, struct PNP_GetRelatedDeviceInstance *r); +void _PNP_EnumerateSubKeys(pipes_struct *p, struct PNP_EnumerateSubKeys *r); +void _PNP_GetDeviceList(pipes_struct *p, struct PNP_GetDeviceList *r); +void _PNP_GetDeviceListSize(pipes_struct *p, struct PNP_GetDeviceListSize *r); +void _PNP_GetDepth(pipes_struct *p, struct PNP_GetDepth *r); +void _PNP_GetDeviceRegProp(pipes_struct *p, struct PNP_GetDeviceRegProp *r); +void _PNP_SetDeviceRegProp(pipes_struct *p, struct PNP_SetDeviceRegProp *r); +void _PNP_GetClassInstance(pipes_struct *p, struct PNP_GetClassInstance *r); +void _PNP_CreateKey(pipes_struct *p, struct PNP_CreateKey *r); +void _PNP_DeleteRegistryKey(pipes_struct *p, struct PNP_DeleteRegistryKey *r); +void _PNP_GetClassCount(pipes_struct *p, struct PNP_GetClassCount *r); +void _PNP_GetClassName(pipes_struct *p, struct PNP_GetClassName *r); +void _PNP_DeleteClassKey(pipes_struct *p, struct PNP_DeleteClassKey *r); +void _PNP_GetInterfaceDeviceAlias(pipes_struct *p, struct PNP_GetInterfaceDeviceAlias *r); +void _PNP_GetInterfaceDeviceList(pipes_struct *p, struct PNP_GetInterfaceDeviceList *r); +void _PNP_GetInterfaceDeviceListSize(pipes_struct *p, struct PNP_GetInterfaceDeviceListSize *r); +void _PNP_RegisterDeviceClassAssociation(pipes_struct *p, struct PNP_RegisterDeviceClassAssociation *r); +void _PNP_UnregisterDeviceClassAssociation(pipes_struct *p, struct PNP_UnregisterDeviceClassAssociation *r); +void _PNP_GetClassRegProp(pipes_struct *p, struct PNP_GetClassRegProp *r); +void _PNP_SetClassRegProp(pipes_struct *p, struct PNP_SetClassRegProp *r); +void _PNP_CreateDevInst(pipes_struct *p, struct PNP_CreateDevInst *r); +void _PNP_DeviceInstanceAction(pipes_struct *p, struct PNP_DeviceInstanceAction *r); +void _PNP_GetDeviceStatus(pipes_struct *p, struct PNP_GetDeviceStatus *r); +void _PNP_SetDeviceProblem(pipes_struct *p, struct PNP_SetDeviceProblem *r); +void _PNP_DisableDevInst(pipes_struct *p, struct PNP_DisableDevInst *r); +void _PNP_UninstallDevInst(pipes_struct *p, struct PNP_UninstallDevInst *r); +void _PNP_AddID(pipes_struct *p, struct PNP_AddID *r); +void _PNP_RegisterDriver(pipes_struct *p, struct PNP_RegisterDriver *r); +void _PNP_QueryRemove(pipes_struct *p, struct PNP_QueryRemove *r); +void _PNP_RequestDeviceEject(pipes_struct *p, struct PNP_RequestDeviceEject *r); +void _PNP_IsDockStationPresent(pipes_struct *p, struct PNP_IsDockStationPresent *r); +void _PNP_RequestEjectPC(pipes_struct *p, struct PNP_RequestEjectPC *r); +void _PNP_HwProfFlags(pipes_struct *p, struct PNP_HwProfFlags *r); +void _PNP_GetHwProfInfo(pipes_struct *p, struct PNP_GetHwProfInfo *r); +void _PNP_AddEmptyLogConf(pipes_struct *p, struct PNP_AddEmptyLogConf *r); +void _PNP_FreeLogConf(pipes_struct *p, struct PNP_FreeLogConf *r); +void _PNP_GetFirstLogConf(pipes_struct *p, struct PNP_GetFirstLogConf *r); +void _PNP_GetNextLogConf(pipes_struct *p, struct PNP_GetNextLogConf *r); +void _PNP_GetLogConfPriority(pipes_struct *p, struct PNP_GetLogConfPriority *r); +void _PNP_AddResDes(pipes_struct *p, struct PNP_AddResDes *r); +void _PNP_FreeResDes(pipes_struct *p, struct PNP_FreeResDes *r); +void _PNP_GetNextResDes(pipes_struct *p, struct PNP_GetNextResDes *r); +void _PNP_GetResDesData(pipes_struct *p, struct PNP_GetResDesData *r); +void _PNP_GetResDesDataSize(pipes_struct *p, struct PNP_GetResDesDataSize *r); +void _PNP_ModifyResDes(pipes_struct *p, struct PNP_ModifyResDes *r); +void _PNP_DetectResourceLimit(pipes_struct *p, struct PNP_DetectResourceLimit *r); +void _PNP_QueryResConfList(pipes_struct *p, struct PNP_QueryResConfList *r); +void _PNP_SetHwProf(pipes_struct *p, struct PNP_SetHwProf *r); +void _PNP_QueryArbitratorFreeData(pipes_struct *p, struct PNP_QueryArbitratorFreeData *r); +void _PNP_QueryArbitratorFreeSize(pipes_struct *p, struct PNP_QueryArbitratorFreeSize *r); +void _PNP_RunDetection(pipes_struct *p, struct PNP_RunDetection *r); +void _PNP_RegisterNotification(pipes_struct *p, struct PNP_RegisterNotification *r); +void _PNP_UnregisterNotification(pipes_struct *p, struct PNP_UnregisterNotification *r); +void _PNP_GetCustomDevProp(pipes_struct *p, struct PNP_GetCustomDevProp *r); +void _PNP_GetVersionInternal(pipes_struct *p, struct PNP_GetVersionInternal *r); +void _PNP_GetBlockedDriverInfo(pipes_struct *p, struct PNP_GetBlockedDriverInfo *r); +void _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p, struct PNP_GetServerSideDeviceInstallFlags *r); +void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns); +NTSTATUS rpc_ntsvcs_init(void); +#endif /* __SRV_NTSVCS__ */ -- cgit From 95103fe6383614c364ed745b3c09a743bc52e060 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 23:29:35 +0100 Subject: Re-run make idl. Guenther (This used to be commit 2a86e2f2d26886cfe87149dfc4f17049b21cb109) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 587 ++++++++++++++++++++++++++++-------- source3/librpc/gen_ndr/cli_ntsvcs.h | 196 ++++++++---- source3/librpc/gen_ndr/ndr_ntsvcs.c | 215 +++++++++++++ source3/librpc/gen_ndr/ntsvcs.h | 326 ++++++++++++++++---- source3/librpc/gen_ndr/srv_ntsvcs.c | 137 +++++---- source3/librpc/gen_ndr/srv_ntsvcs.h | 130 ++++---- 6 files changed, 1201 insertions(+), 390 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index 7795962c3f..da43d451e6 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -7,7 +7,8 @@ #include "librpc/gen_ndr/cli_ntsvcs.h" NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_Disconnect r; NTSTATUS status; @@ -40,11 +41,16 @@ NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_Connect r; NTSTATUS status; @@ -77,11 +83,17 @@ NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + uint16_t *version, + WERROR *werror) { struct PNP_GetVersion r; NTSTATUS status; @@ -112,13 +124,19 @@ NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, } /* Return variables */ + *version = *r.out.version; /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetGlobalState r; NTSTATUS status; @@ -151,11 +169,16 @@ NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_InitDetection r; NTSTATUS status; @@ -188,11 +211,16 @@ NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_ReportLogOn r; NTSTATUS status; @@ -225,11 +253,16 @@ NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_ValidateDeviceInstance r; NTSTATUS status; @@ -262,11 +295,16 @@ NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetRootDeviceInstance r; NTSTATUS status; @@ -299,11 +337,16 @@ NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetRelatedDeviceInstance r; NTSTATUS status; @@ -336,11 +379,16 @@ NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_EnumerateSubKeys r; NTSTATUS status; @@ -373,11 +421,16 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetDeviceList r; NTSTATUS status; @@ -410,11 +463,16 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetDeviceListSize r; NTSTATUS status; @@ -447,11 +505,16 @@ NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetDepth r; NTSTATUS status; @@ -484,11 +547,16 @@ NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetDeviceRegProp r; NTSTATUS status; @@ -521,11 +589,16 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_SetDeviceRegProp r; NTSTATUS status; @@ -558,11 +631,16 @@ NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetClassInstance r; NTSTATUS status; @@ -595,11 +673,16 @@ NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_CreateKey r; NTSTATUS status; @@ -632,11 +715,16 @@ NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_DeleteRegistryKey r; NTSTATUS status; @@ -669,11 +757,16 @@ NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetClassCount r; NTSTATUS status; @@ -706,11 +799,16 @@ NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetClassName r; NTSTATUS status; @@ -743,11 +841,16 @@ NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_DeleteClassKey r; NTSTATUS status; @@ -780,11 +883,16 @@ NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetInterfaceDeviceAlias r; NTSTATUS status; @@ -817,11 +925,16 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetInterfaceDeviceList r; NTSTATUS status; @@ -854,11 +967,16 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetInterfaceDeviceListSize r; NTSTATUS status; @@ -891,11 +1009,16 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RegisterDeviceClassAssociation r; NTSTATUS status; @@ -928,11 +1051,16 @@ NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_UnregisterDeviceClassAssociation r; NTSTATUS status; @@ -965,11 +1093,16 @@ NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetClassRegProp r; NTSTATUS status; @@ -1002,11 +1135,16 @@ NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_SetClassRegProp r; NTSTATUS status; @@ -1039,11 +1177,16 @@ NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_CreateDevInst r; NTSTATUS status; @@ -1076,11 +1219,16 @@ NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_DeviceInstanceAction r; NTSTATUS status; @@ -1113,11 +1261,16 @@ NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetDeviceStatus r; NTSTATUS status; @@ -1150,11 +1303,16 @@ NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_SetDeviceProblem r; NTSTATUS status; @@ -1187,11 +1345,16 @@ NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_DisableDevInst r; NTSTATUS status; @@ -1224,11 +1387,16 @@ NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_UninstallDevInst r; NTSTATUS status; @@ -1261,11 +1429,16 @@ NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_AddID r; NTSTATUS status; @@ -1298,11 +1471,16 @@ NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RegisterDriver r; NTSTATUS status; @@ -1335,11 +1513,16 @@ NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_QueryRemove r; NTSTATUS status; @@ -1372,11 +1555,16 @@ NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RequestDeviceEject r; NTSTATUS status; @@ -1409,11 +1597,16 @@ NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_IsDockStationPresent r; NTSTATUS status; @@ -1446,11 +1639,16 @@ NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RequestEjectPC r; NTSTATUS status; @@ -1483,11 +1681,16 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_HwProfFlags r; NTSTATUS status; @@ -1520,11 +1723,16 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetHwProfInfo r; NTSTATUS status; @@ -1557,11 +1765,16 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_AddEmptyLogConf r; NTSTATUS status; @@ -1594,11 +1807,16 @@ NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_FreeLogConf r; NTSTATUS status; @@ -1631,11 +1849,16 @@ NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetFirstLogConf r; NTSTATUS status; @@ -1668,11 +1891,16 @@ NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetNextLogConf r; NTSTATUS status; @@ -1705,11 +1933,16 @@ NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetLogConfPriority r; NTSTATUS status; @@ -1742,11 +1975,16 @@ NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_AddResDes r; NTSTATUS status; @@ -1779,11 +2017,16 @@ NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_FreeResDes r; NTSTATUS status; @@ -1816,11 +2059,16 @@ NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetNextResDes r; NTSTATUS status; @@ -1853,11 +2101,16 @@ NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetResDesData r; NTSTATUS status; @@ -1890,11 +2143,16 @@ NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetResDesDataSize r; NTSTATUS status; @@ -1927,11 +2185,16 @@ NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_ModifyResDes r; NTSTATUS status; @@ -1964,11 +2227,16 @@ NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_DetectResourceLimit r; NTSTATUS status; @@ -2001,11 +2269,16 @@ NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_QueryResConfList r; NTSTATUS status; @@ -2038,11 +2311,16 @@ NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_SetHwProf r; NTSTATUS status; @@ -2075,11 +2353,16 @@ NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_QueryArbitratorFreeData r; NTSTATUS status; @@ -2112,11 +2395,16 @@ NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_QueryArbitratorFreeSize r; NTSTATUS status; @@ -2149,11 +2437,16 @@ NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RunDetection r; NTSTATUS status; @@ -2186,11 +2479,16 @@ NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_RegisterNotification r; NTSTATUS status; @@ -2223,11 +2521,16 @@ NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_UnregisterNotification r; NTSTATUS status; @@ -2260,11 +2563,16 @@ NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetCustomDevProp r; NTSTATUS status; @@ -2297,11 +2605,16 @@ NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetVersionInternal r; NTSTATUS status; @@ -2334,11 +2647,16 @@ NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetBlockedDriverInfo r; NTSTATUS status; @@ -2371,11 +2689,16 @@ NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + WERROR *werror) { struct PNP_GetServerSideDeviceInstallFlags r; NTSTATUS status; @@ -2408,6 +2731,10 @@ NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ - return NT_STATUS_OK; + if (werror) { + *werror = r.out.result; + } + + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index ab2aead1ea..852cc812e9 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -2,133 +2,199 @@ #ifndef __CLI_NTSVCS__ #define __CLI_NTSVCS__ NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + uint16_t *version, + WERROR *werror); NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + WERROR *werror); #endif /* __CLI_NTSVCS__ */ diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index 8e6176c56c..73dd4d346c 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -8,6 +8,7 @@ static enum ndr_err_code ndr_push_PNP_Disconnect(struct ndr_push *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -17,6 +18,7 @@ static enum ndr_err_code ndr_pull_PNP_Disconnect(struct ndr_pull *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -36,6 +38,7 @@ _PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_Disconnect"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -46,6 +49,7 @@ static enum ndr_err_code ndr_push_PNP_Connect(struct ndr_push *ndr, int flags, c if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -55,6 +59,7 @@ static enum ndr_err_code ndr_pull_PNP_Connect(struct ndr_pull *ndr, int flags, s if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -74,6 +79,7 @@ _PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_Connect"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -84,15 +90,33 @@ static enum ndr_err_code ndr_push_PNP_GetVersion(struct ndr_push *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { + if (r->out.version == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.version)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } static enum ndr_err_code ndr_pull_PNP_GetVersion(struct ndr_pull *ndr, int flags, struct PNP_GetVersion *r) { + TALLOC_CTX *_mem_save_version_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_PULL_ALLOC(ndr, r->out.version); + ZERO_STRUCTP(r->out.version); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.version); + } + _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.version)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -112,6 +136,11 @@ _PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetVersion"); ndr->depth++; + ndr_print_ptr(ndr, "version", r->out.version); + ndr->depth++; + ndr_print_uint16(ndr, "version", *r->out.version); + ndr->depth--; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -122,6 +151,7 @@ static enum ndr_err_code ndr_push_PNP_GetGlobalState(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -131,6 +161,7 @@ static enum ndr_err_code ndr_pull_PNP_GetGlobalState(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -150,6 +181,7 @@ _PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetGlobalState"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -160,6 +192,7 @@ static enum ndr_err_code ndr_push_PNP_InitDetection(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -169,6 +202,7 @@ static enum ndr_err_code ndr_pull_PNP_InitDetection(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -188,6 +222,7 @@ _PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_InitDetection"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -198,6 +233,7 @@ static enum ndr_err_code ndr_push_PNP_ReportLogOn(struct ndr_push *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -207,6 +243,7 @@ static enum ndr_err_code ndr_pull_PNP_ReportLogOn(struct ndr_pull *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -226,6 +263,7 @@ _PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_ReportLogOn"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -236,6 +274,7 @@ static enum ndr_err_code ndr_push_PNP_ValidateDeviceInstance(struct ndr_push *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -245,6 +284,7 @@ static enum ndr_err_code ndr_pull_PNP_ValidateDeviceInstance(struct ndr_pull *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -264,6 +304,7 @@ _PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_ValidateDeviceInstance"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -274,6 +315,7 @@ static enum ndr_err_code ndr_push_PNP_GetRootDeviceInstance(struct ndr_push *ndr if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -283,6 +325,7 @@ static enum ndr_err_code ndr_pull_PNP_GetRootDeviceInstance(struct ndr_pull *ndr if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -302,6 +345,7 @@ _PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const c if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetRootDeviceInstance"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -312,6 +356,7 @@ static enum ndr_err_code ndr_push_PNP_GetRelatedDeviceInstance(struct ndr_push * if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -321,6 +366,7 @@ static enum ndr_err_code ndr_pull_PNP_GetRelatedDeviceInstance(struct ndr_pull * if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -340,6 +386,7 @@ _PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, cons if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetRelatedDeviceInstance"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -350,6 +397,7 @@ static enum ndr_err_code ndr_push_PNP_EnumerateSubKeys(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -359,6 +407,7 @@ static enum ndr_err_code ndr_pull_PNP_EnumerateSubKeys(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -378,6 +427,7 @@ _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_EnumerateSubKeys"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -388,6 +438,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -397,6 +448,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -416,6 +468,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceList"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -426,6 +479,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -435,6 +489,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -454,6 +509,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceListSize"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -464,6 +520,7 @@ static enum ndr_err_code ndr_push_PNP_GetDepth(struct ndr_push *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -473,6 +530,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDepth(struct ndr_pull *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -492,6 +550,7 @@ _PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, in if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDepth"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -502,6 +561,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -511,6 +571,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -530,6 +591,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -540,6 +602,7 @@ static enum ndr_err_code ndr_push_PNP_SetDeviceRegProp(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -549,6 +612,7 @@ static enum ndr_err_code ndr_pull_PNP_SetDeviceRegProp(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -568,6 +632,7 @@ _PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_SetDeviceRegProp"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -578,6 +643,7 @@ static enum ndr_err_code ndr_push_PNP_GetClassInstance(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -587,6 +653,7 @@ static enum ndr_err_code ndr_pull_PNP_GetClassInstance(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -606,6 +673,7 @@ _PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetClassInstance"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -616,6 +684,7 @@ static enum ndr_err_code ndr_push_PNP_CreateKey(struct ndr_push *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -625,6 +694,7 @@ static enum ndr_err_code ndr_pull_PNP_CreateKey(struct ndr_pull *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -644,6 +714,7 @@ _PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, i if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_CreateKey"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -654,6 +725,7 @@ static enum ndr_err_code ndr_push_PNP_DeleteRegistryKey(struct ndr_push *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -663,6 +735,7 @@ static enum ndr_err_code ndr_pull_PNP_DeleteRegistryKey(struct ndr_pull *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -682,6 +755,7 @@ _PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_DeleteRegistryKey"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -692,6 +766,7 @@ static enum ndr_err_code ndr_push_PNP_GetClassCount(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -701,6 +776,7 @@ static enum ndr_err_code ndr_pull_PNP_GetClassCount(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -720,6 +796,7 @@ _PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetClassCount"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -730,6 +807,7 @@ static enum ndr_err_code ndr_push_PNP_GetClassName(struct ndr_push *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -739,6 +817,7 @@ static enum ndr_err_code ndr_pull_PNP_GetClassName(struct ndr_pull *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -758,6 +837,7 @@ _PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetClassName"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -768,6 +848,7 @@ static enum ndr_err_code ndr_push_PNP_DeleteClassKey(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -777,6 +858,7 @@ static enum ndr_err_code ndr_pull_PNP_DeleteClassKey(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -796,6 +878,7 @@ _PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_DeleteClassKey"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -806,6 +889,7 @@ static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceAlias(struct ndr_push *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -815,6 +899,7 @@ static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceAlias(struct ndr_pull *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -834,6 +919,7 @@ _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceAlias"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -844,6 +930,7 @@ static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceList(struct ndr_push *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -853,6 +940,7 @@ static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceList(struct ndr_pull *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -872,6 +960,7 @@ _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceList"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -882,6 +971,7 @@ static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceListSize(struct ndr_push if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -891,6 +981,7 @@ static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceListSize(struct ndr_pull if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -910,6 +1001,7 @@ _PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, co if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceListSize"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -920,6 +1012,7 @@ static enum ndr_err_code ndr_push_PNP_RegisterDeviceClassAssociation(struct ndr_ if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -929,6 +1022,7 @@ static enum ndr_err_code ndr_pull_PNP_RegisterDeviceClassAssociation(struct ndr_ if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -948,6 +1042,7 @@ _PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RegisterDeviceClassAssociation"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -958,6 +1053,7 @@ static enum ndr_err_code ndr_push_PNP_UnregisterDeviceClassAssociation(struct nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -967,6 +1063,7 @@ static enum ndr_err_code ndr_pull_PNP_UnregisterDeviceClassAssociation(struct nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -986,6 +1083,7 @@ _PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_UnregisterDeviceClassAssociation"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -996,6 +1094,7 @@ static enum ndr_err_code ndr_push_PNP_GetClassRegProp(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1005,6 +1104,7 @@ static enum ndr_err_code ndr_pull_PNP_GetClassRegProp(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1024,6 +1124,7 @@ _PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetClassRegProp"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1034,6 +1135,7 @@ static enum ndr_err_code ndr_push_PNP_SetClassRegProp(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1043,6 +1145,7 @@ static enum ndr_err_code ndr_pull_PNP_SetClassRegProp(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1062,6 +1165,7 @@ _PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_SetClassRegProp"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1072,6 +1176,7 @@ static enum ndr_err_code ndr_push_PNP_CreateDevInst(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1081,6 +1186,7 @@ static enum ndr_err_code ndr_pull_PNP_CreateDevInst(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1100,6 +1206,7 @@ _PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_CreateDevInst"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1110,6 +1217,7 @@ static enum ndr_err_code ndr_push_PNP_DeviceInstanceAction(struct ndr_push *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1119,6 +1227,7 @@ static enum ndr_err_code ndr_pull_PNP_DeviceInstanceAction(struct ndr_pull *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1138,6 +1247,7 @@ _PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const ch if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_DeviceInstanceAction"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1148,6 +1258,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceStatus(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1157,6 +1268,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceStatus(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1176,6 +1288,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceStatus"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1186,6 +1299,7 @@ static enum ndr_err_code ndr_push_PNP_SetDeviceProblem(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1195,6 +1309,7 @@ static enum ndr_err_code ndr_pull_PNP_SetDeviceProblem(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1214,6 +1329,7 @@ _PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_SetDeviceProblem"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1224,6 +1340,7 @@ static enum ndr_err_code ndr_push_PNP_DisableDevInst(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1233,6 +1350,7 @@ static enum ndr_err_code ndr_pull_PNP_DisableDevInst(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1252,6 +1370,7 @@ _PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_DisableDevInst"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1262,6 +1381,7 @@ static enum ndr_err_code ndr_push_PNP_UninstallDevInst(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1271,6 +1391,7 @@ static enum ndr_err_code ndr_pull_PNP_UninstallDevInst(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1290,6 +1411,7 @@ _PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_UninstallDevInst"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1300,6 +1422,7 @@ static enum ndr_err_code ndr_push_PNP_AddID(struct ndr_push *ndr, int flags, con if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1309,6 +1432,7 @@ static enum ndr_err_code ndr_pull_PNP_AddID(struct ndr_pull *ndr, int flags, str if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1328,6 +1452,7 @@ _PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int f if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_AddID"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1338,6 +1463,7 @@ static enum ndr_err_code ndr_push_PNP_RegisterDriver(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1347,6 +1473,7 @@ static enum ndr_err_code ndr_pull_PNP_RegisterDriver(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1366,6 +1493,7 @@ _PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RegisterDriver"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1376,6 +1504,7 @@ static enum ndr_err_code ndr_push_PNP_QueryRemove(struct ndr_push *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1385,6 +1514,7 @@ static enum ndr_err_code ndr_pull_PNP_QueryRemove(struct ndr_pull *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1404,6 +1534,7 @@ _PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_QueryRemove"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1414,6 +1545,7 @@ static enum ndr_err_code ndr_push_PNP_RequestDeviceEject(struct ndr_push *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1423,6 +1555,7 @@ static enum ndr_err_code ndr_pull_PNP_RequestDeviceEject(struct ndr_pull *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1442,6 +1575,7 @@ _PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RequestDeviceEject"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1452,6 +1586,7 @@ static enum ndr_err_code ndr_push_PNP_IsDockStationPresent(struct ndr_push *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1461,6 +1596,7 @@ static enum ndr_err_code ndr_pull_PNP_IsDockStationPresent(struct ndr_pull *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1480,6 +1616,7 @@ _PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const ch if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_IsDockStationPresent"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1490,6 +1627,7 @@ static enum ndr_err_code ndr_push_PNP_RequestEjectPC(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1499,6 +1637,7 @@ static enum ndr_err_code ndr_pull_PNP_RequestEjectPC(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1518,6 +1657,7 @@ _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RequestEjectPC"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1528,6 +1668,7 @@ static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1537,6 +1678,7 @@ static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1556,6 +1698,7 @@ _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_HwProfFlags"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1566,6 +1709,7 @@ static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1575,6 +1719,7 @@ static enum ndr_err_code ndr_pull_PNP_GetHwProfInfo(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1594,6 +1739,7 @@ _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetHwProfInfo"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1604,6 +1750,7 @@ static enum ndr_err_code ndr_push_PNP_AddEmptyLogConf(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1613,6 +1760,7 @@ static enum ndr_err_code ndr_pull_PNP_AddEmptyLogConf(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1632,6 +1780,7 @@ _PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_AddEmptyLogConf"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1642,6 +1791,7 @@ static enum ndr_err_code ndr_push_PNP_FreeLogConf(struct ndr_push *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1651,6 +1801,7 @@ static enum ndr_err_code ndr_pull_PNP_FreeLogConf(struct ndr_pull *ndr, int flag if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1670,6 +1821,7 @@ _PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_FreeLogConf"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1680,6 +1832,7 @@ static enum ndr_err_code ndr_push_PNP_GetFirstLogConf(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1689,6 +1842,7 @@ static enum ndr_err_code ndr_pull_PNP_GetFirstLogConf(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1708,6 +1862,7 @@ _PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *n if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetFirstLogConf"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1718,6 +1873,7 @@ static enum ndr_err_code ndr_push_PNP_GetNextLogConf(struct ndr_push *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1727,6 +1883,7 @@ static enum ndr_err_code ndr_pull_PNP_GetNextLogConf(struct ndr_pull *ndr, int f if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1746,6 +1903,7 @@ _PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *na if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetNextLogConf"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1756,6 +1914,7 @@ static enum ndr_err_code ndr_push_PNP_GetLogConfPriority(struct ndr_push *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1765,6 +1924,7 @@ static enum ndr_err_code ndr_pull_PNP_GetLogConfPriority(struct ndr_pull *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1784,6 +1944,7 @@ _PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetLogConfPriority"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1794,6 +1955,7 @@ static enum ndr_err_code ndr_push_PNP_AddResDes(struct ndr_push *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1803,6 +1965,7 @@ static enum ndr_err_code ndr_pull_PNP_AddResDes(struct ndr_pull *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1822,6 +1985,7 @@ _PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, i if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_AddResDes"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1832,6 +1996,7 @@ static enum ndr_err_code ndr_push_PNP_FreeResDes(struct ndr_push *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1841,6 +2006,7 @@ static enum ndr_err_code ndr_pull_PNP_FreeResDes(struct ndr_pull *ndr, int flags if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1860,6 +2026,7 @@ _PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_FreeResDes"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1870,6 +2037,7 @@ static enum ndr_err_code ndr_push_PNP_GetNextResDes(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1879,6 +2047,7 @@ static enum ndr_err_code ndr_pull_PNP_GetNextResDes(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1898,6 +2067,7 @@ _PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetNextResDes"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1908,6 +2078,7 @@ static enum ndr_err_code ndr_push_PNP_GetResDesData(struct ndr_push *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1917,6 +2088,7 @@ static enum ndr_err_code ndr_pull_PNP_GetResDesData(struct ndr_pull *ndr, int fl if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1936,6 +2108,7 @@ _PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *nam if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetResDesData"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1946,6 +2119,7 @@ static enum ndr_err_code ndr_push_PNP_GetResDesDataSize(struct ndr_push *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1955,6 +2129,7 @@ static enum ndr_err_code ndr_pull_PNP_GetResDesDataSize(struct ndr_pull *ndr, in if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1974,6 +2149,7 @@ _PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetResDesDataSize"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -1984,6 +2160,7 @@ static enum ndr_err_code ndr_push_PNP_ModifyResDes(struct ndr_push *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -1993,6 +2170,7 @@ static enum ndr_err_code ndr_pull_PNP_ModifyResDes(struct ndr_pull *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2012,6 +2190,7 @@ _PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_ModifyResDes"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2022,6 +2201,7 @@ static enum ndr_err_code ndr_push_PNP_DetectResourceLimit(struct ndr_push *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2031,6 +2211,7 @@ static enum ndr_err_code ndr_pull_PNP_DetectResourceLimit(struct ndr_pull *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2050,6 +2231,7 @@ _PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const cha if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_DetectResourceLimit"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2060,6 +2242,7 @@ static enum ndr_err_code ndr_push_PNP_QueryResConfList(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2069,6 +2252,7 @@ static enum ndr_err_code ndr_pull_PNP_QueryResConfList(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2088,6 +2272,7 @@ _PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_QueryResConfList"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2098,6 +2283,7 @@ static enum ndr_err_code ndr_push_PNP_SetHwProf(struct ndr_push *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2107,6 +2293,7 @@ static enum ndr_err_code ndr_pull_PNP_SetHwProf(struct ndr_pull *ndr, int flags, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2126,6 +2313,7 @@ _PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, i if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_SetHwProf"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2136,6 +2324,7 @@ static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeData(struct ndr_push *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2145,6 +2334,7 @@ static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeData(struct ndr_pull *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2164,6 +2354,7 @@ _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeData"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2174,6 +2365,7 @@ static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeSize(struct ndr_push *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2183,6 +2375,7 @@ static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeSize(struct ndr_pull *n if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2202,6 +2395,7 @@ _PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeSize"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2212,6 +2406,7 @@ static enum ndr_err_code ndr_push_PNP_RunDetection(struct ndr_push *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2221,6 +2416,7 @@ static enum ndr_err_code ndr_pull_PNP_RunDetection(struct ndr_pull *ndr, int fla if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2240,6 +2436,7 @@ _PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RunDetection"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2250,6 +2447,7 @@ static enum ndr_err_code ndr_push_PNP_RegisterNotification(struct ndr_push *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2259,6 +2457,7 @@ static enum ndr_err_code ndr_pull_PNP_RegisterNotification(struct ndr_pull *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2278,6 +2477,7 @@ _PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const ch if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_RegisterNotification"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2288,6 +2488,7 @@ static enum ndr_err_code ndr_push_PNP_UnregisterNotification(struct ndr_push *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2297,6 +2498,7 @@ static enum ndr_err_code ndr_pull_PNP_UnregisterNotification(struct ndr_pull *nd if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2316,6 +2518,7 @@ _PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_UnregisterNotification"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2326,6 +2529,7 @@ static enum ndr_err_code ndr_push_PNP_GetCustomDevProp(struct ndr_push *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2335,6 +2539,7 @@ static enum ndr_err_code ndr_pull_PNP_GetCustomDevProp(struct ndr_pull *ndr, int if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2354,6 +2559,7 @@ _PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char * if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetCustomDevProp"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2364,6 +2570,7 @@ static enum ndr_err_code ndr_push_PNP_GetVersionInternal(struct ndr_push *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2373,6 +2580,7 @@ static enum ndr_err_code ndr_pull_PNP_GetVersionInternal(struct ndr_pull *ndr, i if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2392,6 +2600,7 @@ _PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetVersionInternal"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2402,6 +2611,7 @@ static enum ndr_err_code ndr_push_PNP_GetBlockedDriverInfo(struct ndr_push *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2411,6 +2621,7 @@ static enum ndr_err_code ndr_pull_PNP_GetBlockedDriverInfo(struct ndr_pull *ndr, if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2430,6 +2641,7 @@ _PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const ch if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetBlockedDriverInfo"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; @@ -2440,6 +2652,7 @@ static enum ndr_err_code ndr_push_PNP_GetServerSideDeviceInstallFlags(struct ndr if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2449,6 +2662,7 @@ static enum ndr_err_code ndr_pull_PNP_GetServerSideDeviceInstallFlags(struct ndr if (flags & NDR_IN) { } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; } @@ -2468,6 +2682,7 @@ _PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *nd if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetServerSideDeviceInstallFlags"); ndr->depth++; + ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } ndr->depth--; diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 43867c1bea..571b7466c2 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -7,327 +7,523 @@ struct PNP_Disconnect { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_Connect { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetVersion { - int _dummy_element; + struct { + uint16_t *version;/* [ref] */ + WERROR result; + } out; + }; struct PNP_GetGlobalState { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_InitDetection { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_ReportLogOn { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_ValidateDeviceInstance { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetRootDeviceInstance { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetRelatedDeviceInstance { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_EnumerateSubKeys { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetDeviceList { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetDeviceListSize { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetDepth { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetDeviceRegProp { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_SetDeviceRegProp { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetClassInstance { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_CreateKey { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_DeleteRegistryKey { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetClassCount { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetClassName { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_DeleteClassKey { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetInterfaceDeviceAlias { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetInterfaceDeviceList { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetInterfaceDeviceListSize { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RegisterDeviceClassAssociation { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_UnregisterDeviceClassAssociation { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetClassRegProp { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_SetClassRegProp { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_CreateDevInst { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_DeviceInstanceAction { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetDeviceStatus { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_SetDeviceProblem { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_DisableDevInst { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_UninstallDevInst { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_AddID { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RegisterDriver { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_QueryRemove { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RequestDeviceEject { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_IsDockStationPresent { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RequestEjectPC { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_HwProfFlags { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetHwProfInfo { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_AddEmptyLogConf { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_FreeLogConf { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetFirstLogConf { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetNextLogConf { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetLogConfPriority { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_AddResDes { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_FreeResDes { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetNextResDes { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetResDesData { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetResDesDataSize { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_ModifyResDes { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_DetectResourceLimit { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_QueryResConfList { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_SetHwProf { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_QueryArbitratorFreeData { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_QueryArbitratorFreeSize { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RunDetection { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_RegisterNotification { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_UnregisterNotification { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetCustomDevProp { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetVersionInternal { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetBlockedDriverInfo { - int _dummy_element; + struct { + WERROR result; + } out; + }; struct PNP_GetServerSideDeviceInstallFlags { - int _dummy_element; + struct { + WERROR result; + } out; + }; #endif /* _HEADER_ntsvcs */ diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c index f4689e0bbb..7bbf9d1bfa 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.c +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -44,7 +44,7 @@ static bool api_PNP_Disconnect(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_Disconnect, r); } - _PNP_Disconnect(p, r); + r->out.result = _PNP_Disconnect(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -117,7 +117,7 @@ static bool api_PNP_Connect(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_Connect, r); } - _PNP_Connect(p, r); + r->out.result = _PNP_Connect(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -190,7 +190,14 @@ static bool api_PNP_GetVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetVersion, r); } - _PNP_GetVersion(p, r); + ZERO_STRUCT(r->out); + r->out.version = talloc_zero(r, uint16_t); + if (r->out.version == NULL) { + talloc_free(r); + return false; + } + + r->out.result = _PNP_GetVersion(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -263,7 +270,7 @@ static bool api_PNP_GetGlobalState(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, r); } - _PNP_GetGlobalState(p, r); + r->out.result = _PNP_GetGlobalState(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -336,7 +343,7 @@ static bool api_PNP_InitDetection(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_InitDetection, r); } - _PNP_InitDetection(p, r); + r->out.result = _PNP_InitDetection(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -409,7 +416,7 @@ static bool api_PNP_ReportLogOn(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, r); } - _PNP_ReportLogOn(p, r); + r->out.result = _PNP_ReportLogOn(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -482,7 +489,7 @@ static bool api_PNP_ValidateDeviceInstance(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, r); } - _PNP_ValidateDeviceInstance(p, r); + r->out.result = _PNP_ValidateDeviceInstance(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -555,7 +562,7 @@ static bool api_PNP_GetRootDeviceInstance(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, r); } - _PNP_GetRootDeviceInstance(p, r); + r->out.result = _PNP_GetRootDeviceInstance(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -628,7 +635,7 @@ static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, r); } - _PNP_GetRelatedDeviceInstance(p, r); + r->out.result = _PNP_GetRelatedDeviceInstance(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -701,7 +708,7 @@ static bool api_PNP_EnumerateSubKeys(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, r); } - _PNP_EnumerateSubKeys(p, r); + r->out.result = _PNP_EnumerateSubKeys(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -774,7 +781,7 @@ static bool api_PNP_GetDeviceList(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r); } - _PNP_GetDeviceList(p, r); + r->out.result = _PNP_GetDeviceList(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -847,7 +854,7 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r); } - _PNP_GetDeviceListSize(p, r); + r->out.result = _PNP_GetDeviceListSize(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -920,7 +927,7 @@ static bool api_PNP_GetDepth(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDepth, r); } - _PNP_GetDepth(p, r); + r->out.result = _PNP_GetDepth(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -993,7 +1000,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r); } - _PNP_GetDeviceRegProp(p, r); + r->out.result = _PNP_GetDeviceRegProp(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1066,7 +1073,7 @@ static bool api_PNP_SetDeviceRegProp(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r); } - _PNP_SetDeviceRegProp(p, r); + r->out.result = _PNP_SetDeviceRegProp(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1139,7 +1146,7 @@ static bool api_PNP_GetClassInstance(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r); } - _PNP_GetClassInstance(p, r); + r->out.result = _PNP_GetClassInstance(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1212,7 +1219,7 @@ static bool api_PNP_CreateKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_CreateKey, r); } - _PNP_CreateKey(p, r); + r->out.result = _PNP_CreateKey(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1285,7 +1292,7 @@ static bool api_PNP_DeleteRegistryKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r); } - _PNP_DeleteRegistryKey(p, r); + r->out.result = _PNP_DeleteRegistryKey(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1358,7 +1365,7 @@ static bool api_PNP_GetClassCount(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r); } - _PNP_GetClassCount(p, r); + r->out.result = _PNP_GetClassCount(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1431,7 +1438,7 @@ static bool api_PNP_GetClassName(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetClassName, r); } - _PNP_GetClassName(p, r); + r->out.result = _PNP_GetClassName(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1504,7 +1511,7 @@ static bool api_PNP_DeleteClassKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r); } - _PNP_DeleteClassKey(p, r); + r->out.result = _PNP_DeleteClassKey(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1577,7 +1584,7 @@ static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r); } - _PNP_GetInterfaceDeviceAlias(p, r); + r->out.result = _PNP_GetInterfaceDeviceAlias(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1650,7 +1657,7 @@ static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r); } - _PNP_GetInterfaceDeviceList(p, r); + r->out.result = _PNP_GetInterfaceDeviceList(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1723,7 +1730,7 @@ static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r); } - _PNP_GetInterfaceDeviceListSize(p, r); + r->out.result = _PNP_GetInterfaceDeviceListSize(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1796,7 +1803,7 @@ static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r); } - _PNP_RegisterDeviceClassAssociation(p, r); + r->out.result = _PNP_RegisterDeviceClassAssociation(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1869,7 +1876,7 @@ static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r); } - _PNP_UnregisterDeviceClassAssociation(p, r); + r->out.result = _PNP_UnregisterDeviceClassAssociation(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -1942,7 +1949,7 @@ static bool api_PNP_GetClassRegProp(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r); } - _PNP_GetClassRegProp(p, r); + r->out.result = _PNP_GetClassRegProp(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2015,7 +2022,7 @@ static bool api_PNP_SetClassRegProp(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r); } - _PNP_SetClassRegProp(p, r); + r->out.result = _PNP_SetClassRegProp(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2088,7 +2095,7 @@ static bool api_PNP_CreateDevInst(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r); } - _PNP_CreateDevInst(p, r); + r->out.result = _PNP_CreateDevInst(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2161,7 +2168,7 @@ static bool api_PNP_DeviceInstanceAction(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r); } - _PNP_DeviceInstanceAction(p, r); + r->out.result = _PNP_DeviceInstanceAction(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2234,7 +2241,7 @@ static bool api_PNP_GetDeviceStatus(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r); } - _PNP_GetDeviceStatus(p, r); + r->out.result = _PNP_GetDeviceStatus(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2307,7 +2314,7 @@ static bool api_PNP_SetDeviceProblem(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r); } - _PNP_SetDeviceProblem(p, r); + r->out.result = _PNP_SetDeviceProblem(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2380,7 +2387,7 @@ static bool api_PNP_DisableDevInst(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r); } - _PNP_DisableDevInst(p, r); + r->out.result = _PNP_DisableDevInst(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2453,7 +2460,7 @@ static bool api_PNP_UninstallDevInst(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r); } - _PNP_UninstallDevInst(p, r); + r->out.result = _PNP_UninstallDevInst(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2526,7 +2533,7 @@ static bool api_PNP_AddID(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_AddID, r); } - _PNP_AddID(p, r); + r->out.result = _PNP_AddID(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2599,7 +2606,7 @@ static bool api_PNP_RegisterDriver(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r); } - _PNP_RegisterDriver(p, r); + r->out.result = _PNP_RegisterDriver(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2672,7 +2679,7 @@ static bool api_PNP_QueryRemove(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r); } - _PNP_QueryRemove(p, r); + r->out.result = _PNP_QueryRemove(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2745,7 +2752,7 @@ static bool api_PNP_RequestDeviceEject(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r); } - _PNP_RequestDeviceEject(p, r); + r->out.result = _PNP_RequestDeviceEject(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2818,7 +2825,7 @@ static bool api_PNP_IsDockStationPresent(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r); } - _PNP_IsDockStationPresent(p, r); + r->out.result = _PNP_IsDockStationPresent(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2891,7 +2898,7 @@ static bool api_PNP_RequestEjectPC(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r); } - _PNP_RequestEjectPC(p, r); + r->out.result = _PNP_RequestEjectPC(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -2964,7 +2971,7 @@ static bool api_PNP_HwProfFlags(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r); } - _PNP_HwProfFlags(p, r); + r->out.result = _PNP_HwProfFlags(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3037,7 +3044,7 @@ static bool api_PNP_GetHwProfInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r); } - _PNP_GetHwProfInfo(p, r); + r->out.result = _PNP_GetHwProfInfo(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3110,7 +3117,7 @@ static bool api_PNP_AddEmptyLogConf(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r); } - _PNP_AddEmptyLogConf(p, r); + r->out.result = _PNP_AddEmptyLogConf(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3183,7 +3190,7 @@ static bool api_PNP_FreeLogConf(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r); } - _PNP_FreeLogConf(p, r); + r->out.result = _PNP_FreeLogConf(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3256,7 +3263,7 @@ static bool api_PNP_GetFirstLogConf(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r); } - _PNP_GetFirstLogConf(p, r); + r->out.result = _PNP_GetFirstLogConf(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3329,7 +3336,7 @@ static bool api_PNP_GetNextLogConf(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r); } - _PNP_GetNextLogConf(p, r); + r->out.result = _PNP_GetNextLogConf(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3402,7 +3409,7 @@ static bool api_PNP_GetLogConfPriority(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r); } - _PNP_GetLogConfPriority(p, r); + r->out.result = _PNP_GetLogConfPriority(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3475,7 +3482,7 @@ static bool api_PNP_AddResDes(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_AddResDes, r); } - _PNP_AddResDes(p, r); + r->out.result = _PNP_AddResDes(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3548,7 +3555,7 @@ static bool api_PNP_FreeResDes(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r); } - _PNP_FreeResDes(p, r); + r->out.result = _PNP_FreeResDes(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3621,7 +3628,7 @@ static bool api_PNP_GetNextResDes(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r); } - _PNP_GetNextResDes(p, r); + r->out.result = _PNP_GetNextResDes(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3694,7 +3701,7 @@ static bool api_PNP_GetResDesData(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r); } - _PNP_GetResDesData(p, r); + r->out.result = _PNP_GetResDesData(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3767,7 +3774,7 @@ static bool api_PNP_GetResDesDataSize(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r); } - _PNP_GetResDesDataSize(p, r); + r->out.result = _PNP_GetResDesDataSize(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3840,7 +3847,7 @@ static bool api_PNP_ModifyResDes(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r); } - _PNP_ModifyResDes(p, r); + r->out.result = _PNP_ModifyResDes(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3913,7 +3920,7 @@ static bool api_PNP_DetectResourceLimit(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r); } - _PNP_DetectResourceLimit(p, r); + r->out.result = _PNP_DetectResourceLimit(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -3986,7 +3993,7 @@ static bool api_PNP_QueryResConfList(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r); } - _PNP_QueryResConfList(p, r); + r->out.result = _PNP_QueryResConfList(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4059,7 +4066,7 @@ static bool api_PNP_SetHwProf(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r); } - _PNP_SetHwProf(p, r); + r->out.result = _PNP_SetHwProf(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4132,7 +4139,7 @@ static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r); } - _PNP_QueryArbitratorFreeData(p, r); + r->out.result = _PNP_QueryArbitratorFreeData(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4205,7 +4212,7 @@ static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r); } - _PNP_QueryArbitratorFreeSize(p, r); + r->out.result = _PNP_QueryArbitratorFreeSize(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4278,7 +4285,7 @@ static bool api_PNP_RunDetection(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RunDetection, r); } - _PNP_RunDetection(p, r); + r->out.result = _PNP_RunDetection(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4351,7 +4358,7 @@ static bool api_PNP_RegisterNotification(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r); } - _PNP_RegisterNotification(p, r); + r->out.result = _PNP_RegisterNotification(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4424,7 +4431,7 @@ static bool api_PNP_UnregisterNotification(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r); } - _PNP_UnregisterNotification(p, r); + r->out.result = _PNP_UnregisterNotification(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4497,7 +4504,7 @@ static bool api_PNP_GetCustomDevProp(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r); } - _PNP_GetCustomDevProp(p, r); + r->out.result = _PNP_GetCustomDevProp(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4570,7 +4577,7 @@ static bool api_PNP_GetVersionInternal(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r); } - _PNP_GetVersionInternal(p, r); + r->out.result = _PNP_GetVersionInternal(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4643,7 +4650,7 @@ static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r); } - _PNP_GetBlockedDriverInfo(p, r); + r->out.result = _PNP_GetBlockedDriverInfo(p, r); if (p->rng_fault_state) { talloc_free(r); @@ -4716,7 +4723,7 @@ static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r); } - _PNP_GetServerSideDeviceInstallFlags(p, r); + r->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r); if (p->rng_fault_state) { talloc_free(r); diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.h b/source3/librpc/gen_ndr/srv_ntsvcs.h index 0bcd09183e..c3969b11da 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.h +++ b/source3/librpc/gen_ndr/srv_ntsvcs.h @@ -1,71 +1,71 @@ #include "librpc/gen_ndr/ndr_ntsvcs.h" #ifndef __SRV_NTSVCS__ #define __SRV_NTSVCS__ -void _PNP_Disconnect(pipes_struct *p, struct PNP_Disconnect *r); -void _PNP_Connect(pipes_struct *p, struct PNP_Connect *r); -void _PNP_GetVersion(pipes_struct *p, struct PNP_GetVersion *r); -void _PNP_GetGlobalState(pipes_struct *p, struct PNP_GetGlobalState *r); -void _PNP_InitDetection(pipes_struct *p, struct PNP_InitDetection *r); -void _PNP_ReportLogOn(pipes_struct *p, struct PNP_ReportLogOn *r); -void _PNP_ValidateDeviceInstance(pipes_struct *p, struct PNP_ValidateDeviceInstance *r); -void _PNP_GetRootDeviceInstance(pipes_struct *p, struct PNP_GetRootDeviceInstance *r); -void _PNP_GetRelatedDeviceInstance(pipes_struct *p, struct PNP_GetRelatedDeviceInstance *r); -void _PNP_EnumerateSubKeys(pipes_struct *p, struct PNP_EnumerateSubKeys *r); -void _PNP_GetDeviceList(pipes_struct *p, struct PNP_GetDeviceList *r); -void _PNP_GetDeviceListSize(pipes_struct *p, struct PNP_GetDeviceListSize *r); -void _PNP_GetDepth(pipes_struct *p, struct PNP_GetDepth *r); -void _PNP_GetDeviceRegProp(pipes_struct *p, struct PNP_GetDeviceRegProp *r); -void _PNP_SetDeviceRegProp(pipes_struct *p, struct PNP_SetDeviceRegProp *r); -void _PNP_GetClassInstance(pipes_struct *p, struct PNP_GetClassInstance *r); -void _PNP_CreateKey(pipes_struct *p, struct PNP_CreateKey *r); -void _PNP_DeleteRegistryKey(pipes_struct *p, struct PNP_DeleteRegistryKey *r); -void _PNP_GetClassCount(pipes_struct *p, struct PNP_GetClassCount *r); -void _PNP_GetClassName(pipes_struct *p, struct PNP_GetClassName *r); -void _PNP_DeleteClassKey(pipes_struct *p, struct PNP_DeleteClassKey *r); -void _PNP_GetInterfaceDeviceAlias(pipes_struct *p, struct PNP_GetInterfaceDeviceAlias *r); -void _PNP_GetInterfaceDeviceList(pipes_struct *p, struct PNP_GetInterfaceDeviceList *r); -void _PNP_GetInterfaceDeviceListSize(pipes_struct *p, struct PNP_GetInterfaceDeviceListSize *r); -void _PNP_RegisterDeviceClassAssociation(pipes_struct *p, struct PNP_RegisterDeviceClassAssociation *r); -void _PNP_UnregisterDeviceClassAssociation(pipes_struct *p, struct PNP_UnregisterDeviceClassAssociation *r); -void _PNP_GetClassRegProp(pipes_struct *p, struct PNP_GetClassRegProp *r); -void _PNP_SetClassRegProp(pipes_struct *p, struct PNP_SetClassRegProp *r); -void _PNP_CreateDevInst(pipes_struct *p, struct PNP_CreateDevInst *r); -void _PNP_DeviceInstanceAction(pipes_struct *p, struct PNP_DeviceInstanceAction *r); -void _PNP_GetDeviceStatus(pipes_struct *p, struct PNP_GetDeviceStatus *r); -void _PNP_SetDeviceProblem(pipes_struct *p, struct PNP_SetDeviceProblem *r); -void _PNP_DisableDevInst(pipes_struct *p, struct PNP_DisableDevInst *r); -void _PNP_UninstallDevInst(pipes_struct *p, struct PNP_UninstallDevInst *r); -void _PNP_AddID(pipes_struct *p, struct PNP_AddID *r); -void _PNP_RegisterDriver(pipes_struct *p, struct PNP_RegisterDriver *r); -void _PNP_QueryRemove(pipes_struct *p, struct PNP_QueryRemove *r); -void _PNP_RequestDeviceEject(pipes_struct *p, struct PNP_RequestDeviceEject *r); -void _PNP_IsDockStationPresent(pipes_struct *p, struct PNP_IsDockStationPresent *r); -void _PNP_RequestEjectPC(pipes_struct *p, struct PNP_RequestEjectPC *r); -void _PNP_HwProfFlags(pipes_struct *p, struct PNP_HwProfFlags *r); -void _PNP_GetHwProfInfo(pipes_struct *p, struct PNP_GetHwProfInfo *r); -void _PNP_AddEmptyLogConf(pipes_struct *p, struct PNP_AddEmptyLogConf *r); -void _PNP_FreeLogConf(pipes_struct *p, struct PNP_FreeLogConf *r); -void _PNP_GetFirstLogConf(pipes_struct *p, struct PNP_GetFirstLogConf *r); -void _PNP_GetNextLogConf(pipes_struct *p, struct PNP_GetNextLogConf *r); -void _PNP_GetLogConfPriority(pipes_struct *p, struct PNP_GetLogConfPriority *r); -void _PNP_AddResDes(pipes_struct *p, struct PNP_AddResDes *r); -void _PNP_FreeResDes(pipes_struct *p, struct PNP_FreeResDes *r); -void _PNP_GetNextResDes(pipes_struct *p, struct PNP_GetNextResDes *r); -void _PNP_GetResDesData(pipes_struct *p, struct PNP_GetResDesData *r); -void _PNP_GetResDesDataSize(pipes_struct *p, struct PNP_GetResDesDataSize *r); -void _PNP_ModifyResDes(pipes_struct *p, struct PNP_ModifyResDes *r); -void _PNP_DetectResourceLimit(pipes_struct *p, struct PNP_DetectResourceLimit *r); -void _PNP_QueryResConfList(pipes_struct *p, struct PNP_QueryResConfList *r); -void _PNP_SetHwProf(pipes_struct *p, struct PNP_SetHwProf *r); -void _PNP_QueryArbitratorFreeData(pipes_struct *p, struct PNP_QueryArbitratorFreeData *r); -void _PNP_QueryArbitratorFreeSize(pipes_struct *p, struct PNP_QueryArbitratorFreeSize *r); -void _PNP_RunDetection(pipes_struct *p, struct PNP_RunDetection *r); -void _PNP_RegisterNotification(pipes_struct *p, struct PNP_RegisterNotification *r); -void _PNP_UnregisterNotification(pipes_struct *p, struct PNP_UnregisterNotification *r); -void _PNP_GetCustomDevProp(pipes_struct *p, struct PNP_GetCustomDevProp *r); -void _PNP_GetVersionInternal(pipes_struct *p, struct PNP_GetVersionInternal *r); -void _PNP_GetBlockedDriverInfo(pipes_struct *p, struct PNP_GetBlockedDriverInfo *r); -void _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p, struct PNP_GetServerSideDeviceInstallFlags *r); +WERROR _PNP_Disconnect(pipes_struct *p, struct PNP_Disconnect *r); +WERROR _PNP_Connect(pipes_struct *p, struct PNP_Connect *r); +WERROR _PNP_GetVersion(pipes_struct *p, struct PNP_GetVersion *r); +WERROR _PNP_GetGlobalState(pipes_struct *p, struct PNP_GetGlobalState *r); +WERROR _PNP_InitDetection(pipes_struct *p, struct PNP_InitDetection *r); +WERROR _PNP_ReportLogOn(pipes_struct *p, struct PNP_ReportLogOn *r); +WERROR _PNP_ValidateDeviceInstance(pipes_struct *p, struct PNP_ValidateDeviceInstance *r); +WERROR _PNP_GetRootDeviceInstance(pipes_struct *p, struct PNP_GetRootDeviceInstance *r); +WERROR _PNP_GetRelatedDeviceInstance(pipes_struct *p, struct PNP_GetRelatedDeviceInstance *r); +WERROR _PNP_EnumerateSubKeys(pipes_struct *p, struct PNP_EnumerateSubKeys *r); +WERROR _PNP_GetDeviceList(pipes_struct *p, struct PNP_GetDeviceList *r); +WERROR _PNP_GetDeviceListSize(pipes_struct *p, struct PNP_GetDeviceListSize *r); +WERROR _PNP_GetDepth(pipes_struct *p, struct PNP_GetDepth *r); +WERROR _PNP_GetDeviceRegProp(pipes_struct *p, struct PNP_GetDeviceRegProp *r); +WERROR _PNP_SetDeviceRegProp(pipes_struct *p, struct PNP_SetDeviceRegProp *r); +WERROR _PNP_GetClassInstance(pipes_struct *p, struct PNP_GetClassInstance *r); +WERROR _PNP_CreateKey(pipes_struct *p, struct PNP_CreateKey *r); +WERROR _PNP_DeleteRegistryKey(pipes_struct *p, struct PNP_DeleteRegistryKey *r); +WERROR _PNP_GetClassCount(pipes_struct *p, struct PNP_GetClassCount *r); +WERROR _PNP_GetClassName(pipes_struct *p, struct PNP_GetClassName *r); +WERROR _PNP_DeleteClassKey(pipes_struct *p, struct PNP_DeleteClassKey *r); +WERROR _PNP_GetInterfaceDeviceAlias(pipes_struct *p, struct PNP_GetInterfaceDeviceAlias *r); +WERROR _PNP_GetInterfaceDeviceList(pipes_struct *p, struct PNP_GetInterfaceDeviceList *r); +WERROR _PNP_GetInterfaceDeviceListSize(pipes_struct *p, struct PNP_GetInterfaceDeviceListSize *r); +WERROR _PNP_RegisterDeviceClassAssociation(pipes_struct *p, struct PNP_RegisterDeviceClassAssociation *r); +WERROR _PNP_UnregisterDeviceClassAssociation(pipes_struct *p, struct PNP_UnregisterDeviceClassAssociation *r); +WERROR _PNP_GetClassRegProp(pipes_struct *p, struct PNP_GetClassRegProp *r); +WERROR _PNP_SetClassRegProp(pipes_struct *p, struct PNP_SetClassRegProp *r); +WERROR _PNP_CreateDevInst(pipes_struct *p, struct PNP_CreateDevInst *r); +WERROR _PNP_DeviceInstanceAction(pipes_struct *p, struct PNP_DeviceInstanceAction *r); +WERROR _PNP_GetDeviceStatus(pipes_struct *p, struct PNP_GetDeviceStatus *r); +WERROR _PNP_SetDeviceProblem(pipes_struct *p, struct PNP_SetDeviceProblem *r); +WERROR _PNP_DisableDevInst(pipes_struct *p, struct PNP_DisableDevInst *r); +WERROR _PNP_UninstallDevInst(pipes_struct *p, struct PNP_UninstallDevInst *r); +WERROR _PNP_AddID(pipes_struct *p, struct PNP_AddID *r); +WERROR _PNP_RegisterDriver(pipes_struct *p, struct PNP_RegisterDriver *r); +WERROR _PNP_QueryRemove(pipes_struct *p, struct PNP_QueryRemove *r); +WERROR _PNP_RequestDeviceEject(pipes_struct *p, struct PNP_RequestDeviceEject *r); +WERROR _PNP_IsDockStationPresent(pipes_struct *p, struct PNP_IsDockStationPresent *r); +WERROR _PNP_RequestEjectPC(pipes_struct *p, struct PNP_RequestEjectPC *r); +WERROR _PNP_HwProfFlags(pipes_struct *p, struct PNP_HwProfFlags *r); +WERROR _PNP_GetHwProfInfo(pipes_struct *p, struct PNP_GetHwProfInfo *r); +WERROR _PNP_AddEmptyLogConf(pipes_struct *p, struct PNP_AddEmptyLogConf *r); +WERROR _PNP_FreeLogConf(pipes_struct *p, struct PNP_FreeLogConf *r); +WERROR _PNP_GetFirstLogConf(pipes_struct *p, struct PNP_GetFirstLogConf *r); +WERROR _PNP_GetNextLogConf(pipes_struct *p, struct PNP_GetNextLogConf *r); +WERROR _PNP_GetLogConfPriority(pipes_struct *p, struct PNP_GetLogConfPriority *r); +WERROR _PNP_AddResDes(pipes_struct *p, struct PNP_AddResDes *r); +WERROR _PNP_FreeResDes(pipes_struct *p, struct PNP_FreeResDes *r); +WERROR _PNP_GetNextResDes(pipes_struct *p, struct PNP_GetNextResDes *r); +WERROR _PNP_GetResDesData(pipes_struct *p, struct PNP_GetResDesData *r); +WERROR _PNP_GetResDesDataSize(pipes_struct *p, struct PNP_GetResDesDataSize *r); +WERROR _PNP_ModifyResDes(pipes_struct *p, struct PNP_ModifyResDes *r); +WERROR _PNP_DetectResourceLimit(pipes_struct *p, struct PNP_DetectResourceLimit *r); +WERROR _PNP_QueryResConfList(pipes_struct *p, struct PNP_QueryResConfList *r); +WERROR _PNP_SetHwProf(pipes_struct *p, struct PNP_SetHwProf *r); +WERROR _PNP_QueryArbitratorFreeData(pipes_struct *p, struct PNP_QueryArbitratorFreeData *r); +WERROR _PNP_QueryArbitratorFreeSize(pipes_struct *p, struct PNP_QueryArbitratorFreeSize *r); +WERROR _PNP_RunDetection(pipes_struct *p, struct PNP_RunDetection *r); +WERROR _PNP_RegisterNotification(pipes_struct *p, struct PNP_RegisterNotification *r); +WERROR _PNP_UnregisterNotification(pipes_struct *p, struct PNP_UnregisterNotification *r); +WERROR _PNP_GetCustomDevProp(pipes_struct *p, struct PNP_GetCustomDevProp *r); +WERROR _PNP_GetVersionInternal(pipes_struct *p, struct PNP_GetVersionInternal *r); +WERROR _PNP_GetBlockedDriverInfo(pipes_struct *p, struct PNP_GetBlockedDriverInfo *r); +WERROR _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p, struct PNP_GetServerSideDeviceInstallFlags *r); void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns); NTSTATUS rpc_ntsvcs_init(void); #endif /* __SRV_NTSVCS__ */ -- cgit From d7382054d7a82cf85505205370996d2abf1e62ae Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 23:44:50 +0100 Subject: Re-run make idl. Guenther (This used to be commit 6f396608bda65c98dfbb13f6e8661a8246c649a2) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 4 ++++ source3/librpc/gen_ndr/cli_ntsvcs.h | 2 ++ source3/librpc/gen_ndr/ndr_ntsvcs.c | 21 +++++++++++++++++++++ source3/librpc/gen_ndr/ntsvcs.h | 5 +++++ 4 files changed, 32 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index da43d451e6..c21910c95b 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -262,12 +262,16 @@ NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *devicepath, + uint32_t flags, WERROR *werror) { struct PNP_ValidateDeviceInstance r; NTSTATUS status; /* In parameters */ + r.in.devicepath = devicepath; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &r); diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index 852cc812e9..666ea9bac8 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -22,6 +22,8 @@ NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *devicepath, + uint32_t flags, WERROR *werror); NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index 73dd4d346c..be55319947 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -272,6 +272,14 @@ _PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_PNP_ValidateDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_ValidateDeviceInstance *r) { if (flags & NDR_IN) { + if (r->in.devicepath == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -282,6 +290,14 @@ static enum ndr_err_code ndr_push_PNP_ValidateDeviceInstance(struct ndr_push *nd static enum ndr_err_code ndr_pull_PNP_ValidateDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_ValidateDeviceInstance *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath)); + if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicepath), ndr_get_array_length(ndr, &r->in.devicepath)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -299,6 +315,11 @@ _PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "PNP_ValidateDeviceInstance"); ndr->depth++; + ndr_print_ptr(ndr, "devicepath", r->in.devicepath); + ndr->depth++; + ndr_print_string(ndr, "devicepath", r->in.devicepath); + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 571b7466c2..477d6adf7f 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -56,6 +56,11 @@ struct PNP_ReportLogOn { struct PNP_ValidateDeviceInstance { + struct { + const char *devicepath;/* [ref,charset(UTF16)] */ + uint32_t flags; + } in; + struct { WERROR result; } out; -- cgit From 560725930663e635b5b602dbb712b602d9c5f35b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 00:26:10 +0100 Subject: Re-run make idl. Guenther (This used to be commit c7c89317db3774e75013dec67e44100d7276c939) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 6 ++++ source3/librpc/gen_ndr/cli_ntsvcs.h | 3 ++ source3/librpc/gen_ndr/ndr_ntsvcs.c | 56 +++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ntsvcs.h | 6 ++++ source3/librpc/gen_ndr/srv_ntsvcs.c | 7 +++++ 5 files changed, 78 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index c21910c95b..7f27580605 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -476,12 +476,17 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *devicename, + uint32_t *size, + uint32_t flags, WERROR *werror) { struct PNP_GetDeviceListSize r; NTSTATUS status; /* In parameters */ + r.in.devicename = devicename; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r); @@ -507,6 +512,7 @@ NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, } /* Return variables */ + *size = *r.out.size; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index 666ea9bac8..911200055f 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -39,6 +39,9 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *devicename, + uint32_t *size, + uint32_t flags, WERROR *werror); NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index be55319947..c66ec2aa87 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -498,8 +498,20 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceListSize *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.devicename)); + if (r->in.devicename) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicename, ndr_charset_length(r->in.devicename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { + if (r->out.size == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -507,9 +519,42 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, in static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceListSize *r) { + uint32_t _ptr_devicename; + TALLOC_CTX *_mem_save_devicename_0; + TALLOC_CTX *_mem_save_size_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devicename)); + if (_ptr_devicename) { + NDR_PULL_ALLOC(ndr, r->in.devicename); + } else { + r->in.devicename = NULL; + } + if (r->in.devicename) { + _mem_save_devicename_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.devicename, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicename)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicename)); + if (ndr_get_array_length(ndr, &r->in.devicename) > ndr_get_array_size(ndr, &r->in.devicename)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicename), ndr_get_array_length(ndr, &r->in.devicename)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicename, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devicename_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.size); + ZERO_STRUCTP(r->out.size); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.size); + } + _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.size, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -525,11 +570,22 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "PNP_GetDeviceListSize"); ndr->depth++; + ndr_print_ptr(ndr, "devicename", r->in.devicename); + ndr->depth++; + if (r->in.devicename) { + ndr_print_string(ndr, "devicename", r->in.devicename); + } + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceListSize"); ndr->depth++; + ndr_print_ptr(ndr, "size", r->out.size); + ndr->depth++; + ndr_print_uint32(ndr, "size", *r->out.size); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 477d6adf7f..2384011789 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -102,6 +102,12 @@ struct PNP_GetDeviceList { struct PNP_GetDeviceListSize { struct { + const char *devicename;/* [unique,charset(UTF16)] */ + uint32_t flags; + } in; + + struct { + uint32_t *size;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c index 7bbf9d1bfa..608353c480 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.c +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -854,6 +854,13 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r); } + ZERO_STRUCT(r->out); + r->out.size = talloc_zero(r, uint32_t); + if (r->out.size == NULL) { + talloc_free(r); + return false; + } + r->out.result = _PNP_GetDeviceListSize(p, r); if (p->rng_fault_state) { -- cgit From b7e7de556cda6b6862f4569bf68e5b96896bf024 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 01:37:06 +0100 Subject: Re-run make idl. Guenther (This used to be commit 5e0f27c2a717ab2daa3b25c450c9cc560aad6218) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 24 +++++ source3/librpc/gen_ndr/cli_ntsvcs.h | 9 ++ source3/librpc/gen_ndr/ndr_ntsvcs.c | 197 ++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ntsvcs.h | 14 +++ source3/librpc/gen_ndr/srv_ntsvcs.c | 9 ++ 5 files changed, 253 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index 7f27580605..2efcf6b6c9 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -1700,12 +1700,29 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + uint32_t unknown1, + const char *devicepath, + uint32_t unknown2, + uint32_t *unknown3, + uint16_t *unknown4, + const char *unknown5, + const char **unknown5a, + uint32_t unknown6, + uint32_t unknown7, WERROR *werror) { struct PNP_HwProfFlags r; NTSTATUS status; /* In parameters */ + r.in.unknown1 = unknown1; + r.in.devicepath = devicepath; + r.in.unknown2 = unknown2; + r.in.unknown3 = unknown3; + r.in.unknown4 = unknown4; + r.in.unknown5 = unknown5; + r.in.unknown6 = unknown6; + r.in.unknown7 = unknown7; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r); @@ -1731,6 +1748,13 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, } /* Return variables */ + *unknown3 = *r.out.unknown3; + if (unknown4 && r.out.unknown4) { + *unknown4 = *r.out.unknown4; + } + if (unknown5a && r.out.unknown5a) { + *unknown5a = *r.out.unknown5a; + } /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index 911200055f..84aad76139 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -129,6 +129,15 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + uint32_t unknown1, + const char *devicepath, + uint32_t unknown2, + uint32_t *unknown3, + uint16_t *unknown4, + const char *unknown5, + const char **unknown5a, + uint32_t unknown6, + uint32_t unknown7, WERROR *werror); NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index c66ec2aa87..2b299964e5 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -1743,8 +1743,52 @@ _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *na static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flags, const struct PNP_HwProfFlags *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); + if (r->in.devicepath == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); + if (r->in.unknown3 == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown3)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown4)); + if (r->in.unknown4) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.unknown4)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown5)); + if (r->in.unknown5) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown5, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown5, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown5, ndr_charset_length(r->in.unknown5, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown6)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown7)); } if (flags & NDR_OUT) { + if (r->out.unknown3 == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown3)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown4)); + if (r->out.unknown4) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.unknown4)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown5a)); + if (r->out.unknown5a) { + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown5a)); + if (*r->out.unknown5a) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.unknown5a, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.unknown5a, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.unknown5a, ndr_charset_length(*r->out.unknown5a, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -1752,9 +1796,117 @@ static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flag static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flags, struct PNP_HwProfFlags *r) { + uint32_t _ptr_unknown4; + uint32_t _ptr_unknown5; + uint32_t _ptr_unknown5a; + TALLOC_CTX *_mem_save_unknown3_0; + TALLOC_CTX *_mem_save_unknown4_0; + TALLOC_CTX *_mem_save_unknown5_0; + TALLOC_CTX *_mem_save_unknown5a_0; + TALLOC_CTX *_mem_save_unknown5a_1; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath)); + if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicepath), ndr_get_array_length(ndr, &r->in.devicepath)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.unknown3); + } + _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown3, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown3)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4)); + if (_ptr_unknown4) { + NDR_PULL_ALLOC(ndr, r->in.unknown4); + } else { + r->in.unknown4 = NULL; + } + if (r->in.unknown4) { + _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown4, 0); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.unknown4)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5)); + if (_ptr_unknown5) { + NDR_PULL_ALLOC(ndr, r->in.unknown5); + } else { + r->in.unknown5 = NULL; + } + if (r->in.unknown5) { + _mem_save_unknown5_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown5, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown5)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown5)); + if (ndr_get_array_length(ndr, &r->in.unknown5) > ndr_get_array_size(ndr, &r->in.unknown5)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.unknown5), ndr_get_array_length(ndr, &r->in.unknown5)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.unknown5), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown5, ndr_get_array_length(ndr, &r->in.unknown5), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5_0, 0); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown6)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown7)); + NDR_PULL_ALLOC(ndr, r->out.unknown3); + *r->out.unknown3 = *r->in.unknown3; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.unknown3); + } + _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown3, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown3)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4)); + if (_ptr_unknown4) { + NDR_PULL_ALLOC(ndr, r->out.unknown4); + } else { + r->out.unknown4 = NULL; + } + if (r->out.unknown4) { + _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown4, 0); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.unknown4)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0); + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5a)); + if (_ptr_unknown5a) { + NDR_PULL_ALLOC(ndr, r->out.unknown5a); + } else { + r->out.unknown5a = NULL; + } + if (r->out.unknown5a) { + _mem_save_unknown5a_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown5a, 0); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5a)); + if (_ptr_unknown5a) { + NDR_PULL_ALLOC(ndr, *r->out.unknown5a); + } else { + *r->out.unknown5a = NULL; + } + if (*r->out.unknown5a) { + _mem_save_unknown5a_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown5a, 0); + NDR_CHECK(ndr_pull_array_size(ndr, r->out.unknown5a)); + NDR_CHECK(ndr_pull_array_length(ndr, r->out.unknown5a)); + if (ndr_get_array_length(ndr, r->out.unknown5a) > ndr_get_array_size(ndr, r->out.unknown5a)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.unknown5a), ndr_get_array_length(ndr, r->out.unknown5a)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.unknown5a), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.unknown5a, ndr_get_array_length(ndr, r->out.unknown5a), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5a_1, 0); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5a_0, 0); + } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -1770,11 +1922,56 @@ _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "PNP_HwProfFlags"); ndr->depth++; + ndr_print_uint32(ndr, "unknown1", r->in.unknown1); + ndr_print_ptr(ndr, "devicepath", r->in.devicepath); + ndr->depth++; + ndr_print_string(ndr, "devicepath", r->in.devicepath); + ndr->depth--; + ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_ptr(ndr, "unknown3", r->in.unknown3); + ndr->depth++; + ndr_print_uint32(ndr, "unknown3", *r->in.unknown3); + ndr->depth--; + ndr_print_ptr(ndr, "unknown4", r->in.unknown4); + ndr->depth++; + if (r->in.unknown4) { + ndr_print_uint16(ndr, "unknown4", *r->in.unknown4); + } + ndr->depth--; + ndr_print_ptr(ndr, "unknown5", r->in.unknown5); + ndr->depth++; + if (r->in.unknown5) { + ndr_print_string(ndr, "unknown5", r->in.unknown5); + } + ndr->depth--; + ndr_print_uint32(ndr, "unknown6", r->in.unknown6); + ndr_print_uint32(ndr, "unknown7", r->in.unknown7); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_HwProfFlags"); ndr->depth++; + ndr_print_ptr(ndr, "unknown3", r->out.unknown3); + ndr->depth++; + ndr_print_uint32(ndr, "unknown3", *r->out.unknown3); + ndr->depth--; + ndr_print_ptr(ndr, "unknown4", r->out.unknown4); + ndr->depth++; + if (r->out.unknown4) { + ndr_print_uint16(ndr, "unknown4", *r->out.unknown4); + } + ndr->depth--; + ndr_print_ptr(ndr, "unknown5a", r->out.unknown5a); + ndr->depth++; + if (r->out.unknown5a) { + ndr_print_ptr(ndr, "unknown5a", *r->out.unknown5a); + ndr->depth++; + if (*r->out.unknown5a) { + ndr_print_string(ndr, "unknown5a", *r->out.unknown5a); + } + ndr->depth--; + } + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 2384011789..8f8af699f3 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -340,6 +340,20 @@ struct PNP_RequestEjectPC { struct PNP_HwProfFlags { struct { + uint32_t unknown1; + const char *devicepath;/* [ref,charset(UTF16)] */ + uint32_t unknown2; + const char *unknown5;/* [unique,charset(UTF16)] */ + uint32_t unknown6; + uint32_t unknown7; + uint32_t *unknown3;/* [ref] */ + uint16_t *unknown4;/* [unique] */ + } in; + + struct { + const char **unknown5a;/* [unique,charset(UTF16)] */ + uint32_t *unknown3;/* [ref] */ + uint16_t *unknown4;/* [unique] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c index 608353c480..b51f930414 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.c +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -2978,6 +2978,15 @@ static bool api_PNP_HwProfFlags(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r); } + ZERO_STRUCT(r->out); + r->out.unknown3 = r->in.unknown3; + r->out.unknown4 = r->in.unknown4; + r->out.unknown5a = talloc_zero(r, const char *); + if (r->out.unknown5a == NULL) { + talloc_free(r); + return false; + } + r->out.result = _PNP_HwProfFlags(p, r); if (p->rng_fault_state) { -- cgit From 2a84f31e286299f93b5561d5b0b9f81e0733e13e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 01:38:08 +0100 Subject: Re-run make idl. Guenther (This used to be commit cbc3f328d0deecdb7a6c2ff6088ab10ce7d0fbd5) --- source3/librpc/gen_ndr/cli_ntsvcs.c | 9 ++++ source3/librpc/gen_ndr/cli_ntsvcs.h | 4 ++ source3/librpc/gen_ndr/ndr_ntsvcs.c | 97 +++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/ndr_ntsvcs.h | 1 + source3/librpc/gen_ndr/ntsvcs.h | 14 ++++++ source3/librpc/gen_ndr/srv_ntsvcs.c | 2 + 6 files changed, 127 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index 2efcf6b6c9..5597fccdb5 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -1766,12 +1766,20 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + uint32_t idx, + struct PNP_HwProfInfo *info, + uint32_t unknown1, + uint32_t unknown2, WERROR *werror) { struct PNP_GetHwProfInfo r; NTSTATUS status; /* In parameters */ + r.in.idx = idx; + r.in.info = info; + r.in.unknown1 = unknown1; + r.in.unknown2 = unknown2; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r); @@ -1797,6 +1805,7 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, } /* Return variables */ + *info = *r.out.info; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index 84aad76139..33df63ee5d 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -141,6 +141,10 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + uint32_t idx, + struct PNP_HwProfInfo *info, + uint32_t unknown1, + uint32_t unknown2, WERROR *werror); NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index 2b299964e5..058b78104a 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -3,6 +3,59 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_ntsvcs.h" +static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_flags, const struct PNP_HwProfInfo *r) +{ + uint32_t cntr_unknown2_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown2[cntr_unknown2_0])); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_HwProfInfo(struct ndr_pull *ndr, int ndr_flags, struct PNP_HwProfInfo *r) +{ + uint32_t cntr_unknown2_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown2[cntr_unknown2_0])); + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r) +{ + uint32_t cntr_unknown2_0; + ndr_print_struct(ndr, name, "PNP_HwProfInfo"); + ndr->depth++; + ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr->print(ndr, "%s: ARRAY(%d)", "unknown2", 160); + ndr->depth++; + for (cntr_unknown2_0=0;cntr_unknown2_0<160;cntr_unknown2_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_unknown2_0); + if (idx_0) { + ndr_print_uint16(ndr, "unknown2", r->unknown2[cntr_unknown2_0]); + free(idx_0); + } + } + ndr->depth--; + ndr_print_uint32(ndr, "unknown3", r->unknown3); + ndr->depth--; +} + static enum ndr_err_code ndr_push_PNP_Disconnect(struct ndr_push *ndr, int flags, const struct PNP_Disconnect *r) { if (flags & NDR_IN) { @@ -1981,8 +2034,19 @@ _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int flags, const struct PNP_GetHwProfInfo *r) { if (flags & NDR_IN) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.idx)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); } if (flags & NDR_OUT) { + if (r->out.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_PNP_HwProfInfo(ndr, NDR_SCALARS, r->out.info)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -1990,9 +2054,31 @@ static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_PNP_GetHwProfInfo(struct ndr_pull *ndr, int flags, struct PNP_GetHwProfInfo *r) { + TALLOC_CTX *_mem_save_info_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.idx)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.info); + } + _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_PULL_ALLOC(ndr, r->out.info); + *r->out.info = *r->in.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_PNP_HwProfInfo(ndr, NDR_SCALARS, r->out.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -2008,11 +2094,22 @@ _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *nam if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "PNP_GetHwProfInfo"); ndr->depth++; + ndr_print_uint32(ndr, "idx", r->in.idx); + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_PNP_HwProfInfo(ndr, "info", r->in.info); + ndr->depth--; + ndr_print_uint32(ndr, "unknown1", r->in.unknown1); + ndr_print_uint32(ndr, "unknown2", r->in.unknown2); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetHwProfInfo"); ndr->depth++; + ndr_print_ptr(ndr, "info", r->out.info); + ndr->depth++; + ndr_print_PNP_HwProfInfo(ndr, "info", r->out.info); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.h b/source3/librpc/gen_ndr/ndr_ntsvcs.h index b415d6056b..0e3b6b91c4 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.h +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.h @@ -142,6 +142,7 @@ extern const struct ndr_interface_table ndr_table_ntsvcs; #define NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS (0x40) #define NDR_NTSVCS_CALL_COUNT (65) +void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r); void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r); void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r); void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r); diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 8f8af699f3..9cdfa656b4 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -5,6 +5,12 @@ #ifndef _HEADER_ntsvcs #define _HEADER_ntsvcs +struct PNP_HwProfInfo { + uint32_t unknown1; + uint16_t unknown2[160]; + uint32_t unknown3; +}; + struct PNP_Disconnect { struct { @@ -362,6 +368,14 @@ struct PNP_HwProfFlags { struct PNP_GetHwProfInfo { struct { + uint32_t idx; + uint32_t unknown1; + uint32_t unknown2; + struct PNP_HwProfInfo *info;/* [ref] */ + } in; + + struct { + struct PNP_HwProfInfo *info;/* [ref] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c index b51f930414..339de6c747 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.c +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -3060,6 +3060,8 @@ static bool api_PNP_GetHwProfInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r); } + ZERO_STRUCT(r->out); + r->out.info = r->in.info; r->out.result = _PNP_GetHwProfInfo(p, r); if (p->rng_fault_state) { -- cgit From 2bac665767804bd184878ad3cb54faa4da72d995 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 18 Feb 2008 16:52:56 +0100 Subject: Re-run make idl. Guenther (This used to be commit 1cac7b0f626b418909a5e7a79a1c6d335c10fbf3) --- source3/librpc/gen_ndr/cli_lsa.c | 4 +-- source3/librpc/gen_ndr/cli_lsa.h | 4 +-- source3/librpc/gen_ndr/lsa.h | 4 +-- source3/librpc/gen_ndr/ndr_lsa.c | 54 +++++++++++++++++++++++++++++++++++----- source3/librpc/gen_ndr/srv_lsa.c | 4 +-- 5 files changed, 56 insertions(+), 14 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 7f784622b5..b1609ea97b 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -2914,7 +2914,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray3 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, @@ -3290,7 +3290,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray3 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index 8513a9d035..7d69926484 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -316,7 +316,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray3 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, @@ -353,7 +353,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names, struct lsa_String *names, - struct lsa_RefDomainList *domains, + struct lsa_RefDomainList **domains, struct lsa_TransSidArray3 *sids, enum lsa_LookupNamesLevel level, uint32_t *count, diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 62f8f2c74a..cc7bca3150 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -1472,7 +1472,7 @@ struct lsa_LookupNames3 { } in; struct { - struct lsa_RefDomainList *domains;/* [ref] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; @@ -1576,7 +1576,7 @@ struct lsa_LookupNames4 { } in; struct { - struct lsa_RefDomainList *domains;/* [ref] */ + struct lsa_RefDomainList **domains;/* [ref] */ struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ NTSTATUS result; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index d5cbc0ec21..dc4918a6d7 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -10515,7 +10515,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f if (r->out.domains == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + } if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -10532,9 +10535,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r) { uint32_t cntr_names_0; + uint32_t _ptr_domains; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -10595,7 +10600,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f } _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); + if (_ptr_domains) { + NDR_PULL_ALLOC(ndr, *r->out.domains); + } else { + *r->out.domains = NULL; + } + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); @@ -10661,7 +10677,12 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; @@ -11241,7 +11262,10 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla if (r->out.domains == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains)); + if (*r->out.domains) { + NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + } if (r->out.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -11258,8 +11282,10 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r) { uint32_t cntr_names_0; + uint32_t _ptr_domains; TALLOC_CTX *_mem_save_names_0; TALLOC_CTX *_mem_save_domains_0; + TALLOC_CTX *_mem_save_domains_1; TALLOC_CTX *_mem_save_sids_0; TALLOC_CTX *_mem_save_count_0; if (flags & NDR_IN) { @@ -11313,7 +11339,18 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla } _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains)); + if (_ptr_domains) { + NDR_PULL_ALLOC(ndr, *r->out.domains); + } else { + *r->out.domains = NULL; + } + if (*r->out.domains) { + _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0); + NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.sids); @@ -11375,7 +11412,12 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "domains", r->out.domains); ndr->depth++; - ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains); + ndr_print_ptr(ndr, "domains", *r->out.domains); + ndr->depth++; + if (*r->out.domains) { + ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains); + } + ndr->depth--; ndr->depth--; ndr_print_ptr(ndr, "sids", r->out.sids); ndr->depth++; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index b21a825682..1ce0448469 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -5258,7 +5258,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; @@ -5940,7 +5940,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.domains = talloc_zero(r, struct lsa_RefDomainList); + r->out.domains = talloc_zero(r, struct lsa_RefDomainList *); if (r->out.domains == NULL) { talloc_free(r); return false; -- cgit From 9712e3c11c69e2a40ea7c156dd3515dafed833ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Feb 2008 10:54:59 +0100 Subject: make idl: Check return value of asprintf (This used to be commit d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a) --- source3/librpc/gen_ndr/ndr_dfs.c | 33 +++++-------- source3/librpc/gen_ndr/ndr_echo.c | 3 +- source3/librpc/gen_ndr/ndr_epmapper.c | 15 ++---- source3/librpc/gen_ndr/ndr_eventlog.c | 3 +- source3/librpc/gen_ndr/ndr_krb5pac.c | 6 +-- source3/librpc/gen_ndr/ndr_lsa.c | 57 ++++++++--------------- source3/librpc/gen_ndr/ndr_messaging.c | 3 +- source3/librpc/gen_ndr/ndr_netlogon.c | 78 +++++++++++-------------------- source3/librpc/gen_ndr/ndr_notify.c | 6 +-- source3/librpc/gen_ndr/ndr_ntsvcs.c | 3 +- source3/librpc/gen_ndr/ndr_samr.c | 36 +++++---------- source3/librpc/gen_ndr/ndr_security.c | 6 +-- source3/librpc/gen_ndr/ndr_srvsvc.c | 84 ++++++++++++---------------------- source3/librpc/gen_ndr/ndr_unixinfo.c | 6 +-- source3/librpc/gen_ndr/ndr_winreg.c | 6 +-- source3/librpc/gen_ndr/ndr_wkssvc.c | 27 ++++------- source3/librpc/gen_ndr/ndr_xattr.c | 3 +- 17 files changed, 125 insertions(+), 250 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index f5ce913bd2..2e9873e929 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -506,8 +506,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -670,8 +669,7 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -1079,8 +1077,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_stores_1=0;cntr_stores_1num_stores;cntr_stores_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_stores_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) { ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]); free(idx_1); } @@ -2271,8 +2268,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2358,8 +2354,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2445,8 +2440,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2532,8 +2526,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2619,8 +2612,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2706,8 +2698,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2793,8 +2784,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } @@ -2880,8 +2870,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_s_1=0;cntr_s_1count;cntr_s_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_s_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) { ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]); free(idx_1); } diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c index 67ff0f2df4..340167cf73 100644 --- a/source3/librpc/gen_ndr/ndr_echo.c +++ b/source3/librpc/gen_ndr/ndr_echo.c @@ -627,8 +627,7 @@ _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_surrounding_0=0;cntr_surrounding_0x;cntr_surrounding_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_surrounding_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_surrounding_0) != -1) { ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c index 4f9422ea57..2e709e11e0 100644 --- a/source3/librpc/gen_ndr/ndr_epmapper.c +++ b/source3/librpc/gen_ndr/ndr_epmapper.c @@ -1566,8 +1566,7 @@ _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_floors_0=0;cntr_floors_0num_floors;cntr_floors_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_floors_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_floors_0) != -1) { ndr_print_epm_floor(ndr, "floors", &r->floors[cntr_floors_0]); free(idx_0); } @@ -1849,8 +1848,7 @@ _PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int ndr->depth++; for (cntr_entries_0=0;cntr_entries_0in.num_ents;cntr_entries_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_entries_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]); free(idx_0); } @@ -1930,8 +1928,7 @@ _PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int ndr->depth++; for (cntr_entries_0=0;cntr_entries_0in.num_ents;cntr_entries_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_entries_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]); free(idx_0); } @@ -2131,8 +2128,7 @@ _PUBLIC_ void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int ndr->depth++; for (cntr_entries_0=0;cntr_entries_0<*r->out.num_ents;cntr_entries_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_entries_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { ndr_print_epm_entry_t(ndr, "entries", &r->out.entries[cntr_entries_0]); free(idx_0); } @@ -2321,8 +2317,7 @@ _PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int fla ndr->depth++; for (cntr_towers_0=0;cntr_towers_0<*r->out.num_towers;cntr_towers_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_towers_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_towers_0) != -1) { ndr_print_epm_twr_p_t(ndr, "towers", &r->out.towers[cntr_towers_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index 1b58eb66b8..c5461d99ab 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -176,8 +176,7 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_strings_0=0;cntr_strings_0num_of_strings;cntr_strings_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_strings_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) { ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c index 82b7803f80..7c4dba0b0a 100644 --- a/source3/librpc/gen_ndr/ndr_krb5pac.c +++ b/source3/librpc/gen_ndr/ndr_krb5pac.c @@ -442,8 +442,7 @@ _PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_buffers_0=0;cntr_buffers_0num_buffers;cntr_buffers_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_buffers_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) { ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]); free(idx_0); } @@ -645,8 +644,7 @@ _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_buffers_0=0;cntr_buffers_0num_buffers;cntr_buffers_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_buffers_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) { ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index dc4918a6d7..b54f43a353 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -221,8 +221,7 @@ _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, con ndr->depth++; for (cntr_names_1=0;cntr_names_1count;cntr_names_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_names_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) { ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]); free(idx_1); } @@ -453,8 +452,7 @@ _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, c ndr->depth++; for (cntr_privs_1=0;cntr_privs_1count;cntr_privs_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_privs_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) { ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]); free(idx_1); } @@ -789,8 +787,7 @@ _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_settings_1=0;cntr_settings_1count;cntr_settings_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_settings_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) { ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]); free(idx_1); } @@ -1622,8 +1619,7 @@ _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_sids_1=0;cntr_sids_1num_sids;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -1709,8 +1705,7 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_domains_1=0;cntr_domains_1count;cntr_domains_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_domains_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) { ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]); free(idx_1); } @@ -1862,8 +1857,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_sids_1=0;cntr_sids_1count;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -1954,8 +1948,7 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_domains_1=0;cntr_domains_1count;cntr_domains_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_domains_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) { ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]); free(idx_1); } @@ -2112,8 +2105,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_names_1=0;cntr_names_1count;cntr_names_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_names_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) { ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]); free(idx_1); } @@ -2213,8 +2205,7 @@ _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_set_0=0;cntr_set_0count;cntr_set_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_set_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) { ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]); free(idx_0); } @@ -3335,8 +3326,7 @@ _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_names_1=0;cntr_names_1count;cntr_names_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_names_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) { ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]); free(idx_1); } @@ -3422,8 +3412,7 @@ _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_domains_1=0;cntr_domains_1count;cntr_domains_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_domains_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) { ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]); free(idx_1); } @@ -3751,8 +3740,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_names_1=0;cntr_names_1count;cntr_names_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_names_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) { ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]); free(idx_1); } @@ -3874,8 +3862,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_sids_1=0;cntr_sids_1count;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -4024,8 +4011,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_sids_1=0;cntr_sids_1count;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -4447,8 +4433,7 @@ _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]); ndr->depth++; if (r->entries[cntr_entries_1]) { @@ -5842,8 +5827,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_names_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) { ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); free(idx_0); } @@ -10068,8 +10052,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_names_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) { ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); free(idx_0); } @@ -10652,8 +10635,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_names_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) { ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); free(idx_0); } @@ -11387,8 +11369,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_names_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) { ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_messaging.c b/source3/librpc/gen_ndr/ndr_messaging.c index 413421f770..db886316f1 100644 --- a/source3/librpc/gen_ndr/ndr_messaging.c +++ b/source3/librpc/gen_ndr/ndr_messaging.c @@ -103,8 +103,7 @@ _PUBLIC_ void ndr_print_messaging_array(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_messages_0=0;cntr_messages_0num_messages;cntr_messages_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_messages_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_messages_0) != -1) { ndr_print_messaging_rec(ndr, "messages", &r->messages[cntr_messages_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index fb5c4603ee..4c46fb0735 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -315,8 +315,7 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_bindata_1=0;cntr_bindata_1length / 2;cntr_bindata_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_bindata_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_bindata_1) != -1) { ndr_print_uint16(ndr, "bindata", r->bindata[cntr_bindata_1]); free(idx_1); } @@ -1111,8 +1110,7 @@ _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_unknown_0=0;cntr_unknown_0<7;cntr_unknown_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); free(idx_0); } @@ -1287,8 +1285,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, c ndr->depth++; for (cntr_sids_1=0;cntr_sids_1sidcount;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -1396,8 +1393,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c ndr->depth++; for (cntr_sids_1=0;cntr_sids_1sidcount;cntr_sids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) { ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]); free(idx_1); } @@ -1411,8 +1407,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c ndr->depth++; for (cntr_unknown4_0=0;cntr_unknown4_0<20;cntr_unknown4_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown4_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown4_0) != -1) { ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]); free(idx_0); } @@ -1558,8 +1553,7 @@ _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_expansionroom_0=0;cntr_expansionroom_0<10;cntr_expansionroom_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_expansionroom_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_expansionroom_0) != -1) { ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]); free(idx_0); } @@ -2810,8 +2804,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_rids_1=0;cntr_rids_1num_rids;cntr_rids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_rids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) { ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]); free(idx_1); } @@ -2826,8 +2819,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_attribs_1=0;cntr_attribs_1num_rids;cntr_attribs_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_attribs_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_attribs_1) != -1) { ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]); free(idx_1); } @@ -3143,8 +3135,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1maxauditeventcount + 1;cntr_eventauditoptions_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1) != -1) { ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]); free(idx_1); } @@ -3285,8 +3276,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const c ndr->depth++; for (cntr_controller_names_1=0;cntr_controller_names_1num_controllers;cntr_controller_names_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_controller_names_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_controller_names_1) != -1) { ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]); free(idx_1); } @@ -3484,8 +3474,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_privilege_attrib_1=0;cntr_privilege_attrib_1privilege_entries;cntr_privilege_attrib_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1) != -1) { ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]); free(idx_1); } @@ -3500,8 +3489,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_privilege_name_1=0;cntr_privilege_name_1privilege_entries;cntr_privilege_name_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_privilege_name_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_privilege_name_1) != -1) { ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]); free(idx_1); } @@ -5291,8 +5279,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char ndr->depth++; for (cntr_delta_enum_1=0;cntr_delta_enum_1num_deltas;cntr_delta_enum_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_delta_enum_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_delta_enum_1) != -1) { ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]); free(idx_1); } @@ -6429,8 +6416,7 @@ _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_data_1=0;cntr_data_1length / 2;cntr_data_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_data_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_data_1) != -1) { ndr_print_uint16(ndr, "data", r->data[cntr_data_1]); free(idx_1); } @@ -6703,8 +6689,7 @@ _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_unknown7_0=0;cntr_unknown7_0<4;cntr_unknown7_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown7_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown7_0) != -1) { ndr_print_uint32(ndr, "unknown7", r->unknown7[cntr_unknown7_0]); free(idx_0); } @@ -6941,8 +6926,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char * ndr->depth++; for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown1_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown1_0) != -1) { ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]); free(idx_0); } @@ -6952,8 +6936,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char * ndr->depth++; for (cntr_unknown_0=0;cntr_unknown_0<4;cntr_unknown_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); free(idx_0); } @@ -7051,8 +7034,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_trusts_1=0;cntr_trusts_1num_trusts;cntr_trusts_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_trusts_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_trusts_1) != -1) { ndr_print_netr_DomainTrustInfo(ndr, "trusts", &r->trusts[cntr_trusts_1]); free(idx_1); } @@ -7064,8 +7046,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_unknown_0=0;cntr_unknown_0<14;cntr_unknown_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); free(idx_0); } @@ -7329,8 +7310,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, co ndr->depth++; for (cntr_sitename_1=0;cntr_sitename_1count;cntr_sitename_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sitename_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) { ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]); free(idx_1); } @@ -7692,8 +7672,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char * ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -7820,8 +7799,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, ndr->depth++; for (cntr_sitename_1=0;cntr_sitename_1count;cntr_sitename_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sitename_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) { ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]); free(idx_1); } @@ -7836,8 +7814,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr, ndr->depth++; for (cntr_subnetname_1=0;cntr_subnetname_1count;cntr_subnetname_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_subnetname_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_subnetname_1) != -1) { ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]); free(idx_1); } @@ -7923,8 +7900,7 @@ _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, cons ndr->depth++; for (cntr_sites_1=0;cntr_sites_1num_sites;cntr_sites_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_sites_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_sites_1) != -1) { ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]); free(idx_1); } @@ -12712,8 +12688,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const ndr->depth++; for (cntr_addresses_1=0;cntr_addresses_1in.count;cntr_addresses_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_addresses_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) { ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]); free(idx_1); } @@ -13256,8 +13231,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, con ndr->depth++; for (cntr_addresses_1=0;cntr_addresses_1in.count;cntr_addresses_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_addresses_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) { ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]); free(idx_1); } diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index 8abfdfdf92..195d421408 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -120,8 +120,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_entries_0=0;cntr_entries_0num_entries;cntr_entries_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_entries_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]); free(idx_0); } @@ -184,8 +183,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_depth_0=0;cntr_depth_0num_depths;cntr_depth_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_depth_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) { ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index 058b78104a..9a0e2bcf4f 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -45,8 +45,7 @@ _PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_unknown2_0=0;cntr_unknown2_0<160;cntr_unknown2_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_unknown2_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_unknown2_0) != -1) { ndr_print_uint16(ndr, "unknown2", r->unknown2[cntr_unknown2_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index eaa38e3a1f..3549bfd22b 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -299,8 +299,7 @@ _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, c ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]); free(idx_1); } @@ -1161,8 +1160,7 @@ _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const ndr->depth++; for (cntr_ids_1=0;cntr_ids_1count;cntr_ids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_ids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_ids_1) != -1) { ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]); free(idx_1); } @@ -1559,8 +1557,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_rids_1=0;cntr_rids_1count;cntr_rids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_rids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) { ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]); free(idx_1); } @@ -1575,8 +1572,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_types_1=0;cntr_types_1count;cntr_types_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_types_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) { ndr_print_uint32(ndr, "types", r->types[cntr_types_1]); free(idx_1); } @@ -3711,8 +3707,7 @@ _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const ndr->depth++; for (cntr_rids_1=0;cntr_rids_1count;cntr_rids_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_rids_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) { ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]); free(idx_1); } @@ -3849,8 +3844,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char * ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]); free(idx_1); } @@ -3982,8 +3976,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]); free(idx_1); } @@ -4115,8 +4108,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]); free(idx_1); } @@ -4237,8 +4229,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_entries_1=0;cntr_entries_1count;cntr_entries_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_entries_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) { ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]); free(idx_1); } @@ -4840,8 +4831,7 @@ _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const c ndr->depth++; for (cntr_pwd_history_1=0;cntr_pwd_history_1pwd_history_len;cntr_pwd_history_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_pwd_history_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_pwd_history_1) != -1) { ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]); free(idx_1); } @@ -7212,8 +7202,7 @@ _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name ndr->depth++; for (cntr_names_0=0;cntr_names_0in.num_names;cntr_names_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_names_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) { ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]); free(idx_0); } @@ -7352,8 +7341,7 @@ _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_rids_0=0;cntr_rids_0in.num_rids;cntr_rids_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_rids_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) { ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c index 8ab56dd914..cbeabf48e5 100644 --- a/source3/librpc/gen_ndr/ndr_security.c +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -552,8 +552,7 @@ _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_aces_0=0;cntr_aces_0num_aces;cntr_aces_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_aces_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_aces_0) != -1) { ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]); free(idx_0); } @@ -981,8 +980,7 @@ _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name, ndr->depth++; for (cntr_sids_0=0;cntr_sids_0num_sids;cntr_sids_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_sids_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) { ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_0]); ndr->depth++; if (r->sids[cntr_sids_0]) { diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c index 86d47a856c..9b08ade4af 100644 --- a/source3/librpc/gen_ndr/ndr_srvsvc.c +++ b/source3/librpc/gen_ndr/ndr_srvsvc.c @@ -140,8 +140,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -326,8 +325,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -749,8 +747,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -938,8 +935,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -1325,8 +1321,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -1520,8 +1515,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -1769,8 +1763,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -1958,8 +1951,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -2381,8 +2373,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -2573,8 +2564,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -2798,8 +2788,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -2984,8 +2973,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -3242,8 +3230,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char * ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -3694,8 +3681,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -3877,8 +3863,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4135,8 +4120,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *n ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4321,8 +4305,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4616,8 +4599,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4763,8 +4745,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4897,8 +4878,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -5008,8 +4988,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -5158,8 +5137,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -5245,8 +5223,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -11487,8 +11464,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *na ndr->depth++; for (cntr_disks_1=0;cntr_disks_1count;cntr_disks_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_disks_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) { ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]); free(idx_1); } @@ -11781,8 +11757,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -12030,8 +12005,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -12282,8 +12256,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -12540,8 +12513,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c index 03a8d30f03..b0b5c81395 100644 --- a/source3/librpc/gen_ndr/ndr_unixinfo.c +++ b/source3/librpc/gen_ndr/ndr_unixinfo.c @@ -425,8 +425,7 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_uids_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_uids_0) != -1) { ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]); free(idx_0); } @@ -445,8 +444,7 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam ndr->depth++; for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_infos_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_infos_0) != -1) { ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]); free(idx_0); } diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c index ed511a62db..cd16a141b0 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.c +++ b/source3/librpc/gen_ndr/ndr_winreg.c @@ -3798,8 +3798,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const ndr->depth++; for (cntr_values_1=0;cntr_values_1in.num_values;cntr_values_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_values_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) { ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]); free(idx_1); } @@ -3828,8 +3827,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const ndr->depth++; for (cntr_values_1=0;cntr_values_1in.num_values;cntr_values_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_values_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) { ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]); free(idx_1); } diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c index 096c0b2c72..80ea67526e 100644 --- a/source3/librpc/gen_ndr/ndr_wkssvc.c +++ b/source3/librpc/gen_ndr/ndr_wkssvc.c @@ -3071,8 +3071,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, cons ndr->depth++; for (cntr_user0_1=0;cntr_user0_1entries_read;cntr_user0_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_user0_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_user0_1) != -1) { ndr_print_wkssvc_NetrWkstaUserInfo0(ndr, "user0", &r->user0[cntr_user0_1]); free(idx_1); } @@ -3317,8 +3316,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, cons ndr->depth++; for (cntr_user1_1=0;cntr_user1_1entries_read;cntr_user1_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_user1_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_user1_1) != -1) { ndr_print_wkssvc_NetrWkstaUserInfo1(ndr, "user1", &r->user1[cntr_user1_1]); free(idx_1); } @@ -3909,8 +3907,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, cons ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_wkssvc_NetWkstaTransportInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4867,8 +4864,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_wkssvc_NetrUseInfo2(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -4954,8 +4950,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_wkssvc_NetrUseInfo1(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -5041,8 +5036,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char ndr->depth++; for (cntr_array_1=0;cntr_array_1count;cntr_array_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_array_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) { ndr_print_wkssvc_NetrUseInfo0(ndr, "array", &r->array[cntr_array_1]); free(idx_1); } @@ -5666,8 +5660,7 @@ _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const cha ndr->depth++; for (cntr_computer_name_1=0;cntr_computer_name_1count;cntr_computer_name_1++) { char *idx_1=NULL; - asprintf(&idx_1, "[%d]", cntr_computer_name_1); - if (idx_1) { + if (asprintf(&idx_1, "[%d]", cntr_computer_name_1) != -1) { ndr_print_lsa_String(ndr, "computer_name", &r->computer_name[cntr_computer_name_1]); free(idx_1); } @@ -8836,8 +8829,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const c ndr->depth++; for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) { char *idx_2=NULL; - asprintf(&idx_2, "[%d]", cntr_ous_2); - if (idx_2) { + if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) { ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]); ndr->depth++; if ((*r->out.ous)[cntr_ous_2]) { @@ -9757,8 +9749,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const ndr->depth++; for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) { char *idx_2=NULL; - asprintf(&idx_2, "[%d]", cntr_ous_2); - if (idx_2) { + if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) { ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]); ndr->depth++; if ((*r->out.ous)[cntr_ous_2]) { diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c index 425ad814bf..46c4249d21 100644 --- a/source3/librpc/gen_ndr/ndr_xattr.c +++ b/source3/librpc/gen_ndr/ndr_xattr.c @@ -91,8 +91,7 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons ndr->depth++; for (cntr_xattrs_0=0;cntr_xattrs_0num_xattrs;cntr_xattrs_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_xattrs_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_xattrs_0) != -1) { ndr_print_tdb_xattr(ndr, "xattrs", &r->xattrs[cntr_xattrs_0]); free(idx_0); } -- cgit From be626225ef8b70694012d539489075d240b4f2a8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Feb 2008 16:04:34 +0100 Subject: Rerun make idl. To remove irritating semicolon. Michael (This used to be commit 3e1f88c90e4c5721381778062edfe6e681c8eec3) --- source3/librpc/gen_ndr/libnet_join.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/libnet_join.h b/source3/librpc/gen_ndr/libnet_join.h index 40759cb489..27e66ec0a5 100644 --- a/source3/librpc/gen_ndr/libnet_join.h +++ b/source3/librpc/gen_ndr/libnet_join.h @@ -7,8 +7,6 @@ #ifndef _HEADER_libnetjoin #define _HEADER_libnetjoin -; - struct libnet_JoinCtx { struct { -- cgit From 3c54bb142e95bbc3e49d59ca28e960b1ee6a20f9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Feb 2008 15:56:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit 01cdb071af7bc677450e511ebc7ef2036e9510e4) --- source3/librpc/gen_ndr/lsa.h | 14 +++++++++++++ source3/librpc/gen_ndr/ndr_lsa.c | 45 ++++++++++++++++++++++++++++++++++------ source3/librpc/gen_ndr/ndr_lsa.h | 3 +++ 3 files changed, 56 insertions(+), 6 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index cc7bca3150..0840149563 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -63,6 +63,20 @@ struct lsa_ObjectAttribute { struct lsa_QosInfo *sec_qos;/* [unique] */ }; +/* bitmap lsa_PolicyAccessMask */ +#define LSA_POLICY_VIEW_LOCAL_INFORMATION ( 0x00000001 ) +#define LSA_POLICY_VIEW_AUDIT_INFORMATION ( 0x00000002 ) +#define LSA_POLICY_GET_PRIVATE_INFORMATION ( 0x00000004 ) +#define LSA_POLICY_TRUST_ADMIN ( 0x00000008 ) +#define LSA_POLICY_CREATE_ACCOUNT ( 0x00000010 ) +#define LSA_POLICY_CREATE_SECRET ( 0x00000020 ) +#define LSA_POLICY_CREATE_PRIVILEGE ( 0x00000040 ) +#define LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS ( 0x00000080 ) +#define LSA_POLICY_SET_AUDIT_REQUIREMENTS ( 0x00000100 ) +#define LSA_POLICY_AUDIT_LOG_ADMIN ( 0x00000200 ) +#define LSA_POLICY_SERVER_ADMIN ( 0x00000400 ) +#define LSA_POLICY_LOOKUP_NAMES ( 0x00000800 ) + struct lsa_AuditLogInfo { uint32_t percent_full; uint32_t log_size; diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index b54f43a353..2a683fee77 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -640,6 +640,39 @@ _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *n ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(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_PolicyAccessMask(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_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r) { if (ndr_flags & NDR_SCALARS) { @@ -4924,7 +4957,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int fla return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { if (r->out.handle == NULL) { @@ -4964,7 +4997,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); NDR_PULL_ALLOC(ndr, r->out.handle); ZERO_STRUCTP(r->out.handle); } @@ -5001,7 +5034,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr); ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); + ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask); ndr->depth--; } if (flags & NDR_OUT) { @@ -8459,7 +8492,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); + NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { if (r->out.handle == NULL) { @@ -8505,7 +8538,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); NDR_PULL_ALLOC(ndr, r->out.handle); ZERO_STRUCTP(r->out.handle); } @@ -8542,7 +8575,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr); ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); + ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask); ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h index 76add459c2..2df42dbaea 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.h +++ b/source3/librpc/gen_ndr/ndr_lsa.h @@ -193,6 +193,9 @@ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const stru void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r); void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r); void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r); +enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r); void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r); void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r); -- cgit From f0b2ae2a183eb2576c829325dab9ed0cbc0437bd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Feb 2008 17:05:31 +0100 Subject: Re-run make idl. Guenther (This used to be commit 64e7f3f1422eb56c153ea0ad764b38e46410d594) --- source3/librpc/gen_ndr/lsa.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 0840149563..373c4fcd87 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -8,6 +8,7 @@ #define LSA_ENUM_TRUST_DOMAIN_MULTIPLIER ( 60 ) #define LSA_REF_DOMAIN_LIST_MULTIPLIER ( 32 ) +#define MAX_REF_DOMAINS ( LSA_REF_DOMAIN_LIST_MULTIPLIER ) #define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER ( 82 ) struct lsa_String { uint16_t length;/* [value(2*strlen_m(string))] */ -- cgit From f084c60dc6136d3e442df9cec900f9d8af780fb4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Feb 2008 17:06:03 +0100 Subject: Re-run make idl. Guenther (This used to be commit 360220a6a358bb36dd705213f3c9fd2bb463e49a) --- source3/librpc/gen_ndr/lsa.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 373c4fcd87..0f0ed143eb 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -9,6 +9,7 @@ #define LSA_ENUM_TRUST_DOMAIN_MULTIPLIER ( 60 ) #define LSA_REF_DOMAIN_LIST_MULTIPLIER ( 32 ) #define MAX_REF_DOMAINS ( LSA_REF_DOMAIN_LIST_MULTIPLIER ) +#define MAX_LOOKUP_SIDS ( 0x5000 ) #define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER ( 82 ) struct lsa_String { uint16_t length;/* [value(2*strlen_m(string))] */ -- cgit From 446a037156cdb94c1b7a541ce67cc90b460808ac Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Feb 2008 17:14:22 +0100 Subject: Re-run make idl. Guenther (This used to be commit 44e63dbac990333878cda4f1a16634496ba47d0e) --- source3/librpc/gen_ndr/samr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index dff4bf80f0..fb40e0ee87 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -9,6 +9,8 @@ #define _HEADER_samr #define SAMR_ENUM_USERS_MULTIPLIER ( 54 ) +#define PASS_MUST_CHANGE_AT_NEXT_LOGON ( 0x01 ) +#define PASS_DONT_CHANGE_AT_NEXT_LOGON ( 0x00 ) /* bitmap samr_AcctFlags */ #define ACB_DISABLED ( 0x00000001 ) #define ACB_HOMDIRREQ ( 0x00000002 ) -- cgit From a136e403add8bfd299ba9963964ed7337eba0a5f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Feb 2008 17:15:09 +0100 Subject: Re-run make idl. Guenther (This used to be commit 2ebfd28cf73a63ccf595775853e9b1660a43fd20) --- source3/librpc/gen_ndr/samr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index fb40e0ee87..700c46222d 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -8,6 +8,8 @@ #ifndef _HEADER_samr #define _HEADER_samr +#define MAX_SAM_ENTRIES_W2K ( 0x400 ) +#define MAX_SAM_ENTRIES_W95 ( 50 ) #define SAMR_ENUM_USERS_MULTIPLIER ( 54 ) #define PASS_MUST_CHANGE_AT_NEXT_LOGON ( 0x01 ) #define PASS_DONT_CHANGE_AT_NEXT_LOGON ( 0x00 ) -- cgit From 8c2b6a126c0f6e111d66e17fb46077a76bc81a15 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 27 Feb 2008 20:03:42 +0100 Subject: remove unused unixinfo.idl and generated files The idl in this version uses pidl specific non NDR types... metze (This used to be commit 5dd83aaff325a1d15a0c786cbab42b8fcd6dd5ee) --- source3/librpc/gen_ndr/cli_unixinfo.c | 216 -------------- source3/librpc/gen_ndr/cli_unixinfo.h | 25 -- source3/librpc/gen_ndr/ndr_unixinfo.c | 536 ---------------------------------- source3/librpc/gen_ndr/ndr_unixinfo.h | 31 -- source3/librpc/gen_ndr/srv_unixinfo.c | 430 --------------------------- source3/librpc/gen_ndr/srv_unixinfo.h | 11 - source3/librpc/gen_ndr/unixinfo.h | 82 ------ 7 files changed, 1331 deletions(-) delete mode 100644 source3/librpc/gen_ndr/cli_unixinfo.c delete mode 100644 source3/librpc/gen_ndr/cli_unixinfo.h delete mode 100644 source3/librpc/gen_ndr/ndr_unixinfo.c delete mode 100644 source3/librpc/gen_ndr/ndr_unixinfo.h delete mode 100644 source3/librpc/gen_ndr/srv_unixinfo.c delete mode 100644 source3/librpc/gen_ndr/srv_unixinfo.h delete mode 100644 source3/librpc/gen_ndr/unixinfo.h (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_unixinfo.c b/source3/librpc/gen_ndr/cli_unixinfo.c deleted file mode 100644 index c8a6c926ef..0000000000 --- a/source3/librpc/gen_ndr/cli_unixinfo.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * client auto-generated by pidl. DO NOT MODIFY! - */ - -#include "includes.h" -#include "librpc/gen_ndr/cli_unixinfo.h" - -NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct dom_sid sid, - uint64_t *uid) -{ - struct unixinfo_SidToUid r; - NTSTATUS status; - - /* In parameters */ - r.in.sid = sid; - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, &r); - } - - status = cli_do_rpc_ndr(cli, - mem_ctx, - PI_UNIXINFO, - &ndr_table_unixinfo, - NDR_UNIXINFO_SIDTOUID, - &r); - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, &r); - } - - if (NT_STATUS_IS_ERR(status)) { - return status; - } - - /* Return variables */ - *uid = *r.out.uid; - - /* Return result */ - return r.out.result; -} - -NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint64_t uid, - struct dom_sid *sid) -{ - struct unixinfo_UidToSid r; - NTSTATUS status; - - /* In parameters */ - r.in.uid = uid; - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, &r); - } - - status = cli_do_rpc_ndr(cli, - mem_ctx, - PI_UNIXINFO, - &ndr_table_unixinfo, - NDR_UNIXINFO_UIDTOSID, - &r); - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, &r); - } - - if (NT_STATUS_IS_ERR(status)) { - return status; - } - - /* Return variables */ - *sid = *r.out.sid; - - /* Return result */ - return r.out.result; -} - -NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct dom_sid sid, - uint64_t *gid) -{ - struct unixinfo_SidToGid r; - NTSTATUS status; - - /* In parameters */ - r.in.sid = sid; - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, &r); - } - - status = cli_do_rpc_ndr(cli, - mem_ctx, - PI_UNIXINFO, - &ndr_table_unixinfo, - NDR_UNIXINFO_SIDTOGID, - &r); - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, &r); - } - - if (NT_STATUS_IS_ERR(status)) { - return status; - } - - /* Return variables */ - *gid = *r.out.gid; - - /* Return result */ - return r.out.result; -} - -NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint64_t gid, - struct dom_sid *sid) -{ - struct unixinfo_GidToSid r; - NTSTATUS status; - - /* In parameters */ - r.in.gid = gid; - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, &r); - } - - status = cli_do_rpc_ndr(cli, - mem_ctx, - PI_UNIXINFO, - &ndr_table_unixinfo, - NDR_UNIXINFO_GIDTOSID, - &r); - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, &r); - } - - if (NT_STATUS_IS_ERR(status)) { - return status; - } - - /* Return variables */ - *sid = *r.out.sid; - - /* Return result */ - return r.out.result; -} - -NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint32_t *count, - uint64_t *uids, - struct unixinfo_GetPWUidInfo *infos) -{ - struct unixinfo_GetPWUid r; - NTSTATUS status; - - /* In parameters */ - r.in.count = count; - r.in.uids = uids; - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, &r); - } - - status = cli_do_rpc_ndr(cli, - mem_ctx, - PI_UNIXINFO, - &ndr_table_unixinfo, - NDR_UNIXINFO_GETPWUID, - &r); - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, &r); - } - - if (NT_STATUS_IS_ERR(status)) { - return status; - } - - /* Return variables */ - *count = *r.out.count; - memcpy(infos, r.out.infos, *r.in.count); - - /* Return result */ - return r.out.result; -} - diff --git a/source3/librpc/gen_ndr/cli_unixinfo.h b/source3/librpc/gen_ndr/cli_unixinfo.h deleted file mode 100644 index fa084cc75d..0000000000 --- a/source3/librpc/gen_ndr/cli_unixinfo.h +++ /dev/null @@ -1,25 +0,0 @@ -#include "librpc/gen_ndr/ndr_unixinfo.h" -#ifndef __CLI_UNIXINFO__ -#define __CLI_UNIXINFO__ -NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct dom_sid sid, - uint64_t *uid); -NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint64_t uid, - struct dom_sid *sid); -NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - struct dom_sid sid, - uint64_t *gid); -NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint64_t gid, - struct dom_sid *sid); -NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint32_t *count, - uint64_t *uids, - struct unixinfo_GetPWUidInfo *infos); -#endif /* __CLI_UNIXINFO__ */ diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c deleted file mode 100644 index b0b5c81395..0000000000 --- a/source3/librpc/gen_ndr/ndr_unixinfo.c +++ /dev/null @@ -1,536 +0,0 @@ -/* parser auto-generated by pidl */ - -#include "includes.h" -#include "librpc/gen_ndr/ndr_unixinfo.h" - -#include "librpc/gen_ndr/ndr_security.h" -static enum ndr_err_code ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->homedir)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->shell)); - ndr->flags = _flags_save_string; - } - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->homedir)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->shell)); - ndr->flags = _flags_save_string; - } - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r) -{ - ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "status", r->status); - ndr_print_string(ndr, "homedir", r->homedir); - ndr_print_string(ndr, "shell", r->shell); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid)); - } - if (flags & NDR_OUT) { - if (r->out.uid == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r) -{ - TALLOC_CTX *_mem_save_uid_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid)); - NDR_PULL_ALLOC(ndr, r->out.uid); - ZERO_STRUCTP(r->out.uid); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.uid); - } - _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r) -{ - ndr_print_struct(ndr, name, "unixinfo_SidToUid"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "unixinfo_SidToUid"); - ndr->depth++; - ndr_print_dom_sid(ndr, "sid", &r->in.sid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "unixinfo_SidToUid"); - ndr->depth++; - ndr_print_ptr(ndr, "uid", r->out.uid); - ndr->depth++; - ndr_print_hyper(ndr, "uid", *r->out.uid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -static enum ndr_err_code ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid)); - } - if (flags & NDR_OUT) { - if (r->out.sid == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r) -{ - TALLOC_CTX *_mem_save_sid_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid)); - NDR_PULL_ALLOC(ndr, r->out.sid); - ZERO_STRUCTP(r->out.sid); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.sid); - } - _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r) -{ - ndr_print_struct(ndr, name, "unixinfo_UidToSid"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "unixinfo_UidToSid"); - ndr->depth++; - ndr_print_hyper(ndr, "uid", r->in.uid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "unixinfo_UidToSid"); - ndr->depth++; - ndr_print_ptr(ndr, "sid", r->out.sid); - ndr->depth++; - ndr_print_dom_sid(ndr, "sid", r->out.sid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -static enum ndr_err_code ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid)); - } - if (flags & NDR_OUT) { - if (r->out.gid == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r) -{ - TALLOC_CTX *_mem_save_gid_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid)); - NDR_PULL_ALLOC(ndr, r->out.gid); - ZERO_STRUCTP(r->out.gid); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.gid); - } - _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r) -{ - ndr_print_struct(ndr, name, "unixinfo_SidToGid"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "unixinfo_SidToGid"); - ndr->depth++; - ndr_print_dom_sid(ndr, "sid", &r->in.sid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "unixinfo_SidToGid"); - ndr->depth++; - ndr_print_ptr(ndr, "gid", r->out.gid); - ndr->depth++; - ndr_print_hyper(ndr, "gid", *r->out.gid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -static enum ndr_err_code ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid)); - } - if (flags & NDR_OUT) { - if (r->out.sid == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r) -{ - TALLOC_CTX *_mem_save_sid_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid)); - NDR_PULL_ALLOC(ndr, r->out.sid); - ZERO_STRUCTP(r->out.sid); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.sid); - } - _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r) -{ - ndr_print_struct(ndr, name, "unixinfo_GidToSid"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "unixinfo_GidToSid"); - ndr->depth++; - ndr_print_hyper(ndr, "gid", r->in.gid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "unixinfo_GidToSid"); - ndr->depth++; - ndr_print_ptr(ndr, "sid", r->out.sid); - ndr->depth++; - ndr_print_dom_sid(ndr, "sid", r->out.sid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -static enum ndr_err_code ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r) -{ - uint32_t cntr_uids_0; - uint32_t cntr_infos_0; - if (flags & NDR_IN) { - if (r->in.count == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) { - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uids[cntr_uids_0])); - } - } - if (flags & NDR_OUT) { - if (r->out.count == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count)); - for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) { - NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0])); - } - NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r) -{ - uint32_t cntr_uids_0; - uint32_t cntr_infos_0; - TALLOC_CTX *_mem_save_count_0; - TALLOC_CTX *_mem_save_uids_0; - TALLOC_CTX *_mem_save_infos_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.count); - } - _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); - if (*r->in.count < 0 || *r->in.count > 1023) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_array_size(ndr, &r->in.uids)); - NDR_PULL_ALLOC_N(ndr, r->in.uids, ndr_get_array_size(ndr, &r->in.uids)); - _mem_save_uids_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.uids, 0); - for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) { - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uids[cntr_uids_0])); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0); - NDR_PULL_ALLOC(ndr, r->out.count); - *r->out.count = *r->in.count; - if (r->in.uids) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count)); - } - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.count); - } - _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count)); - if (*r->out.count < 0 || *r->out.count > 1023) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos)); - NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos)); - _mem_save_infos_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0); - for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) { - NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0])); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); - if (r->out.infos) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count)); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r) -{ - uint32_t cntr_uids_0; - uint32_t cntr_infos_0; - ndr_print_struct(ndr, name, "unixinfo_GetPWUid"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "unixinfo_GetPWUid"); - ndr->depth++; - ndr_print_ptr(ndr, "count", r->in.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->in.count); - ndr->depth--; - ndr->print(ndr, "%s: ARRAY(%d)", "uids", *r->in.count); - ndr->depth++; - for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) { - char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_uids_0) != -1) { - ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]); - free(idx_0); - } - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "unixinfo_GetPWUid"); - ndr->depth++; - ndr_print_ptr(ndr, "count", r->out.count); - ndr->depth++; - ndr_print_uint32(ndr, "count", *r->out.count); - ndr->depth--; - ndr->print(ndr, "%s: ARRAY(%d)", "infos", *r->out.count); - ndr->depth++; - for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) { - char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_infos_0) != -1) { - ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]); - free(idx_0); - } - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -static const struct ndr_interface_call unixinfo_calls[] = { - { - "unixinfo_SidToUid", - sizeof(struct unixinfo_SidToUid), - (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid, - (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid, - (ndr_print_function_t) ndr_print_unixinfo_SidToUid, - false, - }, - { - "unixinfo_UidToSid", - sizeof(struct unixinfo_UidToSid), - (ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid, - (ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid, - (ndr_print_function_t) ndr_print_unixinfo_UidToSid, - false, - }, - { - "unixinfo_SidToGid", - sizeof(struct unixinfo_SidToGid), - (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid, - (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid, - (ndr_print_function_t) ndr_print_unixinfo_SidToGid, - false, - }, - { - "unixinfo_GidToSid", - sizeof(struct unixinfo_GidToSid), - (ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid, - (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid, - (ndr_print_function_t) ndr_print_unixinfo_GidToSid, - false, - }, - { - "unixinfo_GetPWUid", - sizeof(struct unixinfo_GetPWUid), - (ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid, - (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid, - (ndr_print_function_t) ndr_print_unixinfo_GetPWUid, - false, - }, - { NULL, 0, NULL, NULL, NULL, false } -}; - -static const char * const unixinfo_endpoint_strings[] = { - "ncacn_np:[\\pipe\\unixinfo]", - "ncacn_ip_tcp:", - "ncalrpc:", -}; - -static const struct ndr_interface_string_array unixinfo_endpoints = { - .count = 3, - .names = unixinfo_endpoint_strings -}; - -static const char * const unixinfo_authservice_strings[] = { - "host", -}; - -static const struct ndr_interface_string_array unixinfo_authservices = { - .count = 3, - .names = unixinfo_authservice_strings -}; - - -const struct ndr_interface_table ndr_table_unixinfo = { - .name = "unixinfo", - .syntax_id = { - {0x9c54e310,0xa955,0x4885,{0xbd,0x31},{0x78,0x78,0x71,0x47,0xdf,0xa6}}, - NDR_UNIXINFO_VERSION - }, - .helpstring = NDR_UNIXINFO_HELPSTRING, - .num_calls = 5, - .calls = unixinfo_calls, - .endpoints = &unixinfo_endpoints, - .authservices = &unixinfo_authservices -}; - diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.h b/source3/librpc/gen_ndr/ndr_unixinfo.h deleted file mode 100644 index 17f8b811db..0000000000 --- a/source3/librpc/gen_ndr/ndr_unixinfo.h +++ /dev/null @@ -1,31 +0,0 @@ -/* header auto-generated by pidl */ - -#include "librpc/ndr/libndr.h" -#include "librpc/gen_ndr/unixinfo.h" - -#ifndef _HEADER_NDR_unixinfo -#define _HEADER_NDR_unixinfo - -#define NDR_UNIXINFO_UUID "9c54e310-a955-4885-bd31-78787147dfa6" -#define NDR_UNIXINFO_VERSION 0.0 -#define NDR_UNIXINFO_NAME "unixinfo" -#define NDR_UNIXINFO_HELPSTRING "Unixinfo specific stuff" -extern const struct ndr_interface_table ndr_table_unixinfo; -#define NDR_UNIXINFO_SIDTOUID (0x00) - -#define NDR_UNIXINFO_UIDTOSID (0x01) - -#define NDR_UNIXINFO_SIDTOGID (0x02) - -#define NDR_UNIXINFO_GIDTOSID (0x03) - -#define NDR_UNIXINFO_GETPWUID (0x04) - -#define NDR_UNIXINFO_CALL_COUNT (5) -void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r); -void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r); -void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r); -void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r); -void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r); -void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r); -#endif /* _HEADER_NDR_unixinfo */ diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c deleted file mode 100644 index 6142bb113f..0000000000 --- a/source3/librpc/gen_ndr/srv_unixinfo.c +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * server auto-generated by pidl. DO NOT MODIFY! - */ - -#include "includes.h" -#include "librpc/gen_ndr/srv_unixinfo.h" - -static bool api_unixinfo_SidToUid(pipes_struct *p) -{ - const struct ndr_interface_call *call; - struct ndr_pull *pull; - struct ndr_push *push; - enum ndr_err_code ndr_err; - DATA_BLOB blob; - struct unixinfo_SidToUid *r; - - call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID]; - - r = talloc(talloc_tos(), struct unixinfo_SidToUid); - if (r == NULL) { - return false; - } - - if (!prs_data_blob(&p->in_data.data, &blob, r)) { - talloc_free(r); - return false; - } - - pull = ndr_pull_init_blob(&blob, r); - if (pull == NULL) { - talloc_free(r); - return false; - } - - pull->flags |= LIBNDR_FLAG_REF_ALLOC; - ndr_err = call->ndr_pull(pull, NDR_IN, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, r); - } - - ZERO_STRUCT(r->out); - r->out.uid = talloc_zero(r, uint64_t); - if (r->out.uid == NULL) { - talloc_free(r); - return false; - } - - r->out.result = _unixinfo_SidToUid(p, r); - - if (p->rng_fault_state) { - talloc_free(r); - /* Return true here, srv_pipe_hnd.c will take care */ - return true; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, r); - } - - push = ndr_push_init_ctx(r); - if (push == NULL) { - talloc_free(r); - return false; - } - - ndr_err = call->ndr_push(push, NDR_OUT, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { - talloc_free(r); - return false; - } - - talloc_free(r); - - return true; -} - -static bool api_unixinfo_UidToSid(pipes_struct *p) -{ - const struct ndr_interface_call *call; - struct ndr_pull *pull; - struct ndr_push *push; - enum ndr_err_code ndr_err; - DATA_BLOB blob; - struct unixinfo_UidToSid *r; - - call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID]; - - r = talloc(talloc_tos(), struct unixinfo_UidToSid); - if (r == NULL) { - return false; - } - - if (!prs_data_blob(&p->in_data.data, &blob, r)) { - talloc_free(r); - return false; - } - - pull = ndr_pull_init_blob(&blob, r); - if (pull == NULL) { - talloc_free(r); - return false; - } - - pull->flags |= LIBNDR_FLAG_REF_ALLOC; - ndr_err = call->ndr_pull(pull, NDR_IN, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, r); - } - - ZERO_STRUCT(r->out); - r->out.sid = talloc_zero(r, struct dom_sid); - if (r->out.sid == NULL) { - talloc_free(r); - return false; - } - - r->out.result = _unixinfo_UidToSid(p, r); - - if (p->rng_fault_state) { - talloc_free(r); - /* Return true here, srv_pipe_hnd.c will take care */ - return true; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, r); - } - - push = ndr_push_init_ctx(r); - if (push == NULL) { - talloc_free(r); - return false; - } - - ndr_err = call->ndr_push(push, NDR_OUT, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { - talloc_free(r); - return false; - } - - talloc_free(r); - - return true; -} - -static bool api_unixinfo_SidToGid(pipes_struct *p) -{ - const struct ndr_interface_call *call; - struct ndr_pull *pull; - struct ndr_push *push; - enum ndr_err_code ndr_err; - DATA_BLOB blob; - struct unixinfo_SidToGid *r; - - call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID]; - - r = talloc(talloc_tos(), struct unixinfo_SidToGid); - if (r == NULL) { - return false; - } - - if (!prs_data_blob(&p->in_data.data, &blob, r)) { - talloc_free(r); - return false; - } - - pull = ndr_pull_init_blob(&blob, r); - if (pull == NULL) { - talloc_free(r); - return false; - } - - pull->flags |= LIBNDR_FLAG_REF_ALLOC; - ndr_err = call->ndr_pull(pull, NDR_IN, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, r); - } - - ZERO_STRUCT(r->out); - r->out.gid = talloc_zero(r, uint64_t); - if (r->out.gid == NULL) { - talloc_free(r); - return false; - } - - r->out.result = _unixinfo_SidToGid(p, r); - - if (p->rng_fault_state) { - talloc_free(r); - /* Return true here, srv_pipe_hnd.c will take care */ - return true; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, r); - } - - push = ndr_push_init_ctx(r); - if (push == NULL) { - talloc_free(r); - return false; - } - - ndr_err = call->ndr_push(push, NDR_OUT, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { - talloc_free(r); - return false; - } - - talloc_free(r); - - return true; -} - -static bool api_unixinfo_GidToSid(pipes_struct *p) -{ - const struct ndr_interface_call *call; - struct ndr_pull *pull; - struct ndr_push *push; - enum ndr_err_code ndr_err; - DATA_BLOB blob; - struct unixinfo_GidToSid *r; - - call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID]; - - r = talloc(talloc_tos(), struct unixinfo_GidToSid); - if (r == NULL) { - return false; - } - - if (!prs_data_blob(&p->in_data.data, &blob, r)) { - talloc_free(r); - return false; - } - - pull = ndr_pull_init_blob(&blob, r); - if (pull == NULL) { - talloc_free(r); - return false; - } - - pull->flags |= LIBNDR_FLAG_REF_ALLOC; - ndr_err = call->ndr_pull(pull, NDR_IN, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, r); - } - - ZERO_STRUCT(r->out); - r->out.sid = talloc_zero(r, struct dom_sid); - if (r->out.sid == NULL) { - talloc_free(r); - return false; - } - - r->out.result = _unixinfo_GidToSid(p, r); - - if (p->rng_fault_state) { - talloc_free(r); - /* Return true here, srv_pipe_hnd.c will take care */ - return true; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, r); - } - - push = ndr_push_init_ctx(r); - if (push == NULL) { - talloc_free(r); - return false; - } - - ndr_err = call->ndr_push(push, NDR_OUT, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { - talloc_free(r); - return false; - } - - talloc_free(r); - - return true; -} - -static bool api_unixinfo_GetPWUid(pipes_struct *p) -{ - const struct ndr_interface_call *call; - struct ndr_pull *pull; - struct ndr_push *push; - enum ndr_err_code ndr_err; - DATA_BLOB blob; - struct unixinfo_GetPWUid *r; - - call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID]; - - r = talloc(talloc_tos(), struct unixinfo_GetPWUid); - if (r == NULL) { - return false; - } - - if (!prs_data_blob(&p->in_data.data, &blob, r)) { - talloc_free(r); - return false; - } - - pull = ndr_pull_init_blob(&blob, r); - if (pull == NULL) { - talloc_free(r); - return false; - } - - pull->flags |= LIBNDR_FLAG_REF_ALLOC; - ndr_err = call->ndr_pull(pull, NDR_IN, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, r); - } - - ZERO_STRUCT(r->out); - r->out.count = r->in.count; - r->out.infos = talloc_zero_array(r, struct unixinfo_GetPWUidInfo, *r->out.count); - if (r->out.infos == NULL) { - talloc_free(r); - return false; - } - - r->out.result = _unixinfo_GetPWUid(p, r); - - if (p->rng_fault_state) { - talloc_free(r); - /* Return true here, srv_pipe_hnd.c will take care */ - return true; - } - - if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, r); - } - - push = ndr_push_init_ctx(r); - if (push == NULL) { - talloc_free(r); - return false; - } - - ndr_err = call->ndr_push(push, NDR_OUT, r); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(r); - return false; - } - - blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { - talloc_free(r); - return false; - } - - talloc_free(r); - - return true; -} - - -/* Tables */ -static struct api_struct api_unixinfo_cmds[] = -{ - {"UNIXINFO_SIDTOUID", NDR_UNIXINFO_SIDTOUID, api_unixinfo_SidToUid}, - {"UNIXINFO_UIDTOSID", NDR_UNIXINFO_UIDTOSID, api_unixinfo_UidToSid}, - {"UNIXINFO_SIDTOGID", NDR_UNIXINFO_SIDTOGID, api_unixinfo_SidToGid}, - {"UNIXINFO_GIDTOSID", NDR_UNIXINFO_GIDTOSID, api_unixinfo_GidToSid}, - {"UNIXINFO_GETPWUID", NDR_UNIXINFO_GETPWUID, api_unixinfo_GetPWUid}, -}; - -void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns) -{ - *fns = api_unixinfo_cmds; - *n_fns = sizeof(api_unixinfo_cmds) / sizeof(struct api_struct); -} - -NTSTATUS rpc_unixinfo_init(void) -{ - return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "unixinfo", "unixinfo", api_unixinfo_cmds, sizeof(api_unixinfo_cmds) / sizeof(struct api_struct)); -} diff --git a/source3/librpc/gen_ndr/srv_unixinfo.h b/source3/librpc/gen_ndr/srv_unixinfo.h deleted file mode 100644 index 6e5c033b61..0000000000 --- a/source3/librpc/gen_ndr/srv_unixinfo.h +++ /dev/null @@ -1,11 +0,0 @@ -#include "librpc/gen_ndr/ndr_unixinfo.h" -#ifndef __SRV_UNIXINFO__ -#define __SRV_UNIXINFO__ -NTSTATUS _unixinfo_SidToUid(pipes_struct *p, struct unixinfo_SidToUid *r); -NTSTATUS _unixinfo_UidToSid(pipes_struct *p, struct unixinfo_UidToSid *r); -NTSTATUS _unixinfo_SidToGid(pipes_struct *p, struct unixinfo_SidToGid *r); -NTSTATUS _unixinfo_GidToSid(pipes_struct *p, struct unixinfo_GidToSid *r); -NTSTATUS _unixinfo_GetPWUid(pipes_struct *p, struct unixinfo_GetPWUid *r); -void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns); -NTSTATUS rpc_unixinfo_init(void); -#endif /* __SRV_UNIXINFO__ */ diff --git a/source3/librpc/gen_ndr/unixinfo.h b/source3/librpc/gen_ndr/unixinfo.h deleted file mode 100644 index bfe0934ccd..0000000000 --- a/source3/librpc/gen_ndr/unixinfo.h +++ /dev/null @@ -1,82 +0,0 @@ -/* header auto-generated by pidl */ - -#include - -#include "librpc/gen_ndr/security.h" -#ifndef _HEADER_unixinfo -#define _HEADER_unixinfo - -struct unixinfo_GetPWUidInfo { - NTSTATUS status; - const char * homedir;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */ - const char * shell;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */ -}; - - -struct unixinfo_SidToUid { - struct { - struct dom_sid sid; - } in; - - struct { - uint64_t *uid;/* [ref] */ - NTSTATUS result; - } out; - -}; - - -struct unixinfo_UidToSid { - struct { - uint64_t uid; - } in; - - struct { - struct dom_sid *sid;/* [ref] */ - NTSTATUS result; - } out; - -}; - - -struct unixinfo_SidToGid { - struct { - struct dom_sid sid; - } in; - - struct { - uint64_t *gid;/* [ref] */ - NTSTATUS result; - } out; - -}; - - -struct unixinfo_GidToSid { - struct { - uint64_t gid; - } in; - - struct { - struct dom_sid *sid;/* [ref] */ - NTSTATUS result; - } out; - -}; - - -struct unixinfo_GetPWUid { - struct { - uint64_t *uids;/* [size_is(*count)] */ - uint32_t *count;/* [ref,range(0,1023)] */ - } in; - - struct { - struct unixinfo_GetPWUidInfo *infos;/* [size_is(*count)] */ - uint32_t *count;/* [ref,range(0,1023)] */ - NTSTATUS result; - } out; - -}; - -#endif /* _HEADER_unixinfo */ -- cgit From 179405e8e7cdbfb2e305b7c1c79c8cddcc842287 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 00:03:00 +0100 Subject: Re-run make idl. Guenther (This used to be commit 6a84317aec9ae3fcd813390b0eec655387e036ec) --- source3/librpc/gen_ndr/cli_svcctl.c | 10 ++++++ source3/librpc/gen_ndr/cli_svcctl.h | 5 +++ source3/librpc/gen_ndr/ndr_svcctl.c | 67 +++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/srv_svcctl.c | 13 +++++++ source3/librpc/gen_ndr/svcctl.h | 8 +++++ 5 files changed, 103 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index 2a5d6badc6..42711e3174 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -191,12 +191,20 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t security_flags, + uint8_t *buffer, + uint32_t buffer_size, + uint32_t *needed, WERROR *werror) { struct svcctl_QueryServiceObjectSecurity r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.security_flags = security_flags; + r.in.buffer_size = buffer_size; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r); @@ -222,6 +230,8 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, } /* Return variables */ + memcpy(buffer, r.out.buffer, r.in.buffer_size); + *needed = *r.out.needed; /* Return result */ if (werror) { diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h index e9eeb2d9e2..d9ab510d5a 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.h +++ b/source3/librpc/gen_ndr/cli_svcctl.h @@ -22,6 +22,11 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t security_flags, + uint8_t *buffer, + uint32_t buffer_size, + uint32_t *needed, WERROR *werror); NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c index b2dfd0eef4..74466f76c0 100644 --- a/source3/librpc/gen_ndr/ndr_svcctl.c +++ b/source3/librpc/gen_ndr/ndr_svcctl.c @@ -588,8 +588,23 @@ _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.security_flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); } if (flags & NDR_OUT) { + if (r->out.buffer == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buffer_size)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -597,10 +612,48 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_p static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size)); + if (r->in.buffer_size < 0 || r->in.buffer_size > 0x40000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buffer_size); + memset(r->out.buffer, 0, (r->in.buffer_size) * sizeof(*r->out.buffer)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)); + } + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer))); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (*r->out.needed < 0 || *r->out.needed > 0x40000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); + if (r->out.buffer) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buffer_size)); + } } return NDR_ERR_SUCCESS; } @@ -615,11 +668,25 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_uint32(ndr, "security_flags", r->in.security_flags); + ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity"); ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->out.buffer); + ndr->depth++; + ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buffer_size); + ndr->depth--; + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index a7163917bd..10db320452 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -352,6 +352,19 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, r); } + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size); + if (r->out.buffer == NULL) { + talloc_free(r); + return false; + } + + r->out.needed = talloc_zero(r, uint32_t); + if (r->out.needed == NULL) { + talloc_free(r); + return false; + } + r->out.result = _svcctl_QueryServiceObjectSecurity(p, r); if (p->rng_fault_state) { diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h index 7314be0a33..1e005d872a 100644 --- a/source3/librpc/gen_ndr/svcctl.h +++ b/source3/librpc/gen_ndr/svcctl.h @@ -134,6 +134,14 @@ struct svcctl_LockServiceDatabase { struct svcctl_QueryServiceObjectSecurity { struct { + struct policy_handle *handle;/* [ref] */ + uint32_t security_flags; + uint32_t buffer_size;/* [range(0,0x40000)] */ + } in; + + struct { + uint8_t *buffer;/* [ref,size_is(buffer_size)] */ + uint32_t *needed;/* [ref,range(0,0x40000)] */ WERROR result; } out; -- cgit From 8b23d4a6c3e615015ef230070a3f4f9ee5095d2a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 00:18:37 +0100 Subject: Re-run make idl. Guenther (This used to be commit 86061904136706443e5abfda254a2c3a14ffd304) --- source3/librpc/gen_ndr/cli_svcctl.c | 8 ++++++++ source3/librpc/gen_ndr/cli_svcctl.h | 4 ++++ source3/librpc/gen_ndr/ndr_svcctl.c | 39 +++++++++++++++++++++++++++++++++++++ source3/librpc/gen_ndr/svcctl.h | 7 +++++++ 4 files changed, 58 insertions(+) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index 42711e3174..b8f18afe1c 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -243,12 +243,20 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t security_flags, + uint8_t *buffer, + uint32_t buffer_size, WERROR *werror) { struct svcctl_SetServiceObjectSecurity r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.security_flags = security_flags; + r.in.buffer = buffer; + r.in.buffer_size = buffer_size; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r); diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h index d9ab510d5a..7c62519187 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.h +++ b/source3/librpc/gen_ndr/cli_svcctl.h @@ -30,6 +30,10 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t security_flags, + uint8_t *buffer, + uint32_t buffer_size, WERROR *werror); NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c index 74466f76c0..16e0416288 100644 --- a/source3/librpc/gen_ndr/ndr_svcctl.c +++ b/source3/librpc/gen_ndr/ndr_svcctl.c @@ -696,6 +696,17 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.security_flags)); + if (r->in.buffer == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.buffer_size)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -705,7 +716,25 @@ static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_pus static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r) { + TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags)); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)); + } + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer))); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size)); + if (r->in.buffer) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.buffer_size)); + } } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -723,6 +752,16 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, c if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_uint32(ndr, "security_flags", r->in.security_flags); + ndr_print_ptr(ndr, "buffer", r->in.buffer); + ndr->depth++; + ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.buffer_size); + ndr->depth--; + ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size); ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h index 1e005d872a..c13e96b2a0 100644 --- a/source3/librpc/gen_ndr/svcctl.h +++ b/source3/librpc/gen_ndr/svcctl.h @@ -149,6 +149,13 @@ struct svcctl_QueryServiceObjectSecurity { struct svcctl_SetServiceObjectSecurity { + struct { + struct policy_handle *handle;/* [ref] */ + uint32_t security_flags; + uint8_t *buffer;/* [ref,size_is(buffer_size)] */ + uint32_t buffer_size; + } in; + struct { WERROR result; } out; -- cgit From bdebe9dc2a9dfeb922fe8827f97cc68d468e390d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 11:12:33 +0100 Subject: Re-run make idl. Guenther (This used to be commit 5895a03fd600745ec897d987910abca83d79de3e) --- source3/librpc/gen_ndr/libnet_join.h | 2 ++ source3/librpc/gen_ndr/ndr_libnet_join.c | 2 ++ source3/librpc/gen_ndr/ndr_libnet_join.h | 6 +----- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/libnet_join.h b/source3/librpc/gen_ndr/libnet_join.h index 27e66ec0a5..8dbadcf0a2 100644 --- a/source3/librpc/gen_ndr/libnet_join.h +++ b/source3/librpc/gen_ndr/libnet_join.h @@ -63,6 +63,8 @@ struct libnet_UnjoinCtx { const char * dns_domain_name; uint8_t modified_config; const char * error_string; + uint8_t disabled_machine_account; + uint8_t deleted_machine_account; WERROR result; } out; diff --git a/source3/librpc/gen_ndr/ndr_libnet_join.c b/source3/librpc/gen_ndr/ndr_libnet_join.c index 5345bc0ad4..6e65d03977 100644 --- a/source3/librpc/gen_ndr/ndr_libnet_join.c +++ b/source3/librpc/gen_ndr/ndr_libnet_join.c @@ -95,6 +95,8 @@ _PUBLIC_ void ndr_print_libnet_UnjoinCtx(struct ndr_print *ndr, const char *name ndr_print_string(ndr, "dns_domain_name", r->out.dns_domain_name); ndr_print_uint8(ndr, "modified_config", r->out.modified_config); ndr_print_string(ndr, "error_string", r->out.error_string); + ndr_print_uint8(ndr, "disabled_machine_account", r->out.disabled_machine_account); + ndr_print_uint8(ndr, "deleted_machine_account", r->out.deleted_machine_account); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_libnet_join.h b/source3/librpc/gen_ndr/ndr_libnet_join.h index 4a5fdf0d50..14c8a863aa 100644 --- a/source3/librpc/gen_ndr/ndr_libnet_join.h +++ b/source3/librpc/gen_ndr/ndr_libnet_join.h @@ -6,11 +6,7 @@ #ifndef _HEADER_NDR_libnetjoin #define _HEADER_NDR_libnetjoin -#define NDR_LIBNET_JOINCTX (0x00) - -#define NDR_LIBNET_UNJOINCTX (0x01) - -#define NDR_LIBNETJOIN_CALL_COUNT (2) +#define NDR_LIBNETJOIN_CALL_COUNT (0) enum ndr_err_code ndr_push_libnet_JoinCtx(struct ndr_push *ndr, int flags, const struct libnet_JoinCtx *r); enum ndr_err_code ndr_pull_libnet_JoinCtx(struct ndr_pull *ndr, int flags, struct libnet_JoinCtx *r); void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name, int flags, const struct libnet_JoinCtx *r); -- cgit From de39bd20c1f2a674f7acd4ed4fa2527fdbff8aeb Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Feb 2008 23:37:18 +0100 Subject: Re-run make idl. Guenther (This used to be commit 7d88cb2e8db8789b923d8f9979b5c9f65664d3eb) --- source3/librpc/gen_ndr/lsa.h | 10 ++- source3/librpc/gen_ndr/ndr_lsa.c | 135 ++++++++++++++++++++++++++++---------- source3/librpc/gen_ndr/ndr_lsa.h | 3 + source3/librpc/gen_ndr/ndr_samr.c | 10 +-- source3/librpc/gen_ndr/samr.h | 2 +- 5 files changed, 117 insertions(+), 43 deletions(-) (limited to 'source3/librpc/gen_ndr') diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 0f0ed143eb..4fea08e99d 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -19,7 +19,7 @@ struct lsa_String { struct lsa_StringLarge { uint16_t length;/* [value(2*strlen_m(string))] */ - uint16_t size;/* [value(2*(strlen_m(string)+1))] */ + uint16_t size;/* [value(2*strlen_m_term(string))] */ const char *string;/* [unique,charset(UTF16),length_is(length/2),size_is(size/2)] */ }/* [public] */; @@ -31,7 +31,13 @@ struct lsa_Strings { struct lsa_AsciiString { uint16_t length;/* [value(strlen_m(string))] */ uint16_t size;/* [value(strlen_m(string))] */ - const char * string;/* [unique,flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4)] */ + const char *string;/* [unique,charset(DOS),length_is(length),size_is(size)] */ +}/* [public] */; + +struct lsa_AsciiStringLarge { + uint16_t length;/* [value(strlen_m(string))] */ + uint16_t size;/* [value(strlen_m_term(string))] */ + const char *string;/* [unique,charset(DOS),length_is(length),size_is(size)] */ }/* [public] */; struct lsa_LUID { diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 2a683fee77..03e1c21e55 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -80,12 +80,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int nd if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string))); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1))); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string))); NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); } if (ndr_flags & NDR_BUFFERS) { if (r->string) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1) / 2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16)); @@ -136,7 +136,7 @@ _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, ndr_print_struct(ndr, name, "lsa_StringLarge"); ndr->depth++; ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length); - ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * (strlen_m(r->string) + 1):r->size); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size); ndr_print_ptr(ndr, "string", r->string); ndr->depth++; if (r->string) { @@ -238,21 +238,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); - ndr->flags = _flags_save_string; - } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4); - if (r->string) { - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string)); - } - ndr->flags = _flags_save_string; + if (r->string) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS)); } } return NDR_ERR_SUCCESS; @@ -266,29 +259,30 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string)); - if (_ptr_string) { - NDR_PULL_ALLOC(ndr, r->string); - } else { - r->string = NULL; - } - ndr->flags = _flags_save_string; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string)); + if (_ptr_string) { + NDR_PULL_ALLOC(ndr, r->string); + } else { + r->string = NULL; } } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4); - if (r->string) { - _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->string, 0); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0); + if (r->string) { + _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->string, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->string)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->string)); + if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string)); } - ndr->flags = _flags_save_string; + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0); + } + if (r->string) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size)); + } + if (r->string) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length)); } } return NDR_ERR_SUCCESS; @@ -309,6 +303,77 @@ _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string))); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string))); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->string) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->string))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r) +{ + uint32_t _ptr_string; + TALLOC_CTX *_mem_save_string_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string)); + if (_ptr_string) { + NDR_PULL_ALLOC(ndr, r->string); + } else { + r->string = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->string) { + _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->string, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->string)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->string)); + if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string)); + } + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0); + } + if (r->string) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size)); + } + if (r->string) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r) +{ + ndr_print_struct(ndr, name, "lsa_AsciiStringLarge"); + ndr->depth++; + ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size); + ndr_print_ptr(ndr, "string", r->string); + ndr->depth++; + if (r->string) { + ndr_print_string(ndr, "string", r->string); + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r) { if (ndr_flags & NDR_SCALARS) { diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h index 2df42dbaea..a96f2d41b9 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.h +++ b/source3/librpc/gen_ndr/ndr_lsa.h @@ -188,6 +188,9 @@ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r); enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r); void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r); +enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r); +enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r); +void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r); void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r); void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r); void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r); diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 3549bfd22b..3af589f393 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -4124,10 +4124,10 @@ static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx)); - NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name)); } return NDR_ERR_SUCCESS; } @@ -4137,10 +4137,10 @@ static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx)); - NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name)); + NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name)); } return NDR_ERR_SUCCESS; } @@ -4150,7 +4150,7 @@ _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *n ndr_print_struct(ndr, name, "samr_DispEntryAscii"); ndr->depth++; ndr_print_uint32(ndr, "idx", r->idx); - ndr_print_lsa_AsciiString(ndr, "account_name", &r->account_name); + ndr_print_lsa_AsciiStringLarge(ndr, "account_name", &r->account_name); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 700c46222d..c0e2d9d9a9 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -594,7 +594,7 @@ struct samr_DispInfoFullGroups { struct samr_DispEntryAscii { uint32_t idx; - struct lsa_AsciiString account_name; + struct lsa_AsciiStringLarge account_name; }; struct samr_DispInfoAscii { -- cgit