diff options
Diffstat (limited to 'source3/librpc/gen_ndr')
80 files changed, 6946 insertions, 5161 deletions
diff --git a/source3/librpc/gen_ndr/cli_initshutdown.c b/source3/librpc/gen_ndr/cli_initshutdown.c index ab48623ee1..bc8ca5b5f1 100644 --- a/source3/librpc/gen_ndr/cli_initshutdown.c +++ b/source3/librpc/gen_ndr/cli_initshutdown.c @@ -9,7 +9,7 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, @@ -103,7 +103,7 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, diff --git a/source3/librpc/gen_ndr/cli_initshutdown.h b/source3/librpc/gen_ndr/cli_initshutdown.h index c7d2cad664..e2eb9daabe 100644 --- a/source3/librpc/gen_ndr/cli_initshutdown.h +++ b/source3/librpc/gen_ndr/cli_initshutdown.h @@ -4,7 +4,7 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, @@ -16,7 +16,7 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 4ab27ed04b..e7775b1bfe 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -503,7 +503,7 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - struct policy_handle *handle /* [in] [ref] */, + struct policy_handle *policy_handle /* [in] [ref] */, struct lsa_DomainInfo *info /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */) @@ -512,7 +512,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, NTSTATUS status; /* In parameters */ - r.in.handle = handle; + r.in.policy_handle = policy_handle; r.in.info = info; r.in.access_mask = access_mask; @@ -1141,12 +1141,18 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum level /* [in] */, + union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */) { struct lsa_SetInformationTrustedDomain r; NTSTATUS status; /* In parameters */ + r.in.trustdom_handle = trustdom_handle; + r.in.level = level; + r.in.info = info; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &r); @@ -1706,12 +1712,20 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct dom_sid2 *dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum level /* [in] */, + union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */) { struct lsa_SetTrustedDomainInfo r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.dom_sid = dom_sid; + r.in.level = level; + r.in.info = info; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &r); @@ -2161,12 +2175,21 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, + uint32_t access_mask /* [in] */, + struct policy_handle *trustdom_handle /* [out] [ref] */) { struct lsa_CreateTrustedDomainEx r; NTSTATUS status; /* In parameters */ + r.in.policy_handle = policy_handle; + r.in.info = info; + r.in.auth_info = auth_info; + r.in.access_mask = access_mask; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &r); @@ -2191,6 +2214,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, } /* Return variables */ + *trustdom_handle = *r.out.trustdom_handle; /* Return result */ return r.out.result; @@ -2462,8 +2486,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_TransSidArray2 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */) + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */) { struct lsa_LookupNames2 r; NTSTATUS status; @@ -2475,8 +2499,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, r.in.sids = sids; r.in.level = level; r.in.count = count; - r.in.unknown1 = unknown1; - r.in.unknown2 = unknown2; + r.in.lookup_options = lookup_options; + r.in.client_revision = client_revision; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r); @@ -2510,12 +2534,21 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, } NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx) + TALLOC_CTX *mem_ctx, + struct policy_handle *policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, + uint32_t access_mask /* [in] */, + struct policy_handle *trustdom_handle /* [out] [ref] */) { struct lsa_CreateTrustedDomainEx2 r; NTSTATUS status; /* In parameters */ + r.in.policy_handle = policy_handle; + r.in.info = info; + r.in.auth_info = auth_info; + r.in.access_mask = access_mask; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &r); @@ -2540,6 +2573,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, } /* Return variables */ + *trustdom_handle = *r.out.trustdom_handle; /* Return result */ return r.out.result; @@ -2842,8 +2876,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */) + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */) { struct lsa_LookupNames3 r; NTSTATUS status; @@ -2855,8 +2889,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, r.in.sids = sids; r.in.level = level; r.in.count = count; - r.in.unknown1 = unknown1; - r.in.unknown2 = unknown2; + r.in.lookup_options = lookup_options; + r.in.client_revision = client_revision; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r); @@ -3209,8 +3243,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */) + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */) { struct lsa_LookupNames4 r; NTSTATUS status; @@ -3221,8 +3255,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, r.in.sids = sids; r.in.level = level; r.in.count = count; - r.in.unknown1 = unknown1; - r.in.unknown2 = unknown2; + r.in.lookup_options = lookup_options; + r.in.client_revision = client_revision; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r); diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h index f3333a091b..554182c6db 100644 --- a/source3/librpc/gen_ndr/cli_lsa.h +++ b/source3/librpc/gen_ndr/cli_lsa.h @@ -57,7 +57,7 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, uint32_t num_entries /* [in] [range(0,8192)] */); NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - struct policy_handle *handle /* [in] [ref] */, + struct policy_handle *policy_handle /* [in] [ref] */, struct lsa_DomainInfo *info /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); @@ -133,7 +133,10 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */); NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum level /* [in] */, + union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */); NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -201,7 +204,11 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */); NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct dom_sid2 *dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum level /* [in] */, + union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */); NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -250,7 +257,12 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, struct lsa_DomainListEx *domains /* [out] [ref] */, uint32_t max_size /* [in] */); NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, + uint32_t access_mask /* [in] */, + struct policy_handle *trustdom_handle /* [out] [ref] */); NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); @@ -291,10 +303,15 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_TransSidArray2 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */); + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */); NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx); + TALLOC_CTX *mem_ctx, + struct policy_handle *policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, + uint32_t access_mask /* [in] */, + struct policy_handle *trustdom_handle /* [out] [ref] */); NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, @@ -320,8 +337,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */); + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */); NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, @@ -357,8 +374,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */); + uint32_t lookup_options /* [in] */, + uint32_t client_revision /* [in] */); NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index d6ac8b9ede..941273bddc 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -110,8 +110,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */) @@ -167,8 +167,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */) + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */) { struct netr_LogonSamLogoff r; NTSTATUS status; @@ -1934,8 +1934,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *computer_name /* [in] [unique,charset(UTF16)] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, @@ -2241,8 +2241,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h index 2033315a5d..0a0cfdf6e4 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.h +++ b/source3/librpc/gen_ndr/cli_netlogon.h @@ -21,8 +21,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */); @@ -32,8 +32,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */); + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */); NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -297,8 +297,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *computer_name /* [in] [unique,charset(UTF16)] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, @@ -349,8 +349,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, const char *computer_name /* [in] [unique,charset(UTF16)] */, struct netr_Authenticator *credential /* [in] [unique] */, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, - enum netr_LogonLevel logon_level /* [in] */, - union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */, + enum netr_LogonInfoClass logon_level /* [in] */, + union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c index bc5dba4d91..f8ef7a99ad 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.c +++ b/source3/librpc/gen_ndr/cli_ntsvcs.c @@ -424,12 +424,19 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *filter /* [in] [unique,charset(UTF16)] */, + uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */, + uint32_t *length /* [in,out] [ref] */, + uint32_t flags /* [in] */, WERROR *werror) { struct PNP_GetDeviceList r; NTSTATUS status; /* In parameters */ + r.in.filter = filter; + r.in.length = length; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r); @@ -454,6 +461,8 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, } /* Return variables */ + memcpy(buffer, r.out.buffer, *r.in.length * sizeof(*buffer)); + *length = *r.out.length; /* Return result */ if (werror) { @@ -555,11 +564,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, uint32_t property /* [in] */, - uint32_t *unknown1 /* [in,out] [ref] */, + uint32_t *reg_data_type /* [in,out] [ref] */, uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */, uint32_t *buffer_size /* [in,out] [ref] */, uint32_t *needed /* [in,out] [ref] */, - uint32_t unknown3 /* [in] */, + uint32_t flags /* [in] */, WERROR *werror) { struct PNP_GetDeviceRegProp r; @@ -568,10 +577,10 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, /* In parameters */ r.in.devicepath = devicepath; r.in.property = property; - r.in.unknown1 = unknown1; + r.in.reg_data_type = reg_data_type; r.in.buffer_size = buffer_size; r.in.needed = needed; - r.in.unknown3 = unknown3; + r.in.flags = flags; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r); @@ -596,7 +605,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, } /* Return variables */ - *unknown1 = *r.out.unknown1; + *reg_data_type = *r.out.reg_data_type; memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer)); *buffer_size = *r.out.buffer_size; *needed = *r.out.needed; diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h index a52a79ecc5..4ed8a401ec 100644 --- a/source3/librpc/gen_ndr/cli_ntsvcs.h +++ b/source3/librpc/gen_ndr/cli_ntsvcs.h @@ -36,6 +36,10 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + const char *filter /* [in] [unique,charset(UTF16)] */, + uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */, + uint32_t *length /* [in,out] [ref] */, + uint32_t flags /* [in] */, WERROR *werror); NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -50,11 +54,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, uint32_t property /* [in] */, - uint32_t *unknown1 /* [in,out] [ref] */, + uint32_t *reg_data_type /* [in,out] [ref] */, uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */, uint32_t *buffer_size /* [in,out] [ref] */, uint32_t *needed /* [in,out] [ref] */, - uint32_t unknown3 /* [in] */, + uint32_t flags /* [in] */, WERROR *werror); NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index c996c761d5..e5fd4dac87 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -858,9 +858,9 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, - uint8_t *query /* [out] */, - uint32_t buf_size /* [in] */, - uint32_t *bytes_needed /* [out] [ref] */, + struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */, + uint32_t buf_size /* [in] [range(0,8192)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */, WERROR *werror) { struct svcctl_QueryServiceConfigW r; @@ -893,7 +893,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, } /* Return variables */ - memcpy(query, r.out.query, r.in.buf_size * sizeof(*query)); + *query = *r.out.query; *bytes_needed = *r.out.bytes_needed; /* Return result */ diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h index 56f0a2b0e7..02abbadf1e 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.h +++ b/source3/librpc/gen_ndr/cli_svcctl.h @@ -127,9 +127,9 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, - uint8_t *query /* [out] */, - uint32_t buf_size /* [in] */, - uint32_t *bytes_needed /* [out] [ref] */, + struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */, + uint32_t buf_size /* [in] [range(0,8192)] */, + uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */, WERROR *werror); NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c index 29f7e50c45..17b7281c72 100644 --- a/source3/librpc/gen_ndr/cli_winreg.c +++ b/source3/librpc/gen_ndr/cli_winreg.c @@ -497,7 +497,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t enum_index /* [in] */, - struct winreg_ValNameBuf *name /* [in,out] [ref] */, + struct winreg_StringBuf *name /* [in,out] [ref] */, enum winreg_Type *type /* [in,out] [unique] */, uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */, uint32_t *size /* [in,out] [unique] */, @@ -872,9 +872,9 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, struct policy_handle *handle /* [in] [ref] */, struct winreg_String *value_name /* [in] [ref] */, enum winreg_Type *type /* [in,out] [unique] */, - uint8_t *data /* [in,out] [unique,length_is(*value_length),size_is(*data_size)] */, + uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */, uint32_t *data_size /* [in,out] [unique] */, - uint32_t *value_length /* [in,out] [unique] */, + uint32_t *data_length /* [in,out] [unique] */, WERROR *werror) { struct winreg_QueryValue r; @@ -886,7 +886,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, r.in.type = type; r.in.data = data; r.in.data_size = data_size; - r.in.value_length = value_length; + r.in.data_length = data_length; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r); @@ -920,8 +920,8 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, if (data_size && r.out.data_size) { *data_size = *r.out.data_size; } - if (value_length && r.out.value_length) { - *value_length = *r.out.value_length; + if (data_length && r.out.data_length) { + *data_length = *r.out.data_length; } /* Return result */ @@ -1070,7 +1070,7 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, - uint32_t access_mask /* [in] */, + uint32_t sec_info /* [in] */, struct KeySecurityData *sd /* [in] [ref] */, WERROR *werror) { @@ -1079,7 +1079,7 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, /* In parameters */ r.in.handle = handle; - r.in.access_mask = access_mask; + r.in.sec_info = sec_info; r.in.sd = sd; if (DEBUGLEVEL >= 10) { @@ -1209,7 +1209,7 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, @@ -1498,7 +1498,7 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h index 793a4ffc5b..fb27bce9d2 100644 --- a/source3/librpc/gen_ndr/cli_winreg.h +++ b/source3/librpc/gen_ndr/cli_winreg.h @@ -68,7 +68,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t enum_index /* [in] */, - struct winreg_ValNameBuf *name /* [in,out] [ref] */, + struct winreg_StringBuf *name /* [in,out] [ref] */, enum winreg_Type *type /* [in,out] [unique] */, uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */, uint32_t *size /* [in,out] [unique] */, @@ -126,9 +126,9 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, struct policy_handle *handle /* [in] [ref] */, struct winreg_String *value_name /* [in] [ref] */, enum winreg_Type *type /* [in,out] [unique] */, - uint8_t *data /* [in,out] [unique,length_is(*value_length),size_is(*data_size)] */, + uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */, uint32_t *data_size /* [in,out] [unique] */, - uint32_t *value_length /* [in,out] [unique] */, + uint32_t *data_length /* [in,out] [unique] */, WERROR *werror); NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -148,7 +148,7 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, - uint32_t access_mask /* [in] */, + uint32_t sec_info /* [in] */, struct KeySecurityData *sd /* [in] [ref] */, WERROR *werror); NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, @@ -165,7 +165,7 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, @@ -202,7 +202,7 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, - struct initshutdown_String *message /* [in] [unique] */, + struct lsa_StringLarge *message /* [in] [unique] */, uint32_t timeout /* [in] */, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, diff --git a/source3/librpc/gen_ndr/dfs.h b/source3/librpc/gen_ndr/dfs.h index 8957eaef56..07548c3742 100644 --- a/source3/librpc/gen_ndr/dfs.h +++ b/source3/librpc/gen_ndr/dfs.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/misc.h" #ifndef _HEADER_netdfs #define _HEADER_netdfs diff --git a/source3/librpc/gen_ndr/drsblobs.h b/source3/librpc/gen_ndr/drsblobs.h index b0ab9aea2a..692746468e 100644 --- a/source3/librpc/gen_ndr/drsblobs.h +++ b/source3/librpc/gen_ndr/drsblobs.h @@ -4,12 +4,16 @@ #include "librpc/gen_ndr/drsuapi.h" #include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/samr.h" +#include "librpc/gen_ndr/lsa.h" #ifndef _HEADER_drsblobs #define _HEADER_drsblobs #define SUPPLEMENTAL_CREDENTIALS_PREFIX ( " " ) enum drsuapi_DsAttributeId; +enum lsa_TrustAuthType; + struct replPropertyMetaData1 { enum drsuapi_DsAttributeId attid; uint32_t version; @@ -247,7 +251,7 @@ struct package_PrimaryKerberosBlob { }/* [public] */; struct package_PrimaryCLEARTEXTBlob { - const char * cleartext;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */ + DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */ }/* [public] */; struct package_PrimaryWDigestHash { @@ -263,63 +267,158 @@ struct package_PrimaryWDigestBlob { struct package_PrimaryWDigestHash *hashes; }/* [public] */; -struct trustAuthInOutSecret1 { - NTTIME time1; - uint32_t unknown1; - DATA_BLOB value; - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ +struct AuthInfoNone { + uint32_t size;/* [value(0)] */ }; -struct trustAuthInOutCtr1 { - struct trustAuthInOutSecret1 *value1;/* [relative] */ - struct trustAuthInOutSecret1 *value2;/* [relative] */ +struct AuthInfoNT4Owf { + uint32_t size;/* [value(16)] */ + struct samr_Password password; }; -struct trustAuthInOutSecret2V1 { - NTTIME time1; - uint32_t unknown1; - DATA_BLOB value; - NTTIME time2; - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ +struct AuthInfoClear { + uint32_t size; + uint8_t *password; }; -struct trustAuthInOutSecret2V2 { - NTTIME time1; - uint32_t unknown1; - DATA_BLOB value; - NTTIME time2; - uint32_t unknown2; - uint32_t unknown3; - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ -}; - -struct trustAuthInOutCtr2 { - struct trustAuthInOutSecret2V1 *value1;/* [relative] */ - struct trustAuthInOutSecret2V2 *value2;/* [relative] */ +struct AuthInfoVersion { + uint32_t size;/* [value(4)] */ + uint32_t version; }; -union trustAuthInOutCtr { - struct trustAuthInOutCtr1 ctr1;/* [case] */ - struct trustAuthInOutCtr2 ctr2;/* [case(2)] */ +union AuthInfo { + struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */ + struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */ + struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */ + struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */ }/* [nodiscriminant] */; -struct trustAuthInOutBlob { - uint32_t version; - union trustAuthInOutCtr ctr;/* [switch_is(version)] */ +struct AuthenticationInformation { + NTTIME LastUpdateTime; + enum lsa_TrustAuthType AuthType; + union AuthInfo AuthInfo;/* [switch_is(AuthType)] */ + DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ }/* [public] */; +struct AuthenticationInformationArray { + struct AuthenticationInformation *array;/* [size_is] */ +}/* [noprint,nopush,nopull] */; + +struct trustAuthInOutBlob { + uint32_t count; + struct AuthenticationInformationArray *current;/* [relative] */ + struct AuthenticationInformationArray *previous;/* [relative] */ +}/* [noprint,gensize,nopull,public,nopush] */; + +struct trustCurrentPasswords { + uint32_t count; + struct AuthenticationInformation **current;/* [relative] */ +}/* [gensize,public] */; + +struct trustDomainPasswords { + uint8_t confounder[512]; + struct trustCurrentPasswords outgoing;/* [subcontext_size(outgoing_size),subcontext(0)] */ + struct trustCurrentPasswords incoming;/* [subcontext_size(incoming_size),subcontext(0)] */ + uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->flags))] */ + uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->flags))] */ +}/* [public,nopull] */; + struct DsCompressedChunk { uint32_t marker; DATA_BLOB data; }/* [public] */; -struct DsCompressedBlob { - struct DsCompressedChunk chunks[5]; +struct ExtendedErrorAString { + uint16_t __size; + const char *string;/* [unique,charset(DOS),size_is(__size)] */ +}; + +struct ExtendedErrorUString { + uint16_t __size; + const char *string;/* [unique,charset(UTF16),size_is(__size)] */ +}; + +struct ExtendedErrorBlob { + uint16_t length; + uint8_t *data;/* [unique,size_is(length)] */ +}; + +enum ExtendedErrorComputerNamePresent +#ifndef USE_UINT_ENUMS + { + EXTENDED_ERROR_COMPUTER_NAME_PRESENT=1, + EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=2 +} +#else + { __donnot_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF} +#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 ) +#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 ) +#endif +; + +union ExtendedErrorComputerNameU { + struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */ +}/* [switch_type(ExtendedErrorComputerNamePresent)] */; + +struct ExtendedErrorComputerName { + enum ExtendedErrorComputerNamePresent present; + union ExtendedErrorComputerNameU n;/* [switch_is(present)] */ +}; + +enum ExtendedErrorParamType +#ifndef USE_UINT_ENUMS + { + EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=1, + EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=2, + EXTENDED_ERROR_PARAM_TYPE_UINT32=3, + EXTENDED_ERROR_PARAM_TYPE_UINT16=4, + EXTENDED_ERROR_PARAM_TYPE_UINT64=5, + EXTENDED_ERROR_PARAM_TYPE_NONE=6, + EXTENDED_ERROR_PARAM_TYPE_BLOB=7 +} +#else + { __donnot_use_enum_ExtendedErrorParamType=0x7FFFFFFF} +#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 ) +#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 ) +#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 ) +#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 ) +#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 ) +#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 ) +#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 ) +#endif +; + +union ExtendedErrorParamU { + struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */ + struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */ + uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */ + uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */ + uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */ + struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */ +}/* [switch_type(ExtendedErrorParamType)] */; + +struct ExtendedErrorParam { + enum ExtendedErrorParamType type; + union ExtendedErrorParamU p;/* [switch_is(type)] */ +}; + +struct ExtendedErrorInfo { + struct ExtendedErrorInfo *next;/* [unique] */ + struct ExtendedErrorComputerName computer_name; + uint64_t pid; + NTTIME time; + uint32_t generating_component; + WERROR status; + uint16_t detection_location; + uint16_t flags; + uint16_t num_params; + struct ExtendedErrorParam *params;/* [size_is(num_params)] */ }/* [public] */; +struct ExtendedErrorInfoPtr { + struct ExtendedErrorInfo *info;/* [unique] */ +}; + struct decode_replPropertyMetaData { struct { @@ -417,9 +516,17 @@ struct decode_trustAuthInOut { }; -struct decode_DsCompressed { +struct decode_trustDomainPasswords { + struct { + struct trustDomainPasswords blob; + } in; + +}; + + +struct decode_ExtendedErrorInfo { struct { - struct DsCompressedBlob blob; + struct ExtendedErrorInfoPtr ptr;/* [subcontext(0xFFFFFC01)] */ } in; }; diff --git a/source3/librpc/gen_ndr/drsuapi.h b/source3/librpc/gen_ndr/drsuapi.h index 049c2bf4b1..ba01e8f226 100644 --- a/source3/librpc/gen_ndr/drsuapi.h +++ b/source3/librpc/gen_ndr/drsuapi.h @@ -575,29 +575,37 @@ struct drsuapi_DsGetNCChangesCtr6 { WERROR drs_error; }/* [gensize,public] */; +struct drsuapi_DsGetNCChangesCtr1TS { + struct drsuapi_DsGetNCChangesCtr1 ctr1;/* [subcontext(0xFFFFFC01)] */ +}/* [public] */; + +struct drsuapi_DsGetNCChangesCtr6TS { + struct drsuapi_DsGetNCChangesCtr6 ctr6;/* [subcontext(0xFFFFFC01)] */ +}/* [public] */; + struct drsuapi_DsGetNCChangesMSZIPCtr1 { uint32_t decompressed_length; uint32_t compressed_length; - struct drsuapi_DsGetNCChangesCtr1 *ctr1;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ -}; + struct drsuapi_DsGetNCChangesCtr1TS *ts;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ +}/* [nopush] */; struct drsuapi_DsGetNCChangesMSZIPCtr6 { uint32_t decompressed_length; uint32_t compressed_length; - struct drsuapi_DsGetNCChangesCtr6 *ctr6;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ -}; + struct drsuapi_DsGetNCChangesCtr6TS *ts;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ +}/* [nopush] */; struct drsuapi_DsGetNCChangesXPRESSCtr1 { uint32_t decompressed_length; uint32_t compressed_length; - struct drsuapi_DsGetNCChangesCtr1 *ctr1;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ -}; + struct drsuapi_DsGetNCChangesCtr1TS *ts;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ +}/* [nopush] */; struct drsuapi_DsGetNCChangesXPRESSCtr6 { uint32_t decompressed_length; uint32_t compressed_length; - struct drsuapi_DsGetNCChangesCtr6 *ctr6;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ -}; + struct drsuapi_DsGetNCChangesCtr6TS *ts;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ +}/* [nopush] */; enum drsuapi_DsGetNCChangesCompressionType #ifndef USE_UINT_ENUMS @@ -620,7 +628,7 @@ union drsuapi_DsGetNCChangesCompressedCtr { }/* [nodiscriminant,flag(LIBNDR_PRINT_ARRAY_HEX)] */; struct drsuapi_DsGetNCChangesCtr2 { - union drsuapi_DsGetNCChangesCompressedCtr ctr;/* [switch_is(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] */ + struct drsuapi_DsGetNCChangesMSZIPCtr1 mszip1; }; struct drsuapi_DsGetNCChangesCtr7 { @@ -790,7 +798,7 @@ enum drsuapi_DsNameFlags enum drsuapi_DsNameFormat #ifndef USE_UINT_ENUMS { - DRSUAPI_DS_NAME_FORMAT_UKNOWN=0, + DRSUAPI_DS_NAME_FORMAT_UNKNOWN=0, DRSUAPI_DS_NAME_FORMAT_FQDN_1779=1, DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT=2, DRSUAPI_DS_NAME_FORMAT_DISPLAY=3, @@ -804,7 +812,7 @@ enum drsuapi_DsNameFormat } #else { __donnot_use_enum_drsuapi_DsNameFormat=0x7FFFFFFF} -#define DRSUAPI_DS_NAME_FORMAT_UKNOWN ( 0 ) +#define DRSUAPI_DS_NAME_FORMAT_UNKNOWN ( 0 ) #define DRSUAPI_DS_NAME_FORMAT_FQDN_1779 ( 1 ) #define DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT ( 2 ) #define DRSUAPI_DS_NAME_FORMAT_DISPLAY ( 3 ) @@ -889,7 +897,7 @@ union drsuapi_DsWriteAccountSpnResult { struct drsuapi_DsRemoveDSServerRequest1 { const char *server_dn;/* [unique,charset(UTF16)] */ const char *domain_dn;/* [unique,charset(UTF16)] */ - uint32_t unknown; + uint32_t commit; }; union drsuapi_DsRemoveDSServerRequest { @@ -897,7 +905,7 @@ union drsuapi_DsRemoveDSServerRequest { }/* [switch_type(int32)] */; struct drsuapi_DsRemoveDSServerResult1 { - WERROR status; + uint32_t last_dc_in_domain; }; union drsuapi_DsRemoveDSServerResult { diff --git a/source3/librpc/gen_ndr/echo.h b/source3/librpc/gen_ndr/echo.h index c8b5b86422..79d4220714 100644 --- a/source3/librpc/gen_ndr/echo.h +++ b/source3/librpc/gen_ndr/echo.h @@ -7,7 +7,7 @@ struct echo_info1 { uint8_t v; -}; +}/* [public] */; struct echo_info2 { uint16_t v; diff --git a/source3/librpc/gen_ndr/epmapper.h b/source3/librpc/gen_ndr/epmapper.h index d39269b32b..4b75261a02 100644 --- a/source3/librpc/gen_ndr/epmapper.h +++ b/source3/librpc/gen_ndr/epmapper.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/misc.h" #ifndef _HEADER_epmapper #define _HEADER_epmapper @@ -226,7 +227,9 @@ struct epm_twr_t { struct epm_entry_t { struct GUID object; struct epm_twr_t *tower;/* [ptr] */ - const char * annotation;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4)] */ + uint32_t __annotation_offset;/* [value(0)] */ + uint32_t __annotation_length;/* [value(strlen(annotation)+1)] */ + const char *annotation;/* [charset(DOS)] */ }; struct rpc_if_id_t { diff --git a/source3/librpc/gen_ndr/initshutdown.h b/source3/librpc/gen_ndr/initshutdown.h index 366f017c97..014e2fe689 100644 --- a/source3/librpc/gen_ndr/initshutdown.h +++ b/source3/librpc/gen_ndr/initshutdown.h @@ -2,25 +2,15 @@ #include <stdint.h> +#include "librpc/gen_ndr/lsa.h" #ifndef _HEADER_initshutdown #define _HEADER_initshutdown -struct initshutdown_String_sub { - uint32_t name_size;/* [value(strlen_m_term(name))] */ - const char * name;/* [flag(LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM)] */ -}; - -struct initshutdown_String { - 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] */; - struct initshutdown_Init { struct { uint16_t *hostname;/* [unique] */ - struct initshutdown_String *message;/* [unique] */ + struct lsa_StringLarge *message;/* [unique] */ uint32_t timeout; uint8_t force_apps; uint8_t do_reboot; @@ -48,7 +38,7 @@ struct initshutdown_Abort { struct initshutdown_InitEx { struct { uint16_t *hostname;/* [unique] */ - struct initshutdown_String *message;/* [unique] */ + struct lsa_StringLarge *message;/* [unique] */ uint32_t timeout; uint8_t force_apps; uint8_t do_reboot; diff --git a/source3/librpc/gen_ndr/krb5pac.h b/source3/librpc/gen_ndr/krb5pac.h index b3b29e5b2f..7ec3e95d70 100644 --- a/source3/librpc/gen_ndr/krb5pac.h +++ b/source3/librpc/gen_ndr/krb5pac.h @@ -8,6 +8,7 @@ #ifndef _HEADER_krb5pac #define _HEADER_krb5pac +#define NETLOGON_GENERIC_KRB5_PAC_VALIDATE ( 3 ) struct PAC_LOGON_NAME { NTTIME logon_time; uint16_t size;/* [value(2*strlen_m(account_name))] */ @@ -39,10 +40,6 @@ struct PAC_UNKNOWN_12 { }; 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] */; @@ -72,7 +69,7 @@ struct DATA_BLOB_REM { }; union PAC_INFO { - struct PAC_LOGON_INFO_CTR logon_info;/* [case(PAC_TYPE_LOGON_INFO)] */ + struct PAC_LOGON_INFO_CTR logon_info;/* [subcontext(0xFFFFFC01),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)] */ @@ -105,6 +102,14 @@ struct PAC_DATA_RAW { struct PAC_BUFFER_RAW *buffers; }/* [public] */; +struct PAC_Validate { + uint32_t MessageType;/* [value(NETLOGON_GENERIC_KRB5_PAC_VALIDATE)] */ + uint32_t ChecksumLength; + int32_t SignatureType; + uint32_t SignatureLength; + DATA_BLOB ChecksumAndSignature;/* [flag(LIBNDR_FLAG_REMAINING)] */ +}/* [public] */; + struct netsamlogoncache_entry { time_t timestamp; struct netr_SamInfo3 info3; @@ -134,4 +139,12 @@ struct decode_login_info { }; + +struct decode_pac_validate { + struct { + struct PAC_Validate pac_validate; + } in; + +}; + #endif /* _HEADER_krb5pac */ diff --git a/source3/librpc/gen_ndr/libnetapi.h b/source3/librpc/gen_ndr/libnetapi.h index 98da9e12ea..ae7acbf572 100644 --- a/source3/librpc/gen_ndr/libnetapi.h +++ b/source3/librpc/gen_ndr/libnetapi.h @@ -413,7 +413,9 @@ struct USER_INFO_X { uint32_t usriX_code_page; const char * usriX_profile; const char * usriX_home_dir_drive; + uint32_t usriX_user_id; uint32_t usriX_primary_group_id; + uint32_t usriX_password_expired; }; struct GROUP_USERS_INFO_0 { diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h index 1e3d3162b2..d91cf4b66d 100644 --- a/source3/librpc/gen_ndr/lsa.h +++ b/source3/librpc/gen_ndr/lsa.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/misc.h" #include "librpc/gen_ndr/security.h" #ifndef _HEADER_lsarpc #define _HEADER_lsarpc @@ -11,6 +12,9 @@ #define MAX_REF_DOMAINS ( LSA_REF_DOMAIN_LIST_MULTIPLIER ) #define MAX_LOOKUP_SIDS ( 0x5000 ) #define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER ( 82 ) +#define LSA_CLIENT_REVISION_NO_DNS ( 0x00000001 ) +#define LSA_CLIENT_REVISION_DNS ( 0x00000002 ) +#define LSA_LOOKUP_OPTIONS_NO_ISOLATED ( 0x80000000 ) struct lsa_String { uint16_t length;/* [value(2*strlen_m(string))] */ uint16_t size;/* [value(2*strlen_m(string))] */ @@ -93,12 +97,11 @@ struct lsa_ObjectAttribute { struct lsa_AuditLogInfo { uint32_t percent_full; - uint32_t log_size; - NTTIME retention_time; + uint32_t maximum_log_size; + uint64_t retention_time; uint8_t shutdown_in_progress; - NTTIME time_to_shutdown; + uint64_t time_to_shutdown; uint32_t next_audit_record; - uint32_t unknown; }; enum lsa_PolicyAuditPolicy @@ -162,9 +165,21 @@ struct lsa_PDAccountInfo { struct lsa_String name; }; +enum lsa_Role +#ifndef USE_UINT_ENUMS + { + LSA_ROLE_BACKUP=2, + LSA_ROLE_PRIMARY=3 +} +#else + { __donnot_use_enum_lsa_Role=0x7FFFFFFF} +#define LSA_ROLE_BACKUP ( 2 ) +#define LSA_ROLE_PRIMARY ( 3 ) +#endif +; + struct lsa_ServerRole { - uint16_t unknown; - uint16_t role; + enum lsa_Role role; }; struct lsa_ReplicaSourceInfo { @@ -191,7 +206,6 @@ struct lsa_AuditFullSetInfo { }; struct lsa_AuditFullQueryInfo { - uint16_t unknown; uint8_t shutdown_on_full; uint8_t log_is_full; }; @@ -215,10 +229,12 @@ enum lsa_PolicyInfo LSA_POLICY_INFO_ROLE=6, LSA_POLICY_INFO_REPLICA=7, LSA_POLICY_INFO_QUOTA=8, - LSA_POLICY_INFO_DB=9, + LSA_POLICY_INFO_MOD=9, LSA_POLICY_INFO_AUDIT_FULL_SET=10, LSA_POLICY_INFO_AUDIT_FULL_QUERY=11, - LSA_POLICY_INFO_DNS=12 + LSA_POLICY_INFO_DNS=12, + LSA_POLICY_INFO_DNS_INT=13, + LSA_POLICY_INFO_L_ACCOUNT_DOMAIN=14 } #else { __donnot_use_enum_lsa_PolicyInfo=0x7FFFFFFF} @@ -230,10 +246,12 @@ enum lsa_PolicyInfo #define LSA_POLICY_INFO_ROLE ( 6 ) #define LSA_POLICY_INFO_REPLICA ( 7 ) #define LSA_POLICY_INFO_QUOTA ( 8 ) -#define LSA_POLICY_INFO_DB ( 9 ) +#define LSA_POLICY_INFO_MOD ( 9 ) #define LSA_POLICY_INFO_AUDIT_FULL_SET ( 10 ) #define LSA_POLICY_INFO_AUDIT_FULL_QUERY ( 11 ) #define LSA_POLICY_INFO_DNS ( 12 ) +#define LSA_POLICY_INFO_DNS_INT ( 13 ) +#define LSA_POLICY_INFO_L_ACCOUNT_DOMAIN ( 14 ) #endif ; @@ -246,10 +264,11 @@ union lsa_PolicyInformation { struct lsa_ServerRole role;/* [case(LSA_POLICY_INFO_ROLE)] */ struct lsa_ReplicaSourceInfo replica;/* [case(LSA_POLICY_INFO_REPLICA)] */ struct lsa_DefaultQuotaInfo quota;/* [case(LSA_POLICY_INFO_QUOTA)] */ - struct lsa_ModificationInfo db;/* [case(LSA_POLICY_INFO_DB)] */ + struct lsa_ModificationInfo mod;/* [case(LSA_POLICY_INFO_MOD)] */ struct lsa_AuditFullSetInfo auditfullset;/* [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] */ struct lsa_AuditFullQueryInfo auditfullquery;/* [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] */ struct lsa_DnsDomainInfo dns;/* [case(LSA_POLICY_INFO_DNS)] */ + struct lsa_DomainInfo l_account_domain;/* [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] */ }/* [switch_type(uint16)] */; struct lsa_SidPtr { @@ -320,7 +339,8 @@ enum lsa_LookupNamesLevel 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 + LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2=6, + LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC=7 } #else { __donnot_use_enum_lsa_LookupNamesLevel=0x7FFFFFFF} @@ -330,6 +350,7 @@ enum lsa_LookupNamesLevel #define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY ( 4 ) #define LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY ( 5 ) #define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 ( 6 ) +#define LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC ( 7 ) #endif ; @@ -355,6 +376,21 @@ struct lsa_PrivilegeSet { struct lsa_LUIDAttribute *set;/* [size_is(count)] */ }; +/* bitmap lsa_SystemAccessModeFlags */ +#define LSA_POLICY_MODE_INTERACTIVE ( 0x00000001 ) +#define LSA_POLICY_MODE_NETWORK ( 0x00000002 ) +#define LSA_POLICY_MODE_BATCH ( 0x00000004 ) +#define LSA_POLICY_MODE_SERVICE ( 0x00000010 ) +#define LSA_POLICY_MODE_PROXY ( 0x00000020 ) +#define LSA_POLICY_MODE_DENY_INTERACTIVE ( 0x00000040 ) +#define LSA_POLICY_MODE_DENY_NETWORK ( 0x00000080 ) +#define LSA_POLICY_MODE_DENY_BATCH ( 0x00000100 ) +#define LSA_POLICY_MODE_DENY_SERVICE ( 0x00000200 ) +#define LSA_POLICY_MODE_REMOTE_INTERACTIVE ( 0x00000400 ) +#define LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE ( 0x00000800 ) +#define LSA_POLICY_MODE_ALL ( 0x00000FF7 ) +#define LSA_POLICY_MODE_ALL_NT4 ( 0x00000037 ) + struct lsa_DATA_BUF { uint32_t length; uint32_t size; @@ -370,35 +406,75 @@ enum lsa_TrustDomInfoEnum #ifndef USE_UINT_ENUMS { LSA_TRUSTED_DOMAIN_INFO_NAME=1, - LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO=2, + LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS=2, LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET=3, LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4, LSA_TRUSTED_DOMAIN_INFO_BASIC=5, LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6, LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7, LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8, - LSA_TRUSTED_DOMAIN_INFO_11=11, - LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12 + LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL=9, + LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL=10, + LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL=11, + LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL=12, + LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES=13 } #else { __donnot_use_enum_lsa_TrustDomInfoEnum=0x7FFFFFFF} #define LSA_TRUSTED_DOMAIN_INFO_NAME ( 1 ) -#define LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO ( 2 ) +#define LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS ( 2 ) #define LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET ( 3 ) #define LSA_TRUSTED_DOMAIN_INFO_PASSWORD ( 4 ) #define LSA_TRUSTED_DOMAIN_INFO_BASIC ( 5 ) #define LSA_TRUSTED_DOMAIN_INFO_INFO_EX ( 6 ) #define LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO ( 7 ) #define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO ( 8 ) -#define LSA_TRUSTED_DOMAIN_INFO_11 ( 11 ) -#define LSA_TRUSTED_DOMAIN_INFO_INFO_ALL ( 12 ) +#define LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL ( 9 ) +#define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL ( 10 ) +#define LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL ( 11 ) +#define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL ( 12 ) +#define LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES ( 13 ) +#endif +; + +/* bitmap lsa_TrustDirection */ +#define LSA_TRUST_DIRECTION_INBOUND ( 0x00000001 ) +#define LSA_TRUST_DIRECTION_OUTBOUND ( 0x00000002 ) + +enum lsa_TrustType +#ifndef USE_UINT_ENUMS + { + LSA_TRUST_TYPE_DOWNLEVEL=0x00000001, + LSA_TRUST_TYPE_UPLEVEL=0x00000002, + LSA_TRUST_TYPE_MIT=0x00000003 +} +#else + { __donnot_use_enum_lsa_TrustType=0x7FFFFFFF} +#define LSA_TRUST_TYPE_DOWNLEVEL ( 0x00000001 ) +#define LSA_TRUST_TYPE_UPLEVEL ( 0x00000002 ) +#define LSA_TRUST_TYPE_MIT ( 0x00000003 ) #endif ; +/* bitmap lsa_TrustAttributes */ +#define LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE ( 0x00000001 ) +#define LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY ( 0x00000002 ) +#define LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN ( 0x00000004 ) +#define LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE ( 0x00000008 ) +#define LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION ( 0x00000010 ) +#define LSA_TRUST_ATTRIBUTE_WITHIN_FOREST ( 0x00000020 ) +#define LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL ( 0x00000040 ) +#define LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION ( 0x00000080 ) + struct lsa_TrustDomainInfoName { struct lsa_StringLarge netbios_name; }; +struct lsa_TrustDomainInfoControllers { + uint32_t entries; + struct lsa_StringLarge *netbios_names;/* [unique,size_is(entries)] */ +}; + struct lsa_TrustDomainInfoPosixOffset { uint32_t posix_offset; }; @@ -418,13 +494,30 @@ struct lsa_TrustDomainInfoInfoEx { struct lsa_StringLarge netbios_name; struct dom_sid2 *sid;/* [unique] */ uint32_t trust_direction; - uint32_t trust_type; + enum lsa_TrustType trust_type; uint32_t trust_attributes; }; +enum lsa_TrustAuthType +#ifndef USE_UINT_ENUMS + { + TRUST_AUTH_TYPE_NONE=0, + TRUST_AUTH_TYPE_NT4OWF=1, + TRUST_AUTH_TYPE_CLEAR=2, + TRUST_AUTH_TYPE_VERSION=3 +} +#else + { __donnot_use_enum_lsa_TrustAuthType=0x7FFFFFFF} +#define TRUST_AUTH_TYPE_NONE ( 0 ) +#define TRUST_AUTH_TYPE_NT4OWF ( 1 ) +#define TRUST_AUTH_TYPE_CLEAR ( 2 ) +#define TRUST_AUTH_TYPE_VERSION ( 3 ) +#endif +; + struct lsa_TrustDomainInfoBuffer { NTTIME last_update_time; - uint32_t secret_type; + enum lsa_TrustAuthType AuthType; struct lsa_DATA_BUF2 data; }; @@ -443,28 +536,46 @@ struct lsa_TrustDomainInfoFullInfo { struct lsa_TrustDomainInfoAuthInfo auth_info; }; -struct lsa_TrustDomainInfo11 { +struct lsa_TrustDomainInfoAuthInfoInternal { + struct lsa_DATA_BUF2 auth_blob; +}; + +struct lsa_TrustDomainInfoFullInfoInternal { struct lsa_TrustDomainInfoInfoEx info_ex; - struct lsa_DATA_BUF2 data1; + struct lsa_TrustDomainInfoPosixOffset posix_offset; + struct lsa_TrustDomainInfoAuthInfoInternal auth_info; }; -struct lsa_TrustDomainInfoInfoAll { +struct lsa_TrustDomainInfoInfoEx2Internal { struct lsa_TrustDomainInfoInfoEx info_ex; - struct lsa_DATA_BUF2 data1; + uint32_t forest_trust_length; + uint8_t *forest_trust_data;/* [unique,size_is(forest_trust_length)] */ +}; + +struct lsa_TrustDomainInfoFullInfo2Internal { + struct lsa_TrustDomainInfoInfoEx2Internal info; struct lsa_TrustDomainInfoPosixOffset posix_offset; struct lsa_TrustDomainInfoAuthInfo auth_info; }; +struct lsa_TrustDomainInfoSupportedEncTypes { + uint32_t enc_types; +}; + union lsa_TrustedDomainInfo { struct lsa_TrustDomainInfoName name;/* [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] */ + struct lsa_TrustDomainInfoControllers controllers;/* [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)] */ struct lsa_TrustDomainInfoPosixOffset posix_offset;/* [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] */ struct lsa_TrustDomainInfoPassword password;/* [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] */ struct lsa_TrustDomainInfoBasic info_basic;/* [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] */ struct lsa_TrustDomainInfoInfoEx info_ex;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] */ struct lsa_TrustDomainInfoAuthInfo auth_info;/* [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] */ struct lsa_TrustDomainInfoFullInfo full_info;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] */ - struct lsa_TrustDomainInfo11 info11;/* [case(LSA_TRUSTED_DOMAIN_INFO_11)] */ - struct lsa_TrustDomainInfoInfoAll info_all;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] */ + struct lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)] */ + struct lsa_TrustDomainInfoFullInfoInternal full_info_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)] */ + struct lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)] */ + struct lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)] */ + struct lsa_TrustDomainInfoSupportedEncTypes enc_types;/* [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)] */ }/* [switch_type(lsa_TrustDomInfoEnum)] */; struct lsa_DATA_BUF_PTR { @@ -545,7 +656,7 @@ struct lsa_TranslatedSid3 { enum lsa_SidType sid_type; struct dom_sid2 *sid;/* [unique] */ uint32_t sid_index; - uint32_t unknown; + uint32_t flags; }; struct lsa_TransSidArray3 { @@ -762,7 +873,7 @@ struct lsa_EnumAccounts { struct lsa_CreateTrustedDomain { struct { - struct policy_handle *handle;/* [ref] */ + struct policy_handle *policy_handle;/* [ref] */ struct lsa_DomainInfo *info;/* [ref] */ uint32_t access_mask; } in; @@ -973,6 +1084,12 @@ struct lsa_QueryTrustedDomainInfo { struct lsa_SetInformationTrustedDomain { struct { + struct policy_handle *trustdom_handle;/* [ref] */ + enum lsa_TrustDomInfoEnum level; + union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { NTSTATUS result; } out; @@ -1160,6 +1277,13 @@ struct lsa_QueryTrustedDomainInfoBySid { struct lsa_SetTrustedDomainInfo { struct { + struct policy_handle *handle;/* [ref] */ + struct dom_sid2 *dom_sid;/* [ref] */ + enum lsa_TrustDomInfoEnum level; + union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */ + } in; + + struct { NTSTATUS result; } out; @@ -1302,6 +1426,14 @@ struct lsa_EnumTrustedDomainsEx { struct lsa_CreateTrustedDomainEx { struct { + struct policy_handle *policy_handle;/* [ref] */ + struct lsa_TrustDomainInfoInfoEx *info;/* [ref] */ + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info;/* [ref] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *trustdom_handle;/* [ref] */ NTSTATUS result; } out; @@ -1399,8 +1531,8 @@ struct lsa_LookupNames2 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t unknown1; - uint32_t unknown2; + uint32_t lookup_options; + uint32_t client_revision; struct lsa_TransSidArray2 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1417,6 +1549,14 @@ struct lsa_LookupNames2 { struct lsa_CreateTrustedDomainEx2 { struct { + struct policy_handle *policy_handle;/* [ref] */ + struct lsa_TrustDomainInfoInfoEx *info;/* [ref] */ + struct lsa_TrustDomainInfoAuthInfoInternal *auth_info;/* [ref] */ + uint32_t access_mask; + } in; + + struct { + struct policy_handle *trustdom_handle;/* [ref] */ NTSTATUS result; } out; @@ -1493,8 +1633,8 @@ struct lsa_LookupNames3 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t unknown1; - uint32_t unknown2; + uint32_t lookup_options; + uint32_t client_revision; struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1597,8 +1737,8 @@ struct lsa_LookupNames4 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t unknown1; - uint32_t unknown2; + uint32_t lookup_options; + uint32_t client_revision; struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; diff --git a/source3/librpc/gen_ndr/misc.h b/source3/librpc/gen_ndr/misc.h index 4fa7415db7..b3740faf34 100644 --- a/source3/librpc/gen_ndr/misc.h +++ b/source3/librpc/gen_ndr/misc.h @@ -26,13 +26,17 @@ struct policy_handle { enum netr_SchannelType #ifndef USE_UINT_ENUMS { + SEC_CHAN_NULL=0, SEC_CHAN_WKSTA=2, + SEC_CHAN_DNS_DOMAIN=3, SEC_CHAN_DOMAIN=4, SEC_CHAN_BDC=6 } #else { __donnot_use_enum_netr_SchannelType=0x7FFFFFFF} +#define SEC_CHAN_NULL ( 0 ) #define SEC_CHAN_WKSTA ( 2 ) +#define SEC_CHAN_DNS_DOMAIN ( 3 ) #define SEC_CHAN_DOMAIN ( 4 ) #define SEC_CHAN_BDC ( 6 ) #endif diff --git a/source3/librpc/gen_ndr/nbt.h b/source3/librpc/gen_ndr/nbt.h index 62ad524a91..4b872d7936 100644 --- a/source3/librpc/gen_ndr/nbt.h +++ b/source3/librpc/gen_ndr/nbt.h @@ -221,15 +221,15 @@ union nbt_rdata { struct nbt_rdata_netbios netbios;/* [case(NBT_QTYPE_NETBIOS)] */ struct nbt_rdata_status status;/* [case(NBT_QTYPE_STATUS)] */ struct nbt_rdata_data data;/* [default] */ -}/* [nodiscriminant] */; +}/* [nodiscriminant,public] */; struct nbt_res_rec { struct nbt_name name; enum nbt_qtype rr_type; enum nbt_qclass rr_class; uint32_t ttl; - union nbt_rdata rdata;/* [switch_is(((((rr_type)==NBT_QTYPE_NETBIOS)&&talloc_check_name(ndr,"struct ndr_push")&&((rdata).data.length==2))?0:rr_type))] */ -}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; + union nbt_rdata rdata;/* [switch_is(rr_type)] */ +}/* [nopush,flag(LIBNDR_PRINT_ARRAY_HEX)] */; struct nbt_name_packet { uint16_t name_trn_id; @@ -390,69 +390,11 @@ struct nbt_dgram_packet { union dgram_data data;/* [switch_is(msg_type)] */ }/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX)] */; -enum nbt_netlogon_command -#ifndef USE_UINT_ENUMS - { - NETLOGON_QUERY_FOR_PDC=0x7, - NETLOGON_ANNOUNCE_UAS=0xa, - NETLOGON_RESPONSE_FROM_PDC=0xc, - NETLOGON_QUERY_FOR_PDC2=0x12, - NETLOGON_RESPONSE_FROM_PDC2=0x17, - NETLOGON_RESPONSE_FROM_PDC_USER=0x19 -} -#else - { __donnot_use_enum_nbt_netlogon_command=0x7FFFFFFF} -#define NETLOGON_QUERY_FOR_PDC ( 0x7 ) -#define NETLOGON_ANNOUNCE_UAS ( 0xa ) -#define NETLOGON_RESPONSE_FROM_PDC ( 0xc ) -#define NETLOGON_QUERY_FOR_PDC2 ( 0x12 ) -#define NETLOGON_RESPONSE_FROM_PDC2 ( 0x17 ) -#define NETLOGON_RESPONSE_FROM_PDC_USER ( 0x19 ) -#endif -; - -/* bitmap nbt_netlogon_version */ -#define NETLOGON_VERSION_1 ( 0x00000001 ) -#define NETLOGON_VERSION_5 ( 0x00000002 ) -#define NETLOGON_VERSION_5EX ( 0x00000004 ) -#define NETLOGON_VERSION_5EX_WITH_IP ( 0x00000008 ) -#define NETLOGON_VERSION_WITH_CLOSEST_SITE ( 0x00000010 ) -#define NETLOGON_VERSION_AVOID_NT4_EMUL ( 0x01000000 ) -#define NETLOGON_VERSION_PDC ( 0x10000000 ) -#define NETLOGON_VERSION_IP ( 0x20000000 ) -#define NETLOGON_VERSION_LOCAL ( 0x40000000 ) -#define NETLOGON_VERSION_GC ( 0x80000000 ) - -struct nbt_netlogon_query_for_pdc { - const char * computer_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ - const char * unicode_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t nt_version; - uint16_t lmnt_token; - uint16_t lm20_token; -}; - -struct nbt_netlogon_query_for_pdc2 { - uint16_t request_count; - const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t unknown[2]; - uint32_t nt_version; - uint16_t lmnt_token; - uint16_t lm20_token; -}; - -struct nbt_netlogon_response_from_pdc { - const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ - const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t nt_version; - uint16_t lmnt_token; - uint16_t lm20_token; -}; +struct nbt_sockaddr { + uint32_t sockaddr_family; + const char * pdc_ip;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */ + DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */ +}/* [gensize,public] */; /* bitmap nbt_server_type */ #define NBT_SERVER_PDC ( 0x00000001 ) @@ -468,157 +410,90 @@ struct nbt_netlogon_response_from_pdc { #define NBT_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 ) #define NBT_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 ) -struct nbt_dc_sock_addr { - uint32_t family; - const char * pdc_ip;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */ - DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */ -}; - -struct nbt_netlogon_response_from_pdc2 { - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ - uint32_t server_type; - struct GUID domain_uuid; - const char * forest; - const char * dns_domain; - const char * pdc_dns_name; - const char * domain; - const char * pdc_name; - const char * user_name; - const char * server_site; - const char * client_site; - uint8_t dc_sock_addr_size; - struct nbt_dc_sock_addr dc_sock_addr;/* [subcontext_size(dc_sock_addr_size),subcontext(0)] */ - uint32_t nt_version; - uint16_t lmnt_token; - uint16_t lm20_token; -}; - -enum netr_SamDatabaseID; - -struct nbt_db_change { - enum netr_SamDatabaseID db_index; - uint64_t serial; - NTTIME timestamp; -}; +/* bitmap netlogon_nt_version_flags */ +#define NETLOGON_NT_VERSION_1 ( 0x00000001 ) +#define NETLOGON_NT_VERSION_5 ( 0x00000002 ) +#define NETLOGON_NT_VERSION_5EX ( 0x00000004 ) +#define NETLOGON_NT_VERSION_5EX_WITH_IP ( 0x00000008 ) +#define NETLOGON_NT_VERSION_WITH_CLOSEST_SITE ( 0x00000010 ) +#define NETLOGON_NT_VERSION_AVIOD_NT4EMUL ( 0x01000000 ) +#define NETLOGON_NT_VERSION_PDC ( 0x10000000 ) +#define NETLOGON_NT_VERSION_IP ( 0x20000000 ) +#define NETLOGON_NT_VERSION_LOCAL ( 0x40000000 ) +#define NETLOGON_NT_VERSION_GC ( 0x80000000 ) + +enum netlogon_command +#ifndef USE_UINT_ENUMS + { + LOGON_PRIMARY_QUERY=7, + NETLOGON_ANNOUNCE_UAS=10, + NETLOGON_RESPONSE_FROM_PDC=12, + LOGON_SAM_LOGON_REQUEST=18, + LOGON_SAM_LOGON_RESPONSE=19, + LOGON_SAM_LOGON_PAUSE_RESPONSE=20, + LOGON_SAM_LOGON_USER_UNKNOWN=21, + LOGON_SAM_LOGON_RESPONSE_EX=23, + LOGON_SAM_LOGON_PAUSE_RESPONSE_EX=24, + LOGON_SAM_LOGON_USER_UNKNOWN_EX=25 +} +#else + { __donnot_use_enum_netlogon_command=0x7FFFFFFF} +#define LOGON_PRIMARY_QUERY ( 7 ) +#define NETLOGON_ANNOUNCE_UAS ( 10 ) +#define NETLOGON_RESPONSE_FROM_PDC ( 12 ) +#define LOGON_SAM_LOGON_REQUEST ( 18 ) +#define LOGON_SAM_LOGON_RESPONSE ( 19 ) +#define LOGON_SAM_LOGON_PAUSE_RESPONSE ( 20 ) +#define LOGON_SAM_LOGON_USER_UNKNOWN ( 21 ) +#define LOGON_SAM_LOGON_RESPONSE_EX ( 23 ) +#define LOGON_SAM_LOGON_PAUSE_RESPONSE_EX ( 24 ) +#define LOGON_SAM_LOGON_USER_UNKNOWN_EX ( 25 ) +#endif +; -struct nbt_netlogon_announce_uas { - uint32_t serial_lo; - time_t timestamp; - uint32_t pulse; - uint32_t random; - const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - const char * domain;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ - const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * unicode_domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t db_count; - struct nbt_db_change *dbchange; +struct NETLOGON_SAM_LOGON_REQUEST { + uint16_t request_count; + const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ + uint32_t acct_control; uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */ + DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */ struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */ uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; -}; +}/* [nopull,nopush] */; -union nbt_netlogon_request { - struct nbt_netlogon_query_for_pdc pdc;/* [case(NETLOGON_QUERY_FOR_PDC)] */ - struct nbt_netlogon_query_for_pdc2 pdc2;/* [case(NETLOGON_QUERY_FOR_PDC2)] */ - struct nbt_netlogon_announce_uas uas;/* [case(NETLOGON_ANNOUNCE_UAS)] */ - struct nbt_netlogon_response_from_pdc response;/* [case(NETLOGON_RESPONSE_FROM_PDC)] */ - struct nbt_netlogon_response_from_pdc2 response2;/* [case(NETLOGON_RESPONSE_FROM_PDC2)] */ -}/* [nodiscriminant] */; - -struct nbt_netlogon_packet { - enum nbt_netlogon_command command; - union nbt_netlogon_request req;/* [switch_is(command)] */ -}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; - -struct nbt_cldap_netlogon_1 { - enum nbt_netlogon_command type; - const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ +struct NETLOGON_SAM_LOGON_RESPONSE_NT40 { + enum netlogon_command command; + const char * server;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t nt_version;/* [value] */ + const char * domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; -}; +}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; -struct nbt_cldap_netlogon_3 { - enum nbt_netlogon_command type; +struct NETLOGON_SAM_LOGON_RESPONSE { + enum netlogon_command command; const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ struct GUID domain_uuid; - struct GUID unknown_uuid; + struct GUID zero_uuid; const char * forest; const char * dns_domain; const char * pdc_dns_name; const char * pdc_ip; uint32_t server_type; - uint32_t nt_version;/* [value(3)] */ - uint16_t lmnt_token; - uint16_t lm20_token; -}; - -struct nbt_cldap_netlogon_5 { - enum nbt_netlogon_command type; - uint16_t sbz; - uint32_t server_type; - struct GUID domain_uuid; - const char * forest; - const char * dns_domain; - const char * pdc_dns_name; - const char * domain; - const char * pdc_name; - const char * user_name; - const char * server_site; - const char * client_site; - uint32_t nt_version;/* [value(5)] */ - uint16_t lmnt_token; - uint16_t lm20_token; -}/* [public] */; - -struct nbt_cldap_netlogon_13 { - enum nbt_netlogon_command type; - uint16_t sbz; - uint32_t server_type; - struct GUID domain_uuid; - const char * forest; - const char * dns_domain; - const char * pdc_dns_name; - const char * domain; - const char * pdc_name; - const char * user_name; - const char * server_site; - const char * client_site; - uint8_t dc_sock_addr_size; - struct nbt_dc_sock_addr dc_sock_addr;/* [subcontext_size(dc_sock_addr_size),subcontext(0)] */ - uint32_t nt_version;/* [value(13)] */ - uint16_t lmnt_token; - uint16_t lm20_token; -}; - -struct nbt_cldap_netlogon_15 { - enum nbt_netlogon_command type; - uint16_t sbz; - uint32_t server_type; - struct GUID domain_uuid; - const char * forest; - const char * dns_domain; - const char * pdc_dns_name; - const char * domain; - const char * pdc_name; - const char * user_name; - const char * server_site; - const char * client_site; - const char * next_closest_site; - uint32_t nt_version;/* [value(15)] */ + uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; -}/* [public] */; +}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; -struct nbt_cldap_netlogon_29 { - enum nbt_netlogon_command type; +struct NETLOGON_SAM_LOGON_RESPONSE_EX { + enum netlogon_command command; uint16_t sbz; uint32_t server_type; struct GUID domain_uuid; @@ -630,71 +505,70 @@ struct nbt_cldap_netlogon_29 { const char * user_name; const char * server_site; const char * client_site; - uint8_t dc_sock_addr_size; - struct nbt_dc_sock_addr dc_sock_addr;/* [subcontext_size(dc_sock_addr_size),subcontext(0)] */ + uint8_t sockaddr_size;/* [value(ndr_size_nbt_sockaddr(&sockaddr,ndr->flags))] */ + struct nbt_sockaddr sockaddr;/* [subcontext_size(sockaddr_size),subcontext(0)] */ const char * next_closest_site; - uint32_t nt_version;/* [value(29)] */ + uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; -}/* [public] */; - -union nbt_cldap_netlogon { - struct nbt_cldap_netlogon_1 logon1;/* [case(0)] */ - struct nbt_cldap_netlogon_3 logon3;/* [case(2)] */ - struct nbt_cldap_netlogon_5 logon5;/* [case(4)] */ - struct nbt_cldap_netlogon_13 logon13;/* [case(8)] */ - struct nbt_cldap_netlogon_15 logon15;/* [case(20)] */ - struct nbt_cldap_netlogon_29 logon29;/* [case(29)] */ -}/* [public,nodiscriminant,flag(LIBNDR_FLAG_NOALIGN)] */; - -enum nbt_ntlogon_command -#ifndef USE_UINT_ENUMS - { - NTLOGON_SAM_LOGON=0x12, - NTLOGON_SAM_LOGON_REPLY=0x13, - NTLOGON_SAM_LOGON_REPLY15=0x15, - NTLOGON_RESPONSE_FROM_PDC2=0x17 -} -#else - { __donnot_use_enum_nbt_ntlogon_command=0x7FFFFFFF} -#define NTLOGON_SAM_LOGON ( 0x12 ) -#define NTLOGON_SAM_LOGON_REPLY ( 0x13 ) -#define NTLOGON_SAM_LOGON_REPLY15 ( 0x15 ) -#define NTLOGON_RESPONSE_FROM_PDC2 ( 0x17 ) -#endif -; +}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; -struct nbt_ntlogon_sam_logon { - uint16_t request_count; - const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ +struct nbt_netlogon_query_for_pdc { + const char * computer_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ - uint32_t acct_control; - uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */ - struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */ + DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ + const char * unicode_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; }; -struct nbt_ntlogon_sam_logon_reply { - const char * server;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ - const char * domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ +struct nbt_netlogon_response_from_pdc { + enum netlogon_command command; + const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ + DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ + const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ uint32_t nt_version; uint16_t lmnt_token; uint16_t lm20_token; +}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; + +enum netr_SamDatabaseID; + +struct nbt_db_change_info { + enum netr_SamDatabaseID db_index; + uint64_t serial; + NTTIME timestamp; +}; + +struct NETLOGON_DB_CHANGE { + uint32_t serial_lo; + time_t timestamp; + uint32_t pulse; + uint32_t random; + const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ + const char * domain;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */ + DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */ + const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + const char * unicode_domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */ + uint32_t db_count; + struct nbt_db_change_info *dbchange; + uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */ + struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */ + uint32_t message_format_version; + uint32_t message_token; }; -union nbt_ntlogon_request { - struct nbt_ntlogon_sam_logon logon;/* [case(NTLOGON_SAM_LOGON)] */ - struct nbt_ntlogon_sam_logon_reply reply;/* [case(NTLOGON_SAM_LOGON_REPLY)] */ - struct nbt_netlogon_response_from_pdc2 reply2;/* [case(NTLOGON_RESPONSE_FROM_PDC2)] */ +union nbt_netlogon_request { + struct NETLOGON_SAM_LOGON_REQUEST logon;/* [case(LOGON_SAM_LOGON_REQUEST)] */ + struct nbt_netlogon_query_for_pdc pdc;/* [case(LOGON_PRIMARY_QUERY)] */ + struct NETLOGON_DB_CHANGE uas;/* [case(NETLOGON_ANNOUNCE_UAS)] */ }/* [nodiscriminant] */; -struct nbt_ntlogon_packet { - enum nbt_ntlogon_command command; - union nbt_ntlogon_request req;/* [switch_is(command)] */ +struct nbt_netlogon_packet { + enum netlogon_command command; + union nbt_netlogon_request req;/* [switch_is(command)] */ }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */; enum nbt_browse_opcode diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c index de3ac48c00..75a0d4b755 100644 --- a/source3/librpc/gen_ndr/ndr_dfs.c +++ b/source3/librpc/gen_ndr/ndr_dfs.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_dfs.h" +#include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -544,7 +545,6 @@ static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->stores) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { @@ -618,7 +618,6 @@ static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->stores) { _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); @@ -733,7 +732,6 @@ static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); } return NDR_ERR_SUCCESS; } @@ -790,7 +788,6 @@ static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); } return NDR_ERR_SUCCESS; } @@ -948,7 +945,6 @@ static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->stores) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores)); for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) { @@ -1024,7 +1020,6 @@ static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->stores) { _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0); @@ -1096,7 +1091,6 @@ static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); } return NDR_ERR_SUCCESS; } @@ -1108,7 +1102,6 @@ static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid)); } return NDR_ERR_SUCCESS; } @@ -1671,7 +1664,7 @@ static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, case 7: if (r->info7) { - NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7)); + NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7)); } break; @@ -1973,7 +1966,7 @@ static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, if (r->info7) { _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0); - NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7)); + NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0); } break; diff --git a/source3/librpc/gen_ndr/ndr_drsblobs.c b/source3/librpc/gen_ndr/ndr_drsblobs.c index 41a448cbe3..dd8d77ea15 100644 --- a/source3/librpc/gen_ndr/ndr_drsblobs.c +++ b/source3/librpc/gen_ndr/ndr_drsblobs.c @@ -5,6 +5,8 @@ #include "librpc/gen_ndr/ndr_drsuapi.h" #include "librpc/gen_ndr/ndr_misc.h" +#include "librpc/gen_ndr/ndr_samr.h" +#include "librpc/gen_ndr/ndr_lsa.h" static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r) { if (ndr_flags & NDR_SCALARS) { @@ -2165,10 +2167,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext)); - ndr->flags = _flags_save_string; + 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->cleartext)); + ndr->flags = _flags_save_DATA_BLOB; } } if (ndr_flags & NDR_BUFFERS) { @@ -2181,10 +2183,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext)); - ndr->flags = _flags_save_string; + 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->cleartext)); + ndr->flags = _flags_save_DATA_BLOB; } } if (ndr_flags & NDR_BUFFERS) { @@ -2196,7 +2198,7 @@ _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, cons { ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob"); ndr->depth++; - ndr_print_string(ndr, "cleartext", r->cleartext); + ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext); ndr->depth--; } @@ -2311,13 +2313,269 @@ _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const ndr->depth--; } -static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r) +static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r) +{ + ndr_print_struct(ndr, name, "AuthInfoNone"); + ndr->depth++; + ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16)); + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->password)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->password)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r) +{ + ndr_print_struct(ndr, name, "AuthInfoNT4Owf"); + ndr->depth++; + ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size); + ndr_print_samr_Password(ndr, "password", &r->password); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_PULL_ALLOC_N(ndr, r->password, r->size); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r) +{ + ndr_print_struct(ndr, name, "AuthInfoClear"); + ndr->depth++; + ndr_print_uint32(ndr, "size", r->size); + ndr_print_array_uint8(ndr, "password", r->password, r->size); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r) +{ + ndr_print_struct(ndr, name, "AuthInfoVersion"); + ndr->depth++; + ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size); + ndr_print_uint32(ndr, "version", r->version); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case TRUST_AUTH_TYPE_NONE: { + NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none)); + break; } + + case TRUST_AUTH_TYPE_NT4OWF: { + NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf)); + break; } + + case TRUST_AUTH_TYPE_CLEAR: { + NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear)); + break; } + + case TRUST_AUTH_TYPE_VERSION: { + NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version)); + 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 TRUST_AUTH_TYPE_NONE: + break; + + case TRUST_AUTH_TYPE_NT4OWF: + NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf)); + break; + + case TRUST_AUTH_TYPE_CLEAR: + break; + + case TRUST_AUTH_TYPE_VERSION: + 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_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r) +{ + int level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + switch (level) { + case TRUST_AUTH_TYPE_NONE: { + NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none)); + break; } + + case TRUST_AUTH_TYPE_NT4OWF: { + NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf)); + break; } + + case TRUST_AUTH_TYPE_CLEAR: { + NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear)); + break; } + + case TRUST_AUTH_TYPE_VERSION: { + NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case TRUST_AUTH_TYPE_NONE: + break; + + case TRUST_AUTH_TYPE_NT4OWF: + NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf)); + break; + + case TRUST_AUTH_TYPE_CLEAR: + break; + + case TRUST_AUTH_TYPE_VERSION: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "AuthInfo"); + switch (level) { + case TRUST_AUTH_TYPE_NONE: + ndr_print_AuthInfoNone(ndr, "none", &r->none); + break; + + case TRUST_AUTH_TYPE_NT4OWF: + ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf); + break; + + case TRUST_AUTH_TYPE_CLEAR: + ndr_print_AuthInfoClear(ndr, "clear", &r->clear); + break; + + case TRUST_AUTH_TYPE_VERSION: + ndr_print_AuthInfoVersion(ndr, "version", &r->version); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime)); + NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType)); + NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); @@ -2326,17 +2584,19 @@ static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, in } } if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime)); + NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType)); + NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo)); { uint32_t _flags_save_DATA_BLOB = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); @@ -2345,325 +2605,405 @@ static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, in } } if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r) +_PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r) { - ndr_print_struct(ndr, name, "trustAuthInOutSecret1"); + ndr_print_struct(ndr, name, "AuthenticationInformation"); ndr->depth++; - ndr_print_NTTIME(ndr, "time1", r->time1); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_DATA_BLOB(ndr, "value", r->value); + ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime); + ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType); + ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType); + ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo); ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); ndr->depth--; } -static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r) +_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags) { + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob); +} + +_PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r) +{ + uint32_t cntr_current_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1)); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); + for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { + NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0])); + } } if (ndr_flags & NDR_BUFFERS) { - if (r->value1) { - NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1)); - NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1)); - } - if (r->value2) { - NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2)); - NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2)); + for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { + if (r->current[cntr_current_0]) { + NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0])); + NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0])); + } } } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r) { - uint32_t _ptr_value1; - TALLOC_CTX *_mem_save_value1_0; - uint32_t _ptr_value2; - TALLOC_CTX *_mem_save_value2_0; + uint32_t _ptr_current; + uint32_t cntr_current_0; + TALLOC_CTX *_mem_save_current_0; + TALLOC_CTX *_mem_save_current_1; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1)); - if (_ptr_value1) { - NDR_PULL_ALLOC(ndr, r->value1); - NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1)); - } else { - r->value1 = NULL; - } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2)); - if (_ptr_value2) { - NDR_PULL_ALLOC(ndr, r->value2); - NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2)); - } else { - r->value2 = NULL; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); + NDR_PULL_ALLOC_N(ndr, r->current, r->count); + _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->current, 0); + for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current)); + if (_ptr_current) { + NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current)); + } else { + r->current[cntr_current_0] = NULL; + } } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0); } if (ndr_flags & NDR_BUFFERS) { - if (r->value1) { - uint32_t _relative_save_offset; - _relative_save_offset = ndr->offset; - NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1)); - _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0); - NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0); - ndr->offset = _relative_save_offset; - } - if (r->value2) { - uint32_t _relative_save_offset; - _relative_save_offset = ndr->offset; - NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2)); - _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0); - NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0); - ndr->offset = _relative_save_offset; + _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->current, 0); + for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) { + if (r->current[cntr_current_0]) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0])); + _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0); + NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0])); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0); + ndr->offset = _relative_save_offset; + } } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r) +_PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r) { - ndr_print_struct(ndr, name, "trustAuthInOutCtr1"); + uint32_t cntr_current_0; + ndr_print_struct(ndr, name, "trustCurrentPasswords"); ndr->depth++; - ndr_print_ptr(ndr, "value1", r->value1); - ndr->depth++; - if (r->value1) { - ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1); - } - ndr->depth--; - ndr_print_ptr(ndr, "value2", r->value2); + ndr_print_uint32(ndr, "count", r->count); + ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count); ndr->depth++; - if (r->value2) { - ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2); + for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) { + ndr_print_ptr(ndr, "current", r->current[cntr_current_0]); + ndr->depth++; + if (r->current[cntr_current_0]) { + ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]); + } + ndr->depth--; + free(idx_0); + } } ndr->depth--; ndr->depth--; } -static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r) +_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords); +} + +_PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512)); { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; + struct ndr_push *_ndr_outgoing; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags))); + NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags))); } + { + struct ndr_push *_ndr_incoming; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags))); + NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags))); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags))); } if (ndr_flags & NDR_BUFFERS) { } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r) +_PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r) +{ + ndr_print_struct(ndr, name, "trustDomainPasswords"); + ndr->depth++; + ndr_print_array_uint8(ndr, "confounder", r->confounder, 512); + ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing); + ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming); + ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags):r->outgoing_size); + ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags):r->incoming_size); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker)); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; - } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker)); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); } if (ndr_flags & NDR_BUFFERS) { } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r) +_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r) { - ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1"); + ndr_print_struct(ndr, name, "DsCompressedChunk"); ndr->depth++; - ndr_print_NTTIME(ndr, "time1", r->time1); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_DATA_BLOB(ndr, "value", r->value); - ndr_print_NTTIME(ndr, "time2", r->time2); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "unknown3", r->unknown3); - ndr_print_uint32(ndr, "unknown4", r->unknown4); - ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); + ndr_print_uint32(ndr, "marker", r->marker); + ndr_print_DATA_BLOB(ndr, "data", r->data); ndr->depth--; } -static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r) +static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; - } + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size)); + 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, r->__size)); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS)); + } } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r) +static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *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_NTTIME(ndr, NDR_SCALARS, &r->time1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; + 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_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(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)); + } } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r) +_PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r) { - ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2"); + ndr_print_struct(ndr, name, "ExtendedErrorAString"); ndr->depth++; - ndr_print_NTTIME(ndr, "time1", r->time1); - ndr_print_uint32(ndr, "unknown1", r->unknown1); - ndr_print_DATA_BLOB(ndr, "value", r->value); - ndr_print_NTTIME(ndr, "time2", r->time2); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "unknown3", r->unknown3); - ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); + ndr_print_uint16(ndr, "__size", 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_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r) +static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1)); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->string)); } if (ndr_flags & NDR_BUFFERS) { - if (r->value1) { - NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1)); - NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1)); - } - if (r->value2) { - NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2)); - NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2)); + if (r->string) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size)); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16)); } } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r) +static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r) { - uint32_t _ptr_value1; - TALLOC_CTX *_mem_save_value1_0; - uint32_t _ptr_value2; - TALLOC_CTX *_mem_save_value2_0; + 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_value1)); - if (_ptr_value1) { - NDR_PULL_ALLOC(ndr, r->value1); - NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1)); - } else { - r->value1 = NULL; - } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2)); - if (_ptr_value2) { - NDR_PULL_ALLOC(ndr, r->value2); - NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2)); + 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->value2 = NULL; + r->string = NULL; } } if (ndr_flags & NDR_BUFFERS) { - if (r->value1) { - uint32_t _relative_save_offset; - _relative_save_offset = ndr->offset; - NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1)); - _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0); - NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0); - ndr->offset = _relative_save_offset; + 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_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0); } - if (r->value2) { - uint32_t _relative_save_offset; - _relative_save_offset = ndr->offset; - NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2)); - _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0); - NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0); - ndr->offset = _relative_save_offset; + if (r->string) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size)); } } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r) +_PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r) { - ndr_print_struct(ndr, name, "trustAuthInOutCtr2"); + ndr_print_struct(ndr, name, "ExtendedErrorUString"); ndr->depth++; - ndr_print_ptr(ndr, "value1", r->value1); + ndr_print_uint16(ndr, "__size", r->__size); + ndr_print_ptr(ndr, "string", r->string); ndr->depth++; - if (r->value1) { - ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1); + if (r->string) { + ndr_print_string(ndr, "string", r->string); } ndr->depth--; - ndr_print_ptr(ndr, "value2", r->value2); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(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_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *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_uint16(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_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r) +{ + ndr_print_struct(ndr, name, "ExtendedErrorBlob"); ndr->depth++; - if (r->value2) { - ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2); + ndr_print_uint16(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_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r) +static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r) +{ + const char *val = NULL; + + switch (r) { + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break; + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level)); switch (level) { - case 1: { - NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1)); + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: { + NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name)); break; } - case 2: { - NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2)); + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: { break; } default: @@ -2673,12 +3013,11 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd if (ndr_flags & NDR_BUFFERS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case 1: - NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1)); + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: + NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name)); break; - case 2: - NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2)); + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: break; default: @@ -2688,18 +3027,22 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r) +static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *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_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1)); + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: { + NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name)); break; } - case 2: { - NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2)); + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: { break; } default: @@ -2708,12 +3051,11 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { switch (level) { - case 1: - NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1)); + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: + NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name)); break; - case 2: - NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2)); + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: break; default: @@ -2723,18 +3065,17 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r) +_PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r) { int level; level = ndr_print_get_switch_value(ndr, r); - ndr_print_union(ndr, name, level, "trustAuthInOutCtr"); + ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU"); switch (level) { - case 1: - ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1); + case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: + ndr_print_ExtendedErrorUString(ndr, "name", &r->name); break; - case 2: - ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2); + case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: break; default: @@ -2742,116 +3083,404 @@ _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *nam } } -_PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r) +static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version)); - NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present)); + NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr)); + NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r) +static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version)); - NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present)); + NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr)); + NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r) +_PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r) { - ndr_print_struct(ndr, name, "trustAuthInOutBlob"); + ndr_print_struct(ndr, name, "ExtendedErrorComputerName"); ndr->depth++; - ndr_print_uint32(ndr, "version", r->version); - ndr_print_set_switch_value(ndr, &r->ctr, r->version); - ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr); + ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present); + ndr_print_set_switch_value(ndr, &r->n, r->present); + ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n); ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r) +static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r) +{ + const char *val = NULL; + + switch (r) { + case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break; + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break; + case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break; + case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break; + case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break; + case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break; + case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker)); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data)); + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level)); + switch (level) { + case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: { + NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: { + NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT32: { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT16: { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT64: { + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_NONE: { + break; } + + case EXTENDED_ERROR_PARAM_TYPE_BLOB: { + NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob)); + 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 EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: + NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string)); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: + NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string)); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT32: + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT16: + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT64: + break; + + case EXTENDED_ERROR_PARAM_TYPE_NONE: + break; + + case EXTENDED_ERROR_PARAM_TYPE_BLOB: + NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob)); + 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_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r) +static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r) { + int level; + uint16_t _level; + level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker)); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data)); + 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 EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: { + NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: { + NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT32: { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT16: { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_UINT64: { + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64)); + break; } + + case EXTENDED_ERROR_PARAM_TYPE_NONE: { + break; } + + case EXTENDED_ERROR_PARAM_TYPE_BLOB: { + NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: + NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string)); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: + NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string)); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT32: + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT16: + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT64: + break; + + case EXTENDED_ERROR_PARAM_TYPE_NONE: + break; + + case EXTENDED_ERROR_PARAM_TYPE_BLOB: + NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "ExtendedErrorParamU"); + switch (level) { + case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: + ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: + ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT32: + ndr_print_uint32(ndr, "uint32", r->uint32); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT16: + ndr_print_uint16(ndr, "uint16", r->uint16); + break; + + case EXTENDED_ERROR_PARAM_TYPE_UINT64: + ndr_print_hyper(ndr, "uint64", r->uint64); + break; + + case EXTENDED_ERROR_PARAM_TYPE_NONE: + break; + + case EXTENDED_ERROR_PARAM_TYPE_BLOB: + ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type)); + NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p)); } if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r) +static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r) { - ndr_print_struct(ndr, name, "DsCompressedChunk"); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type)); + NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r) +{ + ndr_print_struct(ndr, name, "ExtendedErrorParam"); ndr->depth++; - ndr_print_uint32(ndr, "marker", r->marker); - ndr_print_DATA_BLOB(ndr, "data", r->data); + ndr_print_ExtendedErrorParamType(ndr, "type", r->type); + ndr_print_set_switch_value(ndr, &r->p, r->type); + ndr_print_ExtendedErrorParamU(ndr, "p", &r->p); ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r) +_PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r) { - uint32_t cntr_chunks_0; + uint32_t cntr_params_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) { - NDR_CHECK(ndr_push_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0])); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params)); + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->next)); + NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params)); + for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) { + NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0])); } } if (ndr_flags & NDR_BUFFERS) { + if (r->next) { + NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next)); + } + NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name)); + for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) { + NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0])); + } } return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r) +_PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r) { - uint32_t cntr_chunks_0; + uint32_t _ptr_next; + TALLOC_CTX *_mem_save_next_0; + uint32_t cntr_params_0; + TALLOC_CTX *_mem_save_params_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) { - NDR_CHECK(ndr_pull_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0])); + NDR_CHECK(ndr_pull_array_size(ndr, &r->params)); + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next)); + if (_ptr_next) { + NDR_PULL_ALLOC(ndr, r->next); + } else { + r->next = NULL; + } + NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component)); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params)); + NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params)); + _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->params, 0); + for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) { + NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0); + if (r->params) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params)); } } if (ndr_flags & NDR_BUFFERS) { + if (r->next) { + _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->next, 0); + NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0); + } + NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name)); + _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->params, 0); + for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) { + NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r) +_PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r) { - uint32_t cntr_chunks_0; - ndr_print_struct(ndr, name, "DsCompressedBlob"); + uint32_t cntr_params_0; + ndr_print_struct(ndr, name, "ExtendedErrorInfo"); + ndr->depth++; + ndr_print_ptr(ndr, "next", r->next); ndr->depth++; - ndr->print(ndr, "%s: ARRAY(%d)", "chunks", (int)5); + if (r->next) { + ndr_print_ExtendedErrorInfo(ndr, "next", r->next); + } + ndr->depth--; + ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name); + ndr_print_hyper(ndr, "pid", r->pid); + ndr_print_NTTIME(ndr, "time", r->time); + ndr_print_uint32(ndr, "generating_component", r->generating_component); + ndr_print_WERROR(ndr, "status", r->status); + ndr_print_uint16(ndr, "detection_location", r->detection_location); + ndr_print_uint16(ndr, "flags", r->flags); + ndr_print_uint16(ndr, "num_params", r->num_params); + ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params); ndr->depth++; - for (cntr_chunks_0=0;cntr_chunks_0<5;cntr_chunks_0++) { + for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) { char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_chunks_0) != -1) { - ndr_print_DsCompressedChunk(ndr, "chunks", &r->chunks[cntr_chunks_0]); + if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) { + ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]); free(idx_0); } } @@ -2859,6 +3488,57 @@ _PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name ndr->depth--; } +static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->info) { + NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *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_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_ExtendedErrorInfo(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_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r) +{ + ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr"); + ndr->depth++; + ndr_print_ptr(ndr, "info", r->info); + ndr->depth++; + if (r->info) { + ndr_print_ExtendedErrorInfo(ndr, "info", r->info); + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r) { if (flags & NDR_IN) { @@ -3351,41 +4031,92 @@ _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char ndr->depth--; } -static enum ndr_err_code ndr_push_decode_DsCompressed(struct ndr_push *ndr, int flags, const struct decode_DsCompressed *r) +static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r) +{ + ndr_print_struct(ndr, name, "decode_trustDomainPasswords"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "decode_trustDomainPasswords"); + ndr->depth++; + ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "decode_trustDomainPasswords"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + +static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r) { if (flags & NDR_IN) { - NDR_CHECK(ndr_push_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob)); + { + struct ndr_push *_ndr_ptr; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1)); + } } if (flags & NDR_OUT) { } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_decode_DsCompressed(struct ndr_pull *ndr, int flags, struct decode_DsCompressed *r) +static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r) { if (flags & NDR_IN) { - NDR_CHECK(ndr_pull_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob)); + { + struct ndr_pull *_ndr_ptr; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1)); + } } if (flags & NDR_OUT) { } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r) +_PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r) { - ndr_print_struct(ndr, name, "decode_DsCompressed"); + ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "decode_DsCompressed"); + ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo"); ndr->depth++; - ndr_print_DsCompressedBlob(ndr, "blob", &r->in.blob); + ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "decode_DsCompressed"); + ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo"); ndr->depth++; ndr->depth--; } @@ -3490,11 +4221,19 @@ static const struct ndr_interface_call drsblobs_calls[] = { false, }, { - "decode_DsCompressed", - sizeof(struct decode_DsCompressed), - (ndr_push_flags_fn_t) ndr_push_decode_DsCompressed, - (ndr_pull_flags_fn_t) ndr_pull_decode_DsCompressed, - (ndr_print_function_t) ndr_print_decode_DsCompressed, + "decode_trustDomainPasswords", + sizeof(struct decode_trustDomainPasswords), + (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords, + (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords, + (ndr_print_function_t) ndr_print_decode_trustDomainPasswords, + false, + }, + { + "decode_ExtendedErrorInfo", + sizeof(struct decode_ExtendedErrorInfo), + (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo, + (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo, + (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo, false, }, { NULL, 0, NULL, NULL, NULL, false } @@ -3526,7 +4265,7 @@ const struct ndr_interface_table ndr_table_drsblobs = { NDR_DRSBLOBS_VERSION }, .helpstring = NDR_DRSBLOBS_HELPSTRING, - .num_calls = 13, + .num_calls = 14, .calls = drsblobs_calls, .endpoints = &drsblobs_endpoints, .authservices = &drsblobs_authservices diff --git a/source3/librpc/gen_ndr/ndr_drsblobs.h b/source3/librpc/gen_ndr/ndr_drsblobs.h index 171e7e25a1..8a5298874a 100644 --- a/source3/librpc/gen_ndr/ndr_drsblobs.h +++ b/source3/librpc/gen_ndr/ndr_drsblobs.h @@ -35,9 +35,11 @@ extern const struct ndr_interface_table ndr_table_drsblobs; #define NDR_DECODE_TRUSTAUTHINOUT (0x0b) -#define NDR_DECODE_DSCOMPRESSED (0x0c) +#define NDR_DECODE_TRUSTDOMAINPASSWORDS (0x0c) -#define NDR_DRSBLOBS_CALL_COUNT (13) +#define NDR_DECODE_EXTENDEDERRORINFO (0x0d) + +#define NDR_DRSBLOBS_CALL_COUNT (14) void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r); void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r); void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r); @@ -102,21 +104,44 @@ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *nam enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r); enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r); void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r); -void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r); -void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r); -void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r); -void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r); -void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r); -void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r); +void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r); +void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r); +void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r); +void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r); +void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r); +enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r); +enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r); +void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r); +enum ndr_err_code ndr_push_AuthenticationInformationArray(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformationArray *r); +enum ndr_err_code ndr_pull_AuthenticationInformationArray(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformationArray *r); +void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r); enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r); enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r); void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r); +size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags); +enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r); +enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r); +void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r); +size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags); +enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r); +enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r); +void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r); enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r); enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r); void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r); -enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r); -enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r); -void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r); +void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r); +void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r); +void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r); +void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r); +void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r); +void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r); +void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r); +void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r); +void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r); +enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r); +enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r); +void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r); +void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r); void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r); void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r); void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r); @@ -129,5 +154,6 @@ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, i void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r); void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r); void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r); -void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r); +void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r); +void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r); #endif /* _HEADER_NDR_drsblobs */ diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.c b/source3/librpc/gen_ndr/ndr_drsuapi.c index 38b88f643c..c2a4aee180 100644 --- a/source3/librpc/gen_ndr/ndr_drsuapi.c +++ b/source3/librpc/gen_ndr/ndr_drsuapi.c @@ -2823,217 +2823,219 @@ _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNC return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6); } -static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) +_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); + NDR_CHECK(ndr_push_align(ndr, 1)); + { + struct ndr_push *_ndr_ctr1; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1)); + } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr1) { - { - struct ndr_push *_ndr_ctr1; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); - { - struct ndr_push *_ndr_ctr1_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - NDR_CHECK(ndr_push_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); - } - } } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r) { - uint32_t _ptr_ctr1; - TALLOC_CTX *_mem_save_ctr1_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_PULL_ALLOC(ndr, r->ctr1); - } else { - r->ctr1 = NULL; + NDR_CHECK(ndr_pull_align(ndr, 1)); + { + struct ndr_pull *_ndr_ctr1; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1)); } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr1) { - _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0); - { - struct ndr_pull *_ndr_ctr1; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); - { - struct ndr_pull *_ndr_ctr1_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - NDR_CHECK(ndr_pull_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0); - } } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) +_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r) { - ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1"); - ndr->depth++; - ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); - ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "ctr1", r->ctr1); + ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1TS"); ndr->depth++; - if (r->ctr1) { - ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", r->ctr1); - } - ndr->depth--; + ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1); ndr->depth--; } -static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r) +_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr6)); + NDR_CHECK(ndr_push_align(ndr, 1)); + { + struct ndr_push *_ndr_ctr6; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1)); + } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr6) { - { - struct ndr_push *_ndr_ctr6; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); - { - struct ndr_push *_ndr_ctr6_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); - NDR_CHECK(ndr_push_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); - } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 1)); + { + struct ndr_pull *_ndr_ctr6; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1)); } } + if (ndr_flags & NDR_BUFFERS) { + } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r) +_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6TS"); + ndr->depth++; + ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6); + ndr->depth--; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) { - uint32_t _ptr_ctr6; - TALLOC_CTX *_mem_save_ctr6_0; + uint32_t _ptr_ts; + TALLOC_CTX *_mem_save_ts_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr6)); - if (_ptr_ctr6) { - NDR_PULL_ALLOC(ndr, r->ctr6); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts)); + if (_ptr_ts) { + NDR_PULL_ALLOC(ndr, r->ts); } else { - r->ctr6 = NULL; + r->ts = NULL; } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr6) { - _mem_save_ctr6_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->ctr6, 0); + if (r->ts) { + _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0); { - struct ndr_pull *_ndr_ctr6; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); + struct ndr_pull *_ndr_ts; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length)); { - struct ndr_pull *_ndr_ctr6_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); - NDR_CHECK(ndr_pull_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); + struct ndr_pull *_ndr_ts_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length)); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr6_0, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0); } } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r) +_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r) { - ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6"); + ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1"); ndr->depth++; ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "ctr6", r->ctr6); + ndr_print_ptr(ndr, "ts", r->ts); ndr->depth++; - if (r->ctr6) { - ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", r->ctr6); + if (r->ts) { + ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts); } ndr->depth--; ndr->depth--; } -static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r) +static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r) { + uint32_t _ptr_ts; + TALLOC_CTX *_mem_save_ts_0; if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts)); + if (_ptr_ts) { + NDR_PULL_ALLOC(ndr, r->ts); + } else { + r->ts = NULL; + } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr1) { + if (r->ts) { + _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0); { - struct ndr_push *_ndr_ctr1; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); + struct ndr_pull *_ndr_ts; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length)); { - struct ndr_push *_ndr_ctr1_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - NDR_CHECK(ndr_push_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + struct ndr_pull *_ndr_ts_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length)); } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length)); } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0); } } return NDR_ERR_SUCCESS; } +_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6"); + ndr->depth++; + ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); + ndr_print_uint32(ndr, "compressed_length", r->compressed_length); + ndr_print_ptr(ndr, "ts", r->ts); + ndr->depth++; + if (r->ts) { + ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts); + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr1 *r) { - uint32_t _ptr_ctr1; - TALLOC_CTX *_mem_save_ctr1_0; + uint32_t _ptr_ts; + TALLOC_CTX *_mem_save_ts_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1)); - if (_ptr_ctr1) { - NDR_PULL_ALLOC(ndr, r->ctr1); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts)); + if (_ptr_ts) { + NDR_PULL_ALLOC(ndr, r->ts); } else { - r->ctr1 = NULL; + r->ts = NULL; } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr1) { - _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0); + if (r->ts) { + _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0); { - struct ndr_pull *_ndr_ctr1; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); + struct ndr_pull *_ndr_ts; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length)); { - struct ndr_pull *_ndr_ctr1_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); - NDR_CHECK(ndr_pull_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + struct ndr_pull *_ndr_ts_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length)); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0); } } return NDR_ERR_SUCCESS; @@ -3045,72 +3047,46 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, ndr->depth++; ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "ctr1", r->ctr1); + ndr_print_ptr(ndr, "ts", r->ts); ndr->depth++; - if (r->ctr1) { - ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", r->ctr1); + if (r->ts) { + ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts); } ndr->depth--; ndr->depth--; } -static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr6)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->ctr6) { - { - struct ndr_push *_ndr_ctr6; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); - { - struct ndr_push *_ndr_ctr6_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); - NDR_CHECK(ndr_push_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); - } - } - } - return NDR_ERR_SUCCESS; -} - static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr6 *r) { - uint32_t _ptr_ctr6; - TALLOC_CTX *_mem_save_ctr6_0; + uint32_t _ptr_ts; + TALLOC_CTX *_mem_save_ts_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr6)); - if (_ptr_ctr6) { - NDR_PULL_ALLOC(ndr, r->ctr6); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts)); + if (_ptr_ts) { + NDR_PULL_ALLOC(ndr, r->ts); } else { - r->ctr6 = NULL; + r->ts = NULL; } } if (ndr_flags & NDR_BUFFERS) { - if (r->ctr6) { - _mem_save_ctr6_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->ctr6, 0); + if (r->ts) { + _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0); { - struct ndr_pull *_ndr_ctr6; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); + struct ndr_pull *_ndr_ts; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length)); { - struct ndr_pull *_ndr_ctr6_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); - NDR_CHECK(ndr_pull_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + struct ndr_pull *_ndr_ts_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length)); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr6_0, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0); } } return NDR_ERR_SUCCESS; @@ -3122,10 +3098,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, ndr->depth++; ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "ctr6", r->ctr6); + ndr_print_ptr(ndr, "ts", r->ts); ndr->depth++; - if (r->ctr6) { - ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", r->ctr6); + if (r->ts) { + ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts); } ndr->depth--; ndr->depth--; @@ -3304,11 +3280,10 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16))); - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1)); } return NDR_ERR_SUCCESS; } @@ -3317,11 +3292,10 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *nd { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16))); - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1)); } return NDR_ERR_SUCCESS; } @@ -3330,8 +3304,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const { ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr2"); ndr->depth++; - ndr_print_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16)); - ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr, "ctr", &r->ctr); + ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1); ndr->depth--; } @@ -4741,7 +4714,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char * const char *val = NULL; switch (r) { - case DRSUAPI_DS_NAME_FORMAT_UKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UKNOWN"; break; + case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break; case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break; case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break; case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break; @@ -5609,7 +5582,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_dn) { @@ -5648,7 +5621,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu } else { r->domain_dn = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit)); } if (ndr_flags & NDR_BUFFERS) { if (r->server_dn) { @@ -5695,7 +5668,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr, ndr_print_string(ndr, "domain_dn", r->domain_dn); } ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->unknown); + ndr_print_uint32(ndr, "commit", r->commit); ndr->depth--; } @@ -5778,7 +5751,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_pus { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5789,7 +5762,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pul { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain)); } if (ndr_flags & NDR_BUFFERS) { } @@ -5800,7 +5773,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, c { ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerResult1"); ndr->depth++; - ndr_print_WERROR(ndr, "status", r->status); + ndr_print_uint32(ndr, "last_dc_in_domain", r->last_dc_in_domain); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.h b/source3/librpc/gen_ndr/ndr_drsuapi.h index 6b6a0b5670..4b5ead467f 100644 --- a/source3/librpc/gen_ndr/ndr_drsuapi.h +++ b/source3/librpc/gen_ndr/ndr_drsuapi.h @@ -6,7 +6,7 @@ #ifndef _HEADER_NDR_drsuapi #define _HEADER_NDR_drsuapi -#include "librpc/ndr/ndr_drsuapi.h" +#include "../librpc/ndr/ndr_drsuapi.h" #define NDR_DRSUAPI_UUID "e3514235-4b06-11d1-ab04-00c04fc2dcd2" #define NDR_DRSUAPI_VERSION 4.0 #define NDR_DRSUAPI_NAME "drsuapi" @@ -151,9 +151,19 @@ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, int enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r); void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r); size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r); +enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r); +void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r); +enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r); +void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r); void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r); void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r); void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r); +enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r); void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r); void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r); void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r); diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c index 93a8464c7b..99556e1bff 100644 --- a/source3/librpc/gen_ndr/ndr_echo.c +++ b/source3/librpc/gen_ndr/ndr_echo.c @@ -3,7 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_echo.h" -static enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r) +_PUBLIC_ enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 1)); @@ -14,7 +14,7 @@ static enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 1)); diff --git a/source3/librpc/gen_ndr/ndr_echo.h b/source3/librpc/gen_ndr/ndr_echo.h index 7af1c7446b..c1c7716573 100644 --- a/source3/librpc/gen_ndr/ndr_echo.h +++ b/source3/librpc/gen_ndr/ndr_echo.h @@ -32,6 +32,8 @@ extern const struct ndr_interface_table ndr_table_rpcecho; #define NDR_ECHO_TESTDOUBLEPOINTER (0x09) #define NDR_RPCECHO_CALL_COUNT (10) +enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r); +enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r); 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); diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c index ab84d289cf..0f1005dda7 100644 --- a/source3/librpc/gen_ndr/ndr_epmapper.c +++ b/source3/librpc/gen_ndr/ndr_epmapper.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_epmapper.h" +#include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_epm_protocol(struct ndr_push *ndr, int ndr_flags, enum epm_protocol r) { NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); @@ -1632,15 +1633,11 @@ static enum ndr_err_code ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object)); NDR_CHECK(ndr_push_full_ptr(ndr, r->tower)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->annotation)); - ndr->flags = _flags_save_string; - } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->annotation) + 1)); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->annotation, strlen(r->annotation) + 1, sizeof(uint8_t), CH_DOS)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->object)); if (r->tower) { NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->tower)); } @@ -1661,15 +1658,11 @@ static enum ndr_err_code ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flag } else { r->tower = NULL; } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->annotation)); - ndr->flags = _flags_save_string; - } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_offset)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_length)); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->annotation, r->__annotation_length, sizeof(uint8_t), CH_DOS)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->object)); if (r->tower) { _mem_save_tower_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->tower, 0); @@ -1691,6 +1684,8 @@ _PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, con ndr_print_epm_twr_t(ndr, "tower", r->tower); } ndr->depth--; + ndr_print_uint32(ndr, "__annotation_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__annotation_offset); + ndr_print_uint32(ndr, "__annotation_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->annotation) + 1:r->__annotation_length); ndr_print_string(ndr, "annotation", r->annotation); ndr->depth--; } @@ -1704,7 +1699,6 @@ static enum ndr_err_code ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flag NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_minor)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->uuid)); } return NDR_ERR_SUCCESS; } @@ -1718,7 +1712,6 @@ static enum ndr_err_code ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_minor)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->uuid)); } return NDR_ERR_SUCCESS; } @@ -1952,24 +1945,24 @@ static enum ndr_err_code ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, co NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.inquiry_type)); NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object)); if (r->in.object) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object)); } NDR_CHECK(ndr_push_full_ptr(ndr, r->in.interface_id)); if (r->in.interface_id) { - NDR_CHECK(ndr_push_rpc_if_id_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.interface_id)); + NDR_CHECK(ndr_push_rpc_if_id_t(ndr, NDR_SCALARS, r->in.interface_id)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.vers_option)); if (r->in.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_ents)); } if (flags & NDR_OUT) { if (r->out.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); if (r->out.num_ents == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2011,7 +2004,7 @@ static enum ndr_err_code ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, st if (r->in.object) { _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_interface_id)); @@ -2023,7 +2016,7 @@ static enum ndr_err_code ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, st if (r->in.interface_id) { _mem_save_interface_id_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.interface_id, 0); - NDR_CHECK(ndr_pull_rpc_if_id_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.interface_id)); + NDR_CHECK(ndr_pull_rpc_if_id_t(ndr, NDR_SCALARS, r->in.interface_id)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_interface_id_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.vers_option)); @@ -2032,7 +2025,7 @@ static enum ndr_err_code ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, st } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_ents)); NDR_PULL_ALLOC(ndr, r->out.entry_handle); @@ -2046,7 +2039,7 @@ static enum ndr_err_code ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, st } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_ents); @@ -2146,7 +2139,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_epm_Map(struct ndr_push *ndr, int flags, con if (flags & NDR_IN) { NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object)); if (r->in.object) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object)); } NDR_CHECK(ndr_push_full_ptr(ndr, r->in.map_tower)); if (r->in.map_tower) { @@ -2155,14 +2148,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_epm_Map(struct ndr_push *ndr, int flags, con if (r->in.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_towers)); } if (flags & NDR_OUT) { if (r->out.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); if (r->out.num_towers == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2203,7 +2196,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, str if (r->in.object) { _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_map_tower)); @@ -2223,7 +2216,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, str } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_towers)); NDR_PULL_ALLOC(ndr, r->out.entry_handle); @@ -2237,7 +2230,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, str } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_towers); @@ -2335,13 +2328,13 @@ static enum ndr_err_code ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int if (r->in.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); } if (flags & NDR_OUT) { if (r->out.entry_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.entry_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -2358,7 +2351,7 @@ static enum ndr_err_code ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.entry_handle); *r->out.entry_handle = *r->in.entry_handle; @@ -2369,7 +2362,7 @@ static enum ndr_err_code ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int } _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.entry_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result)); } @@ -2411,7 +2404,7 @@ static enum ndr_err_code ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, if (r->in.epm_object == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.epm_object)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.epm_object)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result)); @@ -2428,7 +2421,7 @@ static enum ndr_err_code ndr_pull_epm_InqObject(struct ndr_pull *ndr, int flags, } _mem_save_epm_object_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.epm_object, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.epm_object)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.epm_object)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_epm_object_0, LIBNDR_FLAG_REF_ALLOC); } if (flags & NDR_OUT) { @@ -2468,7 +2461,7 @@ static enum ndr_err_code ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.object_speced)); NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object)); if (r->in.object) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object)); } NDR_CHECK(ndr_push_full_ptr(ndr, r->in.tower)); if (r->in.tower) { @@ -2498,7 +2491,7 @@ static enum ndr_err_code ndr_pull_epm_MgmtDelete(struct ndr_pull *ndr, int flags if (r->in.object) { _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.object)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tower)); diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c index 2eb26c4bc4..f0c7ee4d61 100644 --- a/source3/librpc/gen_ndr/ndr_eventlog.c +++ b/source3/librpc/gen_ndr/ndr_eventlog.c @@ -192,7 +192,7 @@ static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); 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)); @@ -215,7 +215,7 @@ static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, } _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_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_generic_ptr(ndr, &_ptr_backupfile)); if (_ptr_backupfile) { @@ -314,13 +314,13 @@ static enum ndr_err_code ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, i 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_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|NDR_BUFFERS, r->out.handle)); + 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; @@ -337,7 +337,7 @@ static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, i } _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_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; @@ -348,7 +348,7 @@ static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, i } _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|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -431,7 +431,7 @@ static enum ndr_err_code ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, i 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.number == NULL) { @@ -455,7 +455,7 @@ static enum ndr_err_code ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, i } _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_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.number); ZERO_STRUCTP(r->out.number); @@ -508,7 +508,7 @@ static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.oldest_entry == NULL) { @@ -532,7 +532,7 @@ static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, } _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_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.oldest_entry); ZERO_STRUCTP(r->out.oldest_entry); @@ -642,7 +642,7 @@ static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, i 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|NDR_BUFFERS, r->out.handle)); + 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; @@ -695,7 +695,7 @@ static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, i } _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|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -831,7 +831,7 @@ static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, i 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes)); @@ -868,7 +868,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i } _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_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_uint32(ndr, NDR_SCALARS, &r->in.flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset)); @@ -1449,7 +1449,7 @@ static enum ndr_err_code ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, i 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -1466,7 +1466,7 @@ static enum ndr_err_code ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, i } _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_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); } if (flags & NDR_OUT) { diff --git a/source3/librpc/gen_ndr/ndr_initshutdown.c b/source3/librpc/gen_ndr/ndr_initshutdown.c index 5d6c0c3c08..62a19af3a2 100644 --- a/source3/librpc/gen_ndr/ndr_initshutdown.c +++ b/source3/librpc/gen_ndr/ndr_initshutdown.c @@ -3,106 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_initshutdown.h" -static enum ndr_err_code ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String_sub *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name))); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name)); - ndr->flags = _flags_save_string; - } - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_initshutdown_String_sub(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String_sub *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_size)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name)); - ndr->flags = _flags_save_string; - } - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r) -{ - ndr_print_struct(ndr, name, "initshutdown_String_sub"); - ndr->depth++; - ndr_print_uint32(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name):r->name_size); - ndr_print_string(ndr, "name", r->name); - ndr->depth--; -} - -_PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name->name) * 2)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name->name) * 2)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->name) { - NDR_CHECK(ndr_push_initshutdown_String_sub(ndr, NDR_SCALARS, r->name)); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r) -{ - uint32_t _ptr_name; - TALLOC_CTX *_mem_save_name_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_size)); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name)); - if (_ptr_name) { - NDR_PULL_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->name) { - _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->name, 0); - NDR_CHECK(ndr_pull_initshutdown_String_sub(ndr, NDR_SCALARS, r->name)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r) -{ - ndr_print_struct(ndr, name, "initshutdown_String"); - ndr->depth++; - ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name->name) * 2:r->name_len); - ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name->name) * 2:r->name_size); - ndr_print_ptr(ndr, "name", r->name); - ndr->depth++; - if (r->name) { - ndr_print_initshutdown_String_sub(ndr, "name", r->name); - } - ndr->depth--; - ndr->depth--; -} - +#include "librpc/gen_ndr/ndr_lsa.h" static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r) { if (flags & NDR_IN) { @@ -112,7 +13,7 @@ static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int fl } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message)); if (r->in.message) { - NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps)); @@ -152,7 +53,7 @@ static enum ndr_err_code ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int fl if (r->in.message) { _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0); - NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout)); @@ -184,7 +85,7 @@ _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *nam ndr_print_ptr(ndr, "message", r->in.message); ndr->depth++; if (r->in.message) { - ndr_print_initshutdown_String(ndr, "message", r->in.message); + ndr_print_lsa_StringLarge(ndr, "message", r->in.message); } ndr->depth--; ndr_print_uint32(ndr, "timeout", r->in.timeout); @@ -275,7 +176,7 @@ static enum ndr_err_code ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message)); if (r->in.message) { - NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps)); @@ -316,7 +217,7 @@ static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int if (r->in.message) { _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0); - NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout)); @@ -349,7 +250,7 @@ _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *n ndr_print_ptr(ndr, "message", r->in.message); ndr->depth++; if (r->in.message) { - ndr_print_initshutdown_String(ndr, "message", r->in.message); + ndr_print_lsa_StringLarge(ndr, "message", r->in.message); } ndr->depth--; ndr_print_uint32(ndr, "timeout", r->in.timeout); diff --git a/source3/librpc/gen_ndr/ndr_initshutdown.h b/source3/librpc/gen_ndr/ndr_initshutdown.h index 9a19432678..2cb5a530b0 100644 --- a/source3/librpc/gen_ndr/ndr_initshutdown.h +++ b/source3/librpc/gen_ndr/ndr_initshutdown.h @@ -18,10 +18,6 @@ extern const struct ndr_interface_table ndr_table_initshutdown; #define NDR_INITSHUTDOWN_INITEX (0x02) #define NDR_INITSHUTDOWN_CALL_COUNT (3) -void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r); -enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r); -enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r); -void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r); void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r); void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r); void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r); diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c index 6e06f90a68..f9e93e5210 100644 --- a/source3/librpc/gen_ndr/ndr_krb5pac.c +++ b/source3/librpc/gen_ndr/ndr_krb5pac.c @@ -170,10 +170,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(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, 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) { @@ -190,10 +186,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int 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); @@ -216,10 +208,6 @@ _PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *na { 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) { @@ -304,7 +292,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags 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)); + { + struct ndr_push *_ndr_logon_info; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1)); + } break; } case PAC_TYPE_SRV_CHECKSUM: { @@ -334,7 +327,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags 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: @@ -361,7 +353,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags 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)); + { + struct ndr_pull *_ndr_logon_info; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_logon_info, 0xFFFFFC01, -1)); + NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(_ndr_logon_info, NDR_SCALARS|NDR_BUFFERS, &r->logon_info)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_logon_info, 0xFFFFFC01, -1)); + } break; } case PAC_TYPE_SRV_CHECKSUM: { @@ -390,7 +387,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags 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: @@ -672,6 +668,58 @@ _PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, co ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_PAC_Validate(struct ndr_push *ndr, int ndr_flags, const struct PAC_Validate *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NETLOGON_GENERIC_KRB5_PAC_VALIDATE)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ChecksumLength)); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->SignatureType)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SignatureLength)); + { + 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->ChecksumAndSignature)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_flags, struct PAC_Validate *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MessageType)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ChecksumLength)); + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->SignatureType)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SignatureLength)); + { + 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->ChecksumAndSignature)); + ndr->flags = _flags_save_DATA_BLOB; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PAC_Validate(struct ndr_print *ndr, const char *name, const struct PAC_Validate *r) +{ + ndr_print_struct(ndr, name, "PAC_Validate"); + ndr->depth++; + ndr_print_uint32(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NETLOGON_GENERIC_KRB5_PAC_VALIDATE:r->MessageType); + ndr_print_uint32(ndr, "ChecksumLength", r->ChecksumLength); + ndr_print_int32(ndr, "SignatureType", r->SignatureType); + ndr_print_uint32(ndr, "SignatureLength", r->SignatureLength); + ndr_print_DATA_BLOB(ndr, "ChecksumAndSignature", r->ChecksumAndSignature); + 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) { @@ -830,6 +878,47 @@ _PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *nam ndr->depth--; } +static enum ndr_err_code ndr_push_decode_pac_validate(struct ndr_push *ndr, int flags, const struct decode_pac_validate *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_push_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_decode_pac_validate(struct ndr_pull *ndr, int flags, struct decode_pac_validate *r) +{ + if (flags & NDR_IN) { + NDR_CHECK(ndr_pull_PAC_Validate(ndr, NDR_SCALARS, &r->in.pac_validate)); + } + if (flags & NDR_OUT) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_decode_pac_validate(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_validate *r) +{ + ndr_print_struct(ndr, name, "decode_pac_validate"); + ndr->depth++; + if (flags & NDR_SET_VALUES) { + ndr->flags |= LIBNDR_PRINT_SET_VALUES; + } + if (flags & NDR_IN) { + ndr_print_struct(ndr, "in", "decode_pac_validate"); + ndr->depth++; + ndr_print_PAC_Validate(ndr, "pac_validate", &r->in.pac_validate); + ndr->depth--; + } + if (flags & NDR_OUT) { + ndr_print_struct(ndr, "out", "decode_pac_validate"); + ndr->depth++; + ndr->depth--; + } + ndr->depth--; +} + static const struct ndr_interface_call krb5pac_calls[] = { { "decode_pac", @@ -855,6 +944,14 @@ static const struct ndr_interface_call krb5pac_calls[] = { (ndr_print_function_t) ndr_print_decode_login_info, false, }, + { + "decode_pac_validate", + sizeof(struct decode_pac_validate), + (ndr_push_flags_fn_t) ndr_push_decode_pac_validate, + (ndr_pull_flags_fn_t) ndr_pull_decode_pac_validate, + (ndr_print_function_t) ndr_print_decode_pac_validate, + false, + }, { NULL, 0, NULL, NULL, NULL, false } }; @@ -884,7 +981,7 @@ const struct ndr_interface_table ndr_table_krb5pac = { NDR_KRB5PAC_VERSION }, .helpstring = NDR_KRB5PAC_HELPSTRING, - .num_calls = 3, + .num_calls = 4, .calls = krb5pac_calls, .endpoints = &krb5pac_endpoints, .authservices = &krb5pac_authservices diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.h b/source3/librpc/gen_ndr/ndr_krb5pac.h index 7f03106879..bf09e3fad5 100644 --- a/source3/librpc/gen_ndr/ndr_krb5pac.h +++ b/source3/librpc/gen_ndr/ndr_krb5pac.h @@ -17,7 +17,9 @@ extern const struct ndr_interface_table ndr_table_krb5pac; #define NDR_DECODE_LOGIN_INFO (0x02) -#define NDR_KRB5PAC_CALL_COUNT (3) +#define NDR_DECODE_PAC_VALIDATE (0x03) + +#define NDR_KRB5PAC_CALL_COUNT (4) 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); @@ -46,10 +48,14 @@ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const str 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_PAC_Validate(struct ndr_push *ndr, int ndr_flags, const struct PAC_Validate *r); +enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_flags, struct PAC_Validate *r); +void ndr_print_PAC_Validate(struct ndr_print *ndr, const char *name, const struct PAC_Validate *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); +void ndr_print_decode_pac_validate(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_validate *r); #endif /* _HEADER_NDR_krb5pac */ diff --git a/source3/librpc/gen_ndr/ndr_libnetapi.c b/source3/librpc/gen_ndr/ndr_libnetapi.c index a5266827b6..d7bf63e62f 100644 --- a/source3/librpc/gen_ndr/ndr_libnetapi.c +++ b/source3/librpc/gen_ndr/ndr_libnetapi.c @@ -1895,7 +1895,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_USER_INFO_X(struct ndr_push *ndr, int ndr_fl NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_code_page)); NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_profile)); NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->usriX_home_dir_drive)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_user_id)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_primary_group_id)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->usriX_password_expired)); } if (ndr_flags & NDR_BUFFERS) { if (r->usriX_logon_hours) { @@ -1942,7 +1944,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_USER_INFO_X(struct ndr_pull *ndr, int ndr_fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_code_page)); NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_profile)); NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->usriX_home_dir_drive)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_user_id)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_primary_group_id)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->usriX_password_expired)); } if (ndr_flags & NDR_BUFFERS) { if (r->usriX_logon_hours) { @@ -1990,7 +1994,9 @@ _PUBLIC_ void ndr_print_USER_INFO_X(struct ndr_print *ndr, const char *name, con ndr_print_uint32(ndr, "usriX_code_page", r->usriX_code_page); ndr_print_string(ndr, "usriX_profile", r->usriX_profile); ndr_print_string(ndr, "usriX_home_dir_drive", r->usriX_home_dir_drive); + ndr_print_uint32(ndr, "usriX_user_id", r->usriX_user_id); ndr_print_uint32(ndr, "usriX_primary_group_id", r->usriX_primary_group_id); + ndr_print_uint32(ndr, "usriX_password_expired", r->usriX_password_expired); ndr->depth--; } diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index f25410ad27..926903865e 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_lsa.h" +#include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_security.h" _PUBLIC_ enum ndr_err_code ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r) { @@ -833,14 +834,13 @@ _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char * 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) { - NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_size)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->retention_time)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximum_log_size)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->retention_time)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time_to_shutdown)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->time_to_shutdown)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); } if (ndr_flags & NDR_BUFFERS) { } @@ -850,14 +850,13 @@ static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr static enum ndr_err_code ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_size)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->retention_time)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximum_log_size)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->retention_time)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time_to_shutdown)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->time_to_shutdown)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); } if (ndr_flags & NDR_BUFFERS) { } @@ -869,12 +868,11 @@ _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name ndr_print_struct(ndr, name, "lsa_AuditLogInfo"); ndr->depth++; ndr_print_uint32(ndr, "percent_full", r->percent_full); - ndr_print_uint32(ndr, "log_size", r->log_size); - ndr_print_NTTIME(ndr, "retention_time", r->retention_time); + ndr_print_uint32(ndr, "maximum_log_size", r->maximum_log_size); + ndr_print_hyper(ndr, "retention_time", r->retention_time); ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress); - ndr_print_NTTIME(ndr, "time_to_shutdown", r->time_to_shutdown); + ndr_print_hyper(ndr, "time_to_shutdown", r->time_to_shutdown); ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record); - ndr_print_uint32(ndr, "unknown", r->unknown); ndr->depth--; } @@ -1077,12 +1075,36 @@ _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *nam ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r) +{ + const char *val = NULL; + + switch (r) { + case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break; + case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->role)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1092,9 +1114,8 @@ static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_f static enum ndr_err_code ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->role)); + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1105,8 +1126,7 @@ _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, { ndr_print_struct(ndr, name, "lsa_ServerRole"); ndr->depth++; - ndr_print_uint16(ndr, "unknown", r->unknown); - ndr_print_uint16(ndr, "role", r->role); + ndr_print_lsa_Role(ndr, "role", r->role); ndr->depth--; } @@ -1197,7 +1217,7 @@ static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time)); + NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1209,7 +1229,7 @@ static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id)); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time)); + NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time)); } if (ndr_flags & NDR_BUFFERS) { } @@ -1221,7 +1241,7 @@ _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char * ndr_print_struct(ndr, name, "lsa_ModificationInfo"); ndr->depth++; ndr_print_hyper(ndr, "modified_id", r->modified_id); - ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time); + ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time); ndr->depth--; } @@ -1258,8 +1278,7 @@ _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 2)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_align(ndr, 1)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full)); } @@ -1271,8 +1290,7 @@ static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, i static enum ndr_err_code ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 2)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_align(ndr, 1)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full)); } @@ -1285,7 +1303,6 @@ _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char { ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo"); ndr->depth++; - ndr_print_uint16(ndr, "unknown", r->unknown); ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full); ndr_print_uint8(ndr, "log_is_full", r->log_is_full); ndr->depth--; @@ -1305,7 +1322,6 @@ static enum ndr_err_code ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); if (r->sid) { NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); } @@ -1334,7 +1350,6 @@ static enum ndr_err_code ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int nd NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name)); NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain)); NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); if (r->sid) { _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0); @@ -1389,10 +1404,12 @@ _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break; case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break; case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break; - case LSA_POLICY_INFO_DB: val = "LSA_POLICY_INFO_DB"; break; + case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break; case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break; case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break; case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break; + case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break; + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } @@ -1435,8 +1452,8 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota)); break; } - case LSA_POLICY_INFO_DB: { - NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db)); + case LSA_POLICY_INFO_MOD: { + NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod)); break; } case LSA_POLICY_INFO_AUDIT_FULL_SET: { @@ -1451,6 +1468,14 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); break; } + case LSA_POLICY_INFO_DNS_INT: { + NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); + break; } + + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: { + NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain)); + break; } + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1487,7 +1512,7 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in case LSA_POLICY_INFO_QUOTA: break; - case LSA_POLICY_INFO_DB: + case LSA_POLICY_INFO_MOD: break; case LSA_POLICY_INFO_AUDIT_FULL_SET: @@ -1500,6 +1525,14 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns)); break; + case LSA_POLICY_INFO_DNS_INT: + NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns)); + break; + + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: + NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain)); + break; + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1550,8 +1583,8 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota)); break; } - case LSA_POLICY_INFO_DB: { - NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db)); + case LSA_POLICY_INFO_MOD: { + NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod)); break; } case LSA_POLICY_INFO_AUDIT_FULL_SET: { @@ -1566,6 +1599,14 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); break; } + case LSA_POLICY_INFO_DNS_INT: { + NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns)); + break; } + + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: { + NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain)); + break; } + default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1601,7 +1642,7 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in case LSA_POLICY_INFO_QUOTA: break; - case LSA_POLICY_INFO_DB: + case LSA_POLICY_INFO_MOD: break; case LSA_POLICY_INFO_AUDIT_FULL_SET: @@ -1614,6 +1655,14 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns)); break; + case LSA_POLICY_INFO_DNS_INT: + NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns)); + break; + + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: + NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain)); + break; + default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -1659,8 +1708,8 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota); break; - case LSA_POLICY_INFO_DB: - ndr_print_lsa_ModificationInfo(ndr, "db", &r->db); + case LSA_POLICY_INFO_MOD: + ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod); break; case LSA_POLICY_INFO_AUDIT_FULL_SET: @@ -1675,6 +1724,14 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns); break; + case LSA_POLICY_INFO_DNS_INT: + ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns); + break; + + case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: + ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain); + break; + default: ndr_print_bad_level(ndr, name, level); } @@ -1906,13 +1963,13 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r) +_PUBLIC_ enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r) +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); @@ -2175,6 +2232,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char * 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; + case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } @@ -2589,19 +2647,100 @@ _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char * switch (r) { case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break; - case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO"; break; + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break; case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break; case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break; case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break; case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break; case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break; case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break; - case LSA_TRUSTED_DOMAIN_INFO_11: val = "LSA_TRUSTED_DOMAIN_INFO_11"; break; - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_ALL"; break; + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break; + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break; + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break; + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break; + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } +_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(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_TrustDirection(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_TrustDirection(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_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r) +{ + const char *val = NULL; + + switch (r) { + case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break; + case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break; + case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(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_TrustAttributes(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_TrustAttributes(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_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r) { if (ndr_flags & NDR_SCALARS) { @@ -2634,6 +2773,92 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const cha ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r) +{ + uint32_t cntr_netbios_names_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->netbios_names) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries)); + for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) { + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1])); + } + for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) { + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r) +{ + uint32_t _ptr_netbios_names; + uint32_t cntr_netbios_names_1; + TALLOC_CTX *_mem_save_netbios_names_0; + TALLOC_CTX *_mem_save_netbios_names_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names)); + if (_ptr_netbios_names) { + NDR_PULL_ALLOC(ndr, r->netbios_names); + } else { + r->netbios_names = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->netbios_names) { + _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names)); + NDR_PULL_ALLOC_N(ndr, r->netbios_names, ndr_get_array_size(ndr, &r->netbios_names)); + _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0); + for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) { + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1])); + } + for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) { + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0); + } + if (r->netbios_names) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r) +{ + uint32_t cntr_netbios_names_1; + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers"); + ndr->depth++; + ndr_print_uint32(ndr, "entries", r->entries); + ndr_print_ptr(ndr, "netbios_names", r->netbios_names); + ndr->depth++; + if (r->netbios_names) { + ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries); + ndr->depth++; + for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) { + char *idx_1=NULL; + if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) { + ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r) { if (ndr_flags & NDR_SCALARS) { @@ -2802,9 +3027,9 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name)); NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_direction)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes)); + NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction)); + NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type)); + NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name)); @@ -2830,9 +3055,9 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr } else { r->sid = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_direction)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes)); + NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction)); + NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type)); + NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name)); @@ -2859,18 +3084,45 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const c ndr_print_dom_sid2(ndr, "sid", r->sid); } ndr->depth--; - ndr_print_uint32(ndr, "trust_direction", r->trust_direction); - ndr_print_uint32(ndr, "trust_type", r->trust_type); - ndr_print_uint32(ndr, "trust_attributes", r->trust_attributes); + ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction); + ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type); + ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes); ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r) +{ + const char *val = NULL; + + switch (r) { + case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break; + case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break; + case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break; + case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_type)); + NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType)); NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data)); } if (ndr_flags & NDR_BUFFERS) { @@ -2884,7 +3136,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_type)); + NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType)); NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data)); } if (ndr_flags & NDR_BUFFERS) { @@ -2898,7 +3150,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const c ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer"); ndr->depth++; ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time); - ndr_print_uint32(ndr, "secret_type", r->secret_type); + ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType); ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data); ndr->depth--; } @@ -3072,88 +3324,213 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfo11 *r) +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob)); + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob)); + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r) +{ + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal"); + ndr->depth++; + ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); - NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1)); + NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); - NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1)); + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_TrustDomainInfo11(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfo11 *r) +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); - NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); - NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r) +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r) { - ndr_print_struct(ndr, name, "lsa_TrustDomainInfo11"); + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal"); ndr->depth++; ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex); - ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1); + ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset); + ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info); ndr->depth--; } -static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoAll *r) +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); - NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); + if (r->forest_trust_data) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r) +{ + uint32_t _ptr_forest_trust_data; + TALLOC_CTX *_mem_save_forest_trust_data_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data)); + if (_ptr_forest_trust_data) { + NDR_PULL_ALLOC(ndr, r->forest_trust_data); + } else { + r->forest_trust_data = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); + if (r->forest_trust_data) { + _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data)); + NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0); + } + if (r->forest_trust_data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r) +{ + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal"); + ndr->depth++; + ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex); + ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length); + ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data); + ndr->depth++; + if (r->forest_trust_data) { + ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length); + } + ndr->depth--; + ndr->depth--; +} + +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); - NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1)); + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info)); NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoAll(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoAll *r) +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex)); - NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex)); - NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1)); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info)); NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r) +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r) { - ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoAll"); + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal"); ndr->depth++; - ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex); - ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1); + ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info); ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset); ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info); ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r) +{ + ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes"); + ndr->depth++; + ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types); + ndr->depth--; +} + static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r) { if (ndr_flags & NDR_SCALARS) { @@ -3164,6 +3541,10 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name)); break; } + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers)); + break; } + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: { NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); break; } @@ -3188,12 +3569,24 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info)); break; } - case LSA_TRUSTED_DOMAIN_INFO_11: { - NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11)); + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal)); break; } - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: { - NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all)); + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: { + NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types)); break; } default: @@ -3207,6 +3600,10 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name)); break; + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: + NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers)); + break; + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: break; @@ -3230,12 +3627,23 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info)); break; - case LSA_TRUSTED_DOMAIN_INFO_11: - NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11)); + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: + NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: + NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal)); break; - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: - NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all)); + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: break; default: @@ -3260,6 +3668,10 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name)); break; } + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers)); + break; } + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: { NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset)); break; } @@ -3284,12 +3696,24 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info)); break; } - case LSA_TRUSTED_DOMAIN_INFO_11: { - NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11)); + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal)); + break; } + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal)); break; } - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: { - NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all)); + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: { + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types)); break; } default: @@ -3302,6 +3726,10 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name)); break; + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers)); + break; + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: break; @@ -3325,12 +3753,23 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info)); break; - case LSA_TRUSTED_DOMAIN_INFO_11: - NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11)); + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal)); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal)); break; - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: - NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all)); + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: break; default: @@ -3350,6 +3789,10 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name); break; + case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: + ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers); + break; + case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset); break; @@ -3374,12 +3817,24 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info); break; - case LSA_TRUSTED_DOMAIN_INFO_11: - ndr_print_lsa_TrustDomainInfo11(ndr, "info11", &r->info11); + case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: + ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: + ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal); + break; + + case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: + ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal); + break; + + case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: + ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal); break; - case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: - ndr_print_lsa_TrustDomainInfoInfoAll(ndr, "info_all", &r->info_all); + case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: + ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types); break; default: @@ -4070,7 +4525,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int n NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -4094,7 +4549,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int n r->sid = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); } if (ndr_flags & NDR_BUFFERS) { if (r->sid) { @@ -4119,7 +4574,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *na } ndr->depth--; ndr_print_uint32(ndr, "sid_index", r->sid_index); - ndr_print_uint32(ndr, "unknown", r->unknown); + ndr_print_uint32(ndr, "flags", r->flags); ndr->depth--; } @@ -4645,13 +5100,13 @@ static enum ndr_err_code ndr_push_lsa_Close(struct ndr_push *ndr, int flags, con 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_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|NDR_BUFFERS, r->out.handle)); + 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; @@ -4668,7 +5123,7 @@ static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, str } _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_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; @@ -4679,7 +5134,7 @@ static enum ndr_err_code ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, str } _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|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -4721,7 +5176,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -4738,7 +5193,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, } _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_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); } if (flags & NDR_OUT) { @@ -4778,7 +5233,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flag 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.resume_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -4812,7 +5267,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flag } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.resume_handle); @@ -4891,7 +5346,7 @@ static enum ndr_err_code ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int fl 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_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) { @@ -4921,7 +5376,7 @@ static enum ndr_err_code ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int fl } _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_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); @@ -4992,7 +5447,7 @@ static enum ndr_err_code ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, 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_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"); @@ -5015,7 +5470,7 @@ static enum ndr_err_code ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, } _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_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) { @@ -5120,7 +5575,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int fla 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|NDR_BUFFERS, r->out.handle)); + 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; @@ -5164,7 +5619,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -5213,7 +5668,7 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level)); } if (flags & NDR_OUT) { @@ -5244,7 +5699,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int } _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_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_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level)); NDR_PULL_ALLOC(ndr, r->out.info); @@ -5317,7 +5772,7 @@ static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int fl 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level)); if (r->in.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -5341,7 +5796,7 @@ static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int fl } _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_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_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -5437,7 +5892,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5448,7 +5903,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5467,7 +5922,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -5486,7 +5941,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, 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)); } @@ -5533,7 +5988,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.resume_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5567,7 +6022,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int f } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.resume_handle); @@ -5646,10 +6101,10 @@ _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name _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) { + if (r->in.policy_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_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle)); if (r->in.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5660,7 +6115,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr if (r->out.trustdom_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.trustdom_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -5668,19 +6123,19 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr _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_policy_handle_0; TALLOC_CTX *_mem_save_info_0; TALLOC_CTX *_mem_save_trustdom_handle_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.handle); + NDR_PULL_ALLOC(ndr, r->in.policy_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); + _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.info); } @@ -5698,7 +6153,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr } _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -5715,9 +6170,9 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain"); ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); + ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle); ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle); ndr->depth--; ndr_print_ptr(ndr, "info", r->in.info); ndr->depth++; @@ -5745,7 +6200,7 @@ static enum ndr_err_code ndr_push_lsa_EnumTrustDom(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.resume_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -5779,7 +6234,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumTrustDom(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.resume_handle); @@ -5859,7 +6314,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int fl 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names)); 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++) { @@ -5917,7 +6372,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl } _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_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_uint32(ndr, NDR_SCALARS, &r->in.num_names)); if (r->in.num_names < 0 || r->in.num_names > 1000) { @@ -6066,7 +6521,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6119,7 +6574,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sids); @@ -6249,7 +6704,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } @@ -6257,7 +6712,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int f if (r->out.sec_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.sec_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6275,7 +6730,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int f } _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_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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); @@ -6288,7 +6743,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int f } _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -6332,7 +6787,7 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6343,7 +6798,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.acct_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6362,7 +6817,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flag } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -6381,7 +6836,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, 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)); } @@ -6428,7 +6883,7 @@ static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.privs == NULL) { @@ -6457,7 +6912,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int } _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_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.privs); ZERO_STRUCTP(r->out.privs); @@ -6526,7 +6981,7 @@ static enum ndr_err_code ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.privs == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6548,7 +7003,7 @@ static enum ndr_err_code ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *nd } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.privs); @@ -6599,7 +7054,7 @@ static enum ndr_err_code ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_pus 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs)); if (r->in.privs) { @@ -6623,7 +7078,7 @@ static enum ndr_err_code ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pul } _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_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_uint8(ndr, NDR_SCALARS, &r->in.remove_all)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs)); @@ -6765,7 +7220,7 @@ static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.access_mask == NULL) { @@ -6789,7 +7244,7 @@ static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *nd } _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_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.access_mask); ZERO_STRUCTP(r->out.access_mask); @@ -6842,7 +7297,7 @@ static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { @@ -6860,7 +7315,7 @@ static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *nd } _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_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_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); } @@ -6902,7 +7357,7 @@ static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -6913,7 +7368,7 @@ static enum ndr_err_code ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, in if (r->out.trustdom_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.trustdom_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -6932,7 +7387,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, in } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -6951,7 +7406,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, in } _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -6998,7 +7453,7 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *nd if (r->in.trustdom_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.trustdom_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle)); NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level)); } if (flags & NDR_OUT) { @@ -7029,7 +7484,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *nd } _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trustdom_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level)); NDR_PULL_ALLOC(ndr, r->out.info); @@ -7099,6 +7554,16 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r) { if (flags & NDR_IN) { + if (r->in.trustdom_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.trustdom_handle)); + NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(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_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -7108,7 +7573,25 @@ static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_pus static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r) { + TALLOC_CTX *_mem_save_trustdom_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.trustdom_handle); + } + _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level)); + 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_lsa_TrustedDomainInfo(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)); @@ -7126,6 +7609,16 @@ _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, c if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain"); ndr->depth++; + ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle); + ndr->depth--; + ndr_print_lsa_TrustDomInfoEnum(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_lsa_TrustedDomainInfo(ndr, "info", r->in.info); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -7143,7 +7636,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } @@ -7151,7 +7644,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int fla if (r->out.sec_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.sec_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7169,7 +7662,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); @@ -7182,7 +7675,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int fla } _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.sec_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7226,7 +7719,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flag if (r->in.sec_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.sec_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val)); if (r->in.new_val) { NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val)); @@ -7255,7 +7748,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flag } _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val)); if (_ptr_new_val) { @@ -7331,7 +7824,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int fl if (r->in.sec_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.sec_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val)); if (r->in.new_val) { NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val)); @@ -7390,7 +7883,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int fl } _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.sec_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val)); if (_ptr_new_val) { @@ -7574,7 +8067,7 @@ static enum ndr_err_code ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -7603,7 +8096,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.name); @@ -7667,7 +8160,7 @@ static enum ndr_err_code ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.luid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -7701,7 +8194,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int f } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.luid); @@ -7781,7 +8274,7 @@ static enum ndr_err_code ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -7822,7 +8315,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.name); @@ -7919,13 +8412,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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|NDR_BUFFERS, r->out.handle)); + 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; @@ -7942,7 +8435,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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; @@ -7953,7 +8446,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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -7995,7 +8488,7 @@ static enum ndr_err_code ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); 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)); @@ -8025,7 +8518,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull } _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_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_generic_ptr(ndr, &_ptr_name)); if (_ptr_name) { @@ -8096,7 +8589,7 @@ static enum ndr_err_code ndr_push_lsa_EnumAccountRights(struct ndr_push *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8125,7 +8618,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, in } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -8189,7 +8682,7 @@ static enum ndr_err_code ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8216,7 +8709,7 @@ static enum ndr_err_code ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -8278,7 +8771,7 @@ static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8306,7 +8799,7 @@ static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sid); @@ -8370,7 +8863,7 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_pus 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.dom_sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8406,7 +8899,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pul } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.dom_sid); @@ -8487,6 +8980,20 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, c static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *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 (r->in.dom_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.dom_sid)); + NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(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_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); @@ -8496,7 +9003,33 @@ static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_dom_sid_0; + TALLOC_CTX *_mem_save_info_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); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.dom_sid); + } + _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(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_lsa_TrustedDomainInfo(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)); @@ -8514,6 +9047,20 @@ _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const ch if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo"); 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, "dom_sid", r->in.dom_sid); + ndr->depth++; + ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid); + ndr->depth--; + ndr_print_lsa_TrustDomInfoEnum(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_lsa_TrustedDomainInfo(ndr, "info", r->in.info); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -8531,7 +9078,7 @@ static enum ndr_err_code ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.dom_sid == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -8553,7 +9100,7 @@ static enum ndr_err_code ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.dom_sid); @@ -8700,7 +9247,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int fl 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|NDR_BUFFERS, r->out.handle)); + 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; @@ -8750,7 +9297,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int fl } _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|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -9033,7 +9580,7 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level)); } if (flags & NDR_OUT) { @@ -9064,7 +9611,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int } _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_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_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level)); NDR_PULL_ALLOC(ndr, r->out.info); @@ -9137,7 +9684,7 @@ static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level)); if (r->in.info == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -9161,7 +9708,7 @@ static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int f } _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_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_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -9216,7 +9763,7 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_pu 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.trusted_domain == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -9252,7 +9799,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pu } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.trusted_domain); @@ -9336,7 +9883,7 @@ static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); 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)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); @@ -9362,7 +9909,7 @@ static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull } _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_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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain)); NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level)); @@ -9426,7 +9973,7 @@ static enum ndr_err_code ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.resume_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -9460,7 +10007,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.resume_handle); @@ -9536,8 +10083,25 @@ _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const ch static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r) { if (flags & NDR_IN) { + if (r->in.policy_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.policy_handle)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + if (r->in.auth_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { + if (r->out.trustdom_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.trustdom_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9545,9 +10109,46 @@ static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r) { + TALLOC_CTX *_mem_save_policy_handle_0; + TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_auth_info_0; + TALLOC_CTX *_mem_save_trustdom_handle_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.policy_handle); + } + _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC); + 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_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.auth_info); + } + _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.trustdom_handle); + ZERO_STRUCTP(r->out.trustdom_handle); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.trustdom_handle); + } + _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -9563,11 +10164,28 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const c if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx"); ndr->depth++; + ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle); + ndr->depth--; + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info); + ndr->depth--; + ndr_print_ptr(ndr, "auth_info", r->in.auth_info); + ndr->depth++; + ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info); + ndr->depth--; + ndr_print_uint32(ndr, "access_mask", r->in.access_mask); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx"); ndr->depth++; + ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle); + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } @@ -9580,13 +10198,13 @@ static enum ndr_err_code ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, 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_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|NDR_BUFFERS, r->out.handle)); + 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; @@ -9603,7 +10221,7 @@ static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, } _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_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; @@ -9614,7 +10232,7 @@ static enum ndr_err_code ndr_pull_lsa_CloseTrustedDomainEx(struct ndr_pull *ndr, } _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|NDR_BUFFERS, r->out.handle)); + 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)); } @@ -9656,7 +10274,7 @@ static enum ndr_err_code ndr_push_lsa_QueryDomainInformationPolicy(struct ndr_pu 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); } if (flags & NDR_OUT) { @@ -9687,7 +10305,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pu } _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_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_uint16(ndr, NDR_SCALARS, &r->in.level)); NDR_PULL_ALLOC(ndr, r->out.info); @@ -9760,7 +10378,7 @@ static enum ndr_err_code ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); if (r->in.info) { @@ -9785,7 +10403,7 @@ static enum ndr_err_code ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull } _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_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_uint16(ndr, NDR_SCALARS, &r->in.level)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -9847,7 +10465,7 @@ static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } @@ -9855,7 +10473,7 @@ static enum ndr_err_code ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *n if (r->out.trustdom_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.trustdom_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -9873,7 +10491,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *n } _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_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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); @@ -9886,7 +10504,7 @@ static enum ndr_err_code ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *n } _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -9971,7 +10589,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int fl 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.sids == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -10026,7 +10644,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.sids); @@ -10161,7 +10779,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names)); 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++) { @@ -10179,8 +10797,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(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->in.count)); - 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.lookup_options)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -10221,7 +10839,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f } _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_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_uint32(ndr, NDR_SCALARS, &r->in.num_names)); if (r->in.num_names < 0 || r->in.num_names > 1000) { @@ -10253,8 +10871,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f 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_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.lookup_options)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -10338,8 +10956,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); + ndr_print_uint32(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -10371,8 +10989,25 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r) { if (flags & NDR_IN) { + if (r->in.policy_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.policy_handle)); + if (r->in.info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + if (r->in.auth_info == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask)); } if (flags & NDR_OUT) { + if (r->out.trustdom_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.trustdom_handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -10380,9 +11015,46 @@ static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *nd static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r) { + TALLOC_CTX *_mem_save_policy_handle_0; + TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_auth_info_0; + TALLOC_CTX *_mem_save_trustdom_handle_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.policy_handle); + } + _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC); + 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_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.auth_info); + } + _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask)); + NDR_PULL_ALLOC(ndr, r->out.trustdom_handle); + ZERO_STRUCTP(r->out.trustdom_handle); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.trustdom_handle); + } + _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -10398,11 +11070,28 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2"); ndr->depth++; + ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle); + ndr->depth--; + ndr_print_ptr(ndr, "info", r->in.info); + ndr->depth++; + ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info); + ndr->depth--; + ndr_print_ptr(ndr, "auth_info", r->in.auth_info); + ndr->depth++; + ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info); + ndr->depth--; + ndr_print_uint32(ndr, "access_mask", r->in.access_mask); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2"); ndr->depth++; + ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle); + ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; } @@ -10744,7 +11433,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names)); 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++) { @@ -10762,8 +11451,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(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->in.count)); - 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.lookup_options)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -10804,7 +11493,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f } _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_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_uint32(ndr, NDR_SCALARS, &r->in.num_names)); if (r->in.num_names < 0 || r->in.num_names > 1000) { @@ -10836,8 +11525,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f 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_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.lookup_options)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -10921,8 +11610,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); + ndr_print_uint32(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -11121,7 +11810,7 @@ static enum ndr_err_code ndr_push_lsa_lsaRQueryForestTrustInformation(struct ndr 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.trusted_domain_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -11156,7 +11845,7 @@ static enum ndr_err_code ndr_pull_lsa_lsaRQueryForestTrustInformation(struct ndr } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.trusted_domain_name); @@ -11508,8 +12197,8 @@ 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_uint32(ndr, NDR_SCALARS, *r->in.count)); - 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.lookup_options)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -11574,8 +12263,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(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_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.lookup_options)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -11655,8 +12344,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); + ndr_print_uint32(ndr, "client_revision", r->in.client_revision); 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 a489b5423e..2f623c2ba9 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.h +++ b/source3/librpc/gen_ndr/ndr_lsa.h @@ -207,6 +207,7 @@ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, en 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); +void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r); void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r); void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r); void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r); @@ -221,6 +222,8 @@ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, con enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r); void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r); void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r); +enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r); +enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r); void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r); 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); @@ -233,16 +236,30 @@ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const s void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r); void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r); void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r); +enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r); +enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r); +void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r); void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r); void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r); void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r); void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r); +enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r); +enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r); +void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r); void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r); void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r); void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r); -void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r); -void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r); +void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r); +void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r); +void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r); +void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r); +void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r); 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); diff --git a/source3/librpc/gen_ndr/ndr_misc.c b/source3/librpc/gen_ndr/ndr_misc.c index 56105d499f..22c416a0d7 100644 --- a/source3/librpc/gen_ndr/ndr_misc.c +++ b/source3/librpc/gen_ndr/ndr_misc.c @@ -123,7 +123,9 @@ _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *nam const char *val = NULL; switch (r) { + case SEC_CHAN_NULL: val = "SEC_CHAN_NULL"; break; case SEC_CHAN_WKSTA: val = "SEC_CHAN_WKSTA"; break; + case SEC_CHAN_DNS_DOMAIN: val = "SEC_CHAN_DNS_DOMAIN"; break; case SEC_CHAN_DOMAIN: val = "SEC_CHAN_DOMAIN"; break; case SEC_CHAN_BDC: val = "SEC_CHAN_BDC"; break; } diff --git a/source3/librpc/gen_ndr/ndr_nbt.c b/source3/librpc/gen_ndr/ndr_nbt.c index 75667183a8..c02b539da5 100644 --- a/source3/librpc/gen_ndr/ndr_nbt.c +++ b/source3/librpc/gen_ndr/ndr_nbt.c @@ -77,13 +77,13 @@ _PUBLIC_ void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const ndr->depth--; } -static enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r) +_PUBLIC_ enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r) +_PUBLIC_ enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); @@ -101,13 +101,13 @@ _PUBLIC_ void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum ndr_print_enum(ndr, name, "ENUM", val, r); } -static enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r) +_PUBLIC_ enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r) +_PUBLIC_ enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); @@ -496,7 +496,7 @@ _PUBLIC_ void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r) +_PUBLIC_ enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); @@ -532,7 +532,7 @@ static enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r) +_PUBLIC_ enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r) { int level; level = ndr_pull_get_switch_value(ndr, r); @@ -589,27 +589,6 @@ _PUBLIC_ void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const } } -static enum ndr_err_code ndr_push_nbt_res_rec(struct ndr_push *ndr, int ndr_flags, const struct nbt_res_rec *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_nbt_name(ndr, NDR_SCALARS, &r->name)); - NDR_CHECK(ndr_push_nbt_qtype(ndr, NDR_SCALARS, r->rr_type)); - NDR_CHECK(ndr_push_nbt_qclass(ndr, NDR_SCALARS, r->rr_class)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->rdata, ((((r->rr_type) == NBT_QTYPE_NETBIOS) && talloc_check_name(ndr, "struct ndr_push") && ((r->rdata).data.length == 2))?0:r->rr_type))); - NDR_CHECK(ndr_push_nbt_rdata(ndr, NDR_SCALARS, &r->rdata)); - } - if (ndr_flags & NDR_BUFFERS) { - } - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -} - static enum ndr_err_code ndr_pull_nbt_res_rec(struct ndr_pull *ndr, int ndr_flags, struct nbt_res_rec *r) { { @@ -621,7 +600,7 @@ static enum ndr_err_code ndr_pull_nbt_res_rec(struct ndr_pull *ndr, int ndr_flag NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->rr_type)); NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->rr_class)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, ((((r->rr_type) == NBT_QTYPE_NETBIOS) && talloc_check_name(ndr, "struct ndr_push") && ((r->rdata).data.length == 2))?0:r->rr_type))); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, r->rr_type)); NDR_CHECK(ndr_pull_nbt_rdata(ndr, NDR_SCALARS, &r->rdata)); } if (ndr_flags & NDR_BUFFERS) { @@ -642,7 +621,7 @@ _PUBLIC_ void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, con ndr_print_nbt_qtype(ndr, "rr_type", r->rr_type); ndr_print_nbt_qclass(ndr, "rr_class", r->rr_class); ndr_print_uint32(ndr, "ttl", r->ttl); - ndr_print_set_switch_value(ndr, &r->rdata, ((((r->rr_type) == NBT_QTYPE_NETBIOS) && talloc_check_name(ndr, "struct ndr_push") && ((r->rdata).data.length == 2))?0:r->rr_type)); + ndr_print_set_switch_value(ndr, &r->rdata, r->rr_type); ndr_print_nbt_rdata(ndr, "rdata", &r->rdata); ndr->depth--; ndr->flags = _flags_save_STRUCT; @@ -1548,13 +1527,138 @@ _PUBLIC_ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name } } -static enum ndr_err_code ndr_push_nbt_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum nbt_netlogon_command r) +_PUBLIC_ enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sockaddr_family)); + { + uint32_t _flags_save_ipv4address = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); + NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip)); + ndr->flags = _flags_save_ipv4address; + } + { + 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; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sockaddr_family)); + { + uint32_t _flags_save_ipv4address = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); + NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip)); + ndr->flags = _flags_save_ipv4address; + } + { + 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_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r) +{ + ndr_print_struct(ndr, name, "nbt_sockaddr"); + ndr->depth++; + ndr_print_uint32(ndr, "sockaddr_family", r->sockaddr_family); + ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip); + ndr_print_DATA_BLOB(ndr, "remaining", r->remaining); + ndr->depth--; +} + +_PUBLIC_ size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_nbt_sockaddr); +} + +_PUBLIC_ enum ndr_err_code ndr_push_nbt_server_type(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_nbt_server_type(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_nbt_server_type(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), "NBT_SERVER_PDC", NBT_SERVER_PDC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GC", NBT_SERVER_GC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_LDAP", NBT_SERVER_LDAP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS", NBT_SERVER_DS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_KDC", NBT_SERVER_KDC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_TIMESERV", NBT_SERVER_TIMESERV, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_CLOSEST", NBT_SERVER_CLOSEST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_WRITABLE", NBT_SERVER_WRITABLE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GOOD_TIMESERV", NBT_SERVER_GOOD_TIMESERV, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_NDNC", NBT_SERVER_NDNC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_SELECT_SECRET_DOMAIN_6", NBT_SERVER_SELECT_SECRET_DOMAIN_6, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FULL_SECRET_DOMAIN_6", NBT_SERVER_FULL_SECRET_DOMAIN_6, r); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_netlogon_nt_version_flags(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_netlogon_nt_version_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_netlogon_nt_version_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), "NETLOGON_NT_VERSION_1", NETLOGON_NT_VERSION_1, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5", NETLOGON_NT_VERSION_5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX", NETLOGON_NT_VERSION_5EX, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX_WITH_IP", NETLOGON_NT_VERSION_5EX_WITH_IP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_WITH_CLOSEST_SITE", NETLOGON_NT_VERSION_WITH_CLOSEST_SITE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_AVIOD_NT4EMUL", NETLOGON_NT_VERSION_AVIOD_NT4EMUL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_PDC", NETLOGON_NT_VERSION_PDC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_IP", NETLOGON_NT_VERSION_IP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_LOCAL", NETLOGON_NT_VERSION_LOCAL, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_GC", NETLOGON_NT_VERSION_GC, r); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum netlogon_command r) { NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum nbt_netlogon_command *r) +_PUBLIC_ enum ndr_err_code ndr_pull_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum netlogon_command *r) { uint16_t v; NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); @@ -1562,260 +1666,370 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_command(struct ndr_pull *ndr, int return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_command(struct ndr_print *ndr, const char *name, enum nbt_netlogon_command r) +_PUBLIC_ void ndr_print_netlogon_command(struct ndr_print *ndr, const char *name, enum netlogon_command r) { const char *val = NULL; switch (r) { - case NETLOGON_QUERY_FOR_PDC: val = "NETLOGON_QUERY_FOR_PDC"; break; + case LOGON_PRIMARY_QUERY: val = "LOGON_PRIMARY_QUERY"; break; case NETLOGON_ANNOUNCE_UAS: val = "NETLOGON_ANNOUNCE_UAS"; break; case NETLOGON_RESPONSE_FROM_PDC: val = "NETLOGON_RESPONSE_FROM_PDC"; break; - case NETLOGON_QUERY_FOR_PDC2: val = "NETLOGON_QUERY_FOR_PDC2"; break; - case NETLOGON_RESPONSE_FROM_PDC2: val = "NETLOGON_RESPONSE_FROM_PDC2"; break; - case NETLOGON_RESPONSE_FROM_PDC_USER: val = "NETLOGON_RESPONSE_FROM_PDC_USER"; break; + case LOGON_SAM_LOGON_REQUEST: val = "LOGON_SAM_LOGON_REQUEST"; break; + case LOGON_SAM_LOGON_RESPONSE: val = "LOGON_SAM_LOGON_RESPONSE"; break; + case LOGON_SAM_LOGON_PAUSE_RESPONSE: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE"; break; + case LOGON_SAM_LOGON_USER_UNKNOWN: val = "LOGON_SAM_LOGON_USER_UNKNOWN"; break; + case LOGON_SAM_LOGON_RESPONSE_EX: val = "LOGON_SAM_LOGON_RESPONSE_EX"; break; + case LOGON_SAM_LOGON_PAUSE_RESPONSE_EX: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE_EX"; break; + case LOGON_SAM_LOGON_USER_UNKNOWN_EX: val = "LOGON_SAM_LOGON_USER_UNKNOWN_EX"; break; } ndr_print_enum(ndr, name, "ENUM", val, r); } -static enum ndr_err_code ndr_push_nbt_netlogon_version(struct ndr_push *ndr, int ndr_flags, uint32_t r) +_PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_REQUEST *r) +{ + ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_REQUEST"); + ndr->depth++; + ndr_print_uint16(ndr, "request_count", r->request_count); + ndr_print_string(ndr, "computer_name", r->computer_name); + ndr_print_string(ndr, "user_name", r->user_name); + ndr_print_string(ndr, "mailslot_name", r->mailslot_name); + ndr_print_samr_AcctFlags(ndr, "acct_control", r->acct_control); + ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size); + ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); + ndr_print_dom_sid0(ndr, "sid", &r->sid); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); + ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); + ndr_print_uint16(ndr, "lm20_token", r->lm20_token); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r) { { - uint32_t _flags_save_BITMAP = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); - ndr->flags = _flags_save_BITMAP; + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_version(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +_PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r) { - uint32_t v; { - uint32_t _flags_save_BITMAP = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); - *r = v; - ndr->flags = _flags_save_BITMAP; + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + } + if (ndr_flags & NDR_BUFFERS) { + } + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_version(struct ndr_print *ndr, const char *name, uint32_t r) +_PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r) { + ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_NT40"); { - uint32_t _flags_save_BITMAP = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN); - ndr_print_uint32(ndr, name, r); + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_1", NETLOGON_VERSION_1, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_5", NETLOGON_VERSION_5, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_5EX", NETLOGON_VERSION_5EX, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_5EX_WITH_IP", NETLOGON_VERSION_5EX_WITH_IP, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_WITH_CLOSEST_SITE", NETLOGON_VERSION_WITH_CLOSEST_SITE, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_AVOID_NT4_EMUL", NETLOGON_VERSION_AVOID_NT4_EMUL, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_PDC", NETLOGON_VERSION_PDC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_IP", NETLOGON_VERSION_IP, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_LOCAL", NETLOGON_VERSION_LOCAL, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_VERSION_GC", NETLOGON_VERSION_GC, r); + ndr_print_netlogon_command(ndr, "command", r->command); + ndr_print_string(ndr, "server", r->server); + ndr_print_string(ndr, "user_name", r->user_name); + ndr_print_string(ndr, "domain", r->domain); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); + ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); + ndr_print_uint16(ndr, "lm20_token", r->lm20_token); ndr->depth--; - ndr->flags = _flags_save_BITMAP; + ndr->flags = _flags_save_STRUCT; } } -static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_query_for_pdc *r) +_PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE *r) { - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->zero_uuid)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); + NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip)); + NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); + NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_name)); - ndr->flags = _flags_save_string; + if (ndr_flags & NDR_BUFFERS) { } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_query_for_pdc *r) +_PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE *r) { - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->zero_uuid)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); + NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip)); + NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); + NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_name)); - ndr->flags = _flags_save_string; + if (ndr_flags & NDR_BUFFERS) { } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r) +_PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE *r) { - ndr_print_struct(ndr, name, "nbt_netlogon_query_for_pdc"); - ndr->depth++; - ndr_print_string(ndr, "computer_name", r->computer_name); - ndr_print_string(ndr, "mailslot_name", r->mailslot_name); - ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); - ndr_print_string(ndr, "unicode_name", r->unicode_name); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; + ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + ndr->depth++; + ndr_print_netlogon_command(ndr, "command", r->command); + ndr_print_string(ndr, "pdc_name", r->pdc_name); + ndr_print_string(ndr, "user_name", r->user_name); + ndr_print_string(ndr, "domain_name", r->domain_name); + ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); + ndr_print_GUID(ndr, "zero_uuid", &r->zero_uuid); + ndr_print_nbt_string(ndr, "forest", r->forest); + ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); + ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); + ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip); + ndr_print_nbt_server_type(ndr, "server_type", r->server_type); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); + ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); + ndr_print_uint16(ndr, "lm20_token", r->lm20_token); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; + } } -static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc2(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_query_for_pdc2 *r) +_PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r) { - uint32_t cntr_unknown_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->request_count)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name)); - ndr->flags = _flags_save_string; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz)); + NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags))); + { + struct ndr_push *_ndr_sockaddr; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags))); + NDR_CHECK(ndr_push_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr)); + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags))); + } + NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->next_closest_site)); + NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); } - for (cntr_unknown_0 = 0; cntr_unknown_0 < 2; cntr_unknown_0++) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0])); + if (ndr_flags & NDR_BUFFERS) { } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc2(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_query_for_pdc2 *r) +_PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r) { - uint32_t cntr_unknown_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->request_count)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name)); - ndr->flags = _flags_save_string; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz)); + NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sockaddr_size)); + { + struct ndr_pull *_ndr_sockaddr; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sockaddr, 0, r->sockaddr_size)); + NDR_CHECK(ndr_pull_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr)); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sockaddr, 0, r->sockaddr_size)); + } + NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->next_closest_site)); + NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); } - for (cntr_unknown_0 = 0; cntr_unknown_0 < 2; cntr_unknown_0++) { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0])); + if (ndr_flags & NDR_BUFFERS) { } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc2 *r) +_PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r) { - uint32_t cntr_unknown_0; - ndr_print_struct(ndr, name, "nbt_netlogon_query_for_pdc2"); - ndr->depth++; - ndr_print_uint16(ndr, "request_count", r->request_count); - ndr_print_string(ndr, "computer_name", r->computer_name); - ndr_print_string(ndr, "user_name", r->user_name); - ndr_print_string(ndr, "mailslot_name", r->mailslot_name); - ndr->print(ndr, "%s: ARRAY(%d)", "unknown", (int)2); - ndr->depth++; - for (cntr_unknown_0=0;cntr_unknown_0<2;cntr_unknown_0++) { - char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { - ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); - free(idx_0); - } + ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_EX"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + ndr->depth++; + ndr_print_netlogon_command(ndr, "command", r->command); + ndr_print_uint16(ndr, "sbz", r->sbz); + ndr_print_nbt_server_type(ndr, "server_type", r->server_type); + ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); + ndr_print_nbt_string(ndr, "forest", r->forest); + ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); + ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); + ndr_print_nbt_string(ndr, "domain", r->domain); + ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); + ndr_print_nbt_string(ndr, "user_name", r->user_name); + ndr_print_nbt_string(ndr, "server_site", r->server_site); + ndr_print_nbt_string(ndr, "client_site", r->client_site); + ndr_print_uint8(ndr, "sockaddr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags):r->sockaddr_size); + ndr_print_nbt_sockaddr(ndr, "sockaddr", &r->sockaddr); + ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); + ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); + ndr_print_uint16(ndr, "lm20_token", r->lm20_token); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; } - ndr->depth--; - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; } -static enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r) +static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_query_for_pdc *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name)); ndr->flags = _flags_save_string; } { @@ -1827,16 +2041,10 @@ static enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_name)); ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); + NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); } @@ -1845,14 +2053,20 @@ static enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r) +static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_query_for_pdc *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name)); ndr->flags = _flags_save_string; } { @@ -1864,16 +2078,10 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_name)); ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); + NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); } @@ -1882,205 +2090,127 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r) +_PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r) { - ndr_print_struct(ndr, name, "nbt_netlogon_response_from_pdc"); + ndr_print_struct(ndr, name, "nbt_netlogon_query_for_pdc"); ndr->depth++; - ndr_print_string(ndr, "pdc_name", r->pdc_name); + ndr_print_string(ndr, "computer_name", r->computer_name); + ndr_print_string(ndr, "mailslot_name", r->mailslot_name); ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); - ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name); - ndr_print_string(ndr, "domain_name", r->domain_name); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); + ndr_print_string(ndr, "unicode_name", r->unicode_name); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); ndr_print_uint16(ndr, "lm20_token", r->lm20_token); ndr->depth--; } -static enum ndr_err_code ndr_push_nbt_server_type(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_nbt_server_type(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_nbt_server_type(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), "NBT_SERVER_PDC", NBT_SERVER_PDC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GC", NBT_SERVER_GC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_LDAP", NBT_SERVER_LDAP, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS", NBT_SERVER_DS, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_KDC", NBT_SERVER_KDC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_TIMESERV", NBT_SERVER_TIMESERV, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_CLOSEST", NBT_SERVER_CLOSEST, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_WRITABLE", NBT_SERVER_WRITABLE, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GOOD_TIMESERV", NBT_SERVER_GOOD_TIMESERV, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_NDNC", NBT_SERVER_NDNC, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_SELECT_SECRET_DOMAIN_6", NBT_SERVER_SELECT_SECRET_DOMAIN_6, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FULL_SECRET_DOMAIN_6", NBT_SERVER_FULL_SECRET_DOMAIN_6, r); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_dc_sock_addr(struct ndr_push *ndr, int ndr_flags, const struct nbt_dc_sock_addr *r) +_PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r) { - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->family)); - { - uint32_t _flags_save_ipv4address = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); - NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip)); - ndr->flags = _flags_save_ipv4address; - } - { - 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_nbt_dc_sock_addr(struct ndr_pull *ndr, int ndr_flags, struct nbt_dc_sock_addr *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->family)); - { - uint32_t _flags_save_ipv4address = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN); - NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip)); - ndr->flags = _flags_save_ipv4address; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2); + NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); + ndr->flags = _flags_save_DATA_BLOB; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); } - { - 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) { } - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_dc_sock_addr(struct ndr_print *ndr, const char *name, const struct nbt_dc_sock_addr *r) +_PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r) { - ndr_print_struct(ndr, name, "nbt_dc_sock_addr"); - ndr->depth++; - ndr_print_uint32(ndr, "family", r->family); - ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip); - ndr_print_DATA_BLOB(ndr, "remaining", r->remaining); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc2(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc2 *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_ALIGN4); - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_DATA_BLOB = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2); + NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); + ndr->flags = _flags_save_DATA_BLOB; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name)); + ndr->flags = _flags_save_string; + } + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); } - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); - NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->dc_sock_addr_size)); - { - struct ndr_push *_ndr_dc_sock_addr; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_push_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); + if (ndr_flags & NDR_BUFFERS) { } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr->flags = _flags_save_STRUCT; } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc2(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc2 *r) +_PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *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_ALIGN4); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad)); - ndr->flags = _flags_save_DATA_BLOB; - } - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); - NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->dc_sock_addr_size)); - { - struct ndr_pull *_ndr_dc_sock_addr; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_pull_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { + ndr_print_struct(ndr, name, "nbt_netlogon_response_from_pdc"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); + ndr->depth++; + ndr_print_netlogon_command(ndr, "command", r->command); + ndr_print_string(ndr, "pdc_name", r->pdc_name); + ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); + ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name); + ndr_print_string(ndr, "domain_name", r->domain_name); + ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version); + ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); + ndr_print_uint16(ndr, "lm20_token", r->lm20_token); + ndr->depth--; + ndr->flags = _flags_save_STRUCT; } - return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc2 *r) -{ - ndr_print_struct(ndr, name, "nbt_netlogon_response_from_pdc2"); - ndr->depth++; - ndr_print_DATA_BLOB(ndr, "_pad", r->_pad); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_nbt_string(ndr, "domain", r->domain); - ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); - ndr_print_nbt_string(ndr, "user_name", r->user_name); - ndr_print_nbt_string(ndr, "server_site", r->server_site); - ndr_print_nbt_string(ndr, "client_site", r->client_site); - ndr_print_uint8(ndr, "dc_sock_addr_size", r->dc_sock_addr_size); - ndr_print_nbt_dc_sock_addr(ndr, "dc_sock_addr", &r->dc_sock_addr); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_db_change(struct ndr_push *ndr, int ndr_flags, const struct nbt_db_change *r) +static enum ndr_err_code ndr_push_nbt_db_change_info(struct ndr_push *ndr, int ndr_flags, const struct nbt_db_change_info *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); @@ -2093,7 +2223,7 @@ static enum ndr_err_code ndr_push_nbt_db_change(struct ndr_push *ndr, int ndr_fl return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_db_change(struct ndr_pull *ndr, int ndr_flags, struct nbt_db_change *r) +static enum ndr_err_code ndr_pull_nbt_db_change_info(struct ndr_pull *ndr, int ndr_flags, struct nbt_db_change_info *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); @@ -2106,9 +2236,9 @@ static enum ndr_err_code ndr_pull_nbt_db_change(struct ndr_pull *ndr, int ndr_fl return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_db_change(struct ndr_print *ndr, const char *name, const struct nbt_db_change *r) +_PUBLIC_ void ndr_print_nbt_db_change_info(struct ndr_print *ndr, const char *name, const struct nbt_db_change_info *r) { - ndr_print_struct(ndr, name, "nbt_db_change"); + ndr_print_struct(ndr, name, "nbt_db_change_info"); ndr->depth++; ndr_print_netr_SamDatabaseID(ndr, "db_index", r->db_index); ndr_print_hyper(ndr, "serial", r->serial); @@ -2116,7 +2246,7 @@ _PUBLIC_ void ndr_print_nbt_db_change(struct ndr_print *ndr, const char *name, c ndr->depth--; } -static enum ndr_err_code ndr_push_nbt_netlogon_announce_uas(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_announce_uas *r) +static enum ndr_err_code ndr_push_NETLOGON_DB_CHANGE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_DB_CHANGE *r) { uint32_t cntr_dbchange_0; if (ndr_flags & NDR_SCALARS) { @@ -2157,7 +2287,7 @@ static enum ndr_err_code ndr_push_nbt_netlogon_announce_uas(struct ndr_push *ndr } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->db_count)); for (cntr_dbchange_0 = 0; cntr_dbchange_0 < r->db_count; cntr_dbchange_0++) { - NDR_CHECK(ndr_push_nbt_db_change(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0])); + NDR_CHECK(ndr_push_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0])); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags))); { @@ -2166,16 +2296,15 @@ static enum ndr_err_code ndr_push_nbt_netlogon_announce_uas(struct ndr_push *ndr NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid)); NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags))); } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_format_version)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_token)); } if (ndr_flags & NDR_BUFFERS) { } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_nbt_netlogon_announce_uas(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_announce_uas *r) +static enum ndr_err_code ndr_pull_NETLOGON_DB_CHANGE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_DB_CHANGE *r) { uint32_t cntr_dbchange_0; TALLOC_CTX *_mem_save_dbchange_0; @@ -2220,7 +2349,7 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_announce_uas(struct ndr_pull *ndr _mem_save_dbchange_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->dbchange, 0); for (cntr_dbchange_0 = 0; cntr_dbchange_0 < r->db_count; cntr_dbchange_0++) { - NDR_CHECK(ndr_pull_nbt_db_change(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0])); + NDR_CHECK(ndr_pull_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0])); } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dbchange_0, 0); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size)); @@ -2230,19 +2359,18 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_announce_uas(struct ndr_pull *ndr NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid)); NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size)); } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_format_version)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_token)); } if (ndr_flags & NDR_BUFFERS) { } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_announce_uas *r) +_PUBLIC_ void ndr_print_NETLOGON_DB_CHANGE(struct ndr_print *ndr, const char *name, const struct NETLOGON_DB_CHANGE *r) { uint32_t cntr_dbchange_0; - ndr_print_struct(ndr, name, "nbt_netlogon_announce_uas"); + ndr_print_struct(ndr, name, "NETLOGON_DB_CHANGE"); ndr->depth++; ndr_print_uint32(ndr, "serial_lo", r->serial_lo); ndr_print_time_t(ndr, "timestamp", r->timestamp); @@ -2259,16 +2387,15 @@ _PUBLIC_ void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const c for (cntr_dbchange_0=0;cntr_dbchange_0<r->db_count;cntr_dbchange_0++) { char *idx_0=NULL; if (asprintf(&idx_0, "[%d]", cntr_dbchange_0) != -1) { - ndr_print_nbt_db_change(ndr, "dbchange", &r->dbchange[cntr_dbchange_0]); + ndr_print_nbt_db_change_info(ndr, "dbchange", &r->dbchange[cntr_dbchange_0]); free(idx_0); } } ndr->depth--; ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size); ndr_print_dom_sid0(ndr, "sid", &r->sid); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); + ndr_print_uint32(ndr, "message_format_version", r->message_format_version); + ndr_print_uint32(ndr, "message_token", r->message_token); ndr->depth--; } @@ -2277,28 +2404,16 @@ static enum ndr_err_code ndr_push_nbt_netlogon_request(struct ndr_push *ndr, int if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case NETLOGON_QUERY_FOR_PDC: { - NDR_CHECK(ndr_push_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc)); + case LOGON_SAM_LOGON_REQUEST: { + NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon)); break; } - case NETLOGON_QUERY_FOR_PDC2: { - NDR_CHECK(ndr_push_nbt_netlogon_query_for_pdc2(ndr, NDR_SCALARS, &r->pdc2)); + case LOGON_PRIMARY_QUERY: { + NDR_CHECK(ndr_push_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc)); break; } case NETLOGON_ANNOUNCE_UAS: { - NDR_CHECK(ndr_push_nbt_netlogon_announce_uas(ndr, NDR_SCALARS, &r->uas)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC: { - NDR_CHECK(ndr_push_nbt_netlogon_response_from_pdc(ndr, NDR_SCALARS, &r->response)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC2: { - NDR_CHECK(ndr_push_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->response2)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC_USER: { - NDR_CHECK(ndr_push_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->response2)); + NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas)); break; } default: @@ -2308,23 +2423,15 @@ static enum ndr_err_code ndr_push_nbt_netlogon_request(struct ndr_push *ndr, int if (ndr_flags & NDR_BUFFERS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case NETLOGON_QUERY_FOR_PDC: + case LOGON_SAM_LOGON_REQUEST: + NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon)); break; - case NETLOGON_QUERY_FOR_PDC2: + case LOGON_PRIMARY_QUERY: break; case NETLOGON_ANNOUNCE_UAS: - NDR_CHECK(ndr_push_nbt_netlogon_announce_uas(ndr, NDR_BUFFERS, &r->uas)); - break; - - case NETLOGON_RESPONSE_FROM_PDC: - break; - - case NETLOGON_RESPONSE_FROM_PDC2: - break; - - case NETLOGON_RESPONSE_FROM_PDC_USER: + NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas)); break; default: @@ -2340,28 +2447,16 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_request(struct ndr_pull *ndr, int level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { switch (level) { - case NETLOGON_QUERY_FOR_PDC: { - NDR_CHECK(ndr_pull_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc)); + case LOGON_SAM_LOGON_REQUEST: { + NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon)); break; } - case NETLOGON_QUERY_FOR_PDC2: { - NDR_CHECK(ndr_pull_nbt_netlogon_query_for_pdc2(ndr, NDR_SCALARS, &r->pdc2)); + case LOGON_PRIMARY_QUERY: { + NDR_CHECK(ndr_pull_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc)); break; } case NETLOGON_ANNOUNCE_UAS: { - NDR_CHECK(ndr_pull_nbt_netlogon_announce_uas(ndr, NDR_SCALARS, &r->uas)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC: { - NDR_CHECK(ndr_pull_nbt_netlogon_response_from_pdc(ndr, NDR_SCALARS, &r->response)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC2: { - NDR_CHECK(ndr_pull_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->response2)); - break; } - - case NETLOGON_RESPONSE_FROM_PDC_USER: { - NDR_CHECK(ndr_pull_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->response2)); + NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas)); break; } default: @@ -2370,23 +2465,15 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_request(struct ndr_pull *ndr, int } if (ndr_flags & NDR_BUFFERS) { switch (level) { - case NETLOGON_QUERY_FOR_PDC: + case LOGON_SAM_LOGON_REQUEST: + NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon)); break; - case NETLOGON_QUERY_FOR_PDC2: + case LOGON_PRIMARY_QUERY: break; case NETLOGON_ANNOUNCE_UAS: - NDR_CHECK(ndr_pull_nbt_netlogon_announce_uas(ndr, NDR_BUFFERS, &r->uas)); - break; - - case NETLOGON_RESPONSE_FROM_PDC: - break; - - case NETLOGON_RESPONSE_FROM_PDC2: - break; - - case NETLOGON_RESPONSE_FROM_PDC_USER: + NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas)); break; default: @@ -2402,28 +2489,16 @@ _PUBLIC_ void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char * level = ndr_print_get_switch_value(ndr, r); ndr_print_union(ndr, name, level, "nbt_netlogon_request"); switch (level) { - case NETLOGON_QUERY_FOR_PDC: - ndr_print_nbt_netlogon_query_for_pdc(ndr, "pdc", &r->pdc); + case LOGON_SAM_LOGON_REQUEST: + ndr_print_NETLOGON_SAM_LOGON_REQUEST(ndr, "logon", &r->logon); break; - case NETLOGON_QUERY_FOR_PDC2: - ndr_print_nbt_netlogon_query_for_pdc2(ndr, "pdc2", &r->pdc2); + case LOGON_PRIMARY_QUERY: + ndr_print_nbt_netlogon_query_for_pdc(ndr, "pdc", &r->pdc); break; case NETLOGON_ANNOUNCE_UAS: - ndr_print_nbt_netlogon_announce_uas(ndr, "uas", &r->uas); - break; - - case NETLOGON_RESPONSE_FROM_PDC: - ndr_print_nbt_netlogon_response_from_pdc(ndr, "response", &r->response); - break; - - case NETLOGON_RESPONSE_FROM_PDC2: - ndr_print_nbt_netlogon_response_from_pdc2(ndr, "response2", &r->response2); - break; - - case NETLOGON_RESPONSE_FROM_PDC_USER: - ndr_print_nbt_netlogon_response_from_pdc2(ndr, "response2", &r->response2); + ndr_print_NETLOGON_DB_CHANGE(ndr, "uas", &r->uas); break; default: @@ -2438,7 +2513,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, in ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->command)); + NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command)); NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req)); } @@ -2457,7 +2532,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, in ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->command)); + NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command)); NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command)); NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req)); } @@ -2476,7 +2551,7 @@ _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *n uint32_t _flags_save_STRUCT = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "command", r->command); + ndr_print_netlogon_command(ndr, "command", r->command); ndr_print_set_switch_value(ndr, &r->req, r->command); ndr_print_nbt_netlogon_request(ndr, "req", &r->req); ndr->depth--; @@ -2484,1524 +2559,6 @@ _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *n } } -static enum ndr_err_code ndr_push_nbt_cldap_netlogon_1(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_1 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 1)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_cldap_netlogon_1(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_1 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_1(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_1 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_1"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_string(ndr, "pdc_name", r->pdc_name); - ndr_print_string(ndr, "user_name", r->user_name); - ndr_print_string(ndr, "domain_name", r->domain_name); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_cldap_netlogon_3(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_3 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->unknown_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip)); - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 3)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_cldap_netlogon_3(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_3 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->unknown_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip)); - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_3(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_3 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_3"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_string(ndr, "pdc_name", r->pdc_name); - ndr_print_string(ndr, "user_name", r->user_name); - ndr_print_string(ndr, "domain_name", r->domain_name); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_GUID(ndr, "unknown_uuid", &r->unknown_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -_PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_5(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_5 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz)); - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 5)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_5(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_5 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz)); - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_5(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_5 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_5"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_uint16(ndr, "sbz", r->sbz); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_nbt_string(ndr, "domain", r->domain); - ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); - ndr_print_nbt_string(ndr, "user_name", r->user_name); - ndr_print_nbt_string(ndr, "server_site", r->server_site); - ndr_print_nbt_string(ndr, "client_site", r->client_site); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?5:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_cldap_netlogon_13(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_13 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz)); - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); - NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->dc_sock_addr_size)); - { - struct ndr_push *_ndr_dc_sock_addr; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_push_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 13)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_cldap_netlogon_13(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_13 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz)); - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); - NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->dc_sock_addr_size)); - { - struct ndr_pull *_ndr_dc_sock_addr; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_pull_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_13(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_13 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_13"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_uint16(ndr, "sbz", r->sbz); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_nbt_string(ndr, "domain", r->domain); - ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); - ndr_print_nbt_string(ndr, "user_name", r->user_name); - ndr_print_nbt_string(ndr, "server_site", r->server_site); - ndr_print_nbt_string(ndr, "client_site", r->client_site); - ndr_print_uint8(ndr, "dc_sock_addr_size", r->dc_sock_addr_size); - ndr_print_nbt_dc_sock_addr(ndr, "dc_sock_addr", &r->dc_sock_addr); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?13:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -_PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_15(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_15 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz)); - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->next_closest_site)); - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 15)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_15(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_15 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz)); - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->next_closest_site)); - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_15(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_15 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_15"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_uint16(ndr, "sbz", r->sbz); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_nbt_string(ndr, "domain", r->domain); - ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); - ndr_print_nbt_string(ndr, "user_name", r->user_name); - ndr_print_nbt_string(ndr, "server_site", r->server_site); - ndr_print_nbt_string(ndr, "client_site", r->client_site); - ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?15:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -_PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon_29(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_29 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_netlogon_command(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz)); - NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site)); - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site)); - NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->dc_sock_addr_size)); - { - struct ndr_push *_ndr_dc_sock_addr; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_push_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - } - NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->next_closest_site)); - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, 29)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon_29(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_29 *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_netlogon_command(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz)); - NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site)); - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site)); - NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->dc_sock_addr_size)); - { - struct ndr_pull *_ndr_dc_sock_addr; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - NDR_CHECK(ndr_pull_nbt_dc_sock_addr(_ndr_dc_sock_addr, NDR_SCALARS, &r->dc_sock_addr)); - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_dc_sock_addr, 0, r->dc_sock_addr_size)); - } - NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->next_closest_site)); - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon_29(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_29 *r) -{ - ndr_print_struct(ndr, name, "nbt_cldap_netlogon_29"); - ndr->depth++; - ndr_print_nbt_netlogon_command(ndr, "type", r->type); - ndr_print_uint16(ndr, "sbz", r->sbz); - ndr_print_nbt_server_type(ndr, "server_type", r->server_type); - ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid); - ndr_print_nbt_string(ndr, "forest", r->forest); - ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain); - ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name); - ndr_print_nbt_string(ndr, "domain", r->domain); - ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name); - ndr_print_nbt_string(ndr, "user_name", r->user_name); - ndr_print_nbt_string(ndr, "server_site", r->server_site); - ndr_print_nbt_string(ndr, "client_site", r->client_site); - ndr_print_uint8(ndr, "dc_sock_addr_size", r->dc_sock_addr_size); - ndr_print_nbt_dc_sock_addr(ndr, "dc_sock_addr", &r->dc_sock_addr); - ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site); - ndr_print_nbt_netlogon_version(ndr, "nt_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?29:r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -_PUBLIC_ enum ndr_err_code ndr_push_nbt_cldap_netlogon(struct ndr_push *ndr, int ndr_flags, const union nbt_cldap_netlogon *r) -{ - { - uint32_t _flags_save_UNION = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - if (ndr_flags & NDR_SCALARS) { - int level = ndr_push_get_switch_value(ndr, r); - switch (level) { - case 0: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 1: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 2: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 3: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 4: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 5: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 6: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 7: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 8: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 9: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 10: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 11: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 12: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 13: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 14: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 15: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 16: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 17: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 18: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 19: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 20: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 21: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 22: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 23: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 24: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 25: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 26: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 27: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 28: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 29: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - break; } - - case 30: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - break; } - - case 31: { - NDR_CHECK(ndr_push_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - 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 0: - break; - - case 1: - break; - - case 2: - break; - - case 3: - break; - - case 4: - break; - - case 5: - break; - - case 6: - break; - - case 7: - break; - - case 8: - break; - - case 9: - break; - - case 10: - break; - - case 11: - break; - - case 12: - break; - - case 13: - break; - - case 14: - break; - - case 15: - break; - - case 16: - break; - - case 17: - break; - - case 18: - break; - - case 19: - break; - - case 20: - break; - - case 21: - break; - - case 22: - break; - - case 23: - break; - - case 24: - break; - - case 25: - break; - - case 26: - break; - - case 27: - break; - - case 28: - break; - - case 29: - break; - - case 30: - break; - - case 31: - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - } - ndr->flags = _flags_save_UNION; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_nbt_cldap_netlogon(struct ndr_pull *ndr, int ndr_flags, union nbt_cldap_netlogon *r) -{ - int level; - { - uint32_t _flags_save_UNION = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - level = ndr_pull_get_switch_value(ndr, r); - if (ndr_flags & NDR_SCALARS) { - switch (level) { - case 0: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 1: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 2: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 3: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 4: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 5: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 6: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 7: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_5(ndr, NDR_SCALARS, &r->logon5)); - break; } - - case 8: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 9: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 10: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 11: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 12: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 13: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 14: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 15: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_13(ndr, NDR_SCALARS, &r->logon13)); - break; } - - case 16: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 17: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_1(ndr, NDR_SCALARS, &r->logon1)); - break; } - - case 18: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 19: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_3(ndr, NDR_SCALARS, &r->logon3)); - break; } - - case 20: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 21: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 22: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 23: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 24: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 25: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 26: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 27: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 28: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_15(ndr, NDR_SCALARS, &r->logon15)); - break; } - - case 29: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - break; } - - case 30: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - break; } - - case 31: { - NDR_CHECK(ndr_pull_nbt_cldap_netlogon_29(ndr, NDR_SCALARS, &r->logon29)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - } - if (ndr_flags & NDR_BUFFERS) { - switch (level) { - case 0: - break; - - case 1: - break; - - case 2: - break; - - case 3: - break; - - case 4: - break; - - case 5: - break; - - case 6: - break; - - case 7: - break; - - case 8: - break; - - case 9: - break; - - case 10: - break; - - case 11: - break; - - case 12: - break; - - case 13: - break; - - case 14: - break; - - case 15: - break; - - case 16: - break; - - case 17: - break; - - case 18: - break; - - case 19: - break; - - case 20: - break; - - case 21: - break; - - case 22: - break; - - case 23: - break; - - case 24: - break; - - case 25: - break; - - case 26: - break; - - case 27: - break; - - case 28: - break; - - case 29: - break; - - case 30: - break; - - case 31: - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - } - ndr->flags = _flags_save_UNION; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_cldap_netlogon(struct ndr_print *ndr, const char *name, const union nbt_cldap_netlogon *r) -{ - int level; - { - uint32_t _flags_save_UNION = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - level = ndr_print_get_switch_value(ndr, r); - ndr_print_union(ndr, name, level, "nbt_cldap_netlogon"); - switch (level) { - case 0: - ndr_print_nbt_cldap_netlogon_1(ndr, "logon1", &r->logon1); - break; - - case 1: - ndr_print_nbt_cldap_netlogon_1(ndr, "logon1", &r->logon1); - break; - - case 2: - ndr_print_nbt_cldap_netlogon_3(ndr, "logon3", &r->logon3); - break; - - case 3: - ndr_print_nbt_cldap_netlogon_3(ndr, "logon3", &r->logon3); - break; - - case 4: - ndr_print_nbt_cldap_netlogon_5(ndr, "logon5", &r->logon5); - break; - - case 5: - ndr_print_nbt_cldap_netlogon_5(ndr, "logon5", &r->logon5); - break; - - case 6: - ndr_print_nbt_cldap_netlogon_5(ndr, "logon5", &r->logon5); - break; - - case 7: - ndr_print_nbt_cldap_netlogon_5(ndr, "logon5", &r->logon5); - break; - - case 8: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 9: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 10: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 11: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 12: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 13: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 14: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 15: - ndr_print_nbt_cldap_netlogon_13(ndr, "logon13", &r->logon13); - break; - - case 16: - ndr_print_nbt_cldap_netlogon_1(ndr, "logon1", &r->logon1); - break; - - case 17: - ndr_print_nbt_cldap_netlogon_1(ndr, "logon1", &r->logon1); - break; - - case 18: - ndr_print_nbt_cldap_netlogon_3(ndr, "logon3", &r->logon3); - break; - - case 19: - ndr_print_nbt_cldap_netlogon_3(ndr, "logon3", &r->logon3); - break; - - case 20: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 21: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 22: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 23: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 24: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 25: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 26: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 27: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 28: - ndr_print_nbt_cldap_netlogon_15(ndr, "logon15", &r->logon15); - break; - - case 29: - ndr_print_nbt_cldap_netlogon_29(ndr, "logon29", &r->logon29); - break; - - case 30: - ndr_print_nbt_cldap_netlogon_29(ndr, "logon29", &r->logon29); - break; - - case 31: - ndr_print_nbt_cldap_netlogon_29(ndr, "logon29", &r->logon29); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } - ndr->flags = _flags_save_UNION; - } -} - -static enum ndr_err_code ndr_push_nbt_ntlogon_command(struct ndr_push *ndr, int ndr_flags, enum nbt_ntlogon_command r) -{ - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_ntlogon_command(struct ndr_pull *ndr, int ndr_flags, enum nbt_ntlogon_command *r) -{ - uint16_t v; - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); - *r = v; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_ntlogon_command(struct ndr_print *ndr, const char *name, enum nbt_ntlogon_command r) -{ - const char *val = NULL; - - switch (r) { - case NTLOGON_SAM_LOGON: val = "NTLOGON_SAM_LOGON"; break; - case NTLOGON_SAM_LOGON_REPLY: val = "NTLOGON_SAM_LOGON_REPLY"; break; - case NTLOGON_SAM_LOGON_REPLY15: val = "NTLOGON_SAM_LOGON_REPLY15"; break; - case NTLOGON_RESPONSE_FROM_PDC2: val = "NTLOGON_RESPONSE_FROM_PDC2"; break; - } - ndr_print_enum(ndr, name, "ENUM", val, r); -} - -static enum ndr_err_code ndr_push_nbt_ntlogon_sam_logon(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_sam_logon *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->request_count)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_control)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags))); - { - struct ndr_push *_ndr_sid; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags))); - NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags))); - } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_ntlogon_sam_logon(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_sam_logon *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->request_count)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_control)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size)); - { - struct ndr_pull *_ndr_sid; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size)); - NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid)); - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size)); - } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon *r) -{ - ndr_print_struct(ndr, name, "nbt_ntlogon_sam_logon"); - ndr->depth++; - ndr_print_uint16(ndr, "request_count", r->request_count); - ndr_print_string(ndr, "computer_name", r->computer_name); - ndr_print_string(ndr, "user_name", r->user_name); - ndr_print_string(ndr, "mailslot_name", r->mailslot_name); - ndr_print_samr_AcctFlags(ndr, "acct_control", r->acct_control); - ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size); - ndr_print_dom_sid0(ndr, "sid", &r->sid); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_ntlogon_sam_logon_reply(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_sam_logon_reply *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_push_nbt_netlogon_version(ndr, NDR_SCALARS, r->nt_version)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_nbt_ntlogon_sam_logon_reply(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_sam_logon_reply *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name)); - ndr->flags = _flags_save_string; - } - { - uint32_t _flags_save_string = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); - NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain)); - ndr->flags = _flags_save_string; - } - NDR_CHECK(ndr_pull_nbt_netlogon_version(ndr, NDR_SCALARS, &r->nt_version)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token)); - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token)); - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon_reply(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon_reply *r) -{ - ndr_print_struct(ndr, name, "nbt_ntlogon_sam_logon_reply"); - ndr->depth++; - ndr_print_string(ndr, "server", r->server); - ndr_print_string(ndr, "user_name", r->user_name); - ndr_print_string(ndr, "domain", r->domain); - ndr_print_nbt_netlogon_version(ndr, "nt_version", r->nt_version); - ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token); - ndr_print_uint16(ndr, "lm20_token", r->lm20_token); - ndr->depth--; -} - -static enum ndr_err_code ndr_push_nbt_ntlogon_request(struct ndr_push *ndr, int ndr_flags, const union nbt_ntlogon_request *r) -{ - if (ndr_flags & NDR_SCALARS) { - int level = ndr_push_get_switch_value(ndr, r); - switch (level) { - case NTLOGON_SAM_LOGON: { - NDR_CHECK(ndr_push_nbt_ntlogon_sam_logon(ndr, NDR_SCALARS, &r->logon)); - break; } - - case NTLOGON_SAM_LOGON_REPLY: { - NDR_CHECK(ndr_push_nbt_ntlogon_sam_logon_reply(ndr, NDR_SCALARS, &r->reply)); - break; } - - case NTLOGON_SAM_LOGON_REPLY15: { - NDR_CHECK(ndr_push_nbt_ntlogon_sam_logon_reply(ndr, NDR_SCALARS, &r->reply)); - break; } - - case NTLOGON_RESPONSE_FROM_PDC2: { - NDR_CHECK(ndr_push_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->reply2)); - 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 NTLOGON_SAM_LOGON: - NDR_CHECK(ndr_push_nbt_ntlogon_sam_logon(ndr, NDR_BUFFERS, &r->logon)); - break; - - case NTLOGON_SAM_LOGON_REPLY: - break; - - case NTLOGON_SAM_LOGON_REPLY15: - break; - - case NTLOGON_RESPONSE_FROM_PDC2: - 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_nbt_ntlogon_request(struct ndr_pull *ndr, int ndr_flags, union nbt_ntlogon_request *r) -{ - int level; - level = ndr_pull_get_switch_value(ndr, r); - if (ndr_flags & NDR_SCALARS) { - switch (level) { - case NTLOGON_SAM_LOGON: { - NDR_CHECK(ndr_pull_nbt_ntlogon_sam_logon(ndr, NDR_SCALARS, &r->logon)); - break; } - - case NTLOGON_SAM_LOGON_REPLY: { - NDR_CHECK(ndr_pull_nbt_ntlogon_sam_logon_reply(ndr, NDR_SCALARS, &r->reply)); - break; } - - case NTLOGON_SAM_LOGON_REPLY15: { - NDR_CHECK(ndr_pull_nbt_ntlogon_sam_logon_reply(ndr, NDR_SCALARS, &r->reply)); - break; } - - case NTLOGON_RESPONSE_FROM_PDC2: { - NDR_CHECK(ndr_pull_nbt_netlogon_response_from_pdc2(ndr, NDR_SCALARS, &r->reply2)); - break; } - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - } - if (ndr_flags & NDR_BUFFERS) { - switch (level) { - case NTLOGON_SAM_LOGON: - NDR_CHECK(ndr_pull_nbt_ntlogon_sam_logon(ndr, NDR_BUFFERS, &r->logon)); - break; - - case NTLOGON_SAM_LOGON_REPLY: - break; - - case NTLOGON_SAM_LOGON_REPLY15: - break; - - case NTLOGON_RESPONSE_FROM_PDC2: - break; - - default: - return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_ntlogon_request(struct ndr_print *ndr, const char *name, const union nbt_ntlogon_request *r) -{ - int level; - level = ndr_print_get_switch_value(ndr, r); - ndr_print_union(ndr, name, level, "nbt_ntlogon_request"); - switch (level) { - case NTLOGON_SAM_LOGON: - ndr_print_nbt_ntlogon_sam_logon(ndr, "logon", &r->logon); - break; - - case NTLOGON_SAM_LOGON_REPLY: - ndr_print_nbt_ntlogon_sam_logon_reply(ndr, "reply", &r->reply); - break; - - case NTLOGON_SAM_LOGON_REPLY15: - ndr_print_nbt_ntlogon_sam_logon_reply(ndr, "reply", &r->reply); - break; - - case NTLOGON_RESPONSE_FROM_PDC2: - ndr_print_nbt_netlogon_response_from_pdc2(ndr, "reply2", &r->reply2); - break; - - default: - ndr_print_bad_level(ndr, name, level); - } -} - -_PUBLIC_ enum ndr_err_code ndr_push_nbt_ntlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_packet *r) -{ - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_nbt_ntlogon_command(ndr, NDR_SCALARS, r->command)); - NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command)); - NDR_CHECK(ndr_push_nbt_ntlogon_request(ndr, NDR_SCALARS, &r->req)); - } - if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_nbt_ntlogon_request(ndr, NDR_BUFFERS, &r->req)); - } - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_nbt_ntlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_packet *r) -{ - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_nbt_ntlogon_command(ndr, NDR_SCALARS, &r->command)); - NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command)); - NDR_CHECK(ndr_pull_nbt_ntlogon_request(ndr, NDR_SCALARS, &r->req)); - } - if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_nbt_ntlogon_request(ndr, NDR_BUFFERS, &r->req)); - } - ndr->flags = _flags_save_STRUCT; - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_nbt_ntlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_packet *r) -{ - ndr_print_struct(ndr, name, "nbt_ntlogon_packet"); - { - uint32_t _flags_save_STRUCT = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN); - ndr->depth++; - ndr_print_nbt_ntlogon_command(ndr, "command", r->command); - ndr_print_set_switch_value(ndr, &r->req, r->command); - ndr_print_nbt_ntlogon_request(ndr, "req", &r->req); - ndr->depth--; - ndr->flags = _flags_save_STRUCT; - } -} - static enum ndr_err_code ndr_push_nbt_browse_opcode(struct ndr_push *ndr, int ndr_flags, enum nbt_browse_opcode r) { NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); diff --git a/source3/librpc/gen_ndr/ndr_nbt.h b/source3/librpc/gen_ndr/ndr_nbt.h index 6e9702d5d5..1a0ca0c302 100644 --- a/source3/librpc/gen_ndr/ndr_nbt.h +++ b/source3/librpc/gen_ndr/ndr_nbt.h @@ -6,14 +6,19 @@ #ifndef _HEADER_NDR_nbt #define _HEADER_NDR_nbt -#include "libcli/nbt/libnbt.h" +#include "../libcli/netlogon.h" +#include "../libcli/nbt/libnbt.h" #define NDR_NBT_CALL_COUNT (0) void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r); void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r); enum ndr_err_code ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r); enum ndr_err_code ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r); void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r); +enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r); +enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r); void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r); +enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r); +enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r); void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r); void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r); void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r); @@ -23,7 +28,10 @@ void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const str void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r); void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r); void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r); +enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r); +enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r); void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r); +enum ndr_err_code ndr_push_nbt_res_rec(struct ndr_push *ndr, int ndr_flags, const struct nbt_res_rec *r); void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r); enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r); enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r); @@ -43,42 +51,41 @@ void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union d enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r); enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r); void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r); -void ndr_print_nbt_netlogon_command(struct ndr_print *ndr, const char *name, enum nbt_netlogon_command r); -void ndr_print_nbt_netlogon_version(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r); +enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r); +void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r); +size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags); +enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_nbt_server_type(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_netlogon_nt_version_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_netlogon_nt_version_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_netlogon_nt_version_flags(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum netlogon_command r); +enum ndr_err_code ndr_pull_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum netlogon_command *r); +void ndr_print_netlogon_command(struct ndr_print *ndr, const char *name, enum netlogon_command r); +enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_REQUEST *r); +enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_REQUEST *r); +void ndr_print_NETLOGON_SAM_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_REQUEST *r); +enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r); +enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r); +void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r); +enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE *r); +enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE *r); +void ndr_print_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE *r); +enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r); +enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r); +void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r); void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r); -void ndr_print_nbt_netlogon_query_for_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc2 *r); +enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r); +enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r); void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r); -void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r); -void ndr_print_nbt_dc_sock_addr(struct ndr_print *ndr, const char *name, const struct nbt_dc_sock_addr *r); -void ndr_print_nbt_netlogon_response_from_pdc2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc2 *r); -void ndr_print_nbt_db_change(struct ndr_print *ndr, const char *name, const struct nbt_db_change *r); -void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_announce_uas *r); +void ndr_print_nbt_db_change_info(struct ndr_print *ndr, const char *name, const struct nbt_db_change_info *r); +void ndr_print_NETLOGON_DB_CHANGE(struct ndr_print *ndr, const char *name, const struct NETLOGON_DB_CHANGE *r); void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r); enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r); enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r); void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r); -void ndr_print_nbt_cldap_netlogon_1(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_1 *r); -void ndr_print_nbt_cldap_netlogon_3(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_3 *r); -enum ndr_err_code ndr_push_nbt_cldap_netlogon_5(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_5 *r); -enum ndr_err_code ndr_pull_nbt_cldap_netlogon_5(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_5 *r); -void ndr_print_nbt_cldap_netlogon_5(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_5 *r); -void ndr_print_nbt_cldap_netlogon_13(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_13 *r); -enum ndr_err_code ndr_push_nbt_cldap_netlogon_15(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_15 *r); -enum ndr_err_code ndr_pull_nbt_cldap_netlogon_15(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_15 *r); -void ndr_print_nbt_cldap_netlogon_15(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_15 *r); -enum ndr_err_code ndr_push_nbt_cldap_netlogon_29(struct ndr_push *ndr, int ndr_flags, const struct nbt_cldap_netlogon_29 *r); -enum ndr_err_code ndr_pull_nbt_cldap_netlogon_29(struct ndr_pull *ndr, int ndr_flags, struct nbt_cldap_netlogon_29 *r); -void ndr_print_nbt_cldap_netlogon_29(struct ndr_print *ndr, const char *name, const struct nbt_cldap_netlogon_29 *r); -enum ndr_err_code ndr_push_nbt_cldap_netlogon(struct ndr_push *ndr, int ndr_flags, const union nbt_cldap_netlogon *r); -enum ndr_err_code ndr_pull_nbt_cldap_netlogon(struct ndr_pull *ndr, int ndr_flags, union nbt_cldap_netlogon *r); -void ndr_print_nbt_cldap_netlogon(struct ndr_print *ndr, const char *name, const union nbt_cldap_netlogon *r); -void ndr_print_nbt_ntlogon_command(struct ndr_print *ndr, const char *name, enum nbt_ntlogon_command r); -void ndr_print_nbt_ntlogon_sam_logon(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon *r); -void ndr_print_nbt_ntlogon_sam_logon_reply(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_sam_logon_reply *r); -void ndr_print_nbt_ntlogon_request(struct ndr_print *ndr, const char *name, const union nbt_ntlogon_request *r); -enum ndr_err_code ndr_push_nbt_ntlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_ntlogon_packet *r); -enum ndr_err_code ndr_pull_nbt_ntlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_ntlogon_packet *r); -void ndr_print_nbt_ntlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_ntlogon_packet *r); void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r); void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r); void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r); diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c index b43a157997..169d35e326 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.c +++ b/source3/librpc/gen_ndr/ndr_netlogon.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_netlogon.h" +#include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_lsa.h" #include "librpc/gen_ndr/ndr_samr.h" #include "librpc/gen_ndr/ndr_security.h" @@ -362,8 +363,6 @@ static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword)); - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword)); } return NDR_ERR_SUCCESS; } @@ -378,8 +377,6 @@ static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword)); - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword)); } return NDR_ERR_SUCCESS; } @@ -541,32 +538,155 @@ _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name } } -_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r) +static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo *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_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name)); + 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)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_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_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name)); + 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) { + NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name)); + 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)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r) +{ + ndr_print_struct(ndr, name, "netr_GenericInfo"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + ndr->depth++; + ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info); + ndr_print_lsa_String(ndr, "package_name", &r->package_name); + 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--; + ndr->flags = _flags_save_STRUCT; + } +} + +static enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, int ndr_flags, enum netr_LogonInfoClass r) +{ + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonInfoClass *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r) +{ + const char *val = NULL; + + switch (r) { + case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break; + case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break; + case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break; + case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break; + case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break; + case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break; + case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r) { if (ndr_flags & NDR_SCALARS) { int level = ndr_push_get_switch_value(ndr, r); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level)); + NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level)); switch (level) { - case 1: { + case NetlogonInteractiveInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); break; } - case 2: { + case NetlogonNetworkInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->network)); break; } - case 3: { + case NetlogonServiceInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); break; } - case 5: { + case NetlogonGenericInformation: { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic)); + break; } + + case NetlogonInteractiveTransitiveInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); break; } - case 6: { + case NetlogonNetworkTransitiveInformation: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->network)); break; } + case NetlogonServiceTransitiveInformation: { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->password)); + break; } + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -574,36 +694,48 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr if (ndr_flags & NDR_BUFFERS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case 1: + case NetlogonInteractiveInformation: if (r->password) { NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password)); } break; - case 2: + case NetlogonNetworkInformation: if (r->network) { NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network)); } break; - case 3: + case NetlogonServiceInformation: if (r->password) { NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password)); } break; - case 5: + case NetlogonGenericInformation: + if (r->generic) { + NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic)); + } + break; + + case NetlogonInteractiveTransitiveInformation: if (r->password) { NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password)); } break; - case 6: + case NetlogonNetworkTransitiveInformation: if (r->network) { NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network)); } break; + case NetlogonServiceTransitiveInformation: + if (r->password) { + NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password)); + } + break; + default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -611,12 +743,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r) +_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r) { int level; uint16_t _level; TALLOC_CTX *_mem_save_password_0; TALLOC_CTX *_mem_save_network_0; + TALLOC_CTX *_mem_save_generic_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level)); @@ -624,7 +757,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); } switch (level) { - case 1: { + case NetlogonInteractiveInformation: { uint32_t _ptr_password; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password)); if (_ptr_password) { @@ -634,7 +767,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; } - case 2: { + case NetlogonNetworkInformation: { uint32_t _ptr_network; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network)); if (_ptr_network) { @@ -644,7 +777,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; } - case 3: { + case NetlogonServiceInformation: { uint32_t _ptr_password; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password)); if (_ptr_password) { @@ -654,7 +787,17 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; } - case 5: { + case NetlogonGenericInformation: { + uint32_t _ptr_generic; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic)); + if (_ptr_generic) { + NDR_PULL_ALLOC(ndr, r->generic); + } else { + r->generic = NULL; + } + break; } + + case NetlogonInteractiveTransitiveInformation: { uint32_t _ptr_password; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password)); if (_ptr_password) { @@ -664,7 +807,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; } - case 6: { + case NetlogonNetworkTransitiveInformation: { uint32_t _ptr_network; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network)); if (_ptr_network) { @@ -674,13 +817,23 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; } + case NetlogonServiceTransitiveInformation: { + uint32_t _ptr_password; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password)); + if (_ptr_password) { + NDR_PULL_ALLOC(ndr, r->password); + } else { + r->password = NULL; + } + 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: + case NetlogonInteractiveInformation: if (r->password) { _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->password, 0); @@ -689,7 +842,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; - case 2: + case NetlogonNetworkInformation: if (r->network) { _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->network, 0); @@ -698,7 +851,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; - case 3: + case NetlogonServiceInformation: if (r->password) { _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->password, 0); @@ -707,7 +860,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; - case 5: + case NetlogonGenericInformation: + if (r->generic) { + _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0); + NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0); + } + break; + + case NetlogonInteractiveTransitiveInformation: if (r->password) { _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->password, 0); @@ -716,7 +878,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; - case 6: + case NetlogonNetworkTransitiveInformation: if (r->network) { _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->network, 0); @@ -725,6 +887,15 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr } break; + case NetlogonServiceTransitiveInformation: + if (r->password) { + _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->password, 0); + NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0); + } + break; + default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } @@ -732,13 +903,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r) +_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r) { int level; level = ndr_print_get_switch_value(ndr, r); - ndr_print_union(ndr, name, level, "netr_LogonInfo"); + ndr_print_union(ndr, name, level, "netr_LogonLevel"); switch (level) { - case 1: + case NetlogonInteractiveInformation: ndr_print_ptr(ndr, "password", r->password); ndr->depth++; if (r->password) { @@ -747,7 +918,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 2: + case NetlogonNetworkInformation: ndr_print_ptr(ndr, "network", r->network); ndr->depth++; if (r->network) { @@ -756,7 +927,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 3: + case NetlogonServiceInformation: ndr_print_ptr(ndr, "password", r->password); ndr->depth++; if (r->password) { @@ -765,7 +936,16 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 5: + case NetlogonGenericInformation: + ndr_print_ptr(ndr, "generic", r->generic); + ndr->depth++; + if (r->generic) { + ndr_print_netr_GenericInfo(ndr, "generic", r->generic); + } + ndr->depth--; + break; + + case NetlogonInteractiveTransitiveInformation: ndr_print_ptr(ndr, "password", r->password); ndr->depth++; if (r->password) { @@ -774,7 +954,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 6: + case NetlogonNetworkTransitiveInformation: ndr_print_ptr(ndr, "network", r->network); ndr->depth++; if (r->network) { @@ -783,6 +963,15 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, ndr->depth--; break; + case NetlogonServiceTransitiveInformation: + ndr_print_ptr(ndr, "password", r->password); + ndr->depth++; + if (r->password) { + ndr_print_netr_PasswordInfo(ndr, "password", r->password); + } + ndr->depth--; + break; + default: ndr_print_bad_level(ndr, name, level); } @@ -1514,17 +1703,92 @@ _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, co ndr->depth--; } +static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo2 *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->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)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo2 *r) +{ + uint32_t _ptr_data; + TALLOC_CTX *_mem_save_data_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_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)); + } + } + ndr->flags = _flags_save_STRUCT; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r) +{ + ndr_print_struct(ndr, name, "netr_GenericInfo2"); + { + uint32_t _flags_save_STRUCT = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + 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--; + ndr->flags = _flags_save_STRUCT; + } +} + _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *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 2: { + case NetlogonValidationSamInfo: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2)); break; } - case 3: { + case NetlogonValidationSamInfo2: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3)); break; } @@ -1532,11 +1796,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac)); break; } - case 5: { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac)); + case NetlogonValidationGenericInfo2: { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic)); break; } - case 6: { + case NetlogonValidationSamInfo4: { NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6)); break; } @@ -1547,13 +1811,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd if (ndr_flags & NDR_BUFFERS) { int level = ndr_push_get_switch_value(ndr, r); switch (level) { - case 2: + case NetlogonValidationSamInfo: if (r->sam2) { NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2)); } break; - case 3: + case NetlogonValidationSamInfo2: if (r->sam3) { NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3)); } @@ -1565,13 +1829,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd } break; - case 5: - if (r->pac) { - NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac)); + case NetlogonValidationGenericInfo2: + if (r->generic) { + NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic)); } break; - case 6: + case NetlogonValidationSamInfo4: if (r->sam6) { NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6)); } @@ -1591,6 +1855,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd TALLOC_CTX *_mem_save_sam2_0; TALLOC_CTX *_mem_save_sam3_0; TALLOC_CTX *_mem_save_pac_0; + TALLOC_CTX *_mem_save_generic_0; TALLOC_CTX *_mem_save_sam6_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { @@ -1599,7 +1864,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level); } switch (level) { - case 2: { + case NetlogonValidationSamInfo: { uint32_t _ptr_sam2; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2)); if (_ptr_sam2) { @@ -1609,7 +1874,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd } break; } - case 3: { + case NetlogonValidationSamInfo2: { uint32_t _ptr_sam3; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3)); if (_ptr_sam3) { @@ -1629,17 +1894,17 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd } break; } - case 5: { - uint32_t _ptr_pac; - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac)); - if (_ptr_pac) { - NDR_PULL_ALLOC(ndr, r->pac); + case NetlogonValidationGenericInfo2: { + uint32_t _ptr_generic; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic)); + if (_ptr_generic) { + NDR_PULL_ALLOC(ndr, r->generic); } else { - r->pac = NULL; + r->generic = NULL; } break; } - case 6: { + case NetlogonValidationSamInfo4: { uint32_t _ptr_sam6; NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6)); if (_ptr_sam6) { @@ -1655,7 +1920,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { switch (level) { - case 2: + case NetlogonValidationSamInfo: if (r->sam2) { _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0); @@ -1664,7 +1929,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd } break; - case 3: + case NetlogonValidationSamInfo2: if (r->sam3) { _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0); @@ -1682,16 +1947,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd } break; - case 5: - if (r->pac) { - _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0); - NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0); + case NetlogonValidationGenericInfo2: + if (r->generic) { + _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0); + NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0); } break; - case 6: + case NetlogonValidationSamInfo4: if (r->sam6) { _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0); @@ -1713,7 +1978,7 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, level = ndr_print_get_switch_value(ndr, r); ndr_print_union(ndr, name, level, "netr_Validation"); switch (level) { - case 2: + case NetlogonValidationSamInfo: ndr_print_ptr(ndr, "sam2", r->sam2); ndr->depth++; if (r->sam2) { @@ -1722,7 +1987,7 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 3: + case NetlogonValidationSamInfo2: ndr_print_ptr(ndr, "sam3", r->sam3); ndr->depth++; if (r->sam3) { @@ -1740,16 +2005,16 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, ndr->depth--; break; - case 5: - ndr_print_ptr(ndr, "pac", r->pac); + case NetlogonValidationGenericInfo2: + ndr_print_ptr(ndr, "generic", r->generic); ndr->depth++; - if (r->pac) { - ndr_print_netr_PacInfo(ndr, "pac", r->pac); + if (r->generic) { + ndr_print_netr_GenericInfo2(ndr, "generic", r->generic); } ndr->depth--; break; - case 6: + case NetlogonValidationSamInfo4: ndr_print_ptr(ndr, "sam6", r->sam6); ndr->depth++; if (r->sam6) { @@ -1841,31 +2106,6 @@ _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *na ndr->depth--; } -static enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, enum netr_LogonLevel r) -{ - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonLevel *r) -{ - uint16_t v; - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); - *r = v; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r) -{ - const char *val = NULL; - - switch (r) { - case INTERACTIVE_LOGON_TYPE: val = "INTERACTIVE_LOGON_TYPE"; break; - case NET_LOGON_TYPE: val = "NET_LOGON_TYPE"; break; - } - ndr_print_enum(ndr, name, "ENUM", val, r); -} - static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r) { if (ndr_flags & NDR_SCALARS) { @@ -1968,7 +2208,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->pwd)); } return NDR_ERR_SUCCESS; } @@ -1983,7 +2222,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->pwd)); } return NDR_ERR_SUCCESS; } @@ -2061,8 +2299,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_ 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)); - NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->ntpassword)); } return NDR_ERR_SUCCESS; } @@ -2076,8 +2312,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_ 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)); - NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->ntpassword)); } return NDR_ERR_SUCCESS; } @@ -2099,7 +2333,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_BUFFERS, &r->keys2)); } return NDR_ERR_SUCCESS; } @@ -2111,7 +2344,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_BUFFERS, &r->keys2)); } return NDR_ERR_SUCCESS; } @@ -2132,7 +2364,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_BUFFERS, &r->keys)); } return NDR_ERR_SUCCESS; } @@ -2145,7 +2376,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys)); } if (ndr_flags & NDR_BUFFERS) { - NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_BUFFERS, &r->keys)); } return NDR_ERR_SUCCESS; } @@ -2293,8 +2523,6 @@ static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_ 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)); - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword)); - NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword)); 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_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info)); @@ -2358,8 +2586,6 @@ static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_ 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)); - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword)); - NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword)); 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_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info)); @@ -2421,7 +2647,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int nd 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_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information)); NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length)); @@ -2442,7 +2668,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf)); NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2)); @@ -2457,7 +2683,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(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_lsa_String(ndr, NDR_SCALARS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information)); NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length)); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length)); @@ -2478,7 +2704,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int nd } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name)); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information)); NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf)); NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2)); @@ -2493,7 +2719,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *nam ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN"); ndr->depth++; ndr_print_lsa_String(ndr, "domain_name", &r->domain_name); - ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr_print_lsa_String(ndr, "oem_information", &r->oem_information); ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time); ndr_print_uint16(ndr, "min_password_length", r->min_password_length); ndr_print_uint16(ndr, "password_history_length", r->password_history_length); @@ -6176,7 +6402,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_address, ndr_charset_length(r->dc_address, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); if (r->domain_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); @@ -6286,7 +6511,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_address, ndr_get_array_length(ndr, &r->dc_address), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_address_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid)); if (r->domain_name) { _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0); @@ -6385,6 +6609,35 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char 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)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_TrustFlags(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_TrustFlags(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), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r); + 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; @@ -6893,10 +7146,115 @@ _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name } } +static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8)); + NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension *r) +{ + 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_uint32(ndr, NDR_SCALARS, &r->dummy)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r) +{ + ndr_print_struct(ndr, name, "netr_trust_extension"); + ndr->depth++; + ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->length); + ndr_print_uint32(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy); + ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->size); + ndr_print_netr_TrustFlags(ndr, "flags", r->flags); + ndr_print_uint32(ndr, "parent_index", r->parent_index); + ndr_print_uint32(ndr, "trust_type", r->trust_type); + ndr_print_uint32(ndr, "trust_attributes", r->trust_attributes); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension_container *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->info) { + NDR_CHECK(ndr_push_netr_trust_extension(ndr, NDR_SCALARS, r->info)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension_container *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_uint16(ndr, NDR_SCALARS, &r->length)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size)); + 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_netr_trust_extension(ndr, NDR_SCALARS, r->info)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r) +{ + ndr_print_struct(ndr, name, "netr_trust_extension_container"); + ndr->depth++; + ndr_print_uint16(ndr, "length", r->length); + ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size); + ndr_print_ptr(ndr, "info", r->info); + ndr->depth++; + if (r->info) { + ndr_print_netr_trust_extension(ndr, "info", r->info); + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustInfo *r) { - uint32_t cntr_unknown1_0; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domainname)); @@ -6904,23 +7262,24 @@ static enum ndr_err_code ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->forest)); NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid)); - for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) { - NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_SCALARS, &r->unknown1[cntr_unknown1_0])); + NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0])); } - for (cntr_unknown_0 = 0; cntr_unknown_0 < 4; cntr_unknown_0++) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0])); + for (cntr_dummy_0 = 0; cntr_dummy_0 < 4; cntr_dummy_0++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy[cntr_dummy_0])); } } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domainname)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->fulldomainname)); NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->forest)); - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->sid) { NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); } - for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) { - NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_BUFFERS, &r->unknown1[cntr_unknown1_0])); + NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0])); } } return NDR_ERR_SUCCESS; @@ -6930,8 +7289,8 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int { uint32_t _ptr_sid; TALLOC_CTX *_mem_save_sid_0; - uint32_t cntr_unknown1_0; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domainname)); @@ -6944,26 +7303,27 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int } else { r->sid = NULL; } - for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) { - NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_SCALARS, &r->unknown1[cntr_unknown1_0])); + NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0])); } - for (cntr_unknown_0 = 0; cntr_unknown_0 < 4; cntr_unknown_0++) { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0])); + for (cntr_dummy_0 = 0; cntr_dummy_0 < 4; cntr_dummy_0++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy[cntr_dummy_0])); } } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domainname)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->fulldomainname)); NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->forest)); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); if (r->sid) { _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0); NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0); } - for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) { - NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_BUFFERS, &r->unknown1[cntr_unknown1_0])); + NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0])); } } return NDR_ERR_SUCCESS; @@ -6971,8 +7331,8 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r) { - uint32_t cntr_unknown1_0; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; ndr_print_struct(ndr, name, "netr_DomainTrustInfo"); ndr->depth++; ndr_print_lsa_String(ndr, "domainname", &r->domainname); @@ -6985,22 +7345,23 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char * ndr_print_dom_sid2(ndr, "sid", r->sid); } ndr->depth--; - ndr->print(ndr, "%s: ARRAY(%d)", "unknown1", (int)4); + ndr_print_netr_trust_extension_container(ndr, "trust_extension", &r->trust_extension); + ndr->print(ndr, "%s: ARRAY(%d)", "dummystring", (int)3); ndr->depth++; - for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) { + for (cntr_dummystring_0=0;cntr_dummystring_0<3;cntr_dummystring_0++) { char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_unknown1_0) != -1) { - ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]); + if (asprintf(&idx_0, "[%d]", cntr_dummystring_0) != -1) { + ndr_print_lsa_String(ndr, "dummystring", &r->dummystring[cntr_dummystring_0]); free(idx_0); } } ndr->depth--; - ndr->print(ndr, "%s: ARRAY(%d)", "unknown", (int)4); + ndr->print(ndr, "%s: ARRAY(%d)", "dummy", (int)4); ndr->depth++; - for (cntr_unknown_0=0;cntr_unknown_0<4;cntr_unknown_0++) { + for (cntr_dummy_0=0;cntr_dummy_0<4;cntr_dummy_0++) { char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { - ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); + if (asprintf(&idx_0, "[%d]", cntr_dummy_0) != -1) { + ndr_print_uint32(ndr, "dummy", r->dummy[cntr_dummy_0]); free(idx_0); } } @@ -7008,17 +7369,108 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char * ndr->depth--; } +static enum ndr_err_code ndr_push_netr_LsaPolicyInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_LsaPolicyInfo *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->policy) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_netr_LsaPolicyInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_LsaPolicyInfo *r) +{ + uint32_t _ptr_policy; + TALLOC_CTX *_mem_save_policy_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy)); + if (_ptr_policy) { + NDR_PULL_ALLOC(ndr, r->policy); + } else { + r->policy = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->policy) { + _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->policy)); + NDR_PULL_ALLOC_N(ndr, r->policy, ndr_get_array_size(ndr, &r->policy)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, ndr_get_array_size(ndr, &r->policy))); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0); + } + if (r->policy) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->policy, r->policy_size)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_netr_LsaPolicyInfo(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInfo *r) +{ + ndr_print_struct(ndr, name, "netr_LsaPolicyInfo"); + ndr->depth++; + ndr_print_uint32(ndr, "policy_size", r->policy_size); + ndr_print_ptr(ndr, "policy", r->policy); + ndr->depth++; + if (r->policy) { + ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size); + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_netr_WorkstationFlags(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_WorkstationFlags(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_WorkstationFlags(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), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainInfo1 *r) { uint32_t cntr_trusts_1; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->domaininfo)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_trusts)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusts)); - for (cntr_unknown_0 = 0; cntr_unknown_0 < 14; cntr_unknown_0++) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0])); + NDR_CHECK(ndr_push_netr_LsaPolicyInfo(ndr, NDR_SCALARS, &r->lsa_policy)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_hostname)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0])); + } + NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->supported_enc_types)); + for (cntr_dummy_0 = 0; cntr_dummy_0 < 2; cntr_dummy_0++) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy[cntr_dummy_0])); } } if (ndr_flags & NDR_BUFFERS) { @@ -7032,6 +7484,11 @@ static enum ndr_err_code ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->trusts[cntr_trusts_1])); } } + NDR_CHECK(ndr_push_netr_LsaPolicyInfo(ndr, NDR_BUFFERS, &r->lsa_policy)); + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_hostname)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0])); + } } return NDR_ERR_SUCCESS; } @@ -7042,7 +7499,8 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr uint32_t cntr_trusts_1; TALLOC_CTX *_mem_save_trusts_0; TALLOC_CTX *_mem_save_trusts_1; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->domaininfo)); @@ -7053,8 +7511,15 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr } else { r->trusts = NULL; } - for (cntr_unknown_0 = 0; cntr_unknown_0 < 14; cntr_unknown_0++) { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0])); + NDR_CHECK(ndr_pull_netr_LsaPolicyInfo(ndr, NDR_SCALARS, &r->lsa_policy)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_hostname)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0])); + } + NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->supported_enc_types)); + for (cntr_dummy_0 = 0; cntr_dummy_0 < 2; cntr_dummy_0++) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy[cntr_dummy_0])); } } if (ndr_flags & NDR_BUFFERS) { @@ -7075,6 +7540,11 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, 0); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, 0); } + NDR_CHECK(ndr_pull_netr_LsaPolicyInfo(ndr, NDR_BUFFERS, &r->lsa_policy)); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_hostname)); + for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) { + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0])); + } if (r->trusts) { NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusts, r->num_trusts)); } @@ -7085,7 +7555,8 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r) { uint32_t cntr_trusts_1; - uint32_t cntr_unknown_0; + uint32_t cntr_dummystring_0; + uint32_t cntr_dummy_0; ndr_print_struct(ndr, name, "netr_DomainInfo1"); ndr->depth++; ndr_print_netr_DomainTrustInfo(ndr, "domaininfo", &r->domaininfo); @@ -7105,12 +7576,26 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name ndr->depth--; } ndr->depth--; - ndr->print(ndr, "%s: ARRAY(%d)", "unknown", (int)14); + ndr_print_netr_LsaPolicyInfo(ndr, "lsa_policy", &r->lsa_policy); + ndr_print_lsa_String(ndr, "dns_hostname", &r->dns_hostname); + ndr->print(ndr, "%s: ARRAY(%d)", "dummystring", (int)3); ndr->depth++; - for (cntr_unknown_0=0;cntr_unknown_0<14;cntr_unknown_0++) { + for (cntr_dummystring_0=0;cntr_dummystring_0<3;cntr_dummystring_0++) { char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) { - ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]); + if (asprintf(&idx_0, "[%d]", cntr_dummystring_0) != -1) { + ndr_print_lsa_String(ndr, "dummystring", &r->dummystring[cntr_dummystring_0]); + free(idx_0); + } + } + ndr->depth--; + ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags); + ndr_print_uint32(ndr, "supported_enc_types", r->supported_enc_types); + ndr->print(ndr, "%s: ARRAY(%d)", "dummy", (int)2); + ndr->depth++; + for (cntr_dummy_0=0;cntr_dummy_0<2;cntr_dummy_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_dummy_0) != -1) { + ndr_print_uint32(ndr, "dummy", r->dummy[cntr_dummy_0]); free(idx_0); } } @@ -7129,7 +7614,7 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_ break; } case 2: { - NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2)); break; } default: @@ -7146,8 +7631,8 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_ break; case 2: - if (r->info1) { - NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); + if (r->info2) { + NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); } break; @@ -7163,6 +7648,7 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_ int level; uint32_t _level; TALLOC_CTX *_mem_save_info1_0; + TALLOC_CTX *_mem_save_info2_0; level = ndr_pull_get_switch_value(ndr, r); if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level)); @@ -7181,12 +7667,12 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; } case 2: { - uint32_t _ptr_info1; - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1)); - if (_ptr_info1) { - NDR_PULL_ALLOC(ndr, r->info1); + uint32_t _ptr_info2; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2)); + if (_ptr_info2) { + NDR_PULL_ALLOC(ndr, r->info2); } else { - r->info1 = NULL; + r->info2 = NULL; } break; } @@ -7206,11 +7692,11 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; case 2: - if (r->info1) { - _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0); - NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0); + if (r->info2) { + _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0); + NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0); } break; @@ -7237,10 +7723,10 @@ _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, break; case 2: - ndr_print_ptr(ndr, "info1", r->info1); + ndr_print_ptr(ndr, "info2", r->info2); ndr->depth++; - if (r->info1) { - ndr_print_netr_DomainInfo1(ndr, "info1", r->info1); + if (r->info2) { + ndr_print_netr_DomainInfo1(ndr, "info2", r->info2); } ndr->depth--; break; @@ -7444,33 +7930,6 @@ _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, 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)); - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_netr_TrustFlags(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_TrustFlags(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), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r); - ndr->depth--; -} - static enum ndr_err_code ndr_push_netr_TrustType(struct ndr_push *ndr, int ndr_flags, enum netr_TrustType r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -7555,7 +8014,6 @@ static enum ndr_err_code ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr if (r->sid) { NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); } - NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid)); } return NDR_ERR_SUCCESS; } @@ -7625,7 +8083,6 @@ static enum ndr_err_code ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0); } - NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid)); } return NDR_ERR_SUCCESS; } @@ -8235,12 +8692,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f if (r->in.return_authenticator) { NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); } - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level)); 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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + 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) { @@ -8338,14 +8795,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0); } - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level)); 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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + 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); @@ -8420,11 +8877,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level); 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_LogonInfo(ndr, "logon", r->in.logon); + ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon); ndr->depth--; ndr_print_uint16(ndr, "validation_level", r->in.validation_level); ndr->depth--; @@ -8478,9 +8935,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int if (r->in.return_authenticator) { NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); } - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonInfoClass(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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator)); @@ -8565,9 +9022,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0); } - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonInfoClass(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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator)); @@ -8621,9 +9078,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *n ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level); ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonInfo(ndr, "logon", &r->in.logon); + ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); ndr->depth--; } if (flags & NDR_OUT) { @@ -8926,7 +9383,7 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, i 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)); + NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_password)); } if (flags & NDR_OUT) { if (r->out.return_authenticator == NULL) { @@ -8993,7 +9450,7 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i } _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_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, 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); @@ -11134,11 +11591,11 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int fl } 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_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_guid)); if (r->in.site_guid) { - NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.site_guid)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.site_guid)); } NDR_CHECK(ndr_push_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, r->in.flags)); } @@ -11216,7 +11673,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl 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_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_guid)); @@ -11228,7 +11685,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl if (r->in.site_guid) { _mem_save_site_guid_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.site_guid, 0); - NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.site_guid)); + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.site_guid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0); } NDR_CHECK(ndr_pull_netr_DsRGetDCName_flags(ndr, NDR_SCALARS, &r->in.flags)); @@ -11811,7 +12268,7 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int } 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_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name)); if (r->in.site_name) { @@ -11896,7 +12353,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int 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_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name)); @@ -12476,7 +12933,7 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, i 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_samr_Password(ndr, NDR_SCALARS, r->out.password)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -12550,7 +13007,7 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, i } _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_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, 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)); } @@ -12831,7 +13288,7 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int } 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_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name)); if (r->in.site_name) { @@ -12937,7 +13394,7 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int 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_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.domain_guid)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0); } NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name)); @@ -13458,12 +13915,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int 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_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level)); 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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + 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"); @@ -13538,14 +13995,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int 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_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0); } - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level)); 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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon)); + 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) { @@ -13612,11 +14069,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char * ndr_print_string(ndr, "computer_name", r->in.computer_name); } ndr->depth--; - ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level); 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_LogonInfo(ndr, "logon", r->in.logon); + 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); @@ -13763,11 +14220,11 @@ static enum ndr_err_code ndr_push_netr_DsrDeregisterDNSHostRecords(struct ndr_pu } 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_GUID(ndr, NDR_SCALARS, 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)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.dsa_guid)); } if (r->in.dns_host == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -13839,7 +14296,7 @@ static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pu 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_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, 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)); @@ -13851,7 +14308,7 @@ static enum ndr_err_code ndr_pull_netr_DsrDeregisterDNSHostRecords(struct ndr_pu 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_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, 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)); @@ -13949,11 +14406,11 @@ static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push * 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_samr_Password(ndr, NDR_SCALARS, 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_samr_Password(ndr, NDR_SCALARS, r->out.password2)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -14030,14 +14487,14 @@ static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull * } _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_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, 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_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, 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)); } @@ -14436,9 +14893,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *n if (r->in.return_authenticator) { NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); } - NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level)); + NDR_CHECK(ndr_push_netr_LogonInfoClass(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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + 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"); @@ -14544,9 +15001,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *n NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0); } - NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level)); + NDR_CHECK(ndr_pull_netr_LogonInfoClass(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_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); + NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon)); 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); @@ -14636,9 +15093,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); } ndr->depth--; - ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level); + ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level); ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level); - ndr_print_netr_LogonInfo(ndr, "logon", &r->in.logon); + ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon); 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/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h index a9d36aeacb..2a3c0fbf84 100644 --- a/source3/librpc/gen_ndr/ndr_netlogon.h +++ b/source3/librpc/gen_ndr/ndr_netlogon.h @@ -118,9 +118,11 @@ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const 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); void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r); -enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r); -enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r); -void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r); +void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r); +void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r); +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_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); @@ -138,6 +140,7 @@ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, st void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r); void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r); void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r); +void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r); enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r); enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r); void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r); @@ -147,7 +150,6 @@ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const st enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r); enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r); void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r); -void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r); void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r); void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r); void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r); @@ -195,16 +197,22 @@ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r); enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r); void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r); +void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t 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); +void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r); +void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r); void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r); +void ndr_print_netr_LsaPolicyInfo(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInfo *r); +enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r); 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); diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index 00ba8bc293..dfa72d8004 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_notify.h" +#include "librpc/gen_ndr/ndr_security.h" _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) { if (ndr_flags & NDR_SCALARS) { diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c index 62acf474ae..35d02a0dcb 100644 --- a/source3/librpc/gen_ndr/ndr_ntsvcs.c +++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c @@ -508,9 +508,35 @@ _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char * static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r) { + uint32_t cntr_buffer_1; if (flags & NDR_IN) { + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filter)); + if (r->in.filter) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.filter, ndr_charset_length(r->in.filter, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->in.length == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } 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->out.length)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length)); + for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) { + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.buffer[cntr_buffer_1])); + } + if (r->out.length == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -518,16 +544,81 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r) { + uint32_t _ptr_filter; + uint32_t cntr_buffer_1; + TALLOC_CTX *_mem_save_filter_0; + TALLOC_CTX *_mem_save_buffer_1; + TALLOC_CTX *_mem_save_length_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filter)); + if (_ptr_filter) { + NDR_PULL_ALLOC(ndr, r->in.filter); + } else { + r->in.filter = NULL; + } + if (r->in.filter) { + _mem_save_filter_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.filter, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->in.filter)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->in.filter)); + if (ndr_get_array_length(ndr, &r->in.filter) > ndr_get_array_size(ndr, &r->in.filter)) { + 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.filter), ndr_get_array_length(ndr, &r->in.filter)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.filter, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filter_0, 0); + } + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.length); + } + _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length); + memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer)); + NDR_PULL_ALLOC(ndr, r->out.length); + *r->out.length = *r->in.length; } if (flags & NDR_OUT) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer)); + if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.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.buffer), ndr_get_array_length(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)); + } + _mem_save_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0); + for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) { + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.buffer[cntr_buffer_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_1, 0); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.length); + } + _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.length, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_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->out.length)); + } + if (r->out.buffer) { + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.length)); + } } return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r) { + uint32_t cntr_buffer_1; ndr_print_struct(ndr, name, "PNP_GetDeviceList"); ndr->depth++; if (flags & NDR_SET_VALUES) { @@ -536,11 +627,39 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "PNP_GetDeviceList"); ndr->depth++; + ndr_print_ptr(ndr, "filter", r->in.filter); + ndr->depth++; + if (r->in.filter) { + ndr_print_string(ndr, "filter", r->in.filter); + } + ndr->depth--; + ndr_print_ptr(ndr, "length", r->in.length); + ndr->depth++; + ndr_print_uint32(ndr, "length", *r->in.length); + ndr->depth--; + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceList"); ndr->depth++; + ndr_print_ptr(ndr, "buffer", r->out.buffer); + ndr->depth++; + ndr->print(ndr, "%s: ARRAY(%d)", "buffer", (int)*r->out.length); + ndr->depth++; + for (cntr_buffer_1=0;cntr_buffer_1<*r->out.length;cntr_buffer_1++) { + char *idx_1=NULL; + if (asprintf(&idx_1, "[%d]", cntr_buffer_1) != -1) { + ndr_print_uint16(ndr, "buffer", r->out.buffer[cntr_buffer_1]); + free(idx_1); + } + } + ndr->depth--; + ndr->depth--; + ndr_print_ptr(ndr, "length", r->out.length); + ndr->depth++; + ndr_print_uint32(ndr, "length", *r->out.length); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -696,10 +815,10 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int 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.property)); - if (r->in.unknown1 == NULL) { + if (r->in.reg_data_type == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.reg_data_type)); if (r->in.buffer_size == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -708,13 +827,13 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(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->in.needed)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { - if (r->out.unknown1 == NULL) { + if (r->out.reg_data_type == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.reg_data_type)); if (r->out.buffer == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -737,7 +856,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r) { - TALLOC_CTX *_mem_save_unknown1_0; + TALLOC_CTX *_mem_save_reg_data_type_0; TALLOC_CTX *_mem_save_buffer_size_0; TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { @@ -752,12 +871,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int 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.property)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->in.unknown1); + NDR_PULL_ALLOC(ndr, r->in.reg_data_type); } - _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown1, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown1)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_data_type, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.reg_data_type)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.buffer_size); } @@ -772,9 +891,9 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, r->in.needed, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.needed)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3)); - NDR_PULL_ALLOC(ndr, r->out.unknown1); - *r->out.unknown1 = *r->in.unknown1; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_PULL_ALLOC(ndr, r->out.reg_data_type); + *r->out.reg_data_type = *r->in.reg_data_type; 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.buffer_size); @@ -784,12 +903,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.unknown1); + NDR_PULL_ALLOC(ndr, r->out.reg_data_type); } - _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown1, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown1)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.reg_data_type, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.reg_data_type)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer)); NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer)); if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) { @@ -839,9 +958,9 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char * ndr_print_string(ndr, "devicepath", r->in.devicepath); ndr->depth--; ndr_print_uint32(ndr, "property", r->in.property); - ndr_print_ptr(ndr, "unknown1", r->in.unknown1); + ndr_print_ptr(ndr, "reg_data_type", r->in.reg_data_type); ndr->depth++; - ndr_print_uint32(ndr, "unknown1", *r->in.unknown1); + ndr_print_uint32(ndr, "reg_data_type", *r->in.reg_data_type); ndr->depth--; ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size); ndr->depth++; @@ -851,15 +970,15 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char * ndr->depth++; ndr_print_uint32(ndr, "needed", *r->in.needed); ndr->depth--; - ndr_print_uint32(ndr, "unknown3", r->in.unknown3); + ndr_print_uint32(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp"); ndr->depth++; - ndr_print_ptr(ndr, "unknown1", r->out.unknown1); + ndr_print_ptr(ndr, "reg_data_type", r->out.reg_data_type); ndr->depth++; - ndr_print_uint32(ndr, "unknown1", *r->out.unknown1); + ndr_print_uint32(ndr, "reg_data_type", *r->out.reg_data_type); ndr->depth--; ndr_print_ptr(ndr, "buffer", r->out.buffer); ndr->depth++; diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c index 9c5a886325..10055aef37 100644 --- a/source3/librpc/gen_ndr/ndr_samr.c +++ b/source3/librpc/gen_ndr/ndr_samr.c @@ -406,12 +406,12 @@ _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, c ndr->depth--; } -static enum ndr_err_code ndr_push_samr_DomInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo2 *r) +static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *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->oem_information)); 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)); @@ -423,19 +423,19 @@ static enum ndr_err_code ndr_push_samr_DomInfo2(struct ndr_push *ndr, int ndr_fl 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->oem_information)); 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) +static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *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->oem_information)); 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)); @@ -447,19 +447,19 @@ static enum ndr_err_code ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_fl 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->oem_information)); 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) +_PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r) { - ndr_print_struct(ndr, name, "samr_DomInfo2"); + ndr_print_struct(ndr, name, "samr_DomGeneralInformation"); 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, "oem_information", &r->oem_information); 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); @@ -502,35 +502,35 @@ _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, c ndr->depth--; } -static enum ndr_err_code ndr_push_samr_DomInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo4 *r) +static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *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->oem_information)); } 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->oem_information)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r) +static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *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->oem_information)); } 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->oem_information)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r) +_PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r) { - ndr_print_struct(ndr, name, "samr_DomInfo4"); + ndr_print_struct(ndr, name, "samr_DomOEMInformation"); ndr->depth++; - ndr_print_lsa_String(ndr, "comment", &r->comment); + ndr_print_lsa_String(ndr, "oem_information", &r->oem_information); ndr->depth--; } @@ -691,41 +691,41 @@ _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, c ndr->depth--; } -static enum ndr_err_code ndr_push_samr_DomInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo11 *r) +static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *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_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general)); 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)); + NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r) +static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *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_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general)); 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)); + NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); } return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r) +_PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r) { - ndr_print_struct(ndr, name, "samr_DomInfo11"); + ndr_print_struct(ndr, name, "samr_DomGeneralInformation2"); ndr->depth++; - ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); + ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general); 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); @@ -818,7 +818,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ break; } case 2: { - NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general)); break; } case 3: { @@ -826,7 +826,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ break; } case 4: { - NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem)); break; } case 5: { @@ -850,7 +850,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ break; } case 11: { - NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); + NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2)); break; } case 12: { @@ -872,14 +872,14 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ break; case 2: - NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); break; case 3: break; case 4: - NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); + NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem)); break; case 5: @@ -900,7 +900,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_ break; case 11: - NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); + NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2)); break; case 12: @@ -932,7 +932,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; } case 2: { - NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); + NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general)); break; } case 3: { @@ -940,7 +940,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; } case 4: { - NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); + NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem)); break; } case 5: { @@ -964,7 +964,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; } case 11: { - NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); + NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2)); break; } case 12: { @@ -985,14 +985,14 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; case 2: - NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); + NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general)); break; case 3: break; case 4: - NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); + NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem)); break; case 5: @@ -1013,7 +1013,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_ break; case 11: - NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); + NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2)); break; case 12: @@ -1040,7 +1040,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, break; case 2: - ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); + ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general); break; case 3: @@ -1048,7 +1048,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, break; case 4: - ndr_print_samr_DomInfo4(ndr, "info4", &r->info4); + ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem); break; case 5: @@ -1072,7 +1072,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, break; case 11: - ndr_print_samr_DomInfo11(ndr, "info11", &r->info11); + ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2); break; case 12: diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h index c21b5455fb..1f582061f9 100644 --- a/source3/librpc/gen_ndr/ndr_samr.h +++ b/source3/librpc/gen_ndr/ndr_samr.h @@ -163,15 +163,15 @@ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr 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_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *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_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *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_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *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); diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c index d54fdb2395..de899241ab 100644 --- a/source3/librpc/gen_ndr/ndr_security.c +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -1024,3 +1024,29 @@ _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_kerb_EncTypes(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_kerb_EncTypes(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_kerb_EncTypes(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), "KERB_ENCTYPE_DES_CBC_CRC", KERB_ENCTYPE_DES_CBC_CRC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_MD5", KERB_ENCTYPE_DES_CBC_MD5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_RC4_HMAC_MD5", KERB_ENCTYPE_RC4_HMAC_MD5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96, r); + ndr->depth--; +} + diff --git a/source3/librpc/gen_ndr/ndr_security.h b/source3/librpc/gen_ndr/ndr_security.h index 79bfd78f51..7a2ff74309 100644 --- a/source3/librpc/gen_ndr/ndr_security.h +++ b/source3/librpc/gen_ndr/ndr_security.h @@ -38,4 +38,7 @@ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const str 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); +enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r); #endif /* _HEADER_NDR_security */ diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c index d97ee0171c..36c3dbe256 100644 --- a/source3/librpc/gen_ndr/ndr_srvsvc.c +++ b/source3/librpc/gen_ndr/ndr_srvsvc.c @@ -18013,7 +18013,7 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, if (flags & NDR_OUT) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd)); if (r->out.hnd) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd)); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -18066,7 +18066,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, if (r->out.hnd) { _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0); } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -18114,13 +18114,13 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd)); if (r->in.hnd) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hnd)); } } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd)); if (r->out.hnd) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd)); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -18143,7 +18143,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, if (r->in.hnd) { _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hnd)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0); } } @@ -18157,7 +18157,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, if (r->out.hnd) { _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0); } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c index eb3929696e..e897ef334b 100644 --- a/source3/librpc/gen_ndr/ndr_svcctl.c +++ b/source3/librpc/gen_ndr/ndr_svcctl.c @@ -3,6 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_svcctl.h" +#include "librpc/gen_ndr/ndr_misc.h" static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r) { if (ndr_flags & NDR_SCALARS) { @@ -352,19 +353,228 @@ _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const ch ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_type)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->error_control)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->executablepath) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->loadordergroup) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->dependencies) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->startname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + if (r->displayname) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r) +{ + uint32_t _ptr_executablepath; + TALLOC_CTX *_mem_save_executablepath_0; + uint32_t _ptr_loadordergroup; + TALLOC_CTX *_mem_save_loadordergroup_0; + uint32_t _ptr_dependencies; + TALLOC_CTX *_mem_save_dependencies_0; + uint32_t _ptr_startname; + TALLOC_CTX *_mem_save_startname_0; + uint32_t _ptr_displayname; + TALLOC_CTX *_mem_save_displayname_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_type)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->error_control)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath)); + if (_ptr_executablepath) { + NDR_PULL_ALLOC(ndr, r->executablepath); + } else { + r->executablepath = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup)); + if (_ptr_loadordergroup) { + NDR_PULL_ALLOC(ndr, r->loadordergroup); + } else { + r->loadordergroup = NULL; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies)); + if (_ptr_dependencies) { + NDR_PULL_ALLOC(ndr, r->dependencies); + } else { + r->dependencies = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname)); + if (_ptr_startname) { + NDR_PULL_ALLOC(ndr, r->startname); + } else { + r->startname = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname)); + if (_ptr_displayname) { + NDR_PULL_ALLOC(ndr, r->displayname); + } else { + r->displayname = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->executablepath) { + _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath)); + if (ndr_get_array_length(ndr, &r->executablepath) > ndr_get_array_size(ndr, &r->executablepath)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->executablepath), ndr_get_array_length(ndr, &r->executablepath)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0); + } + if (r->loadordergroup) { + _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup)); + if (ndr_get_array_length(ndr, &r->loadordergroup) > ndr_get_array_size(ndr, &r->loadordergroup)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->loadordergroup), ndr_get_array_length(ndr, &r->loadordergroup)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0); + } + if (r->dependencies) { + _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies)); + if (ndr_get_array_length(ndr, &r->dependencies) > ndr_get_array_size(ndr, &r->dependencies)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dependencies), ndr_get_array_length(ndr, &r->dependencies)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0); + } + if (r->startname) { + _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->startname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->startname)); + if (ndr_get_array_length(ndr, &r->startname) > ndr_get_array_size(ndr, &r->startname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->startname), ndr_get_array_length(ndr, &r->startname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0); + } + if (r->displayname) { + _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname)); + if (ndr_get_array_length(ndr, &r->displayname) > ndr_get_array_size(ndr, &r->displayname)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->displayname), ndr_get_array_length(ndr, &r->displayname)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r) +{ + ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG"); + ndr->depth++; + ndr_print_uint32(ndr, "service_type", r->service_type); + ndr_print_uint32(ndr, "start_type", r->start_type); + ndr_print_uint32(ndr, "error_control", r->error_control); + ndr_print_ptr(ndr, "executablepath", r->executablepath); + ndr->depth++; + if (r->executablepath) { + ndr_print_string(ndr, "executablepath", r->executablepath); + } + ndr->depth--; + ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup); + ndr->depth++; + if (r->loadordergroup) { + ndr_print_string(ndr, "loadordergroup", r->loadordergroup); + } + ndr->depth--; + ndr_print_uint32(ndr, "tag_id", r->tag_id); + ndr_print_ptr(ndr, "dependencies", r->dependencies); + ndr->depth++; + if (r->dependencies) { + ndr_print_string(ndr, "dependencies", r->dependencies); + } + ndr->depth--; + ndr_print_ptr(ndr, "startname", r->startname); + ndr->depth++; + if (r->startname) { + ndr_print_string(ndr, "startname", r->startname); + } + ndr->depth--; + ndr_print_ptr(ndr, "displayname", r->displayname); + ndr->depth++; + if (r->displayname) { + ndr_print_string(ndr, "displayname", r->displayname); + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags) +{ + return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG); +} + static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *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_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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -381,7 +591,7 @@ static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr } _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_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; @@ -392,7 +602,7 @@ static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -434,7 +644,7 @@ static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.control)); } if (flags & NDR_OUT) { @@ -459,7 +669,7 @@ static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, in } _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_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_uint32(ndr, NDR_SCALARS, &r->in.control)); NDR_PULL_ALLOC(ndr, r->out.service_status); @@ -514,7 +724,7 @@ static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -531,7 +741,7 @@ static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int } _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_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); } if (flags & NDR_OUT) { @@ -571,13 +781,13 @@ static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.lock == 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.lock)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -595,7 +805,7 @@ static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *nd } _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_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.lock); ZERO_STRUCTP(r->out.lock); @@ -606,7 +816,7 @@ static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *nd } _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -648,7 +858,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_p 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_policy_handle(ndr, NDR_SCALARS, 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)); } @@ -679,7 +889,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p } _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_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_uint32(ndr, NDR_SCALARS, &r->in.security_flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size)); @@ -756,7 +966,7 @@ static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_pus 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_policy_handle(ndr, NDR_SCALARS, 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"); @@ -780,7 +990,7 @@ static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pul } _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_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_uint32(ndr, NDR_SCALARS, &r->in.security_flags)); NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer)); @@ -836,7 +1046,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.service_status == NULL) { @@ -860,7 +1070,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr } _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_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.service_status); ZERO_STRUCTP(r->out.service_status); @@ -954,13 +1164,13 @@ static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push * if (r->in.lock == 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.lock)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock)); } if (flags & NDR_OUT) { if (r->out.lock == 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.lock)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -977,7 +1187,7 @@ static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull * } _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.lock)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.lock); *r->out.lock = *r->in.lock; @@ -988,7 +1198,7 @@ static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull * } _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -1071,7 +1281,7 @@ static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate)); @@ -1091,7 +1301,7 @@ static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, } _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_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_uint32(ndr, NDR_SCALARS, &r->in.bits)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson)); @@ -1137,7 +1347,7 @@ static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error)); @@ -1218,7 +1428,7 @@ static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *n } _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_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_uint32(ndr, NDR_SCALARS, &r->in.type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start)); @@ -1421,7 +1631,7 @@ static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, in if (r->in.scmanager_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.scmanager_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); @@ -1480,7 +1690,7 @@ static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, in 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -1510,7 +1720,7 @@ static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, in } _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName)); NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName)); @@ -1653,7 +1863,7 @@ static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, in } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -1745,7 +1955,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push if (r->in.service == 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.service)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } @@ -1781,7 +1991,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull } _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); @@ -1874,7 +2084,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); @@ -1918,7 +2128,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd } _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_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_uint32(ndr, NDR_SCALARS, &r->in.type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); @@ -2050,7 +2260,7 @@ static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, in 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -2112,7 +2322,7 @@ static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, in } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -2163,7 +2373,7 @@ static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int if (r->in.scmanager_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.scmanager_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); @@ -2174,7 +2384,7 @@ static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -2192,7 +2402,7 @@ static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int } _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName)); NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName)); @@ -2211,7 +2421,7 @@ static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -2255,11 +2465,14 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } if (flags & NDR_OUT) { - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size)); + if (r->out.query == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query)); if (r->out.bytes_needed == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2272,6 +2485,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *nd static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r) { TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_query_0; TALLOC_CTX *_mem_save_bytes_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -2281,21 +2495,34 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd } _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_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_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); + if (r->in.buf_size < 0 || r->in.buf_size > 8192) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_PULL_ALLOC(ndr, r->out.query); + ZERO_STRUCTP(r->out.query); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); } if (flags & NDR_OUT) { - NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.buf_size); - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.query); + } + _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.bytes_needed); } _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed)); + if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -2322,7 +2549,10 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW"); ndr->depth++; - ndr_print_array_uint8(ndr, "query", r->out.query, r->in.buf_size); + ndr_print_ptr(ndr, "query", r->out.query); + ndr->depth++; + ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query); + ndr->depth--; ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed); ndr->depth++; ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed); @@ -2339,7 +2569,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } if (flags & NDR_OUT) { @@ -2369,7 +2599,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull } _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_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_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); NDR_PULL_ALLOC(ndr, r->out.lock_status); @@ -2437,7 +2667,7 @@ static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments)); if (r->in.Arguments) { @@ -2464,7 +2694,7 @@ static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int } _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_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_uint32(ndr, NDR_SCALARS, &r->in.NumArgs)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments)); @@ -2530,7 +2760,7 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name)); if (r->in.service_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16))); @@ -2581,7 +2811,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull } _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_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_generic_ptr(ndr, &_ptr_service_name)); if (_ptr_service_name) { @@ -2716,7 +2946,7 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name)); if (r->in.service_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16))); @@ -2767,7 +2997,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr } _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_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_generic_ptr(ndr, &_ptr_service_name)); if (_ptr_service_name) { @@ -2902,7 +3132,7 @@ static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate)); @@ -2922,7 +3152,7 @@ static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, } _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_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_uint32(ndr, NDR_SCALARS, &r->in.bits)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson)); @@ -2968,7 +3198,7 @@ static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.start)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.error)); @@ -3049,7 +3279,7 @@ static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *n } _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_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_uint32(ndr, NDR_SCALARS, &r->in.type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.start)); @@ -3252,7 +3482,7 @@ static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName)); if (r->in.ServiceName) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); @@ -3344,7 +3574,7 @@ static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, in } _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_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_generic_ptr(ndr, &_ptr_ServiceName)); if (_ptr_ServiceName) { @@ -3578,7 +3808,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push if (r->in.service == 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.service)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } @@ -3615,7 +3845,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull } _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.service)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); @@ -3703,7 +3933,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); @@ -3747,7 +3977,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd } _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_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_uint32(ndr, NDR_SCALARS, &r->in.type)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state)); @@ -3879,7 +4109,7 @@ static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, in 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -3941,7 +4171,7 @@ static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, in } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -3992,7 +4222,7 @@ static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int if (r->in.scmanager_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.scmanager_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName)); if (r->in.ServiceName) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16))); @@ -4019,7 +4249,7 @@ static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int } _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName)); if (_ptr_ServiceName) { @@ -4085,7 +4315,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *nd 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } if (flags & NDR_OUT) { @@ -4111,7 +4341,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *nd } _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_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_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); @@ -4169,7 +4399,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } if (flags & NDR_OUT) { @@ -4199,7 +4429,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull } _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_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_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); NDR_PULL_ALLOC(ndr, r->out.lock_status); @@ -4267,7 +4497,7 @@ static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments)); if (r->in.Arguments) { @@ -4294,7 +4524,7 @@ static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int } _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_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_uint32(ndr, NDR_SCALARS, &r->in.NumArgs)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments)); @@ -4360,7 +4590,7 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name)); if (r->in.service_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16))); @@ -4411,7 +4641,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull } _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_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_generic_ptr(ndr, &_ptr_service_name)); if (_ptr_service_name) { @@ -4546,7 +4776,7 @@ static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name)); if (r->in.service_name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16))); @@ -4597,7 +4827,7 @@ static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr } _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_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_generic_ptr(ndr, &_ptr_service_name)); if (_ptr_service_name) { @@ -4814,7 +5044,7 @@ static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push * 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); if (r->in.info) { @@ -4838,7 +5068,7 @@ static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull * } _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_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_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -4898,7 +5128,7 @@ static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push * 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info)); if (r->in.info) { @@ -4922,7 +5152,7 @@ static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull * } _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_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_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -4982,7 +5212,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } @@ -5009,7 +5239,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *n } _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_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_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); @@ -5069,7 +5299,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } @@ -5096,7 +5326,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n } _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_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_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); @@ -5156,7 +5386,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *n 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size)); } @@ -5183,7 +5413,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n } _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_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_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size)); @@ -5243,7 +5473,7 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, in if (r->in.scmanager == 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.scmanager)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); @@ -5300,7 +5530,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in } _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); @@ -5448,7 +5678,7 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in if (r->in.scmanager == 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.scmanager)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state)); @@ -5505,7 +5735,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in } _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.scmanager)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type)); diff --git a/source3/librpc/gen_ndr/ndr_svcctl.h b/source3/librpc/gen_ndr/ndr_svcctl.h index 4475b08792..0bebd3401a 100644 --- a/source3/librpc/gen_ndr/ndr_svcctl.h +++ b/source3/librpc/gen_ndr/ndr_svcctl.h @@ -108,6 +108,10 @@ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r); +enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r); +void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r); +size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags); void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r); void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r); void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r); diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c index 053e155616..791d11103d 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.c +++ b/source3/librpc/gen_ndr/ndr_winreg.c @@ -4,7 +4,6 @@ #include "librpc/gen_ndr/ndr_winreg.h" #include "librpc/gen_ndr/ndr_lsa.h" -#include "librpc/gen_ndr/ndr_initshutdown.h" #include "librpc/gen_ndr/ndr_security.h" static enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r) { @@ -35,13 +34,13 @@ _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *nam ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r) { uint32_t v; NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); @@ -276,7 +275,7 @@ static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); } @@ -284,8 +283,8 @@ static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr if (r->name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2)); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2)); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16)); } } return NDR_ERR_SUCCESS; @@ -332,7 +331,7 @@ _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name { ndr_print_struct(ndr, name, "winreg_StringBuf"); ndr->depth++; - ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length); + ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length); ndr_print_uint16(ndr, "size", r->size); ndr_print_ptr(ndr, "name", r->name); ndr->depth++; @@ -343,74 +342,28 @@ _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r) { - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->name) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2)); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16)); - } - } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) { - uint32_t _ptr_name; - TALLOC_CTX *_mem_save_name_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_name)); - if (_ptr_name) { - NDR_PULL_ALLOC(ndr, r->name); - } else { - r->name = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->name) { - _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->name, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->name)); - NDR_CHECK(ndr_pull_array_length(ndr, &r->name)); - if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->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->name), ndr_get_array_length(ndr, &r->name)); - } - NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0); - } - if (r->name) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2)); - } - if (r->name) { - NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2)); - } - } + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r) +_PUBLIC_ void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r) { - ndr_print_struct(ndr, name, "winreg_ValNameBuf"); - ndr->depth++; - ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length); - ndr_print_uint16(ndr, "size", r->size); - ndr_print_ptr(ndr, "name", r->name); + ndr_print_uint32(ndr, name, r); ndr->depth++; - if (r->name) { - ndr_print_string(ndr, "name", r->name); - } - ndr->depth--; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_NAME", REG_NOTIFY_CHANGE_NAME, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_ATTRIBUTES", REG_NOTIFY_CHANGE_ATTRIBUTES, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_LAST_SET", REG_NOTIFY_CHANGE_LAST_SET, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_SECURITY", REG_NOTIFY_CHANGE_SECURITY, r); ndr->depth--; } @@ -525,7 +478,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -561,7 +514,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -613,7 +566,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -649,7 +602,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -688,7 +641,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r) { if (flags & NDR_IN) { NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name)); @@ -701,13 +654,13 @@ static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r) { uint32_t _ptr_system_name; TALLOC_CTX *_mem_save_system_name_0; @@ -737,7 +690,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -789,7 +742,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -825,7 +778,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -877,7 +830,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKU(struct ndr_push *ndr, int flags 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -913,7 +866,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, int flags } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -952,25 +905,25 @@ _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *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_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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r) { TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { @@ -981,7 +934,7 @@ static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flag } _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_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; @@ -992,7 +945,7 @@ static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -1028,13 +981,13 @@ _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options)); @@ -1052,7 +1005,7 @@ static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int fla if (r->out.new_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.new_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.new_handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.action_taken)); if (r->out.action_taken) { NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->out.action_taken)); @@ -1062,7 +1015,7 @@ static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r) { uint32_t _ptr_secdesc; uint32_t _ptr_action_taken; @@ -1078,7 +1031,7 @@ static enum ndr_err_code ndr_pull_winreg_CreateKey(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass)); @@ -1117,7 +1070,7 @@ static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int fla } _mem_save_new_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.new_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.new_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken)); if (_ptr_action_taken) { @@ -1187,13 +1140,13 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key)); } if (flags & NDR_OUT) { @@ -1202,7 +1155,7 @@ static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r) { TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { @@ -1211,7 +1164,7 @@ static enum ndr_err_code ndr_pull_winreg_DeleteKey(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key)); } @@ -1253,7 +1206,7 @@ static enum ndr_err_code ndr_push_winreg_DeleteValue(struct ndr_push *ndr, int f 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value)); } if (flags & NDR_OUT) { @@ -1271,7 +1224,7 @@ static enum ndr_err_code ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, int f } _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_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_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value)); } @@ -1307,13 +1260,13 @@ _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *na ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index)); if (r->in.name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -1346,7 +1299,7 @@ static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r) { uint32_t _ptr_keyclass; uint32_t _ptr_last_changed_time; @@ -1362,7 +1315,7 @@ static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags } _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_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_uint32(ndr, NDR_SCALARS, &r->in.enum_index)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -1494,18 +1447,18 @@ _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index)); if (r->in.name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type)); if (r->in.type) { NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type)); @@ -1530,7 +1483,7 @@ static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int fla if (r->out.name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); + NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type)); if (r->out.type) { NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type)); @@ -1555,7 +1508,7 @@ static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int fla return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r) { uint32_t _ptr_type; uint32_t _ptr_value; @@ -1575,7 +1528,7 @@ static enum ndr_err_code ndr_pull_winreg_EnumValue(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_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); + 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_uint32(ndr, NDR_SCALARS, &r->in.enum_index)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -1583,7 +1536,7 @@ static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int fla } _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_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_CHECK(ndr_pull_winreg_StringBuf(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_generic_ptr(ndr, &_ptr_type)); if (_ptr_type) { @@ -1656,7 +1609,7 @@ static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int fla } _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); + NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type)); if (_ptr_type) { @@ -1742,7 +1695,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name ndr_print_uint32(ndr, "enum_index", r->in.enum_index); ndr_print_ptr(ndr, "name", r->in.name); ndr->depth++; - ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name); + ndr_print_winreg_StringBuf(ndr, "name", r->in.name); ndr->depth--; ndr_print_ptr(ndr, "type", r->in.type); ndr->depth++; @@ -1776,7 +1729,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "name", r->out.name); ndr->depth++; - ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name); + ndr_print_winreg_StringBuf(ndr, "name", r->out.name); ndr->depth--; ndr_print_ptr(ndr, "type", r->out.type); ndr->depth++; @@ -1809,13 +1762,13 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -1823,7 +1776,7 @@ static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flag return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r) { TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { @@ -1832,7 +1785,7 @@ static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flag } _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_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); } if (flags & NDR_OUT) { @@ -1866,13 +1819,13 @@ _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info)); if (r->in.sd == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); @@ -1889,7 +1842,7 @@ static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, in return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_sd_0; @@ -1901,7 +1854,7 @@ static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, in } _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_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) { @@ -1967,7 +1920,7 @@ static enum ndr_err_code ndr_push_winreg_LoadKey(struct ndr_push *ndr, int flags 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyname)); if (r->in.keyname) { NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyname)); @@ -1996,7 +1949,7 @@ static enum ndr_err_code ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, int flags } _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_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_generic_ptr(ndr, &_ptr_keyname)); if (_ptr_keyname) { @@ -2066,15 +2019,15 @@ _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.notify_filter)); + NDR_CHECK(ndr_push_winreg_NotifyChangeType(ndr, NDR_SCALARS, r->in.notify_filter)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2)); @@ -2086,7 +2039,7 @@ static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *n return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r) { TALLOC_CTX *_mem_save_handle_0; if (flags & NDR_IN) { @@ -2095,10 +2048,10 @@ static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *n } _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_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_uint8(ndr, NDR_SCALARS, &r->in.watch_subtree)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.notify_filter)); + NDR_CHECK(ndr_pull_winreg_NotifyChangeType(ndr, NDR_SCALARS, &r->in.notify_filter)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1)); NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2)); @@ -2125,7 +2078,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; ndr_print_uint8(ndr, "watch_subtree", r->in.watch_subtree); - ndr_print_uint32(ndr, "notify_filter", r->in.notify_filter); + ndr_print_winreg_NotifyChangeType(ndr, "notify_filter", r->in.notify_filter); ndr_print_uint32(ndr, "unknown", r->in.unknown); ndr_print_winreg_String(ndr, "string1", &r->in.string1); ndr_print_winreg_String(ndr, "string2", &r->in.string2); @@ -2141,13 +2094,13 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r) { if (flags & NDR_IN) { if (r->in.parent_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.parent_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.parent_handle)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown)); NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask)); @@ -2156,13 +2109,13 @@ static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r) { TALLOC_CTX *_mem_save_parent_handle_0; TALLOC_CTX *_mem_save_handle_0; @@ -2174,7 +2127,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags } _mem_save_parent_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.parent_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.parent_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.parent_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown)); @@ -2188,7 +2141,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -2227,13 +2180,13 @@ _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.classname == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2281,7 +2234,7 @@ static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_classname_0; @@ -2301,7 +2254,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.classname); @@ -2463,13 +2416,13 @@ _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *n ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.value_name == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2482,16 +2435,16 @@ static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int fl if (r->in.data) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.value_length)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.data_length)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size)); if (r->in.data_size) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size)); } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value_length)); - if (r->in.value_length) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_length)); + if (r->in.data_length) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_length)); } } if (flags & NDR_OUT) { @@ -2503,34 +2456,34 @@ static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int fl if (r->out.data) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.value_length)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_length)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.data_length)); } NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size)); if (r->out.data_size) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size)); } - NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value_length)); - if (r->out.value_length) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_length)); + if (r->out.data_length) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_length)); } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r) { uint32_t _ptr_type; uint32_t _ptr_data; uint32_t _ptr_data_size; - uint32_t _ptr_value_length; + uint32_t _ptr_data_length; TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_value_name_0; TALLOC_CTX *_mem_save_type_0; TALLOC_CTX *_mem_save_data_0; TALLOC_CTX *_mem_save_data_size_0; - TALLOC_CTX *_mem_save_value_length_0; + TALLOC_CTX *_mem_save_data_length_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -2539,7 +2492,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.value_name); @@ -2590,25 +2543,25 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_size)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0); } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length)); - if (_ptr_value_length) { - NDR_PULL_ALLOC(ndr, r->in.value_length); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length)); + if (_ptr_data_length) { + NDR_PULL_ALLOC(ndr, r->in.data_length); } else { - r->in.value_length = NULL; + r->in.data_length = NULL; } - if (r->in.value_length) { - _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.value_length, 0); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.value_length)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0); + if (r->in.data_length) { + _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.data_length, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_length)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0); } if (r->in.data) { if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()"); NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size)); } if (r->in.data) { - if (r->in.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()"); - NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.value_length)); + if (r->in.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()"); + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.data_length)); } } if (flags & NDR_OUT) { @@ -2654,17 +2607,17 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_size)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0); } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length)); - if (_ptr_value_length) { - NDR_PULL_ALLOC(ndr, r->out.value_length); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length)); + if (_ptr_data_length) { + NDR_PULL_ALLOC(ndr, r->out.data_length); } else { - r->out.value_length = NULL; + r->out.data_length = NULL; } - if (r->out.value_length) { - _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.value_length, 0); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_length)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0); + if (r->out.data_length) { + _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.data_length, 0); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_length)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0); } NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); if (r->out.data) { @@ -2672,8 +2625,8 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size)); } if (r->out.data) { - if (r->out.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()"); - NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.value_length)); + if (r->out.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()"); + NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.data_length)); } } return NDR_ERR_SUCCESS; @@ -2706,8 +2659,8 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam ndr_print_ptr(ndr, "data", r->in.data); ndr->depth++; if (r->in.data) { - if (r->in.value_length == NULL) return; - ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length); + if (r->in.data_length == NULL) return; + ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.data_length); } ndr->depth--; ndr_print_ptr(ndr, "data_size", r->in.data_size); @@ -2716,10 +2669,10 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam ndr_print_uint32(ndr, "data_size", *r->in.data_size); } ndr->depth--; - ndr_print_ptr(ndr, "value_length", r->in.value_length); + ndr_print_ptr(ndr, "data_length", r->in.data_length); ndr->depth++; - if (r->in.value_length) { - ndr_print_uint32(ndr, "value_length", *r->in.value_length); + if (r->in.data_length) { + ndr_print_uint32(ndr, "data_length", *r->in.data_length); } ndr->depth--; ndr->depth--; @@ -2736,8 +2689,8 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam ndr_print_ptr(ndr, "data", r->out.data); ndr->depth++; if (r->out.data) { - if (r->out.value_length == NULL) return; - ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length); + if (r->out.data_length == NULL) return; + ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.data_length); } ndr->depth--; ndr_print_ptr(ndr, "data_size", r->out.data_size); @@ -2746,10 +2699,10 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam ndr_print_uint32(ndr, "data_size", *r->out.data_size); } ndr->depth--; - ndr_print_ptr(ndr, "value_length", r->out.value_length); + ndr_print_ptr(ndr, "data_length", r->out.data_length); ndr->depth++; - if (r->out.value_length) { - ndr_print_uint32(ndr, "value_length", *r->out.value_length); + if (r->out.data_length) { + ndr_print_uint32(ndr, "data_length", *r->out.data_length); } ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); @@ -2805,7 +2758,7 @@ static enum ndr_err_code ndr_push_winreg_RestoreKey(struct ndr_push *ndr, int fl 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.filename == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2828,7 +2781,7 @@ static enum ndr_err_code ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, int fl } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.filename); @@ -2881,7 +2834,7 @@ static enum ndr_err_code ndr_push_winreg_SaveKey(struct ndr_push *ndr, int flags 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); if (r->in.filename == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -2909,7 +2862,7 @@ static enum ndr_err_code ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, int flags } _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_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); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->in.filename); @@ -2978,8 +2931,8 @@ static enum ndr_err_code ndr_push_winreg_SetKeySecurity(struct ndr_push *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_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask)); + 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.sd == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -3001,9 +2954,9 @@ static enum ndr_err_code ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, in } _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_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_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask)); + 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.sd); } @@ -3032,7 +2985,7 @@ _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char ndr->depth++; ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; - ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask); + ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info); ndr_print_ptr(ndr, "sd", r->in.sd); ndr->depth++; ndr_print_KeySecurityData(ndr, "sd", r->in.sd); @@ -3054,7 +3007,7 @@ static enum ndr_err_code ndr_push_winreg_SetValue(struct ndr_push *ndr, int flag 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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type)); if (r->in.data == NULL) { @@ -3079,7 +3032,7 @@ static enum ndr_err_code ndr_pull_winreg_SetValue(struct ndr_pull *ndr, int flag } _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_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_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type)); @@ -3181,7 +3134,7 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message)); if (r->in.message) { - NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps)); @@ -3221,7 +3174,7 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull if (r->in.message) { _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0); - NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout)); @@ -3253,7 +3206,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, con ndr_print_ptr(ndr, "message", r->in.message); ndr->depth++; if (r->in.message) { - ndr_print_initshutdown_String(ndr, "message", r->in.message); + ndr_print_lsa_StringLarge(ndr, "message", r->in.message); } ndr->depth--; ndr_print_uint32(ndr, "timeout", r->in.timeout); @@ -3335,13 +3288,13 @@ _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *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_policy_handle(ndr, NDR_SCALARS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.version == NULL) { @@ -3353,7 +3306,7 @@ static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int fl return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_version_0; @@ -3365,7 +3318,7 @@ static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int fl } _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_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.version); ZERO_STRUCTP(r->out.version); @@ -3425,7 +3378,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -3461,7 +3414,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -3513,7 +3466,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -3549,7 +3502,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -3588,14 +3541,14 @@ _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, ndr->depth--; } -static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r) +_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r) { uint32_t cntr_values_1; if (flags & NDR_IN) { if (r->in.key_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.key_handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.key_handle)); if (r->in.values == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -3650,7 +3603,7 @@ static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *nd return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r) +_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r) { uint32_t cntr_values_1; uint32_t _ptr_buffer; @@ -3666,7 +3619,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *nd } _mem_save_key_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.key_handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key_handle)); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.key_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_array_size(ndr, &r->in.values)); NDR_CHECK(ndr_pull_array_length(ndr, &r->in.values)); @@ -3872,7 +3825,7 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_pus } NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message)); if (r->in.message) { - NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout)); NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps)); @@ -3913,7 +3866,7 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pul if (r->in.message) { _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0); - NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); + NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout)); @@ -3946,7 +3899,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, c ndr_print_ptr(ndr, "message", r->in.message); ndr->depth++; if (r->in.message) { - ndr_print_initshutdown_String(ndr, "message", r->in.message); + ndr_print_lsa_StringLarge(ndr, "message", r->in.message); } ndr->depth--; ndr_print_uint32(ndr, "timeout", r->in.timeout); @@ -4018,7 +3971,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4054,7 +4007,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -4106,7 +4059,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, int flag 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|NDR_BUFFERS, r->out.handle)); + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -4142,7 +4095,7 @@ static enum ndr_err_code ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, int flag } _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|NDR_BUFFERS, r->out.handle)); + 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_WERROR(ndr, NDR_SCALARS, &r->out.result)); } diff --git a/source3/librpc/gen_ndr/ndr_winreg.h b/source3/librpc/gen_ndr/ndr_winreg.h index c093b0d1e0..8dea3ae273 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.h +++ b/source3/librpc/gen_ndr/ndr_winreg.h @@ -83,6 +83,8 @@ extern const struct ndr_interface_table ndr_table_winreg; #define NDR_WINREG_CALL_COUNT (35) void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r); +enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r); void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r); enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r); enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r); @@ -91,26 +93,52 @@ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const st void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r); void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r); void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r); -void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r); +enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r); void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r); void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r); void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r); +enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r); +enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r); void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r); void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r); void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r); +enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r); +enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r); void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r); +enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r); +enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r); void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r); +enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r); +enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r); void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r); void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r); +enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r); +enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r); void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r); +enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r); +enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r); void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r); +enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r); +enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r); void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r); +enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r); +enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r); void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r); void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r); +enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r); +enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r); void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r); +enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r); +enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r); void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r); +enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r); +enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r); void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r); +enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r); +enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r); void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r); void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r); void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r); @@ -120,9 +148,13 @@ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flag void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r); void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r); void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r); +enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r); +enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r); void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r); void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r); void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r); +enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r); +enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r); void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r); void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r); void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r); diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c index 92369835cf..0e9dda9f47 100644 --- a/source3/librpc/gen_ndr/ndr_xattr.c +++ b/source3/librpc/gen_ndr/ndr_xattr.c @@ -3,7 +3,244 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_xattr.h" -_PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r) +#include "librpc/gen_ndr/ndr_security.h" +static enum ndr_err_code ndr_push_xattr_DosInfo1(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attrib)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ea_size)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->create_time)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_xattr_DosInfo1(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attrib)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ea_size)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->create_time)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosInfo1(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo1 *r) +{ + ndr_print_struct(ndr, name, "xattr_DosInfo1"); + ndr->depth++; + ndr_print_uint32(ndr, "attrib", r->attrib); + ndr_print_uint32(ndr, "ea_size", r->ea_size); + ndr_print_udlong(ndr, "size", r->size); + ndr_print_udlong(ndr, "alloc_size", r->alloc_size); + ndr_print_NTTIME(ndr, "create_time", r->create_time); + ndr_print_NTTIME(ndr, "change_time", r->change_time); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_xattr_DosInfo2Old(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosInfo2Old *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attrib)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ea_size)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->create_time)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time)); + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->write_time)); + { + 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->name)); + ndr->flags = _flags_save_string; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_xattr_DosInfo2Old(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosInfo2Old *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attrib)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ea_size)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->create_time)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time)); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->write_time)); + { + 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->name)); + ndr->flags = _flags_save_string; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosInfo2Old(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo2Old *r) +{ + ndr_print_struct(ndr, name, "xattr_DosInfo2Old"); + ndr->depth++; + ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_uint32(ndr, "attrib", r->attrib); + ndr_print_uint32(ndr, "ea_size", r->ea_size); + ndr_print_udlong(ndr, "size", r->size); + ndr_print_udlong(ndr, "alloc_size", r->alloc_size); + ndr_print_NTTIME(ndr, "create_time", r->create_time); + ndr_print_NTTIME(ndr, "change_time", r->change_time); + ndr_print_NTTIME(ndr, "write_time", r->write_time); + ndr_print_string(ndr, "name", r->name); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_xattr_DosInfo(struct ndr_push *ndr, int ndr_flags, const union xattr_DosInfo *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_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1)); + break; } + + case 2: { + NDR_CHECK(ndr_push_xattr_DosInfo2Old(ndr, NDR_SCALARS, &r->oldinfo2)); + 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: + 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_xattr_DosInfo(struct ndr_pull *ndr, int ndr_flags, union xattr_DosInfo *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_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_xattr_DosInfo2Old(ndr, NDR_SCALARS, &r->oldinfo2)); + 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: + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosInfo(struct ndr_print *ndr, const char *name, const union xattr_DosInfo *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "xattr_DosInfo"); + switch (level) { + case 1: + ndr_print_xattr_DosInfo1(ndr, "info1", &r->info1); + break; + + case 2: + ndr_print_xattr_DosInfo2Old(ndr, "oldinfo2", &r->oldinfo2); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + +_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosAttrib(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosAttrib *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version)); + NDR_CHECK(ndr_push_xattr_DosInfo(ndr, NDR_SCALARS, &r->info)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosAttrib(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosAttrib *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version)); + NDR_CHECK(ndr_pull_xattr_DosInfo(ndr, NDR_SCALARS, &r->info)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosAttrib(struct ndr_print *ndr, const char *name, const struct xattr_DosAttrib *r) +{ + ndr_print_struct(ndr, name, "xattr_DosAttrib"); + ndr->depth++; + ndr_print_uint16(ndr, "version", r->version); + ndr_print_set_switch_value(ndr, &r->info, r->version); + ndr_print_xattr_DosInfo(ndr, "info", &r->info); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_xattr_EA(struct ndr_push *ndr, int ndr_flags, const struct xattr_EA *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -20,7 +257,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flag return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r) +static enum ndr_err_code ndr_pull_xattr_EA(struct ndr_pull *ndr, int ndr_flags, struct xattr_EA *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); @@ -37,23 +274,103 @@ _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flag return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r) +_PUBLIC_ void ndr_print_xattr_EA(struct ndr_print *ndr, const char *name, const struct xattr_EA *r) { - ndr_print_struct(ndr, name, "tdb_xattr"); + ndr_print_struct(ndr, name, "xattr_EA"); ndr->depth++; ndr_print_string(ndr, "name", r->name); ndr_print_DATA_BLOB(ndr, "value", r->value); ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosEAs(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosEAs *r) +{ + uint32_t cntr_eas_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_eas)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->eas)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->eas) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_eas)); + for (cntr_eas_1 = 0; cntr_eas_1 < r->num_eas; cntr_eas_1++) { + NDR_CHECK(ndr_push_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosEAs(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosEAs *r) +{ + uint32_t _ptr_eas; + uint32_t cntr_eas_1; + TALLOC_CTX *_mem_save_eas_0; + TALLOC_CTX *_mem_save_eas_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_eas)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eas)); + if (_ptr_eas) { + NDR_PULL_ALLOC(ndr, r->eas); + } else { + r->eas = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->eas) { + _mem_save_eas_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->eas)); + NDR_PULL_ALLOC_N(ndr, r->eas, ndr_get_array_size(ndr, &r->eas)); + _mem_save_eas_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0); + for (cntr_eas_1 = 0; cntr_eas_1 < r->num_eas; cntr_eas_1++) { + NDR_CHECK(ndr_pull_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_0, 0); + } + if (r->eas) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->eas, r->num_eas)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosEAs(struct ndr_print *ndr, const char *name, const struct xattr_DosEAs *r) +{ + uint32_t cntr_eas_1; + ndr_print_struct(ndr, name, "xattr_DosEAs"); + ndr->depth++; + ndr_print_uint16(ndr, "num_eas", r->num_eas); + ndr_print_ptr(ndr, "eas", r->eas); + ndr->depth++; + if (r->eas) { + ndr->print(ndr, "%s: ARRAY(%d)", "eas", (int)r->num_eas); + ndr->depth++; + for (cntr_eas_1=0;cntr_eas_1<r->num_eas;cntr_eas_1++) { + char *idx_1=NULL; + if (asprintf(&idx_1, "[%d]", cntr_eas_1) != -1) { + ndr_print_xattr_EA(ndr, "eas", &r->eas[cntr_eas_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r) { - uint32_t cntr_xattrs_0; + uint32_t cntr_eas_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_xattrs)); - for (cntr_xattrs_0 = 0; cntr_xattrs_0 < r->num_xattrs; cntr_xattrs_0++) { - NDR_CHECK(ndr_push_tdb_xattr(ndr, NDR_SCALARS, &r->xattrs[cntr_xattrs_0])); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_eas)); + for (cntr_eas_0 = 0; cntr_eas_0 < r->num_eas; cntr_eas_0++) { + NDR_CHECK(ndr_push_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0])); } } if (ndr_flags & NDR_BUFFERS) { @@ -63,18 +380,18 @@ _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_fla _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r) { - uint32_t cntr_xattrs_0; - TALLOC_CTX *_mem_save_xattrs_0; + uint32_t cntr_eas_0; + TALLOC_CTX *_mem_save_eas_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_xattrs)); - NDR_PULL_ALLOC_N(ndr, r->xattrs, r->num_xattrs); - _mem_save_xattrs_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->xattrs, 0); - for (cntr_xattrs_0 = 0; cntr_xattrs_0 < r->num_xattrs; cntr_xattrs_0++) { - NDR_CHECK(ndr_pull_tdb_xattr(ndr, NDR_SCALARS, &r->xattrs[cntr_xattrs_0])); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_eas)); + NDR_PULL_ALLOC_N(ndr, r->eas, r->num_eas); + _mem_save_eas_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0); + for (cntr_eas_0 = 0; cntr_eas_0 < r->num_eas; cntr_eas_0++) { + NDR_CHECK(ndr_pull_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0])); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_xattrs_0, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_0, 0); } if (ndr_flags & NDR_BUFFERS) { } @@ -83,16 +400,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_fla _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r) { - uint32_t cntr_xattrs_0; + uint32_t cntr_eas_0; ndr_print_struct(ndr, name, "tdb_xattrs"); ndr->depth++; - ndr_print_uint32(ndr, "num_xattrs", r->num_xattrs); - ndr->print(ndr, "%s: ARRAY(%d)", "xattrs", (int)r->num_xattrs); + ndr_print_uint32(ndr, "num_eas", r->num_eas); + ndr->print(ndr, "%s: ARRAY(%d)", "eas", (int)r->num_eas); ndr->depth++; - for (cntr_xattrs_0=0;cntr_xattrs_0<r->num_xattrs;cntr_xattrs_0++) { + for (cntr_eas_0=0;cntr_eas_0<r->num_eas;cntr_eas_0++) { char *idx_0=NULL; - if (asprintf(&idx_0, "[%d]", cntr_xattrs_0) != -1) { - ndr_print_tdb_xattr(ndr, "xattrs", &r->xattrs[cntr_xattrs_0]); + if (asprintf(&idx_0, "[%d]", cntr_eas_0) != -1) { + ndr_print_xattr_EA(ndr, "eas", &r->eas[cntr_eas_0]); free(idx_0); } } @@ -100,6 +417,135 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons ndr->depth--; } +static enum ndr_err_code ndr_push_xattr_DosStream(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStream *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size)); + NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size)); + { + 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->name)); + ndr->flags = _flags_save_string; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_xattr_DosStream(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStream *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size)); + NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size)); + { + 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->name)); + ndr->flags = _flags_save_string; + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosStream(struct ndr_print *ndr, const char *name, const struct xattr_DosStream *r) +{ + ndr_print_struct(ndr, name, "xattr_DosStream"); + ndr->depth++; + ndr_print_uint32(ndr, "flags", r->flags); + ndr_print_udlong(ndr, "size", r->size); + ndr_print_udlong(ndr, "alloc_size", r->alloc_size); + ndr_print_string(ndr, "name", r->name); + ndr->depth--; +} + +_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStreams *r) +{ + uint32_t cntr_streams_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_streams)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->streams)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->streams) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_streams)); + for (cntr_streams_1 = 0; cntr_streams_1 < r->num_streams; cntr_streams_1++) { + NDR_CHECK(ndr_push_xattr_DosStream(ndr, NDR_SCALARS, &r->streams[cntr_streams_1])); + } + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r) +{ + uint32_t _ptr_streams; + uint32_t cntr_streams_1; + TALLOC_CTX *_mem_save_streams_0; + TALLOC_CTX *_mem_save_streams_1; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_streams)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_streams)); + if (_ptr_streams) { + NDR_PULL_ALLOC(ndr, r->streams); + } else { + r->streams = NULL; + } + } + if (ndr_flags & NDR_BUFFERS) { + if (r->streams) { + _mem_save_streams_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->streams)); + NDR_PULL_ALLOC_N(ndr, r->streams, ndr_get_array_size(ndr, &r->streams)); + _mem_save_streams_1 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0); + for (cntr_streams_1 = 0; cntr_streams_1 < r->num_streams; cntr_streams_1++) { + NDR_CHECK(ndr_pull_xattr_DosStream(ndr, NDR_SCALARS, &r->streams[cntr_streams_1])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_1, 0); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_0, 0); + } + if (r->streams) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->streams, r->num_streams)); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name, const struct xattr_DosStreams *r) +{ + uint32_t cntr_streams_1; + ndr_print_struct(ndr, name, "xattr_DosStreams"); + ndr->depth++; + ndr_print_uint32(ndr, "num_streams", r->num_streams); + ndr_print_ptr(ndr, "streams", r->streams); + ndr->depth++; + if (r->streams) { + ndr->print(ndr, "%s: ARRAY(%d)", "streams", (int)r->num_streams); + ndr->depth++; + for (cntr_streams_1=0;cntr_streams_1<r->num_streams;cntr_streams_1++) { + char *idx_1=NULL; + if (asprintf(&idx_1, "[%d]", cntr_streams_1) != -1) { + ndr_print_xattr_DosStream(ndr, "streams", &r->streams[cntr_streams_1]); + free(idx_1); + } + } + ndr->depth--; + } + ndr->depth--; + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r) { if (ndr_flags & NDR_SCALARS) { diff --git a/source3/librpc/gen_ndr/ndr_xattr.h b/source3/librpc/gen_ndr/ndr_xattr.h index 21c5ae03b5..38701b1aca 100644 --- a/source3/librpc/gen_ndr/ndr_xattr.h +++ b/source3/librpc/gen_ndr/ndr_xattr.h @@ -7,12 +7,23 @@ #define _HEADER_NDR_xattr #define NDR_XATTR_CALL_COUNT (0) -enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r); -enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r); -void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r); +void ndr_print_xattr_DosInfo1(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo1 *r); +void ndr_print_xattr_DosInfo2Old(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo2Old *r); +void ndr_print_xattr_DosInfo(struct ndr_print *ndr, const char *name, const union xattr_DosInfo *r); +enum ndr_err_code ndr_push_xattr_DosAttrib(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosAttrib *r); +enum ndr_err_code ndr_pull_xattr_DosAttrib(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosAttrib *r); +void ndr_print_xattr_DosAttrib(struct ndr_print *ndr, const char *name, const struct xattr_DosAttrib *r); +void ndr_print_xattr_EA(struct ndr_print *ndr, const char *name, const struct xattr_EA *r); +enum ndr_err_code ndr_push_xattr_DosEAs(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosEAs *r); +enum ndr_err_code ndr_pull_xattr_DosEAs(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosEAs *r); +void ndr_print_xattr_DosEAs(struct ndr_print *ndr, const char *name, const struct xattr_DosEAs *r); enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r); enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r); void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r); +void ndr_print_xattr_DosStream(struct ndr_print *ndr, const char *name, const struct xattr_DosStream *r); +enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStreams *r); +enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r); +void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name, const struct xattr_DosStreams *r); enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r); enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_timestamp *r); void ndr_print_security_descriptor_timestamp(struct ndr_print *ndr, const char *name, const struct security_descriptor_timestamp *r); diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h index 1cea1f0f42..cf3959b199 100644 --- a/source3/librpc/gen_ndr/netlogon.h +++ b/source3/librpc/gen_ndr/netlogon.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/misc.h" #include "librpc/gen_ndr/lsa.h" #include "librpc/gen_ndr/samr.h" #include "librpc/gen_ndr/security.h" @@ -78,10 +79,41 @@ struct netr_NetworkInfo { struct netr_ChallengeResponse lm; }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; -union netr_LogonInfo { - struct netr_PasswordInfo *password;/* [unique,case] */ - struct netr_NetworkInfo *network;/* [unique,case(2)] */ -}/* [public,switch_type(uint16)] */; +struct netr_GenericInfo { + struct netr_IdentityInfo identity_info; + struct lsa_String package_name; + uint32_t length; + uint8_t *data;/* [unique,size_is(length)] */ +}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +enum netr_LogonInfoClass +#ifndef USE_UINT_ENUMS + { + NetlogonInteractiveInformation=1, + NetlogonNetworkInformation=2, + NetlogonServiceInformation=3, + NetlogonGenericInformation=4, + NetlogonInteractiveTransitiveInformation=5, + NetlogonNetworkTransitiveInformation=6, + NetlogonServiceTransitiveInformation=7 +} +#else + { __donnot_use_enum_netr_LogonInfoClass=0x7FFFFFFF} +#define NetlogonInteractiveInformation ( 1 ) +#define NetlogonNetworkInformation ( 2 ) +#define NetlogonServiceInformation ( 3 ) +#define NetlogonGenericInformation ( 4 ) +#define NetlogonInteractiveTransitiveInformation ( 5 ) +#define NetlogonNetworkTransitiveInformation ( 6 ) +#define NetlogonServiceTransitiveInformation ( 7 ) +#endif +; + +union netr_LogonLevel { + struct netr_PasswordInfo *password;/* [unique,case(NetlogonInteractiveInformation)] */ + struct netr_NetworkInfo *network;/* [unique,case(NetlogonNetworkInformation)] */ + struct netr_GenericInfo *generic;/* [unique,case(NetlogonGenericInformation)] */ +}/* [public,switch_type(netr_LogonInfoClass)] */; struct netr_UserSessionKey { uint8_t key[16]; @@ -172,11 +204,36 @@ struct netr_PacInfo { struct lsa_String unknown4; }; +struct netr_GenericInfo2 { + uint32_t length; + uint8_t *data;/* [unique,size_is(length)] */ +}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */; + +enum netr_ValidationInfoClass +#ifndef USE_UINT_ENUMS + { + NetlogonValidationUasInfo=1, + NetlogonValidationSamInfo=2, + NetlogonValidationSamInfo2=3, + NetlogonValidationGenericInfo2=5, + NetlogonValidationSamInfo4=6 +} +#else + { __donnot_use_enum_netr_ValidationInfoClass=0x7FFFFFFF} +#define NetlogonValidationUasInfo ( 1 ) +#define NetlogonValidationSamInfo ( 2 ) +#define NetlogonValidationSamInfo2 ( 3 ) +#define NetlogonValidationGenericInfo2 ( 5 ) +#define NetlogonValidationSamInfo4 ( 6 ) +#endif +; + union netr_Validation { - struct netr_SamInfo2 *sam2;/* [unique,case(2)] */ - struct netr_SamInfo3 *sam3;/* [unique,case(3)] */ + struct netr_SamInfo2 *sam2;/* [unique,case(NetlogonValidationSamInfo)] */ + struct netr_SamInfo3 *sam3;/* [unique,case(NetlogonValidationSamInfo2)] */ struct netr_PacInfo *pac;/* [unique,case(4)] */ - struct netr_SamInfo6 *sam6;/* [unique,case(6)] */ + struct netr_GenericInfo2 *generic;/* [unique,case(NetlogonValidationGenericInfo2)] */ + struct netr_SamInfo6 *sam6;/* [unique,case(NetlogonValidationSamInfo4)] */ }/* [public,switch_type(uint16)] */; struct netr_Credential { @@ -188,19 +245,6 @@ struct netr_Authenticator { time_t timestamp; }/* [public] */; -enum netr_LogonLevel -#ifndef USE_UINT_ENUMS - { - INTERACTIVE_LOGON_TYPE=1, - NET_LOGON_TYPE=2 -} -#else - { __donnot_use_enum_netr_LogonLevel=0x7FFFFFFF} -#define INTERACTIVE_LOGON_TYPE ( 1 ) -#define NET_LOGON_TYPE ( 2 ) -#endif -; - enum netr_SchannelType; enum netr_SamDatabaseID; @@ -298,7 +342,7 @@ struct netr_DELTA_USER { struct netr_DELTA_DOMAIN { struct lsa_String domain_name; - struct lsa_String comment; + struct lsa_String oem_information; int64_t force_logoff_time; uint16_t min_password_length; uint16_t password_history_length; @@ -736,6 +780,16 @@ struct netr_DsRGetDCNameInfo { const char *client_site_name;/* [unique,charset(UTF16)] */ }/* [public] */; +/* bitmap netr_TrustFlags */ +#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 ) +#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 ) +#define NETR_TRUST_FLAG_TREEROOT ( 0x00000004 ) +#define NETR_TRUST_FLAG_PRIMARY ( 0x00000008 ) +#define NETR_TRUST_FLAG_NATIVE ( 0x00000010 ) +#define NETR_TRUST_FLAG_INBOUND ( 0x00000020 ) +#define NETR_TRUST_FLAG_MIT_KRB5 ( 0x00000080 ) +#define NETR_TRUST_FLAG_AES ( 0x00000100 ) + struct netr_BinaryString { uint16_t length; uint16_t size; @@ -761,25 +815,57 @@ union netr_DomainQuery { struct netr_DomainQuery1 *query1;/* [unique,case] */ }; +struct netr_trust_extension { + uint32_t length;/* [value(8)] */ + uint32_t dummy;/* [value(0)] */ + uint32_t size;/* [value(8)] */ + uint32_t flags; + uint32_t parent_index; + uint32_t trust_type; + uint32_t trust_attributes; +}; + +struct netr_trust_extension_container { + uint16_t length; + uint16_t size;/* [value(length)] */ + struct netr_trust_extension *info;/* [unique] */ +}; + struct netr_DomainTrustInfo { struct lsa_String domainname; struct lsa_String fulldomainname; struct lsa_String forest; struct GUID guid; struct dom_sid2 *sid;/* [unique] */ - struct netr_BinaryString unknown1[4]; - uint32_t unknown[4]; + struct netr_trust_extension_container trust_extension; + struct lsa_String dummystring[3]; + uint32_t dummy[4]; }; +struct netr_LsaPolicyInfo { + uint32_t policy_size; + uint8_t *policy;/* [unique,size_is(policy_size)] */ +}; + +/* bitmap netr_WorkstationFlags */ +#define NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS ( 0x00000001 ) +#define NETR_WS_FLAG_HANDLES_SPN_UPDATE ( 0x00000002 ) + struct netr_DomainInfo1 { struct netr_DomainTrustInfo domaininfo; uint32_t num_trusts; struct netr_DomainTrustInfo *trusts;/* [unique,size_is(num_trusts)] */ - uint32_t unknown[14]; + struct netr_LsaPolicyInfo lsa_policy; + struct lsa_String dns_hostname; + struct lsa_String dummystring[3]; + uint32_t workstation_flags; + uint32_t supported_enc_types; + uint32_t dummy[2]; }; union netr_DomainInfo { struct netr_DomainInfo1 *info1;/* [unique,case] */ + struct netr_DomainInfo1 *info2;/* [unique,case(2)] */ }; struct netr_CryptPassword { @@ -797,14 +883,6 @@ struct netr_DsRAddress { uint32_t size; }; -/* bitmap netr_TrustFlags */ -#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 ) -#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 ) -#define NETR_TRUST_FLAG_TREEROOT ( 0x00000004 ) -#define NETR_TRUST_FLAG_PRIMARY ( 0x00000008 ) -#define NETR_TRUST_FLAG_NATIVE ( 0x00000010 ) -#define NETR_TRUST_FLAG_INBOUND ( 0x00000020 ) - enum netr_TrustType #ifndef USE_UINT_ENUMS { @@ -894,8 +972,8 @@ struct netr_LogonSamLogon { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - enum netr_LogonLevel logon_level; - union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */ + enum netr_LogonInfoClass logon_level; + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -915,8 +993,8 @@ struct netr_LogonSamLogoff { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - enum netr_LogonLevel logon_level; - union netr_LogonInfo logon;/* [switch_is(logon_level)] */ + enum netr_LogonInfoClass logon_level; + union netr_LogonLevel logon;/* [switch_is(logon_level)] */ struct netr_Authenticator *return_authenticator;/* [unique] */ } in; @@ -1480,8 +1558,8 @@ struct netr_LogonSamLogonEx { struct { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ - enum netr_LogonLevel logon_level; - union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */ + enum netr_LogonInfoClass logon_level; + union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */ uint16_t validation_level; uint32_t *flags;/* [ref] */ } in; @@ -1582,8 +1660,8 @@ struct netr_LogonSamLogonWithFlags { const char *server_name;/* [unique,charset(UTF16)] */ const char *computer_name;/* [unique,charset(UTF16)] */ struct netr_Authenticator *credential;/* [unique] */ - enum netr_LogonLevel logon_level; - union netr_LogonInfo logon;/* [switch_is(logon_level)] */ + enum netr_LogonInfoClass logon_level; + union netr_LogonLevel logon;/* [switch_is(logon_level)] */ uint16_t validation_level; struct netr_Authenticator *return_authenticator;/* [unique] */ uint32_t *flags;/* [ref] */ diff --git a/source3/librpc/gen_ndr/notify.h b/source3/librpc/gen_ndr/notify.h index c809702e5d..46a7e24e0d 100644 --- a/source3/librpc/gen_ndr/notify.h +++ b/source3/librpc/gen_ndr/notify.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/security.h" #ifndef _HEADER_notify #define _HEADER_notify diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h index 95484e49f5..b56b552ae2 100644 --- a/source3/librpc/gen_ndr/ntsvcs.h +++ b/source3/librpc/gen_ndr/ntsvcs.h @@ -101,6 +101,14 @@ struct PNP_EnumerateSubKeys { struct PNP_GetDeviceList { struct { + const char *filter;/* [unique,charset(UTF16)] */ + uint32_t flags; + uint32_t *length;/* [ref] */ + } in; + + struct { + uint16_t *buffer;/* [ref,length_is(*length),size_is(*length)] */ + uint32_t *length;/* [ref] */ WERROR result; } out; @@ -133,15 +141,15 @@ struct PNP_GetDeviceRegProp { struct { const char *devicepath;/* [ref,charset(UTF16)] */ uint32_t property; - uint32_t unknown3; - uint32_t *unknown1;/* [ref] */ + uint32_t flags; + uint32_t *reg_data_type;/* [ref] */ uint32_t *buffer_size;/* [ref] */ uint32_t *needed;/* [ref] */ } in; struct { uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */ - uint32_t *unknown1;/* [ref] */ + uint32_t *reg_data_type;/* [ref] */ uint32_t *buffer_size;/* [ref] */ uint32_t *needed;/* [ref] */ WERROR result; diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h index 522c6a9cec..62f6bf8de6 100644 --- a/source3/librpc/gen_ndr/samr.h +++ b/source3/librpc/gen_ndr/samr.h @@ -125,9 +125,9 @@ struct samr_DomInfo1 { int64_t min_password_age; }; -struct samr_DomInfo2 { +struct samr_DomGeneralInformation { NTTIME force_logoff_time; - struct lsa_String comment; + struct lsa_String oem_information; struct lsa_String domain_name; struct lsa_String primary; uint64_t sequence_num; @@ -143,8 +143,8 @@ struct samr_DomInfo3 { NTTIME force_logoff_time; }; -struct samr_DomInfo4 { - struct lsa_String comment; +struct samr_DomOEMInformation { + struct lsa_String oem_information; }; struct samr_DomInfo5 { @@ -168,8 +168,8 @@ struct samr_DomInfo9 { uint32_t unknown; }; -struct samr_DomInfo11 { - struct samr_DomInfo2 info2; +struct samr_DomGeneralInformation2 { + struct samr_DomGeneralInformation general; uint64_t lockout_duration; uint64_t lockout_window; uint16_t lockout_threshold; @@ -190,15 +190,15 @@ struct samr_DomInfo13 { union samr_DomainInfo { struct samr_DomInfo1 info1;/* [case] */ - struct samr_DomInfo2 info2;/* [case(2)] */ + struct samr_DomGeneralInformation general;/* [case(2)] */ struct samr_DomInfo3 info3;/* [case(3)] */ - struct samr_DomInfo4 info4;/* [case(4)] */ + struct samr_DomOEMInformation oem;/* [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_DomGeneralInformation2 general2;/* [case(11)] */ struct samr_DomInfo12 info12;/* [case(12)] */ struct samr_DomInfo13 info13;/* [case(13)] */ }/* [switch_type(uint16)] */; diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h index 04655b178e..5b77d76b50 100644 --- a/source3/librpc/gen_ndr/security.h +++ b/source3/librpc/gen_ndr/security.h @@ -59,6 +59,7 @@ #define SEC_ADS_DELETE_TREE ( 0x00000040 ) #define SEC_ADS_LIST_OBJECT ( 0x00000080 ) #define SEC_ADS_CONTROL_ACCESS ( 0x00000100 ) +#define SEC_MASK_INVALID ( 0x0ce0fe00 ) #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 ) @@ -74,6 +75,7 @@ #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 SID_OWNER_RIGHTS ( "S-1-3-4" ) #define NAME_NT_AUTHORITY ( "NT AUTHORITY" ) #define SID_NT_AUTHORITY ( "S-1-5" ) #define SID_NT_DIALUP ( "S-1-5-1" ) @@ -90,9 +92,14 @@ #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_IUSR ( "S-1-5-17" ) #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 SID_NT_DIGEST_AUTHENTICATION ( "S-1-5-64-21" ) +#define SID_NT_NTLM_AUTHENTICATION ( "S-1-5-64-10" ) +#define SID_NT_SCHANNEL_AUTHENTICATION ( "S-1-5-64-14" ) +#define SID_NT_OTHER_ORGANISATION ( "S-1-5-1000" ) #define NAME_BUILTIN ( "BUILTIN" ) #define SID_BUILTIN ( "S-1-5-32" ) #define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" ) @@ -324,4 +331,11 @@ struct security_token { #define SECINFO_PROTECTED_SACL ( 0x40000000 ) #define SECINFO_PROTECTED_DACL ( 0x80000000 ) +/* bitmap kerb_EncTypes */ +#define KERB_ENCTYPE_DES_CBC_CRC ( 0x00000001 ) +#define KERB_ENCTYPE_DES_CBC_MD5 ( 0x00000002 ) +#define KERB_ENCTYPE_RC4_HMAC_MD5 ( 0x00000004 ) +#define KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 ( 0x00000008 ) +#define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 ( 0x00000010 ) + #endif /* _HEADER_security */ diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index 54b2184829..d58272084a 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -27,7 +27,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_dfs_Add(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -136,7 +136,7 @@ static bool api_dfs_Add(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Add, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -180,7 +180,7 @@ static bool api_dfs_Remove(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -209,7 +209,7 @@ static bool api_dfs_Remove(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Remove, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -253,7 +253,7 @@ static bool api_dfs_SetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -282,7 +282,7 @@ static bool api_dfs_SetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -326,7 +326,7 @@ static bool api_dfs_GetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -362,7 +362,7 @@ static bool api_dfs_GetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -406,7 +406,7 @@ static bool api_dfs_Enum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -438,7 +438,7 @@ static bool api_dfs_Enum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Enum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -482,7 +482,7 @@ static bool api_dfs_Rename(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -511,7 +511,7 @@ static bool api_dfs_Rename(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Rename, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -555,7 +555,7 @@ static bool api_dfs_Move(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -584,7 +584,7 @@ static bool api_dfs_Move(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Move, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -628,7 +628,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -657,7 +657,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -701,7 +701,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -730,7 +730,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -774,7 +774,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -805,7 +805,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -849,7 +849,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -880,7 +880,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -924,7 +924,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -953,7 +953,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -997,7 +997,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1026,7 +1026,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1070,7 +1070,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1099,7 +1099,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1143,7 +1143,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1172,7 +1172,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1216,7 +1216,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1249,7 +1249,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1293,7 +1293,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1322,7 +1322,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1366,7 +1366,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1395,7 +1395,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1439,7 +1439,7 @@ static bool api_dfs_Add2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1468,7 +1468,7 @@ static bool api_dfs_Add2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Add2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1512,7 +1512,7 @@ static bool api_dfs_Remove2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1541,7 +1541,7 @@ static bool api_dfs_Remove2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_Remove2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1585,7 +1585,7 @@ static bool api_dfs_EnumEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1617,7 +1617,7 @@ static bool api_dfs_EnumEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1661,7 +1661,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1690,7 +1690,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_dssetup.c b/source3/librpc/gen_ndr/srv_dssetup.c index 79bde30d06..62123b826c 100644 --- a/source3/librpc/gen_ndr/srv_dssetup.c +++ b/source3/librpc/gen_ndr/srv_dssetup.c @@ -27,7 +27,7 @@ static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -136,7 +136,7 @@ static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -180,7 +180,7 @@ static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -209,7 +209,7 @@ static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -253,7 +253,7 @@ static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -282,7 +282,7 @@ static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -326,7 +326,7 @@ static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -355,7 +355,7 @@ static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -399,7 +399,7 @@ static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -428,7 +428,7 @@ static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -472,7 +472,7 @@ static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -501,7 +501,7 @@ static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -545,7 +545,7 @@ static bool api_dssetup_DsRoleCancel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -574,7 +574,7 @@ static bool api_dssetup_DsRoleCancel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -618,7 +618,7 @@ static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -647,7 +647,7 @@ static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -691,7 +691,7 @@ static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -720,7 +720,7 @@ static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -764,7 +764,7 @@ static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -793,7 +793,7 @@ static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p) NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_echo.c b/source3/librpc/gen_ndr/srv_echo.c index b8b38dad13..970398dc71 100644 --- a/source3/librpc/gen_ndr/srv_echo.c +++ b/source3/librpc/gen_ndr/srv_echo.c @@ -27,7 +27,7 @@ static bool api_echo_AddOne(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_echo_AddOne(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_AddOne, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_echo_EchoData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -143,7 +143,7 @@ static bool api_echo_EchoData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_EchoData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -187,7 +187,7 @@ static bool api_echo_SinkData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -216,7 +216,7 @@ static bool api_echo_SinkData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_SinkData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -260,7 +260,7 @@ static bool api_echo_SourceData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -296,7 +296,7 @@ static bool api_echo_SourceData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_SourceData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -340,7 +340,7 @@ static bool api_echo_TestCall(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -376,7 +376,7 @@ static bool api_echo_TestCall(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestCall, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -420,7 +420,7 @@ static bool api_echo_TestCall2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -456,7 +456,7 @@ static bool api_echo_TestCall2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestCall2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -500,7 +500,7 @@ static bool api_echo_TestSleep(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -529,7 +529,7 @@ static bool api_echo_TestSleep(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestSleep, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -573,7 +573,7 @@ static bool api_echo_TestEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -606,7 +606,7 @@ static bool api_echo_TestEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -650,7 +650,7 @@ static bool api_echo_TestSurrounding(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -681,7 +681,7 @@ static bool api_echo_TestSurrounding(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -725,7 +725,7 @@ static bool api_echo_TestDoublePointer(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -754,7 +754,7 @@ static bool api_echo_TestDoublePointer(pipes_struct *p) NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_epmapper.c b/source3/librpc/gen_ndr/srv_epmapper.c index f42598abd4..a31d89b8e8 100644 --- a/source3/librpc/gen_ndr/srv_epmapper.c +++ b/source3/librpc/gen_ndr/srv_epmapper.c @@ -27,7 +27,7 @@ static bool api_epm_Insert(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -56,7 +56,7 @@ static bool api_epm_Insert(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_Insert, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -100,7 +100,7 @@ static bool api_epm_Delete(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -129,7 +129,7 @@ static bool api_epm_Delete(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_Delete, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -173,7 +173,7 @@ static bool api_epm_Lookup(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -216,7 +216,7 @@ static bool api_epm_Lookup(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_Lookup, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -260,7 +260,7 @@ static bool api_epm_Map(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -303,7 +303,7 @@ static bool api_epm_Map(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_Map, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -347,7 +347,7 @@ static bool api_epm_LookupHandleFree(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -378,7 +378,7 @@ static bool api_epm_LookupHandleFree(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -422,7 +422,7 @@ static bool api_epm_InqObject(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -451,7 +451,7 @@ static bool api_epm_InqObject(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_InqObject, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -495,7 +495,7 @@ static bool api_epm_MgmtDelete(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -524,7 +524,7 @@ static bool api_epm_MgmtDelete(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -568,7 +568,7 @@ static bool api_epm_MapAuth(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -597,7 +597,7 @@ static bool api_epm_MapAuth(pipes_struct *p) NDR_PRINT_OUT_DEBUG(epm_MapAuth, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index eb3fb1fe6d..b9a4a2e9ed 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -27,7 +27,7 @@ static bool api_eventlog_ClearEventLogW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -56,7 +56,7 @@ static bool api_eventlog_ClearEventLogW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -100,7 +100,7 @@ static bool api_eventlog_BackupEventLogW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -129,7 +129,7 @@ static bool api_eventlog_BackupEventLogW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -173,7 +173,7 @@ static bool api_eventlog_CloseEventLog(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -204,7 +204,7 @@ static bool api_eventlog_CloseEventLog(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -248,7 +248,7 @@ static bool api_eventlog_DeregisterEventSource(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -277,7 +277,7 @@ static bool api_eventlog_DeregisterEventSource(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -321,7 +321,7 @@ static bool api_eventlog_GetNumRecords(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -357,7 +357,7 @@ static bool api_eventlog_GetNumRecords(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -401,7 +401,7 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -437,7 +437,7 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -481,7 +481,7 @@ static bool api_eventlog_ChangeNotify(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -510,7 +510,7 @@ static bool api_eventlog_ChangeNotify(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -554,7 +554,7 @@ static bool api_eventlog_OpenEventLogW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -590,7 +590,7 @@ static bool api_eventlog_OpenEventLogW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -634,7 +634,7 @@ static bool api_eventlog_RegisterEventSourceW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -663,7 +663,7 @@ static bool api_eventlog_RegisterEventSourceW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -707,7 +707,7 @@ static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -736,7 +736,7 @@ static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -780,7 +780,7 @@ static bool api_eventlog_ReadEventLogW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -828,7 +828,7 @@ static bool api_eventlog_ReadEventLogW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -872,7 +872,7 @@ static bool api_eventlog_ReportEventW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -901,7 +901,7 @@ static bool api_eventlog_ReportEventW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -945,7 +945,7 @@ static bool api_eventlog_ClearEventLogA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -974,7 +974,7 @@ static bool api_eventlog_ClearEventLogA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1018,7 +1018,7 @@ static bool api_eventlog_BackupEventLogA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1047,7 +1047,7 @@ static bool api_eventlog_BackupEventLogA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1091,7 +1091,7 @@ static bool api_eventlog_OpenEventLogA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1120,7 +1120,7 @@ static bool api_eventlog_OpenEventLogA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1164,7 +1164,7 @@ static bool api_eventlog_RegisterEventSourceA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1193,7 +1193,7 @@ static bool api_eventlog_RegisterEventSourceA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1237,7 +1237,7 @@ static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1266,7 +1266,7 @@ static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1310,7 +1310,7 @@ static bool api_eventlog_ReadEventLogA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1339,7 +1339,7 @@ static bool api_eventlog_ReadEventLogA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1383,7 +1383,7 @@ static bool api_eventlog_ReportEventA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1412,7 +1412,7 @@ static bool api_eventlog_ReportEventA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1456,7 +1456,7 @@ static bool api_eventlog_RegisterClusterSvc(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1485,7 +1485,7 @@ static bool api_eventlog_RegisterClusterSvc(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1529,7 +1529,7 @@ static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1558,7 +1558,7 @@ static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1602,7 +1602,7 @@ static bool api_eventlog_WriteClusterEvents(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1631,7 +1631,7 @@ static bool api_eventlog_WriteClusterEvents(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1675,7 +1675,7 @@ static bool api_eventlog_GetLogIntormation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1704,7 +1704,7 @@ static bool api_eventlog_GetLogIntormation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1748,7 +1748,7 @@ static bool api_eventlog_FlushEventLog(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1777,7 +1777,7 @@ static bool api_eventlog_FlushEventLog(pipes_struct *p) NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_initshutdown.c b/source3/librpc/gen_ndr/srv_initshutdown.c index 00a89661b5..51098074ac 100644 --- a/source3/librpc/gen_ndr/srv_initshutdown.c +++ b/source3/librpc/gen_ndr/srv_initshutdown.c @@ -27,7 +27,7 @@ static bool api_initshutdown_Init(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -56,7 +56,7 @@ static bool api_initshutdown_Init(pipes_struct *p) NDR_PRINT_OUT_DEBUG(initshutdown_Init, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -100,7 +100,7 @@ static bool api_initshutdown_Abort(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -129,7 +129,7 @@ static bool api_initshutdown_Abort(pipes_struct *p) NDR_PRINT_OUT_DEBUG(initshutdown_Abort, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -173,7 +173,7 @@ static bool api_initshutdown_InitEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -202,7 +202,7 @@ static bool api_initshutdown_InitEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 41d1c9716c..b0893623a8 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -27,7 +27,7 @@ static bool api_lsa_Close(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -58,7 +58,7 @@ static bool api_lsa_Close(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_Close, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -102,7 +102,7 @@ static bool api_lsa_Delete(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -131,7 +131,7 @@ static bool api_lsa_Delete(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_Delete, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -175,7 +175,7 @@ static bool api_lsa_EnumPrivs(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -212,7 +212,7 @@ static bool api_lsa_EnumPrivs(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -256,7 +256,7 @@ static bool api_lsa_QuerySecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -292,7 +292,7 @@ static bool api_lsa_QuerySecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -336,7 +336,7 @@ static bool api_lsa_SetSecObj(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -365,7 +365,7 @@ static bool api_lsa_SetSecObj(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -409,7 +409,7 @@ static bool api_lsa_ChangePassword(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -438,7 +438,7 @@ static bool api_lsa_ChangePassword(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -482,7 +482,7 @@ static bool api_lsa_OpenPolicy(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -518,7 +518,7 @@ static bool api_lsa_OpenPolicy(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -562,7 +562,7 @@ static bool api_lsa_QueryInfoPolicy(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -598,7 +598,7 @@ static bool api_lsa_QueryInfoPolicy(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -642,7 +642,7 @@ static bool api_lsa_SetInfoPolicy(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -671,7 +671,7 @@ static bool api_lsa_SetInfoPolicy(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -715,7 +715,7 @@ static bool api_lsa_ClearAuditLog(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -744,7 +744,7 @@ static bool api_lsa_ClearAuditLog(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -788,7 +788,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -824,7 +824,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -868,7 +868,7 @@ static bool api_lsa_EnumAccounts(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -905,7 +905,7 @@ static bool api_lsa_EnumAccounts(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -949,7 +949,7 @@ static bool api_lsa_CreateTrustedDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -985,7 +985,7 @@ static bool api_lsa_CreateTrustedDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1029,7 +1029,7 @@ static bool api_lsa_EnumTrustDom(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1066,7 +1066,7 @@ static bool api_lsa_EnumTrustDom(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1110,7 +1110,7 @@ static bool api_lsa_LookupNames(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1148,7 +1148,7 @@ static bool api_lsa_LookupNames(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupNames, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1192,7 +1192,7 @@ static bool api_lsa_LookupSids(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1230,7 +1230,7 @@ static bool api_lsa_LookupSids(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupSids, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1274,7 +1274,7 @@ static bool api_lsa_CreateSecret(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1310,7 +1310,7 @@ static bool api_lsa_CreateSecret(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1354,7 +1354,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1390,7 +1390,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1434,7 +1434,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1470,7 +1470,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1514,7 +1514,7 @@ static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1543,7 +1543,7 @@ static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1587,7 +1587,7 @@ static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1616,7 +1616,7 @@ static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1660,7 +1660,7 @@ static bool api_lsa_GetQuotasForAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1689,7 +1689,7 @@ static bool api_lsa_GetQuotasForAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1733,7 +1733,7 @@ static bool api_lsa_SetQuotasForAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1762,7 +1762,7 @@ static bool api_lsa_SetQuotasForAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1806,7 +1806,7 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1842,7 +1842,7 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1886,7 +1886,7 @@ static bool api_lsa_SetSystemAccessAccount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1915,7 +1915,7 @@ static bool api_lsa_SetSystemAccessAccount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1959,7 +1959,7 @@ static bool api_lsa_OpenTrustedDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1995,7 +1995,7 @@ static bool api_lsa_OpenTrustedDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2039,7 +2039,7 @@ static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2075,7 +2075,7 @@ static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2119,7 +2119,7 @@ static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2148,7 +2148,7 @@ static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2192,7 +2192,7 @@ static bool api_lsa_OpenSecret(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2228,7 +2228,7 @@ static bool api_lsa_OpenSecret(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2272,7 +2272,7 @@ static bool api_lsa_SetSecret(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2301,7 +2301,7 @@ static bool api_lsa_SetSecret(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetSecret, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2345,7 +2345,7 @@ static bool api_lsa_QuerySecret(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2379,7 +2379,7 @@ static bool api_lsa_QuerySecret(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2423,7 +2423,7 @@ static bool api_lsa_LookupPrivValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2459,7 +2459,7 @@ static bool api_lsa_LookupPrivValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2503,7 +2503,7 @@ static bool api_lsa_LookupPrivName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2539,7 +2539,7 @@ static bool api_lsa_LookupPrivName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2583,7 +2583,7 @@ static bool api_lsa_LookupPrivDisplayName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2625,7 +2625,7 @@ static bool api_lsa_LookupPrivDisplayName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2669,7 +2669,7 @@ static bool api_lsa_DeleteObject(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2700,7 +2700,7 @@ static bool api_lsa_DeleteObject(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2744,7 +2744,7 @@ static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2780,7 +2780,7 @@ static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2824,7 +2824,7 @@ static bool api_lsa_EnumAccountRights(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2860,7 +2860,7 @@ static bool api_lsa_EnumAccountRights(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2904,7 +2904,7 @@ static bool api_lsa_AddAccountRights(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2933,7 +2933,7 @@ static bool api_lsa_AddAccountRights(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2977,7 +2977,7 @@ static bool api_lsa_RemoveAccountRights(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3006,7 +3006,7 @@ static bool api_lsa_RemoveAccountRights(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3050,7 +3050,7 @@ static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3086,7 +3086,7 @@ static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3130,7 +3130,7 @@ static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3159,7 +3159,7 @@ static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3203,7 +3203,7 @@ static bool api_lsa_DeleteTrustedDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3232,7 +3232,7 @@ static bool api_lsa_DeleteTrustedDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3276,7 +3276,7 @@ static bool api_lsa_StorePrivateData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3305,7 +3305,7 @@ static bool api_lsa_StorePrivateData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3349,7 +3349,7 @@ static bool api_lsa_RetrievePrivateData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3378,7 +3378,7 @@ static bool api_lsa_RetrievePrivateData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3422,7 +3422,7 @@ static bool api_lsa_OpenPolicy2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3458,7 +3458,7 @@ static bool api_lsa_OpenPolicy2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3502,7 +3502,7 @@ static bool api_lsa_GetUserName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3534,7 +3534,7 @@ static bool api_lsa_GetUserName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_GetUserName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3578,7 +3578,7 @@ static bool api_lsa_QueryInfoPolicy2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3614,7 +3614,7 @@ static bool api_lsa_QueryInfoPolicy2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3658,7 +3658,7 @@ static bool api_lsa_SetInfoPolicy2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3687,7 +3687,7 @@ static bool api_lsa_SetInfoPolicy2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3731,7 +3731,7 @@ static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3767,7 +3767,7 @@ static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3811,7 +3811,7 @@ static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3840,7 +3840,7 @@ static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3884,7 +3884,7 @@ static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3921,7 +3921,7 @@ static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3965,7 +3965,7 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3982,6 +3982,13 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, r); } + ZERO_STRUCT(r->out); + r->out.trustdom_handle = talloc_zero(r, struct policy_handle); + if (r->out.trustdom_handle == NULL) { + talloc_free(r); + return false; + } + r->out.result = _lsa_CreateTrustedDomainEx(p, r); if (p->rng_fault_state) { @@ -3994,7 +4001,7 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4038,7 +4045,7 @@ static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4069,7 +4076,7 @@ static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4113,7 +4120,7 @@ static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4149,7 +4156,7 @@ static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4193,7 +4200,7 @@ static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4222,7 +4229,7 @@ static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4266,7 +4273,7 @@ static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4302,7 +4309,7 @@ static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4346,7 +4353,7 @@ static bool api_lsa_TestCall(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4375,7 +4382,7 @@ static bool api_lsa_TestCall(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_TestCall, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4419,7 +4426,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4457,7 +4464,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4501,7 +4508,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4539,7 +4546,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4583,7 +4590,7 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4600,6 +4607,13 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, r); } + ZERO_STRUCT(r->out); + r->out.trustdom_handle = talloc_zero(r, struct policy_handle); + if (r->out.trustdom_handle == NULL) { + talloc_free(r); + return false; + } + r->out.result = _lsa_CreateTrustedDomainEx2(p, r); if (p->rng_fault_state) { @@ -4612,7 +4626,7 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4656,7 +4670,7 @@ static bool api_lsa_CREDRWRITE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4685,7 +4699,7 @@ static bool api_lsa_CREDRWRITE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4729,7 +4743,7 @@ static bool api_lsa_CREDRREAD(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4758,7 +4772,7 @@ static bool api_lsa_CREDRREAD(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4802,7 +4816,7 @@ static bool api_lsa_CREDRENUMERATE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4831,7 +4845,7 @@ static bool api_lsa_CREDRENUMERATE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4875,7 +4889,7 @@ static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4904,7 +4918,7 @@ static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4948,7 +4962,7 @@ static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4977,7 +4991,7 @@ static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5021,7 +5035,7 @@ static bool api_lsa_CREDRDELETE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5050,7 +5064,7 @@ static bool api_lsa_CREDRDELETE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5094,7 +5108,7 @@ static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5123,7 +5137,7 @@ static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5167,7 +5181,7 @@ static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5196,7 +5210,7 @@ static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5240,7 +5254,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5278,7 +5292,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5322,7 +5336,7 @@ static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5351,7 +5365,7 @@ static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5395,7 +5409,7 @@ static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5424,7 +5438,7 @@ static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5468,7 +5482,7 @@ static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5497,7 +5511,7 @@ static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5541,7 +5555,7 @@ static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5570,7 +5584,7 @@ static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5614,7 +5628,7 @@ static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5650,7 +5664,7 @@ static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5694,7 +5708,7 @@ static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5723,7 +5737,7 @@ static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5767,7 +5781,7 @@ static bool api_lsa_CREDRRENAME(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5796,7 +5810,7 @@ static bool api_lsa_CREDRRENAME(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5840,7 +5854,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5878,7 +5892,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5922,7 +5936,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5960,7 +5974,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -6004,7 +6018,7 @@ static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -6033,7 +6047,7 @@ static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -6077,7 +6091,7 @@ static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -6106,7 +6120,7 @@ static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -6150,7 +6164,7 @@ static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -6179,7 +6193,7 @@ static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -6223,7 +6237,7 @@ static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -6252,7 +6266,7 @@ static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 154ef71d40..c14f682c1c 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -27,7 +27,7 @@ static bool api_netr_LogonUasLogon(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_netr_LogonUasLogon(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_netr_LogonUasLogoff(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -143,7 +143,7 @@ static bool api_netr_LogonUasLogoff(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -187,7 +187,7 @@ static bool api_netr_LogonSamLogon(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -230,7 +230,7 @@ static bool api_netr_LogonSamLogon(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -274,7 +274,7 @@ static bool api_netr_LogonSamLogoff(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -305,7 +305,7 @@ static bool api_netr_LogonSamLogoff(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -349,7 +349,7 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -385,7 +385,7 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -429,7 +429,7 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -465,7 +465,7 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -509,7 +509,7 @@ static bool api_netr_ServerPasswordSet(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -545,7 +545,7 @@ static bool api_netr_ServerPasswordSet(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -589,7 +589,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -627,7 +627,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -671,7 +671,7 @@ static bool api_netr_DatabaseSync(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -709,7 +709,7 @@ static bool api_netr_DatabaseSync(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -753,7 +753,7 @@ static bool api_netr_AccountDeltas(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -808,7 +808,7 @@ static bool api_netr_AccountDeltas(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -852,7 +852,7 @@ static bool api_netr_AccountSync(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -908,7 +908,7 @@ static bool api_netr_AccountSync(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_AccountSync, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -952,7 +952,7 @@ static bool api_netr_GetDcName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -988,7 +988,7 @@ static bool api_netr_GetDcName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_GetDcName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1032,7 +1032,7 @@ static bool api_netr_LogonControl(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1068,7 +1068,7 @@ static bool api_netr_LogonControl(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonControl, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1112,7 +1112,7 @@ static bool api_netr_GetAnyDCName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1148,7 +1148,7 @@ static bool api_netr_GetAnyDCName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1192,7 +1192,7 @@ static bool api_netr_LogonControl2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1228,7 +1228,7 @@ static bool api_netr_LogonControl2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonControl2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1272,7 +1272,7 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1309,7 +1309,7 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1353,7 +1353,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1391,7 +1391,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1435,7 +1435,7 @@ static bool api_netr_DatabaseRedo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1472,7 +1472,7 @@ static bool api_netr_DatabaseRedo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1516,7 +1516,7 @@ static bool api_netr_LogonControl2Ex(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1552,7 +1552,7 @@ static bool api_netr_LogonControl2Ex(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1596,7 +1596,7 @@ static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1632,7 +1632,7 @@ static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1676,7 +1676,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1712,7 +1712,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1756,7 +1756,7 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1785,7 +1785,7 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1829,7 +1829,7 @@ static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1858,7 +1858,7 @@ static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1902,7 +1902,7 @@ static bool api_netr_LogonGetTrustRid(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1938,7 +1938,7 @@ static bool api_netr_LogonGetTrustRid(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1982,7 +1982,7 @@ static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2011,7 +2011,7 @@ static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2055,7 +2055,7 @@ static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2084,7 +2084,7 @@ static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2128,7 +2128,7 @@ static bool api_netr_ServerAuthenticate3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2166,7 +2166,7 @@ static bool api_netr_ServerAuthenticate3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2210,7 +2210,7 @@ static bool api_netr_DsRGetDCNameEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2246,7 +2246,7 @@ static bool api_netr_DsRGetDCNameEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2290,7 +2290,7 @@ static bool api_netr_DsRGetSiteName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2326,7 +2326,7 @@ static bool api_netr_DsRGetSiteName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2370,7 +2370,7 @@ static bool api_netr_LogonGetDomainInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2407,7 +2407,7 @@ static bool api_netr_LogonGetDomainInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2451,7 +2451,7 @@ static bool api_netr_ServerPasswordSet2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2487,7 +2487,7 @@ static bool api_netr_ServerPasswordSet2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2531,7 +2531,7 @@ static bool api_netr_ServerPasswordGet(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2573,7 +2573,7 @@ static bool api_netr_ServerPasswordGet(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2617,7 +2617,7 @@ static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2646,7 +2646,7 @@ static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2690,7 +2690,7 @@ static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2726,7 +2726,7 @@ static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2770,7 +2770,7 @@ static bool api_netr_DsRGetDCNameEx2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2806,7 +2806,7 @@ static bool api_netr_DsRGetDCNameEx2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2850,7 +2850,7 @@ static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2879,7 +2879,7 @@ static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2923,7 +2923,7 @@ static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2959,7 +2959,7 @@ static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3003,7 +3003,7 @@ static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3039,7 +3039,7 @@ static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3083,7 +3083,7 @@ static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3119,7 +3119,7 @@ static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3163,7 +3163,7 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3206,7 +3206,7 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3250,7 +3250,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3286,7 +3286,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3330,7 +3330,7 @@ static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3359,7 +3359,7 @@ static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3403,7 +3403,7 @@ static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3451,7 +3451,7 @@ static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3495,7 +3495,7 @@ static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3531,7 +3531,7 @@ static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3575,7 +3575,7 @@ static bool api_netr_GetForestTrustInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3617,7 +3617,7 @@ static bool api_netr_GetForestTrustInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3661,7 +3661,7 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3705,7 +3705,7 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3749,7 +3749,7 @@ static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3778,7 +3778,7 @@ static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p) NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c index d21e86db6e..87f5d51695 100644 --- a/source3/librpc/gen_ndr/srv_ntsvcs.c +++ b/source3/librpc/gen_ndr/srv_ntsvcs.c @@ -27,7 +27,7 @@ static bool api_PNP_Disconnect(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -56,7 +56,7 @@ static bool api_PNP_Disconnect(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -100,7 +100,7 @@ static bool api_PNP_Connect(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -129,7 +129,7 @@ static bool api_PNP_Connect(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_Connect, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -173,7 +173,7 @@ static bool api_PNP_GetVersion(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -209,7 +209,7 @@ static bool api_PNP_GetVersion(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -253,7 +253,7 @@ static bool api_PNP_GetGlobalState(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -282,7 +282,7 @@ static bool api_PNP_GetGlobalState(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -326,7 +326,7 @@ static bool api_PNP_InitDetection(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -355,7 +355,7 @@ static bool api_PNP_InitDetection(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -399,7 +399,7 @@ static bool api_PNP_ReportLogOn(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -428,7 +428,7 @@ static bool api_PNP_ReportLogOn(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -472,7 +472,7 @@ static bool api_PNP_ValidateDeviceInstance(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -501,7 +501,7 @@ static bool api_PNP_ValidateDeviceInstance(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -545,7 +545,7 @@ static bool api_PNP_GetRootDeviceInstance(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -574,7 +574,7 @@ static bool api_PNP_GetRootDeviceInstance(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -618,7 +618,7 @@ static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -647,7 +647,7 @@ static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -691,7 +691,7 @@ static bool api_PNP_EnumerateSubKeys(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -720,7 +720,7 @@ static bool api_PNP_EnumerateSubKeys(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -764,7 +764,7 @@ static bool api_PNP_GetDeviceList(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -781,6 +781,14 @@ static bool api_PNP_GetDeviceList(pipes_struct *p) NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r); } + ZERO_STRUCT(r->out); + r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length); + if (r->out.buffer == NULL) { + talloc_free(r); + return false; + } + + r->out.length = r->in.length; r->out.result = _PNP_GetDeviceList(p, r); if (p->rng_fault_state) { @@ -793,7 +801,7 @@ static bool api_PNP_GetDeviceList(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -837,7 +845,7 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -873,7 +881,7 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -917,7 +925,7 @@ static bool api_PNP_GetDepth(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -946,7 +954,7 @@ static bool api_PNP_GetDepth(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -990,7 +998,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1008,7 +1016,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.unknown1 = r->in.unknown1; + r->out.reg_data_type = r->in.reg_data_type; r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size); if (r->out.buffer == NULL) { talloc_free(r); @@ -1029,7 +1037,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1073,7 +1081,7 @@ static bool api_PNP_SetDeviceRegProp(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1102,7 +1110,7 @@ static bool api_PNP_SetDeviceRegProp(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1146,7 +1154,7 @@ static bool api_PNP_GetClassInstance(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1175,7 +1183,7 @@ static bool api_PNP_GetClassInstance(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1219,7 +1227,7 @@ static bool api_PNP_CreateKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1248,7 +1256,7 @@ static bool api_PNP_CreateKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1292,7 +1300,7 @@ static bool api_PNP_DeleteRegistryKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1321,7 +1329,7 @@ static bool api_PNP_DeleteRegistryKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1365,7 +1373,7 @@ static bool api_PNP_GetClassCount(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1394,7 +1402,7 @@ static bool api_PNP_GetClassCount(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1438,7 +1446,7 @@ static bool api_PNP_GetClassName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1467,7 +1475,7 @@ static bool api_PNP_GetClassName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1511,7 +1519,7 @@ static bool api_PNP_DeleteClassKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1540,7 +1548,7 @@ static bool api_PNP_DeleteClassKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1584,7 +1592,7 @@ static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1613,7 +1621,7 @@ static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1657,7 +1665,7 @@ static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1686,7 +1694,7 @@ static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1730,7 +1738,7 @@ static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1759,7 +1767,7 @@ static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1803,7 +1811,7 @@ static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1832,7 +1840,7 @@ static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1876,7 +1884,7 @@ static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1905,7 +1913,7 @@ static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1949,7 +1957,7 @@ static bool api_PNP_GetClassRegProp(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1978,7 +1986,7 @@ static bool api_PNP_GetClassRegProp(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2022,7 +2030,7 @@ static bool api_PNP_SetClassRegProp(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2051,7 +2059,7 @@ static bool api_PNP_SetClassRegProp(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2095,7 +2103,7 @@ static bool api_PNP_CreateDevInst(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2124,7 +2132,7 @@ static bool api_PNP_CreateDevInst(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2168,7 +2176,7 @@ static bool api_PNP_DeviceInstanceAction(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2197,7 +2205,7 @@ static bool api_PNP_DeviceInstanceAction(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2241,7 +2249,7 @@ static bool api_PNP_GetDeviceStatus(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2270,7 +2278,7 @@ static bool api_PNP_GetDeviceStatus(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2314,7 +2322,7 @@ static bool api_PNP_SetDeviceProblem(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2343,7 +2351,7 @@ static bool api_PNP_SetDeviceProblem(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2387,7 +2395,7 @@ static bool api_PNP_DisableDevInst(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2416,7 +2424,7 @@ static bool api_PNP_DisableDevInst(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2460,7 +2468,7 @@ static bool api_PNP_UninstallDevInst(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2489,7 +2497,7 @@ static bool api_PNP_UninstallDevInst(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2533,7 +2541,7 @@ static bool api_PNP_AddID(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2562,7 +2570,7 @@ static bool api_PNP_AddID(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_AddID, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2606,7 +2614,7 @@ static bool api_PNP_RegisterDriver(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2635,7 +2643,7 @@ static bool api_PNP_RegisterDriver(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2679,7 +2687,7 @@ static bool api_PNP_QueryRemove(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2708,7 +2716,7 @@ static bool api_PNP_QueryRemove(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2752,7 +2760,7 @@ static bool api_PNP_RequestDeviceEject(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2781,7 +2789,7 @@ static bool api_PNP_RequestDeviceEject(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2825,7 +2833,7 @@ static bool api_PNP_IsDockStationPresent(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2854,7 +2862,7 @@ static bool api_PNP_IsDockStationPresent(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2898,7 +2906,7 @@ static bool api_PNP_RequestEjectPC(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2927,7 +2935,7 @@ static bool api_PNP_RequestEjectPC(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2971,7 +2979,7 @@ static bool api_PNP_HwProfFlags(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3009,7 +3017,7 @@ static bool api_PNP_HwProfFlags(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3053,7 +3061,7 @@ static bool api_PNP_GetHwProfInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3084,7 +3092,7 @@ static bool api_PNP_GetHwProfInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3128,7 +3136,7 @@ static bool api_PNP_AddEmptyLogConf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3157,7 +3165,7 @@ static bool api_PNP_AddEmptyLogConf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3201,7 +3209,7 @@ static bool api_PNP_FreeLogConf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3230,7 +3238,7 @@ static bool api_PNP_FreeLogConf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3274,7 +3282,7 @@ static bool api_PNP_GetFirstLogConf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3303,7 +3311,7 @@ static bool api_PNP_GetFirstLogConf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3347,7 +3355,7 @@ static bool api_PNP_GetNextLogConf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3376,7 +3384,7 @@ static bool api_PNP_GetNextLogConf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3420,7 +3428,7 @@ static bool api_PNP_GetLogConfPriority(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3449,7 +3457,7 @@ static bool api_PNP_GetLogConfPriority(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3493,7 +3501,7 @@ static bool api_PNP_AddResDes(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3522,7 +3530,7 @@ static bool api_PNP_AddResDes(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3566,7 +3574,7 @@ static bool api_PNP_FreeResDes(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3595,7 +3603,7 @@ static bool api_PNP_FreeResDes(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3639,7 +3647,7 @@ static bool api_PNP_GetNextResDes(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3668,7 +3676,7 @@ static bool api_PNP_GetNextResDes(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3712,7 +3720,7 @@ static bool api_PNP_GetResDesData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3741,7 +3749,7 @@ static bool api_PNP_GetResDesData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3785,7 +3793,7 @@ static bool api_PNP_GetResDesDataSize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3814,7 +3822,7 @@ static bool api_PNP_GetResDesDataSize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3858,7 +3866,7 @@ static bool api_PNP_ModifyResDes(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3887,7 +3895,7 @@ static bool api_PNP_ModifyResDes(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3931,7 +3939,7 @@ static bool api_PNP_DetectResourceLimit(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3960,7 +3968,7 @@ static bool api_PNP_DetectResourceLimit(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4004,7 +4012,7 @@ static bool api_PNP_QueryResConfList(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4033,7 +4041,7 @@ static bool api_PNP_QueryResConfList(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4077,7 +4085,7 @@ static bool api_PNP_SetHwProf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4106,7 +4114,7 @@ static bool api_PNP_SetHwProf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4150,7 +4158,7 @@ static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4179,7 +4187,7 @@ static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4223,7 +4231,7 @@ static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4252,7 +4260,7 @@ static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4296,7 +4304,7 @@ static bool api_PNP_RunDetection(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4325,7 +4333,7 @@ static bool api_PNP_RunDetection(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4369,7 +4377,7 @@ static bool api_PNP_RegisterNotification(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4398,7 +4406,7 @@ static bool api_PNP_RegisterNotification(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4442,7 +4450,7 @@ static bool api_PNP_UnregisterNotification(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4471,7 +4479,7 @@ static bool api_PNP_UnregisterNotification(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4515,7 +4523,7 @@ static bool api_PNP_GetCustomDevProp(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4544,7 +4552,7 @@ static bool api_PNP_GetCustomDevProp(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4588,7 +4596,7 @@ static bool api_PNP_GetVersionInternal(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4617,7 +4625,7 @@ static bool api_PNP_GetVersionInternal(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4661,7 +4669,7 @@ static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4690,7 +4698,7 @@ static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4734,7 +4742,7 @@ static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4763,7 +4771,7 @@ static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p) NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c index 1eaa19eaf7..e09c7a3faf 100644 --- a/source3/librpc/gen_ndr/srv_samr.c +++ b/source3/librpc/gen_ndr/srv_samr.c @@ -27,7 +27,7 @@ static bool api_samr_Connect(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_samr_Connect(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Connect, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_samr_Close(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -138,7 +138,7 @@ static bool api_samr_Close(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Close, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -182,7 +182,7 @@ static bool api_samr_SetSecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -211,7 +211,7 @@ static bool api_samr_SetSecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetSecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -255,7 +255,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -291,7 +291,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QuerySecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -335,7 +335,7 @@ static bool api_samr_Shutdown(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -364,7 +364,7 @@ static bool api_samr_Shutdown(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Shutdown, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -408,7 +408,7 @@ static bool api_samr_LookupDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -444,7 +444,7 @@ static bool api_samr_LookupDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_LookupDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -488,7 +488,7 @@ static bool api_samr_EnumDomains(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -531,7 +531,7 @@ static bool api_samr_EnumDomains(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_EnumDomains, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -575,7 +575,7 @@ static bool api_samr_OpenDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -611,7 +611,7 @@ static bool api_samr_OpenDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_OpenDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -655,7 +655,7 @@ static bool api_samr_QueryDomainInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -691,7 +691,7 @@ static bool api_samr_QueryDomainInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -735,7 +735,7 @@ static bool api_samr_SetDomainInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -764,7 +764,7 @@ static bool api_samr_SetDomainInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -808,7 +808,7 @@ static bool api_samr_CreateDomainGroup(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -850,7 +850,7 @@ static bool api_samr_CreateDomainGroup(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -894,7 +894,7 @@ static bool api_samr_EnumDomainGroups(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -937,7 +937,7 @@ static bool api_samr_EnumDomainGroups(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -981,7 +981,7 @@ static bool api_samr_CreateUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1023,7 +1023,7 @@ static bool api_samr_CreateUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_CreateUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1067,7 +1067,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1110,7 +1110,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1154,7 +1154,7 @@ static bool api_samr_CreateDomAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1196,7 +1196,7 @@ static bool api_samr_CreateDomAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1240,7 +1240,7 @@ static bool api_samr_EnumDomainAliases(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1283,7 +1283,7 @@ static bool api_samr_EnumDomainAliases(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1327,7 +1327,7 @@ static bool api_samr_GetAliasMembership(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1363,7 +1363,7 @@ static bool api_samr_GetAliasMembership(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetAliasMembership, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1407,7 +1407,7 @@ static bool api_samr_LookupNames(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1449,7 +1449,7 @@ static bool api_samr_LookupNames(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_LookupNames, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1493,7 +1493,7 @@ static bool api_samr_LookupRids(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1535,7 +1535,7 @@ static bool api_samr_LookupRids(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_LookupRids, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1579,7 +1579,7 @@ static bool api_samr_OpenGroup(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1615,7 +1615,7 @@ static bool api_samr_OpenGroup(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_OpenGroup, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1659,7 +1659,7 @@ static bool api_samr_QueryGroupInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1695,7 +1695,7 @@ static bool api_samr_QueryGroupInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryGroupInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1739,7 +1739,7 @@ static bool api_samr_SetGroupInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1768,7 +1768,7 @@ static bool api_samr_SetGroupInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1812,7 +1812,7 @@ static bool api_samr_AddGroupMember(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1841,7 +1841,7 @@ static bool api_samr_AddGroupMember(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_AddGroupMember, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1885,7 +1885,7 @@ static bool api_samr_DeleteDomainGroup(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1916,7 +1916,7 @@ static bool api_samr_DeleteDomainGroup(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1960,7 +1960,7 @@ static bool api_samr_DeleteGroupMember(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1989,7 +1989,7 @@ static bool api_samr_DeleteGroupMember(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2033,7 +2033,7 @@ static bool api_samr_QueryGroupMember(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2069,7 +2069,7 @@ static bool api_samr_QueryGroupMember(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryGroupMember, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2113,7 +2113,7 @@ static bool api_samr_SetMemberAttributesOfGroup(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2142,7 +2142,7 @@ static bool api_samr_SetMemberAttributesOfGroup(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2186,7 +2186,7 @@ static bool api_samr_OpenAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2222,7 +2222,7 @@ static bool api_samr_OpenAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_OpenAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2266,7 +2266,7 @@ static bool api_samr_QueryAliasInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2302,7 +2302,7 @@ static bool api_samr_QueryAliasInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryAliasInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2346,7 +2346,7 @@ static bool api_samr_SetAliasInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2375,7 +2375,7 @@ static bool api_samr_SetAliasInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2419,7 +2419,7 @@ static bool api_samr_DeleteDomAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2450,7 +2450,7 @@ static bool api_samr_DeleteDomAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2494,7 +2494,7 @@ static bool api_samr_AddAliasMember(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2523,7 +2523,7 @@ static bool api_samr_AddAliasMember(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_AddAliasMember, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2567,7 +2567,7 @@ static bool api_samr_DeleteAliasMember(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2596,7 +2596,7 @@ static bool api_samr_DeleteAliasMember(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2640,7 +2640,7 @@ static bool api_samr_GetMembersInAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2676,7 +2676,7 @@ static bool api_samr_GetMembersInAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetMembersInAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2720,7 +2720,7 @@ static bool api_samr_OpenUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2756,7 +2756,7 @@ static bool api_samr_OpenUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_OpenUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2800,7 +2800,7 @@ static bool api_samr_DeleteUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2831,7 +2831,7 @@ static bool api_samr_DeleteUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_DeleteUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2875,7 +2875,7 @@ static bool api_samr_QueryUserInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2911,7 +2911,7 @@ static bool api_samr_QueryUserInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2955,7 +2955,7 @@ static bool api_samr_SetUserInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2984,7 +2984,7 @@ static bool api_samr_SetUserInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetUserInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3028,7 +3028,7 @@ static bool api_samr_ChangePasswordUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3057,7 +3057,7 @@ static bool api_samr_ChangePasswordUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3101,7 +3101,7 @@ static bool api_samr_GetGroupsForUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3137,7 +3137,7 @@ static bool api_samr_GetGroupsForUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetGroupsForUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3181,7 +3181,7 @@ static bool api_samr_QueryDisplayInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3229,7 +3229,7 @@ static bool api_samr_QueryDisplayInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3273,7 +3273,7 @@ static bool api_samr_GetDisplayEnumerationIndex(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3309,7 +3309,7 @@ static bool api_samr_GetDisplayEnumerationIndex(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3353,7 +3353,7 @@ static bool api_samr_TestPrivateFunctionsDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3382,7 +3382,7 @@ static bool api_samr_TestPrivateFunctionsDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3426,7 +3426,7 @@ static bool api_samr_TestPrivateFunctionsUser(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3455,7 +3455,7 @@ static bool api_samr_TestPrivateFunctionsUser(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3499,7 +3499,7 @@ static bool api_samr_GetUserPwInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3535,7 +3535,7 @@ static bool api_samr_GetUserPwInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetUserPwInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3579,7 +3579,7 @@ static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3608,7 +3608,7 @@ static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3652,7 +3652,7 @@ static bool api_samr_QueryDomainInfo2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3688,7 +3688,7 @@ static bool api_samr_QueryDomainInfo2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3732,7 +3732,7 @@ static bool api_samr_QueryUserInfo2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3768,7 +3768,7 @@ static bool api_samr_QueryUserInfo2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3812,7 +3812,7 @@ static bool api_samr_QueryDisplayInfo2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3860,7 +3860,7 @@ static bool api_samr_QueryDisplayInfo2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3904,7 +3904,7 @@ static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3940,7 +3940,7 @@ static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3984,7 +3984,7 @@ static bool api_samr_CreateUser2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4032,7 +4032,7 @@ static bool api_samr_CreateUser2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_CreateUser2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4076,7 +4076,7 @@ static bool api_samr_QueryDisplayInfo3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4124,7 +4124,7 @@ static bool api_samr_QueryDisplayInfo3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4168,7 +4168,7 @@ static bool api_samr_AddMultipleMembersToAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4197,7 +4197,7 @@ static bool api_samr_AddMultipleMembersToAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4241,7 +4241,7 @@ static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4270,7 +4270,7 @@ static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4314,7 +4314,7 @@ static bool api_samr_OemChangePasswordUser2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4343,7 +4343,7 @@ static bool api_samr_OemChangePasswordUser2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4387,7 +4387,7 @@ static bool api_samr_ChangePasswordUser2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4416,7 +4416,7 @@ static bool api_samr_ChangePasswordUser2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4460,7 +4460,7 @@ static bool api_samr_GetDomPwInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4496,7 +4496,7 @@ static bool api_samr_GetDomPwInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetDomPwInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4540,7 +4540,7 @@ static bool api_samr_Connect2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4576,7 +4576,7 @@ static bool api_samr_Connect2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Connect2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4620,7 +4620,7 @@ static bool api_samr_SetUserInfo2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4649,7 +4649,7 @@ static bool api_samr_SetUserInfo2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4693,7 +4693,7 @@ static bool api_samr_SetBootKeyInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4722,7 +4722,7 @@ static bool api_samr_SetBootKeyInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4766,7 +4766,7 @@ static bool api_samr_GetBootKeyInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4802,7 +4802,7 @@ static bool api_samr_GetBootKeyInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4846,7 +4846,7 @@ static bool api_samr_Connect3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4882,7 +4882,7 @@ static bool api_samr_Connect3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Connect3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4926,7 +4926,7 @@ static bool api_samr_Connect4(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4962,7 +4962,7 @@ static bool api_samr_Connect4(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Connect4, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5006,7 +5006,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5048,7 +5048,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5092,7 +5092,7 @@ static bool api_samr_Connect5(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5140,7 +5140,7 @@ static bool api_samr_Connect5(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_Connect5, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5184,7 +5184,7 @@ static bool api_samr_RidToSid(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5220,7 +5220,7 @@ static bool api_samr_RidToSid(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_RidToSid, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5264,7 +5264,7 @@ static bool api_samr_SetDsrmPassword(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5293,7 +5293,7 @@ static bool api_samr_SetDsrmPassword(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -5337,7 +5337,7 @@ static bool api_samr_ValidatePassword(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -5373,7 +5373,7 @@ static bool api_samr_ValidatePassword(pipes_struct *p) NDR_PRINT_OUT_DEBUG(samr_ValidatePassword, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c index 66faaaaf7e..57d5239971 100644 --- a/source3/librpc/gen_ndr/srv_srvsvc.c +++ b/source3/librpc/gen_ndr/srv_srvsvc.c @@ -27,7 +27,7 @@ static bool api_srvsvc_NetCharDevEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -66,7 +66,7 @@ static bool api_srvsvc_NetCharDevEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -110,7 +110,7 @@ static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -146,7 +146,7 @@ static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -190,7 +190,7 @@ static bool api_srvsvc_NetCharDevControl(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -219,7 +219,7 @@ static bool api_srvsvc_NetCharDevControl(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -263,7 +263,7 @@ static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -302,7 +302,7 @@ static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -346,7 +346,7 @@ static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -382,7 +382,7 @@ static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -426,7 +426,7 @@ static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -457,7 +457,7 @@ static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -501,7 +501,7 @@ static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -530,7 +530,7 @@ static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -574,7 +574,7 @@ static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -603,7 +603,7 @@ static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -647,7 +647,7 @@ static bool api_srvsvc_NetConnEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -685,7 +685,7 @@ static bool api_srvsvc_NetConnEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -729,7 +729,7 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -767,7 +767,7 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -811,7 +811,7 @@ static bool api_srvsvc_NetFileGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -847,7 +847,7 @@ static bool api_srvsvc_NetFileGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -891,7 +891,7 @@ static bool api_srvsvc_NetFileClose(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -920,7 +920,7 @@ static bool api_srvsvc_NetFileClose(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -964,7 +964,7 @@ static bool api_srvsvc_NetSessEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1002,7 +1002,7 @@ static bool api_srvsvc_NetSessEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1046,7 +1046,7 @@ static bool api_srvsvc_NetSessDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1075,7 +1075,7 @@ static bool api_srvsvc_NetSessDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1119,7 +1119,7 @@ static bool api_srvsvc_NetShareAdd(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1150,7 +1150,7 @@ static bool api_srvsvc_NetShareAdd(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1194,7 +1194,7 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1232,7 +1232,7 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1276,7 +1276,7 @@ static bool api_srvsvc_NetShareGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1312,7 +1312,7 @@ static bool api_srvsvc_NetShareGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1356,7 +1356,7 @@ static bool api_srvsvc_NetShareSetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1387,7 +1387,7 @@ static bool api_srvsvc_NetShareSetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1431,7 +1431,7 @@ static bool api_srvsvc_NetShareDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1460,7 +1460,7 @@ static bool api_srvsvc_NetShareDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1504,7 +1504,7 @@ static bool api_srvsvc_NetShareDelSticky(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1533,7 +1533,7 @@ static bool api_srvsvc_NetShareDelSticky(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1577,7 +1577,7 @@ static bool api_srvsvc_NetShareCheck(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1613,7 +1613,7 @@ static bool api_srvsvc_NetShareCheck(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1657,7 +1657,7 @@ static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1693,7 +1693,7 @@ static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1737,7 +1737,7 @@ static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1768,7 +1768,7 @@ static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1812,7 +1812,7 @@ static bool api_srvsvc_NetDiskEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1850,7 +1850,7 @@ static bool api_srvsvc_NetDiskEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1894,7 +1894,7 @@ static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1930,7 +1930,7 @@ static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1974,7 +1974,7 @@ static bool api_srvsvc_NetTransportAdd(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2003,7 +2003,7 @@ static bool api_srvsvc_NetTransportAdd(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2047,7 +2047,7 @@ static bool api_srvsvc_NetTransportEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2086,7 +2086,7 @@ static bool api_srvsvc_NetTransportEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2130,7 +2130,7 @@ static bool api_srvsvc_NetTransportDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2159,7 +2159,7 @@ static bool api_srvsvc_NetTransportDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2203,7 +2203,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2239,7 +2239,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2283,7 +2283,7 @@ static bool api_srvsvc_NetSetServiceBits(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2312,7 +2312,7 @@ static bool api_srvsvc_NetSetServiceBits(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2356,7 +2356,7 @@ static bool api_srvsvc_NetPathType(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2392,7 +2392,7 @@ static bool api_srvsvc_NetPathType(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2436,7 +2436,7 @@ static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2473,7 +2473,7 @@ static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2517,7 +2517,7 @@ static bool api_srvsvc_NetPathCompare(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2546,7 +2546,7 @@ static bool api_srvsvc_NetPathCompare(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2590,7 +2590,7 @@ static bool api_srvsvc_NetNameValidate(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2619,7 +2619,7 @@ static bool api_srvsvc_NetNameValidate(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2663,7 +2663,7 @@ static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2692,7 +2692,7 @@ static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2736,7 +2736,7 @@ static bool api_srvsvc_NetPRNameCompare(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2765,7 +2765,7 @@ static bool api_srvsvc_NetPRNameCompare(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2809,7 +2809,7 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2847,7 +2847,7 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2891,7 +2891,7 @@ static bool api_srvsvc_NetShareDelStart(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2927,7 +2927,7 @@ static bool api_srvsvc_NetShareDelStart(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2971,7 +2971,7 @@ static bool api_srvsvc_NetShareDelCommit(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3002,7 +3002,7 @@ static bool api_srvsvc_NetShareDelCommit(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3046,7 +3046,7 @@ static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3082,7 +3082,7 @@ static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3126,7 +3126,7 @@ static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3155,7 +3155,7 @@ static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3199,7 +3199,7 @@ static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3228,7 +3228,7 @@ static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3272,7 +3272,7 @@ static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3301,7 +3301,7 @@ static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3345,7 +3345,7 @@ static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3374,7 +3374,7 @@ static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3418,7 +3418,7 @@ static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3447,7 +3447,7 @@ static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3491,7 +3491,7 @@ static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3520,7 +3520,7 @@ static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3564,7 +3564,7 @@ static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3593,7 +3593,7 @@ static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3637,7 +3637,7 @@ static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3666,7 +3666,7 @@ static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3710,7 +3710,7 @@ static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3739,7 +3739,7 @@ static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3783,7 +3783,7 @@ static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3812,7 +3812,7 @@ static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3856,7 +3856,7 @@ static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3885,7 +3885,7 @@ static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3929,7 +3929,7 @@ static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3958,7 +3958,7 @@ static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4002,7 +4002,7 @@ static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4031,7 +4031,7 @@ static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -4075,7 +4075,7 @@ static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -4104,7 +4104,7 @@ static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p) NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index 32317ad8fe..2349b4fd93 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -27,7 +27,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -58,7 +58,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -102,7 +102,7 @@ static bool api_svcctl_ControlService(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -138,7 +138,7 @@ static bool api_svcctl_ControlService(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_ControlService, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -182,7 +182,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -211,7 +211,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -255,7 +255,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -291,7 +291,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -335,7 +335,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -377,7 +377,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -421,7 +421,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -450,7 +450,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -494,7 +494,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -530,7 +530,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -574,7 +574,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -603,7 +603,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -647,7 +647,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -678,7 +678,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -722,7 +722,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -751,7 +751,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -795,7 +795,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -824,7 +824,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -868,7 +868,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -904,7 +904,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -948,7 +948,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -985,7 +985,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1029,7 +1029,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1077,7 +1077,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1121,7 +1121,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1170,7 +1170,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1214,7 +1214,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1250,7 +1250,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1294,7 +1294,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1330,7 +1330,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1374,7 +1374,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1392,7 +1392,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size); + r->out.query = talloc_zero(r, struct QUERY_SERVICE_CONFIG); if (r->out.query == NULL) { talloc_free(r); return false; @@ -1416,7 +1416,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1460,7 +1460,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1502,7 +1502,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1546,7 +1546,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1575,7 +1575,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1619,7 +1619,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1656,7 +1656,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1700,7 +1700,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1737,7 +1737,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1781,7 +1781,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1810,7 +1810,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1854,7 +1854,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1890,7 +1890,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1934,7 +1934,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1970,7 +1970,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2014,7 +2014,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2062,7 +2062,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2106,7 +2106,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2155,7 +2155,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2199,7 +2199,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2235,7 +2235,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2279,7 +2279,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2308,7 +2308,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2352,7 +2352,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2394,7 +2394,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2438,7 +2438,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2480,7 +2480,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2524,7 +2524,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2553,7 +2553,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2597,7 +2597,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2634,7 +2634,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2678,7 +2678,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2715,7 +2715,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2759,7 +2759,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2788,7 +2788,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2832,7 +2832,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2861,7 +2861,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2905,7 +2905,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2934,7 +2934,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2978,7 +2978,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3007,7 +3007,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3051,7 +3051,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3093,7 +3093,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3137,7 +3137,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3179,7 +3179,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3223,7 +3223,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3265,7 +3265,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3309,7 +3309,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3364,7 +3364,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3408,7 +3408,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3463,7 +3463,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -3507,7 +3507,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -3536,7 +3536,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p) NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c index c697f44d2a..77b0a1c5d2 100644 --- a/source3/librpc/gen_ndr/srv_winreg.c +++ b/source3/librpc/gen_ndr/srv_winreg.c @@ -27,7 +27,7 @@ static bool api_winreg_OpenHKCR(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_winreg_OpenHKCR(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_winreg_OpenHKCU(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -143,7 +143,7 @@ static bool api_winreg_OpenHKCU(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -187,7 +187,7 @@ static bool api_winreg_OpenHKLM(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -223,7 +223,7 @@ static bool api_winreg_OpenHKLM(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -267,7 +267,7 @@ static bool api_winreg_OpenHKPD(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -303,7 +303,7 @@ static bool api_winreg_OpenHKPD(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -347,7 +347,7 @@ static bool api_winreg_OpenHKU(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -383,7 +383,7 @@ static bool api_winreg_OpenHKU(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -427,7 +427,7 @@ static bool api_winreg_CloseKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -458,7 +458,7 @@ static bool api_winreg_CloseKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_CloseKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -502,7 +502,7 @@ static bool api_winreg_CreateKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -539,7 +539,7 @@ static bool api_winreg_CreateKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_CreateKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -583,7 +583,7 @@ static bool api_winreg_DeleteKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -612,7 +612,7 @@ static bool api_winreg_DeleteKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -656,7 +656,7 @@ static bool api_winreg_DeleteValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -685,7 +685,7 @@ static bool api_winreg_DeleteValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -729,7 +729,7 @@ static bool api_winreg_EnumKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -762,7 +762,7 @@ static bool api_winreg_EnumKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_EnumKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -806,7 +806,7 @@ static bool api_winreg_EnumValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -841,7 +841,7 @@ static bool api_winreg_EnumValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_EnumValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -885,7 +885,7 @@ static bool api_winreg_FlushKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -914,7 +914,7 @@ static bool api_winreg_FlushKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_FlushKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -958,7 +958,7 @@ static bool api_winreg_GetKeySecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -989,7 +989,7 @@ static bool api_winreg_GetKeySecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1033,7 +1033,7 @@ static bool api_winreg_LoadKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1062,7 +1062,7 @@ static bool api_winreg_LoadKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_LoadKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1106,7 +1106,7 @@ static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1135,7 +1135,7 @@ static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1179,7 +1179,7 @@ static bool api_winreg_OpenKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1215,7 +1215,7 @@ static bool api_winreg_OpenKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1259,7 +1259,7 @@ static bool api_winreg_QueryInfoKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1338,7 +1338,7 @@ static bool api_winreg_QueryInfoKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1382,7 +1382,7 @@ static bool api_winreg_QueryValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1403,7 +1403,7 @@ static bool api_winreg_QueryValue(pipes_struct *p) r->out.type = r->in.type; r->out.data = r->in.data; r->out.data_size = r->in.data_size; - r->out.value_length = r->in.value_length; + r->out.data_length = r->in.data_length; r->out.result = _winreg_QueryValue(p, r); if (p->rng_fault_state) { @@ -1416,7 +1416,7 @@ static bool api_winreg_QueryValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_QueryValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1460,7 +1460,7 @@ static bool api_winreg_ReplaceKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1489,7 +1489,7 @@ static bool api_winreg_ReplaceKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1533,7 +1533,7 @@ static bool api_winreg_RestoreKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1562,7 +1562,7 @@ static bool api_winreg_RestoreKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1606,7 +1606,7 @@ static bool api_winreg_SaveKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1635,7 +1635,7 @@ static bool api_winreg_SaveKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_SaveKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1679,7 +1679,7 @@ static bool api_winreg_SetKeySecurity(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1708,7 +1708,7 @@ static bool api_winreg_SetKeySecurity(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1752,7 +1752,7 @@ static bool api_winreg_SetValue(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1781,7 +1781,7 @@ static bool api_winreg_SetValue(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_SetValue, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1825,7 +1825,7 @@ static bool api_winreg_UnLoadKey(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1854,7 +1854,7 @@ static bool api_winreg_UnLoadKey(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1898,7 +1898,7 @@ static bool api_winreg_InitiateSystemShutdown(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1927,7 +1927,7 @@ static bool api_winreg_InitiateSystemShutdown(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1971,7 +1971,7 @@ static bool api_winreg_AbortSystemShutdown(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2000,7 +2000,7 @@ static bool api_winreg_AbortSystemShutdown(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2044,7 +2044,7 @@ static bool api_winreg_GetVersion(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2080,7 +2080,7 @@ static bool api_winreg_GetVersion(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_GetVersion, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2124,7 +2124,7 @@ static bool api_winreg_OpenHKCC(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2160,7 +2160,7 @@ static bool api_winreg_OpenHKCC(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2204,7 +2204,7 @@ static bool api_winreg_OpenHKDD(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2240,7 +2240,7 @@ static bool api_winreg_OpenHKDD(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2284,7 +2284,7 @@ static bool api_winreg_QueryMultipleValues(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2317,7 +2317,7 @@ static bool api_winreg_QueryMultipleValues(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2361,7 +2361,7 @@ static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2390,7 +2390,7 @@ static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2434,7 +2434,7 @@ static bool api_winreg_SaveKeyEx(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2463,7 +2463,7 @@ static bool api_winreg_SaveKeyEx(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2507,7 +2507,7 @@ static bool api_winreg_OpenHKPT(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2543,7 +2543,7 @@ static bool api_winreg_OpenHKPT(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2587,7 +2587,7 @@ static bool api_winreg_OpenHKPN(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2623,7 +2623,7 @@ static bool api_winreg_OpenHKPN(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2667,7 +2667,7 @@ static bool api_winreg_QueryMultipleValues2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2696,7 +2696,7 @@ static bool api_winreg_QueryMultipleValues2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c index 227e4c1a48..9c07fa86ea 100644 --- a/source3/librpc/gen_ndr/srv_wkssvc.c +++ b/source3/librpc/gen_ndr/srv_wkssvc.c @@ -27,7 +27,7 @@ static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -63,7 +63,7 @@ static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -107,7 +107,7 @@ static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -138,7 +138,7 @@ static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -182,7 +182,7 @@ static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -220,7 +220,7 @@ static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -264,7 +264,7 @@ static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -300,7 +300,7 @@ static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -344,7 +344,7 @@ static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -375,7 +375,7 @@ static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -419,7 +419,7 @@ static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -457,7 +457,7 @@ static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -501,7 +501,7 @@ static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -532,7 +532,7 @@ static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -576,7 +576,7 @@ static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -605,7 +605,7 @@ static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -649,7 +649,7 @@ static bool api_wkssvc_NetrUseAdd(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -680,7 +680,7 @@ static bool api_wkssvc_NetrUseAdd(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -724,7 +724,7 @@ static bool api_wkssvc_NetrUseGetInfo(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -760,7 +760,7 @@ static bool api_wkssvc_NetrUseGetInfo(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -804,7 +804,7 @@ static bool api_wkssvc_NetrUseDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -833,7 +833,7 @@ static bool api_wkssvc_NetrUseDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -877,7 +877,7 @@ static bool api_wkssvc_NetrUseEnum(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -915,7 +915,7 @@ static bool api_wkssvc_NetrUseEnum(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -959,7 +959,7 @@ static bool api_wkssvc_NetrMessageBufferSend(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -988,7 +988,7 @@ static bool api_wkssvc_NetrMessageBufferSend(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1032,7 +1032,7 @@ static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1068,7 +1068,7 @@ static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1112,7 +1112,7 @@ static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1141,7 +1141,7 @@ static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1185,7 +1185,7 @@ static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1214,7 +1214,7 @@ static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1258,7 +1258,7 @@ static bool api_wkssvc_NetrJoinDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1287,7 +1287,7 @@ static bool api_wkssvc_NetrJoinDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1331,7 +1331,7 @@ static bool api_wkssvc_NetrUnjoinDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1360,7 +1360,7 @@ static bool api_wkssvc_NetrUnjoinDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1404,7 +1404,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1433,7 +1433,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1477,7 +1477,7 @@ static bool api_wkssvc_NetrValidateName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1506,7 +1506,7 @@ static bool api_wkssvc_NetrValidateName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1550,7 +1550,7 @@ static bool api_wkssvc_NetrGetJoinInformation(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1587,7 +1587,7 @@ static bool api_wkssvc_NetrGetJoinInformation(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1631,7 +1631,7 @@ static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1668,7 +1668,7 @@ static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1712,7 +1712,7 @@ static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1741,7 +1741,7 @@ static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1785,7 +1785,7 @@ static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1814,7 +1814,7 @@ static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1858,7 +1858,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1887,7 +1887,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -1931,7 +1931,7 @@ static bool api_wkssvc_NetrValidateName2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -1960,7 +1960,7 @@ static bool api_wkssvc_NetrValidateName2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2004,7 +2004,7 @@ static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2041,7 +2041,7 @@ static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2085,7 +2085,7 @@ static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2114,7 +2114,7 @@ static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2158,7 +2158,7 @@ static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2187,7 +2187,7 @@ static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2231,7 +2231,7 @@ static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2260,7 +2260,7 @@ static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; @@ -2304,7 +2304,7 @@ static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct *p) return false; } - pull = ndr_pull_init_blob(&blob, r); + pull = ndr_pull_init_blob(&blob, r, NULL); if (pull == NULL) { talloc_free(r); return false; @@ -2340,7 +2340,7 @@ static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct *p) NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, r); } - push = ndr_push_init_ctx(r); + push = ndr_push_init_ctx(r, NULL); if (push == NULL) { talloc_free(r); return false; diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h index d4135d2ddb..42ed039784 100644 --- a/source3/librpc/gen_ndr/svcctl.h +++ b/source3/librpc/gen_ndr/svcctl.h @@ -2,6 +2,7 @@ #include <stdint.h> +#include "librpc/gen_ndr/misc.h" #ifndef _HEADER_svcctl #define _HEADER_svcctl @@ -98,6 +99,18 @@ enum SERVICE_CONTROL #define SC_RIGHT_SVC_INTERROGATE ( 0x0080 ) #define SC_RIGHT_SVC_USER_DEFINED_CONTROL ( 0x0100 ) +struct QUERY_SERVICE_CONFIG { + uint32_t service_type; + uint32_t start_type; + uint32_t error_control; + const char *executablepath;/* [unique,range(0,8192),charset(UTF16)] */ + const char *loadordergroup;/* [unique,range(0,8192),charset(UTF16)] */ + uint32_t tag_id; + const char *dependencies;/* [unique,range(0,8192),charset(UTF16)] */ + const char *startname;/* [unique,range(0,8192),charset(UTF16)] */ + const char *displayname;/* [unique,range(0,8192),charset(UTF16)] */ +}/* [gensize,public] */; + struct svcctl_CloseServiceHandle { struct { @@ -359,12 +372,12 @@ struct svcctl_OpenServiceW { struct svcctl_QueryServiceConfigW { struct { struct policy_handle *handle;/* [ref] */ - uint32_t buf_size; + uint32_t buf_size;/* [range(0,8192)] */ } in; struct { - uint8_t *query; - uint32_t *bytes_needed;/* [ref] */ + struct QUERY_SERVICE_CONFIG *query;/* [ref] */ + uint32_t *bytes_needed;/* [ref,range(0,8192)] */ WERROR result; } out; diff --git a/source3/librpc/gen_ndr/tables.c b/source3/librpc/gen_ndr/tables.c new file mode 100644 index 0000000000..f2064d95ac --- /dev/null +++ b/source3/librpc/gen_ndr/tables.c @@ -0,0 +1,83 @@ + +/* Automatically generated by tables.pl. DO NOT EDIT */ + +#include "includes.h" +#include "librpc/ndr/libndr.h" +#include "librpc/ndr/ndr_table.h" +#include "librpc/gen_ndr/ndr_dfs.h" +#include "librpc/gen_ndr/ndr_drsblobs.h" +#include "librpc/gen_ndr/ndr_drsuapi.h" +#include "librpc/gen_ndr/ndr_dssetup.h" +#include "librpc/gen_ndr/ndr_echo.h" +#include "librpc/gen_ndr/ndr_epmapper.h" +#include "librpc/gen_ndr/ndr_eventlog.h" +#include "librpc/gen_ndr/ndr_initshutdown.h" +#include "librpc/gen_ndr/ndr_krb5pac.h" +#include "librpc/gen_ndr/ndr_lsa.h" +#include "librpc/gen_ndr/ndr_netlogon.h" +#include "librpc/gen_ndr/ndr_ntsvcs.h" +#include "librpc/gen_ndr/ndr_samr.h" +#include "librpc/gen_ndr/ndr_srvsvc.h" +#include "librpc/gen_ndr/ndr_svcctl.h" +#include "librpc/gen_ndr/ndr_winreg.h" +#include "librpc/gen_ndr/ndr_wkssvc.h" + +NTSTATUS ndr_table_register_builtin_tables(void) +{ + NTSTATUS status; + + status = ndr_table_register(&ndr_table_netdfs); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_drsblobs); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_drsuapi); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_dssetup); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_rpcecho); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_epmapper); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_eventlog); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_initshutdown); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_krb5pac); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_lsarpc); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_netlogon); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_ntsvcs); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_samr); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_srvsvc); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_svcctl); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_winreg); + if (NT_STATUS_IS_ERR(status)) return status; + + status = ndr_table_register(&ndr_table_wkssvc); + if (NT_STATUS_IS_ERR(status)) return status; + + + + return NT_STATUS_OK; +} diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h index 4a06e3bc83..fbbab33c8d 100644 --- a/source3/librpc/gen_ndr/winreg.h +++ b/source3/librpc/gen_ndr/winreg.h @@ -3,7 +3,6 @@ #include <stdint.h> #include "librpc/gen_ndr/lsa.h" -#include "librpc/gen_ndr/initshutdown.h" #include "librpc/gen_ndr/security.h" #ifndef _HEADER_winreg #define _HEADER_winreg @@ -85,17 +84,17 @@ enum winreg_CreateAction ; struct winreg_StringBuf { - uint16_t length;/* [value(strlen_m_term_null(name)*2)] */ - uint16_t size; - const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */ -}; - -struct winreg_ValNameBuf { uint16_t length;/* [value(strlen_m_term(name)*2)] */ uint16_t size; const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */ }; +/* bitmap winreg_NotifyChangeType */ +#define REG_NOTIFY_CHANGE_NAME ( 0x00000001 ) +#define REG_NOTIFY_CHANGE_ATTRIBUTES ( 0x00000002 ) +#define REG_NOTIFY_CHANGE_LAST_SET ( 0x00000004 ) +#define REG_NOTIFY_CHANGE_SECURITY ( 0x00000008 ) + struct KeySecurityAttribute { uint32_t data_size; struct KeySecurityData sec_data; @@ -262,7 +261,7 @@ struct winreg_EnumValue { struct { struct policy_handle *handle;/* [ref] */ uint32_t enum_index; - struct winreg_ValNameBuf *name;/* [ref] */ + struct winreg_StringBuf *name;/* [ref] */ enum winreg_Type *type;/* [unique] */ uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */ uint32_t *size;/* [unique] */ @@ -270,7 +269,7 @@ struct winreg_EnumValue { } in; struct { - struct winreg_ValNameBuf *name;/* [ref] */ + struct winreg_StringBuf *name;/* [ref] */ enum winreg_Type *type;/* [unique] */ uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */ uint32_t *size;/* [unique] */ @@ -383,16 +382,16 @@ struct winreg_QueryValue { struct policy_handle *handle;/* [ref] */ struct winreg_String *value_name;/* [ref] */ enum winreg_Type *type;/* [unique] */ - uint8_t *data;/* [unique,length_is(*value_length),size_is(*data_size)] */ + uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */ uint32_t *data_size;/* [unique] */ - uint32_t *value_length;/* [unique] */ + uint32_t *data_length;/* [unique] */ } in; struct { enum winreg_Type *type;/* [unique] */ - uint8_t *data;/* [unique,length_is(*value_length),size_is(*data_size)] */ + uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */ uint32_t *data_size;/* [unique] */ - uint32_t *value_length;/* [unique] */ + uint32_t *data_length;/* [unique] */ WERROR result; } out; @@ -438,7 +437,7 @@ struct winreg_SaveKey { struct winreg_SetKeySecurity { struct { struct policy_handle *handle;/* [ref] */ - uint32_t access_mask; + uint32_t sec_info; struct KeySecurityData *sd;/* [ref] */ } in; @@ -476,7 +475,7 @@ struct winreg_UnLoadKey { struct winreg_InitiateSystemShutdown { struct { uint16_t *hostname;/* [unique] */ - struct initshutdown_String *message;/* [unique] */ + struct lsa_StringLarge *message;/* [unique] */ uint32_t timeout; uint8_t force_apps; uint8_t do_reboot; @@ -564,7 +563,7 @@ struct winreg_QueryMultipleValues { struct winreg_InitiateSystemShutdownEx { struct { uint16_t *hostname;/* [unique] */ - struct initshutdown_String *message;/* [unique] */ + struct lsa_StringLarge *message;/* [unique] */ uint32_t timeout; uint8_t force_apps; uint8_t do_reboot; diff --git a/source3/librpc/gen_ndr/xattr.h b/source3/librpc/gen_ndr/xattr.h index b0b9db99c1..1d8da3f5e2 100644 --- a/source3/librpc/gen_ndr/xattr.h +++ b/source3/librpc/gen_ndr/xattr.h @@ -2,18 +2,75 @@ #include <stdint.h> +#include "librpc/gen_ndr/security.h" #ifndef _HEADER_xattr #define _HEADER_xattr +#define XATTR_DOSATTRIB_NAME ( "user.DosAttrib" ) +#define XATTR_DOSATTRIB_ESTIMATED_SIZE ( 64 ) +#define XATTR_DOSEAS_NAME ( "user.DosEAs" ) +#define XATTR_DOSSTREAMS_NAME ( "user.DosStreams" ) +#define XATTR_STREAM_FLAG_INTERNAL ( 0x00000001 ) +#define XATTR_DOSSTREAM_PREFIX ( "user.DosStream." ) +#define XATTR_MAX_STREAM_SIZE ( 0x4000 ) +#define XATTR_MAX_STREAM_SIZE_TDB ( 0x100000 ) #define XATTR_NTACL_NAME ( "security.NTACL" ) -struct tdb_xattr { +struct xattr_DosInfo1 { + uint32_t attrib; + uint32_t ea_size; + uint64_t size; + uint64_t alloc_size; + NTTIME create_time; + NTTIME change_time; +}; + +struct xattr_DosInfo2Old { + uint32_t flags; + uint32_t attrib; + uint32_t ea_size; + uint64_t size; + uint64_t alloc_size; + NTTIME create_time; + NTTIME change_time; + NTTIME write_time; + const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */ +}; + +union xattr_DosInfo { + struct xattr_DosInfo1 info1;/* [case] */ + struct xattr_DosInfo2Old oldinfo2;/* [case(2)] */ +}/* [switch_type(uint16)] */; + +struct xattr_DosAttrib { + uint16_t version; + union xattr_DosInfo info;/* [switch_is(version)] */ +}/* [public] */; + +struct xattr_EA { const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */ DATA_BLOB value; +}; + +struct xattr_DosEAs { + uint16_t num_eas; + struct xattr_EA *eas;/* [unique,size_is(num_eas)] */ }/* [public] */; struct tdb_xattrs { - uint32_t num_xattrs; - struct tdb_xattr *xattrs; + uint32_t num_eas; + struct xattr_EA *eas; +}/* [public] */; + +struct xattr_DosStream { + uint32_t flags; + uint64_t size; + uint64_t alloc_size; + const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */ +}; + +struct xattr_DosStreams { + uint32_t num_streams; + struct xattr_DosStream *streams;/* [unique,size_is(num_streams)] */ }/* [public] */; struct security_descriptor_timestamp { |