diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-21 14:51:13 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-21 14:51:13 +0200 |
commit | 5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch) | |
tree | b0a7e52b5646c8eec182dbc391e7934b6804488c /source3/librpc | |
parent | 625359b2e266105022309df8985720108ecd6f67 (diff) | |
parent | 2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff) | |
download | samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2 samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts:
source4/lib/registry/ldb.c
source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source3/librpc')
122 files changed, 7540 insertions, 19275 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 { diff --git a/source3/librpc/idl/dfs.idl b/source3/librpc/idl/dfs.idl deleted file mode 100644 index a729b0e560..0000000000 --- a/source3/librpc/idl/dfs.idl +++ /dev/null @@ -1,417 +0,0 @@ -/* - dfs interface definition -*/ - -[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"), - version(3.0), - pointer_default(unique), - helpstring("Settings for Microsoft Distributed File System"), - endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:") -] interface netdfs -{ - /******************/ - /* Function: 0x00 */ - typedef [v1_enum] enum { - DFS_MANAGER_VERSION_NT4 = 1, - DFS_MANAGER_VERSION_W2K = 2, - DFS_MANAGER_VERSION_W2K3 = 4, - DFS_MANAGER_VERSION_W2K8 = 6 - } dfs_ManagerVersion; - - [public] void dfs_GetManagerVersion( - [out] dfs_ManagerVersion *version - ); - - - /******************/ - /* Function: 0x01 */ - WERROR dfs_Add ( - [in] [string,charset(UTF16)] uint16 *path, - [in] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *share, - [in,unique] [string,charset(UTF16)] uint16 *comment, - [in] uint32 flags - ); - - /******************/ - /* Function: 0x02 */ - WERROR dfs_Remove ( - [in] [string,charset(UTF16)] uint16 *dfs_entry_path, - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename - ); - - /******************/ - /* Function: 0x03 */ - - typedef struct { - } dfs_Info0; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - } dfs_Info1; - - typedef [public,bitmap32bit] bitmap { - DFS_VOLUME_STATE_OK = 0x1, - DFS_VOLUME_STATE_INCONSISTENT = 0x2, - DFS_VOLUME_STATE_OFFLINE = 0x3, - DFS_VOLUME_STATE_ONLINE = 0x4, - DFS_VOLUME_STATE_STANDALONE = DFS_VOLUME_FLAVOR_STANDALONE, - DFS_VOLUME_STATE_AD_BLOB = DFS_VOLUME_FLAVOR_AD_BLOB - } dfs_VolumeState; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 num_stores; - } dfs_Info2; - - const int DFS_STORAGE_STATES = 0xf; - - /* yes, this is a bitmap */ - typedef [public,bitmap32bit] bitmap { - DFS_STORAGE_STATE_OFFLINE = 1, - DFS_STORAGE_STATE_ONLINE = 2, - DFS_STORAGE_STATE_ACTIVE = 4 - } dfs_StorageState; - - typedef struct { - dfs_StorageState state; - [string,charset(UTF16)] uint16 *server; - [string,charset(UTF16)] uint16 *share; - } dfs_StorageInfo; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 num_stores; - [size_is(num_stores)] dfs_StorageInfo *stores; - } dfs_Info3; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - uint32 num_stores; - [size_is(num_stores)] dfs_StorageInfo *stores; - } dfs_Info4; - - /* verified with dfsutil */ - typedef [public,bitmap32bit] bitmap { - DFS_PROPERTY_FLAG_INSITE_REFERRALS = 0x01, - DFS_PROPERTY_FLAG_ROOT_SCALABILITY = 0x02, - DFS_PROPERTY_FLAG_SITE_COSTING = 0x04, - DFS_PROPERTY_FLAG_TARGET_FAILBACK = 0x08, - DFS_PROPERTY_FLAG_CLUSTER_ENABLED = 0x10 /* untested */ - } dfs_PropertyFlags; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - dfs_PropertyFlags flags; - uint32 pktsize; - uint32 num_stores; - } dfs_Info5; - - typedef [v1_enum] enum { - DFS_INVALID_PRIORITY_CLASS = -1, - DFS_SITE_COST_NORMAL_PRIORITY_CLASS = 0, - DFS_GLOBAL_HIGH_PRIORITY_CLASS = 1, - DFS_SITE_COST_HIGH_PRIORITY_CLASS = 2, - DFS_SITE_COST_LOW_PRIORITY_CLASS = 3, - DFS_GLOBAL_LOW_PRIORITY_CLASS = 4 - } dfs_Target_PriorityClass; - - typedef struct { - dfs_Target_PriorityClass target_priority_class; - uint16 target_priority_rank; - uint16 reserved; - } dfs_Target_Priority; - - typedef struct { - dfs_StorageInfo info; - dfs_Target_Priority target_priority; - } dfs_StorageInfo2; - - typedef struct { - [string,charset(UTF16)] uint16 *entry_path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - dfs_PropertyFlags flags; - uint32 pktsize; - uint16 num_stores; - [size_is(num_stores)] dfs_StorageInfo2 *stores; - } dfs_Info6; - - typedef struct { - GUID generation_guid; - } dfs_Info7; - - typedef struct { - [string,charset(UTF16)] uint16 *comment; - } dfs_Info100; - - typedef struct { - dfs_StorageState state; - } dfs_Info101; - - typedef struct { - uint32 timeout; - } dfs_Info102; - - typedef struct { - dfs_PropertyFlags flags; - } dfs_Info103; - - typedef struct { - dfs_Target_Priority priority; - } dfs_Info104; - - typedef struct { - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - uint32 property_flag_mask; - uint32 property_flags; - } dfs_Info105; - - typedef struct { - dfs_StorageState state; - dfs_Target_Priority priority; - } dfs_Info106; - - typedef struct { - [string,charset(UTF16)] uint16 *dom_root; - } dfs_Info200; - - typedef enum { - DFS_VOLUME_FLAVOR_STANDALONE = 0x100, - DFS_VOLUME_FLAVOR_AD_BLOB = 0x200 - } dfs_VolumeFlavor; - - typedef struct { - dfs_VolumeFlavor flavor; - [string,charset(UTF16)] uint16 *dom_root; - } dfs_Info300; - - typedef union { - [case(0)] dfs_Info0 *info0; - [case(1)] dfs_Info1 *info1; - [case(2)] dfs_Info2 *info2; - [case(3)] dfs_Info3 *info3; - [case(4)] dfs_Info4 *info4; - [case(5)] dfs_Info5 *info5; - [case(6)] dfs_Info6 *info6; - [case(7)] dfs_Info7 *info7; - [case(100)] dfs_Info100 *info100; - [case(101)] dfs_Info101 *info101; - [case(102)] dfs_Info102 *info102; - [case(103)] dfs_Info103 *info103; - [case(104)] dfs_Info104 *info104; - [case(105)] dfs_Info105 *info105; - [case(106)] dfs_Info106 *info106; - } dfs_Info; - - WERROR dfs_SetInfo ( - [in] [string,charset(UTF16)] uint16 dfs_entry_path[], - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename, - [in] uint32 level, - [in,ref,switch_is(level)] dfs_Info *info - ); - - /******************/ - /* Function: 0x04 */ - WERROR dfs_GetInfo ( - [in] [string,charset(UTF16)] uint16 dfs_entry_path[], - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename, - [in] uint32 level, - [out,switch_is(level)] dfs_Info *info - ); - - /******************/ - /* Function: 0x05 */ - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info1 *s; - } dfs_EnumArray1; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info2 *s; - } dfs_EnumArray2; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info3 *s; - } dfs_EnumArray3; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info4 *s; - } dfs_EnumArray4; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info5 *s; - } dfs_EnumArray5; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info6 *s; - } dfs_EnumArray6; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info200 *s; - } dfs_EnumArray200; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info300 *s; - } dfs_EnumArray300; - - - typedef union { - [case(1)] dfs_EnumArray1 *info1; - [case(2)] dfs_EnumArray2 *info2; - [case(3)] dfs_EnumArray3 *info3; - [case(4)] dfs_EnumArray4 *info4; - [case(5)] dfs_EnumArray5 *info5; - [case(6)] dfs_EnumArray6 *info6; - [case(200)] dfs_EnumArray200 *info200; - [case(300)] dfs_EnumArray300 *info300; - } dfs_EnumInfo; - - typedef struct { - uint32 level; - [switch_is(level)] dfs_EnumInfo e; - } dfs_EnumStruct; - - WERROR dfs_Enum ( - [in] uint32 level, - [in] uint32 bufsize, - [in,out,unique] dfs_EnumStruct *info, - [in,out,unique] uint32 *total - ); - - /* Function 0x06 */ - WERROR dfs_Rename(); - - /* Function 0x07 */ - WERROR dfs_Move(); - - /* Function 0x08 */ - WERROR dfs_ManagerGetConfigInfo(); - - /* Function 0x09 */ - WERROR dfs_ManagerSendSiteInfo(); - - /* Function 0x0a */ - typedef struct { - uint32 unknown1; - [string,charset(UTF16)] uint16 *unknown2; - } dfs_UnknownStruct; - - WERROR dfs_AddFtRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 dns_servername[], - [in] [string,charset(UTF16)] uint16 dfsname[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] [string,charset(UTF16)] uint16 dfs_config_dn[], - [in] uint8 unknown1, - [in] uint32 flags, - [in,out,unique] dfs_UnknownStruct **unknown2 - ); - - /* Function 0x0b */ - WERROR dfs_RemoveFtRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 dns_servername[], - [in] [string,charset(UTF16)] uint16 dfsname[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] uint32 flags, - [in,out,unique] dfs_UnknownStruct **unknown - ); - - /* Function 0x0c */ - WERROR dfs_AddStdRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] uint32 flags - ); - - /* Function 0x0d */ - WERROR dfs_RemoveStdRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] uint32 flags - ); - - /* Function 0x0e */ - WERROR dfs_ManagerInitialize( - [in] [string,charset(UTF16)] uint16 *servername, - [in] uint32 flags - ); - - /* Function 0x0f */ - WERROR dfs_AddStdRootForced( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] [string,charset(UTF16)] uint16 store[] /* C:\\whatever */ - ); - - /* Function 0x10 */ - WERROR dfs_GetDcAddress( - [in] [string,charset(UTF16)] uint16 servername[], - [in,out,ref] [string,charset(UTF16)] uint16 **server_fullname, - [in,out,ref] boolean8 *is_root, - [in,out,ref] uint32 *ttl - ); - - /* Function 0x11 */ - WERROR dfs_SetDcAddress( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 server_fullname[], - [in] uint32 flags, - [in] uint32 ttl - ); - - /* Function 0x12 */ - WERROR dfs_FlushFtTable( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[] - ); - - /* Function 0x13 */ - WERROR dfs_Add2(); - - /* Function 0x14 */ - WERROR dfs_Remove2(); - - /* Function 0x15 */ - [public] WERROR dfs_EnumEx( - [in] [string,charset(UTF16)] uint16 dfs_name[], - [in] uint32 level, - [in] uint32 bufsize, - [in,out,unique] dfs_EnumStruct *info, - [in,out,unique] uint32 *total - ); - - /* Function 0x16 */ - WERROR dfs_SetInfo2(); -} diff --git a/source3/librpc/idl/drsblobs.idl b/source3/librpc/idl/drsblobs.idl deleted file mode 100644 index 6fdca0ec43..0000000000 --- a/source3/librpc/idl/drsblobs.idl +++ /dev/null @@ -1,436 +0,0 @@ -#include "idl_types.h" - -import "drsuapi.idl", "misc.idl"; - -[ - uuid("12345778-1234-abcd-0001-00000001"), - version(0.0), - pointer_default(unique), - helpstring("Active Directory Replication LDAP Blobs") -] -interface drsblobs { - typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions; - typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags; - typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId; - - /* - * replPropertyMetaData - * w2k uses version 1 - * w2k3 uses version 1 - */ - typedef struct { - drsuapi_DsAttributeId attid; - uint32 version; - NTTIME_1sec originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - hyper local_usn; - } replPropertyMetaData1; - - typedef struct { - uint32 count; - uint32 reserved; - replPropertyMetaData1 array[count]; - } replPropertyMetaDataCtr1; - - typedef [nodiscriminant] union { - [case(1)] replPropertyMetaDataCtr1 ctr1; - } replPropertyMetaDataCtr; - - typedef [public] struct { - uint32 version; - uint32 reserved; - [switch_is(version)] replPropertyMetaDataCtr ctr; - } replPropertyMetaDataBlob; - - void decode_replPropertyMetaData( - [in] replPropertyMetaDataBlob blob - ); - - /* - * replUpToDateVector - * w2k uses version 1 - * w2k3 uses version 2 - */ - typedef struct { - uint32 count; - uint32 reserved; - drsuapi_DsReplicaCursor cursors[count]; - } replUpToDateVectorCtr1; - - typedef struct { - uint32 count; - uint32 reserved; - drsuapi_DsReplicaCursor2 cursors[count]; - } replUpToDateVectorCtr2; - - typedef [nodiscriminant] union { - [case(1)] replUpToDateVectorCtr1 ctr1; - [case(2)] replUpToDateVectorCtr2 ctr2; - } replUpToDateVectorCtr; - - typedef [public] struct { - uint32 version; - uint32 reserved; - [switch_is(version)] replUpToDateVectorCtr ctr; - } replUpToDateVectorBlob; - - void decode_replUpToDateVector( - [in] replUpToDateVectorBlob blob - ); - - /* - * repsFrom/repsTo - * w2k uses version 1 - * w2k3 uses version 1 - */ - typedef [public,gensize] struct { - [value(strlen(dns_name)+1)] uint32 __dns_name_size; - [charset(DOS)] uint8 dns_name[__dns_name_size]; - } repsFromTo1OtherInfo; - - typedef [public,gensize,flag(NDR_PAHEX)] struct { - /* this includes the 8 bytes of the repsFromToBlob header */ - [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize; - uint32 consecutive_sync_failures; - NTTIME_1sec last_success; - NTTIME_1sec last_attempt; - WERROR result_last_attempt; - [relative] repsFromTo1OtherInfo *other_info; - [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length; - drsuapi_DsReplicaNeighbourFlags replica_flags; - uint8 schedule[84]; - uint32 reserved; - drsuapi_DsReplicaHighWaterMark highwatermark; - GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */ - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - GUID transport_guid; - } repsFromTo1; - - typedef [nodiscriminant] union { - [case(1)] repsFromTo1 ctr1; - } repsFromTo; - - typedef [public] struct { - uint32 version; - uint32 reserved; - [switch_is(version)] repsFromTo ctr; - } repsFromToBlob; - - void decode_repsFromTo( - [in] repsFromToBlob blob - ); - - /* - * partialAttributeSet - * w2k uses version 1 - * w2k3 uses version 1 - */ - typedef struct { - uint32 count; - drsuapi_DsAttributeId array[count]; - } partialAttributeSetCtr1; - - typedef [nodiscriminant] union { - [case(1)] partialAttributeSetCtr1 ctr1; - } partialAttributeSetCtr; - - typedef [public] struct { - uint32 version; - uint32 reserved; - [switch_is(version)] partialAttributeSetCtr ctr; - } partialAttributeSetBlob; - - void decode_partialAttributeSet( - [in] partialAttributeSetBlob blob - ); - - /* - * prefixMap - * w2k unknown - * w2k3 unknown - * samba4 uses 0x44534442 'DSDB' - * - * as we windows don't return the prefixMap attribute when you ask for - * we don't know the format, but the attribute is not replicated - * so that we can choose our own format... - */ - typedef [v1_enum] enum { - PREFIX_MAP_VERSION_DSDB = 0x44534442 - } prefixMapVersion; - - typedef [nodiscriminant] union { - [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb; - } prefixMapCtr; - - typedef [public] struct { - prefixMapVersion version; - uint32 reserved; - [switch_is(version)] prefixMapCtr ctr; - } prefixMapBlob; - - void decode_prefixMap( - [in] prefixMapBlob blob - ); - - /* - * the cookie for the LDAP dirsync control - */ - typedef [nodiscriminant,gensize] union { - [case(0)]; - [default] replUpToDateVectorBlob uptodateness_vector; - } ldapControlDirSyncExtra; - - typedef struct { - [value(3)] uint32 u1; - NTTIME time; - uint32 u2; - uint32 u3; - [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))] - uint32 extra_length; - drsuapi_DsReplicaHighWaterMark highwatermark; - GUID guid1; - [switch_is(extra_length)] ldapControlDirSyncExtra extra; - } ldapControlDirSyncBlob; - - typedef [public,relative_base] struct { - [charset(DOS),value("MSDS")] uint8 msds[4]; - [subcontext(0)] ldapControlDirSyncBlob blob; - } ldapControlDirSyncCookie; - - void decode_ldapControlDirSync( - [in] ldapControlDirSyncCookie cookie - ); - - typedef struct { - [value(2*strlen_m(name))] uint16 name_len; - [value(strlen(data))] uint16 data_len; - uint16 reserved; /* 2 for 'Packages', 1 for 'Primary:*', but should be ignored */ - [charset(UTF16)] uint8 name[name_len]; - /* - * the data field contains data as HEX strings - * - * 'Packages': - * data contains the list of packages - * as non termiated UTF16 strings with - * a UTF16 NULL byte as separator - * - * 'Primary:Kerberos-Newer-Keys': - * ... - * - * 'Primary:Kerberos': - * ... - * - * 'Primary:WDigest': - * ... - * - * 'Primary:CLEARTEXT': - * data contains the cleartext password - * as UTF16 string encoded as HEX string - */ - [charset(DOS)] uint8 data[data_len]; - } supplementalCredentialsPackage; - - /* this are 0x30 (48) whitespaces (0x20) */ - const string SUPPLEMENTAL_CREDENTIALS_PREFIX = " "; - - typedef [flag(NDR_PAHEX)] enum { - SUPPLEMENTAL_CREDENTIALS_SIGNATURE = 0x0050 - } supplementalCredentialsSignature; - - typedef [gensize] struct { - [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x30]; - [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] supplementalCredentialsSignature signature; - uint16 num_packages; - supplementalCredentialsPackage packages[num_packages]; - } supplementalCredentialsSubBlob; - - typedef [public] struct { - [value(0)] uint32 unknown1; - [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size; - [value(0)] uint32 unknown2; - [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub; - [value(0)] uint8 unknown3; - } supplementalCredentialsBlob; - - void decode_supplementalCredentials( - [in] supplementalCredentialsBlob blob - ); - - typedef [public] struct { - [flag(STR_NOTERM|NDR_REMAINING)] string_array names; - } package_PackagesBlob; - - void decode_Packages( - [in] package_PackagesBlob blob - ); - - typedef struct { - [value(2*strlen_m(string))] uint16 length; - [value(2*strlen_m(string))] uint16 size; - [relative,subcontext(0),subcontext_size(size),flag(STR_NOTERM|NDR_REMAINING)] string *string; - } package_PrimaryKerberosString; - - typedef struct { - [value(0)] uint16 reserved1; - [value(0)] uint16 reserved2; - [value(0)] uint32 reserved3; - uint32 keytype; - [value((value?value->length:0))] uint32 value_len; - [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value; - } package_PrimaryKerberosKey3; - - typedef struct { - uint16 num_keys; - uint16 num_old_keys; - package_PrimaryKerberosString salt; - package_PrimaryKerberosKey3 keys[num_keys]; - package_PrimaryKerberosKey3 old_keys[num_old_keys]; - [value(0)] uint32 padding1; - [value(0)] uint32 padding2; - [value(0)] uint32 padding3; - [value(0)] uint32 padding4; - [value(0)] uint32 padding5; - } package_PrimaryKerberosCtr3; - - typedef struct { - [value(0)] uint16 reserved1; - [value(0)] uint16 reserved2; - [value(0)] uint32 reserved3; - uint32 iteration_count; - uint32 keytype; - [value((value?value->length:0))] uint32 value_len; - [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value; - } package_PrimaryKerberosKey4; - - typedef struct { - uint16 num_keys; - [value(0)] uint16 num_service_keys; - uint16 num_old_keys; - uint16 num_older_keys; - package_PrimaryKerberosString salt; - uint32 default_iteration_count; - package_PrimaryKerberosKey4 keys[num_keys]; - package_PrimaryKerberosKey4 service_keys[num_service_keys]; - package_PrimaryKerberosKey4 old_keys[num_old_keys]; - package_PrimaryKerberosKey4 older_keys[num_older_keys]; - } package_PrimaryKerberosCtr4; - - typedef [nodiscriminant] union { - [case(3)] package_PrimaryKerberosCtr3 ctr3; - [case(4)] package_PrimaryKerberosCtr4 ctr4; - } package_PrimaryKerberosCtr; - - typedef [public] struct { - uint16 version; - [value(0)] uint16 flags; - [switch_is(version)] package_PrimaryKerberosCtr ctr; - } package_PrimaryKerberosBlob; - - void decode_PrimaryKerberos( - [in] package_PrimaryKerberosBlob blob - ); - - typedef [public] struct { - [flag(STR_NOTERM|NDR_REMAINING)] string cleartext; - } package_PrimaryCLEARTEXTBlob; - - void decode_PrimaryCLEARTEXT( - [in] package_PrimaryCLEARTEXTBlob blob - ); - - typedef [flag(NDR_PAHEX)] struct { - uint8 hash[16]; - } package_PrimaryWDigestHash; - - typedef [public] struct { - [value(0x31)] uint16 unknown1; - [value(0x01)] uint8 unknown2; - uint8 num_hashes; - [value(0)] uint32 unknown3; - [value(0)] udlong uuknown4; - package_PrimaryWDigestHash hashes[num_hashes]; - } package_PrimaryWDigestBlob; - - void decode_PrimaryWDigest( - [in] package_PrimaryWDigestBlob blob - ); - - typedef struct { - NTTIME time1; - uint32 unknown1; - /* - * the secret value is encoded as UTF16 if it's a string - * but krb5 trusts have random bytes here, so converting to UTF16 - * mayfail... - * - * TODO: We should try handle the case of a random buffer in all places - * we deal with cleartext passwords from windows - * - * so we don't use this: - * - * uint32 value_len; - * [charset(UTF16)] uint8 value[value_len]; - */ - DATA_BLOB value; - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - } trustAuthInOutSecret1; - - typedef struct { - [relative] trustAuthInOutSecret1 *value1; - [relative] trustAuthInOutSecret1 *value2; - } trustAuthInOutCtr1; - - typedef struct { - NTTIME time1; - uint32 unknown1; - DATA_BLOB value; - NTTIME time2; - uint32 unknown2; - uint32 unknown3; - uint32 unknown4; - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - } trustAuthInOutSecret2V1; - - typedef struct { - NTTIME time1; - uint32 unknown1; - DATA_BLOB value; - NTTIME time2; - uint32 unknown2; - uint32 unknown3; - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - } trustAuthInOutSecret2V2; - - typedef struct { - [relative] trustAuthInOutSecret2V1 *value1; - [relative] trustAuthInOutSecret2V2 *value2; - } trustAuthInOutCtr2; - - typedef [nodiscriminant] union { - [case(1)] trustAuthInOutCtr1 ctr1; - [case(2)] trustAuthInOutCtr2 ctr2; - } trustAuthInOutCtr; - - typedef [public] struct { - uint32 version; - [switch_is(version)] trustAuthInOutCtr ctr; - } trustAuthInOutBlob; - - void decode_trustAuthInOut( - [in] trustAuthInOutBlob blob - ); - - typedef [public] struct { - uint32 marker; - DATA_BLOB data; - } DsCompressedChunk; - - typedef [public] struct { - DsCompressedChunk chunks[5]; - } DsCompressedBlob; - - void decode_DsCompressed( - [in] DsCompressedBlob blob - ); -} diff --git a/source3/librpc/idl/drsuapi.idl b/source3/librpc/idl/drsuapi.idl deleted file mode 100644 index 56dd483054..0000000000 --- a/source3/librpc/idl/drsuapi.idl +++ /dev/null @@ -1,1601 +0,0 @@ -#include "idl_types.h" - -import "security.idl", "misc.idl", "samr.idl"; - -[ - uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"), - version(4.0), - endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"), - authservice("ldap"), - helpstring("Active Directory Replication"), - helper("librpc/ndr/ndr_drsuapi.h"), - pointer_default(unique) -] -interface drsuapi -{ - typedef bitmap samr_GroupAttrs samr_GroupAttrs; - - /*****************/ - /* Function 0x00 */ - typedef [bitmap32bit] bitmap { - DRSUAPI_SUPPORTED_EXTENSION_BASE = 0x00000001, - DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION = 0x00000002, - DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI = 0x00000004, - DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2 = 0x00000008, - DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS = 0x00000010, - DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1 = 0x00000020, - DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION = 0x00000040, - DRSUAPI_SUPPORTED_EXTENSION_00000080 = 0x00000080, - DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE = 0x00000100, - DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2 = 0x00000200, - DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION = 0x00000400, - DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2 = 0x00000800, - DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD= 0x00001000, - DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND = 0x00002000, - DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO = 0x00004000, - DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION = 0x00008000, - DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01 = 0x00010000, - DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP = 0x00020000, - DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY = 0x00040000, - DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3 = 0x00080000, - DRSUAPI_SUPPORTED_EXTENSION_00100000 = 0x00100000, - DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2 = 0x00200000, - DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6 = 0x00400000, - DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS = 0x00800000, - DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8 = 0x01000000, - DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5 = 0x02000000, - DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6 = 0x04000000, - /* - * the following 3 have the same value - * repadmin.exe /bind says that - */ - DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3 = 0x08000000, - DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7 = 0x08000000, - DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT = 0x08000000, - DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS = 0x10000000, - DRSUAPI_SUPPORTED_EXTENSION_20000000 = 0x20000000, - DRSUAPI_SUPPORTED_EXTENSION_40000000 = 0x40000000, - DRSUAPI_SUPPORTED_EXTENSION_80000000 = 0x80000000 - } drsuapi_SupportedExtensions; - - typedef [bitmap32bit] bitmap { - DRSUAPI_SUPPORTED_EXTENSION_ADAM = 0x00000001, - DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2 = 0x00000002 - } drsuapi_SupportedExtensionsExt; - - /* this is used by w2k */ - typedef struct { - drsuapi_SupportedExtensions supported_extensions; - GUID site_guid; - uint32 pid; - } drsuapi_DsBindInfo24; - - /* this is used by w2k3 */ - typedef struct { - drsuapi_SupportedExtensions supported_extensions; - GUID site_guid; - uint32 pid; - uint32 repl_epoch; - } drsuapi_DsBindInfo28; - - /* this is used by w2k8 */ - typedef struct { - drsuapi_SupportedExtensions supported_extensions; - GUID site_guid; - uint32 pid; - uint32 repl_epoch; - drsuapi_SupportedExtensionsExt supported_extensions_ext; - GUID config_dn_guid; - } drsuapi_DsBindInfo48; - - typedef struct { - [flag(NDR_REMAINING)] DATA_BLOB info; - } drsuapi_DsBindInfoFallBack; - - typedef [nodiscriminant] union { - [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24; - [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28; - [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48; - [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack; - } drsuapi_DsBindInfo; - - /* the drsuapi_DsBindInfoCtr was this before - * typedef [flag(NDR_PAHEX)] struct { - * [range(1,10000)] uint32 length; - * [size_is(length)] uint8 data[]; - * } drsuapi_DsBindInfo; - * - * but we don't want the caller to manually decode this blob, - * so we're doing it here - */ - - typedef struct { - [range(1,10000)] uint32 length; - [switch_is(length)] drsuapi_DsBindInfo info; - } drsuapi_DsBindInfoCtr; - - /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work - * - * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04 - */ - const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d"; - /* - * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges() - * as administrator and this values are also used in the destination_dsa_guid field - * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero. - */ - const char *DRSUAPI_DS_BIND_GUID_W2K = "6abec3d1-3054-41c8-a362-5a0c5b7d5d71"; - const char *DRSUAPI_DS_BIND_GUID_W2K3 = "6afab99c-6e26-464a-975f-f58f105218bc"; - - [public] WERROR drsuapi_DsBind( - [in,unique] GUID *bind_guid, - [in,out,unique] drsuapi_DsBindInfoCtr *bind_info, - [out] policy_handle *bind_handle - ); - - /*****************/ - /* Function 0x01 */ - WERROR drsuapi_DsUnbind( - [in,out] policy_handle *bind_handle - ); - - /*****************/ - /* Function 0x02 */ - typedef [public,gensize] struct { - [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size; - [value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid; - GUID guid; - dom_sid28 sid; - [value(strlen_m(dn))] uint32 __ndr_size_dn; - [charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[]; - } drsuapi_DsReplicaObjectIdentifier; - - typedef [public] bitmap { - DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_SYNC_WRITEABLE = 0x00000002, - DRSUAPI_DS_REPLICA_SYNC_PERIODIC = 0x00000004, - DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING = 0x00000008, - DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES = 0x00000010, - DRSUAPI_DS_REPLICA_SYNC_FULL = 0x00000020, - DRSUAPI_DS_REPLICA_SYNC_URGENT = 0x00000040, - DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD = 0x00000080, - DRSUAPI_DS_REPLICA_SYNC_FORCE = 0x00000100, - DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE = 0x00000200, - DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED = 0x00000400, - DRSUAPI_DS_REPLICA_SYNC_TWO_WAY = 0x00000800, - DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY = 0x00001000, - DRSUAPI_DS_REPLICA_SYNC_INITIAL = 0x00002000, - DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION = 0x00004000, - DRSUAPI_DS_REPLICA_SYNC_ABANDONED = 0x00008000, - DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS = 0x00010000, - DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET = 0x00020000, - DRSUAPI_DS_REPLICA_SYNC_REQUEUE = 0x00040000, - DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION = 0x00080000, - DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA = 0x00100000, - DRSUAPI_DS_REPLICA_SYNC_CRITICAL = 0x00200000, - DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS = 0x00400000, - DRSUAPI_DS_REPLICA_SYNC_PREEMPTED = 0x00800000 - } drsuapi_DsReplicaSyncOptions; - - typedef struct { - drsuapi_DsReplicaObjectIdentifier *naming_context; - GUID source_dsa_guid; - astring *other_info; /* I assume this is related to the repsFromTo1OtherInfo dns_name */ - drsuapi_DsReplicaSyncOptions options; - } drsuapi_DsReplicaSyncRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsReplicaSyncRequest1 req1; - } drsuapi_DsReplicaSyncRequest; - - WERROR drsuapi_DsReplicaSync( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,switch_is(level)] drsuapi_DsReplicaSyncRequest req - ); - - /*****************/ - /* Function 0x03 */ - typedef [public] struct { - hyper tmp_highest_usn; /* updated after each object update */ - hyper reserved_usn; - hyper highest_usn; /* updated after a full replication cycle */ - } drsuapi_DsReplicaHighWaterMark; - - typedef [public] struct { - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - hyper highest_usn; /* updated after a full replication cycle */ - } drsuapi_DsReplicaCursor; - - typedef struct { - [value(1)] uint32 version; - [value(0)] uint32 reserved1; - [range(0,0x100000)] uint32 count; - [value(0)] uint32 reserved2; - [size_is(count)] drsuapi_DsReplicaCursor cursors[]; - } drsuapi_DsReplicaCursorCtrEx; - - typedef [public] bitmap { - /* the _WRITEABLE flag indicates a replication with all attributes - * - * --metze - */ - DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE = 0x00000010, - DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP = 0x00000020, - DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS = 0x00000040, - DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT = 0x00000080, - DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC = 0x00000200, - DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS = 0x00000800, - DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS = 0x00001000, /* was 0x00010000, */ - DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET = 0x00002000, /* was 0x00020000, */ - DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED = 0x00200000, - DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED = 0x01000000, - DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS = 0x04000000, - DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC = 0x08000000, - /* - * the following NOTE applies to DsGetNCChangesRequest5: - * - the data is only compressed when 10 or more objects are replicated - * - but there could also be a size limit of 35 KBytes or something like that - * - the reply is DsGetNCChangesCtr2 - * - maybe the same applies to DsGetNCChangesRequest8... - * - * --metze - */ - DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES = 0x10000000, - DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS = 0x20000000, - DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET = 0x40000000 - } drsuapi_DsReplicaNeighbourFlags; - - typedef [flag(NDR_PAHEX),v1_enum] enum { - DRSUAPI_EXOP_NONE = 0x00000000, - DRSUAPI_EXOP_FSMO_REQ_ROLE = 0x00000001, - DRSUAPI_EXOP_FSMO_RID_ALLOC = 0x00000002, - DRSUAPI_EXOP_FSMO_RID_REQ_ROLE = 0x00000003, - DRSUAPI_EXOP_FSMO_REQ_PDC = 0x00000004, - DRSUAPI_EXOP_FSMO_ABANDON_ROLE = 0x00000005, - DRSUAPI_EXOP_REPL_OBJ = 0x00000006, - DRSUAPI_EXOP_REPL_SECRET = 0x00000007 - } drsuapi_DsExtendedOperation; - - typedef [flag(NDR_PAHEX),v1_enum] enum { - DRSUAPI_EXOP_ERR_NONE = 0x00000000, - DRSUAPI_EXOP_ERR_SUCCESS = 0x00000001, - DRSUAPI_EXOP_ERR_UNKNOWN_OP = 0x00000002, - DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER = 0x00000003, - DRSUAPI_EXOP_ERR_UPDATE_ERR = 0x00000004, - DRSUAPI_EXOP_ERR_EXCEPTION = 0x00000005, - DRSUAPI_EXOP_ERR_UNKNOWN_CALLER = 0x00000006, - DRSUAPI_EXOP_ERR_RID_ALLOC = 0x00000007, - DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED = 0x00000008, - DRSUAPI_EXOP_ERR_FMSO_PENDING_OP = 0x00000009, - DRSUAPI_EXOP_ERR_MISMATCH = 0x0000000A, - DRSUAPI_EXOP_ERR_COULDNT_CONTACT = 0x0000000B, - DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES = 0x0000000C, - DRSUAPI_EXOP_ERR_DIR_ERROR = 0x0000000D, - DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS = 0x0000000E, - DRSUAPI_EXOP_ERR_ACCESS_DENIED = 0x0000000F, - DRSUAPI_EXOP_ERR_PARAM_ERROR = 0x00000010 - } drsuapi_DsExtendedError; - - typedef struct { - GUID destination_dsa_guid; - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; - drsuapi_DsReplicaHighWaterMark highwatermark; - drsuapi_DsReplicaCursorCtrEx *uptodateness_vector; - drsuapi_DsReplicaNeighbourFlags replica_flags; - uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */ - uint32 max_ndr_size; /* w2k3 seems to ignore this */ - drsuapi_DsExtendedOperation extended_op; - hyper fsmo_info; - } drsuapi_DsGetNCChangesRequest5; - - /* - * In DRSUAPI all attributes with syntax 2.5.5.2 - * are identified by uint32 values - * - * the following table shows the mapping used between the two representations - * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47 - * and a UINT32-ID of '0x0017002F'. - * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a - * OID-prefix: 1.2.840.113556.1.5.7000 - * and a value: 47 => 0x2F - * - the mapping table gives a UINT32-prefix: 0x00170000 - * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F - * - * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr - * array. The following are the default mappings of w2k3 - * - * OID-prefix => UINT32-Id prefix - * - * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema) - * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema) - * 1.2.840.113556.1.2.* => 0x00020000 - * 1.2.840.113556.1.3.* => 0x00030000 - * 2.5.5.* => 0x00080000 (attributeSyntax OID's) - * 1.2.840.113556.1.4.* => 0x00090000 - * 1.2.840.113556.1.5.* => 0x000A0000 - * 2.16.840.1.113730.3.* => 0x00140000 - * 0.9.2342.19200300.100.1.* => 0x00150000 - * 2.16.840.1.113730.3.1.* => 0x00160000 - * 1.2.840.113556.1.5.7000.* => 0x00170000 - * 2.5.21.* => 0x00180000 (attrs for SubSchema) - * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema) - * 2.5.20.* => 0x001A0000 - * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL) - * 2.16.840.1.113730.3.2.* => 0x001C0000 - * 1.3.6.1.4.1.250.1.* => 0x001D0000 - * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName) - * 0.9.2342.19200300.100.4.* => 0x001F0000 - * - * Here's a list of used 'attributeSyntax' OID's - * - * 2.5.5.1 => Object(DS-DN) string - * struct drsuapi_DsObjectIdentifier3 - * - * 2.5.5.2 => OID-string - * => all values are represented as uint32 values in drsuapi - * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP - * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax - * are returned as attribute names - * - * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset - * - * 2.5.5.5 => String(IA5) case-sensitive string - * - * 2.5.5.6 => String(Numeric) - * => eg. internationalISDNNumber - * - * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN> - * => e.g. wellKnownObjects - * - * 2.5.5.8 => BOOL - * - * 2.5.5.9 => int32 - * - * 2.5.5.10 => DATA_BLOB - * => struct GUID - * - * 2.5.5.11 => LDAP timestring - * => NTTIME_1sec - * - * 2.5.5.12 => String(Unicode) case-insensitive string - * => 'standard strings' - * - * 2.5.5.13 => Object(Presentation-Address) string - * => used in objectClass applicationEntity - * - * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN> - * => not used - * - * 2.5.5.15 => ntSecurityDescriptor - * - * 2.5.5.16 => int64 - * - * 2.5.5.17 => dom_sid - */ - typedef [nopush,nopull] struct { - [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))] uint32 __ndr_size; - [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's encoded with asn1_write_OID_String() */ - } drsuapi_DsReplicaOID; - - typedef struct { - uint32 id_prefix; - drsuapi_DsReplicaOID oid; - } drsuapi_DsReplicaOIDMapping; - - typedef [public] struct { - [range(0,0x100000)] uint32 num_mappings; - [size_is(num_mappings)] drsuapi_DsReplicaOIDMapping *mappings; - } drsuapi_DsReplicaOIDMapping_Ctr; - - typedef [flag(NDR_PAHEX),v1_enum] enum { - DRSUAPI_OBJECTCLASS_top = 0x00010000, - DRSUAPI_OBJECTCLASS_classSchema = 0x0003000d, - DRSUAPI_OBJECTCLASS_attributeSchema = 0x0003000e - } drsuapi_DsObjectClassId; - - typedef [flag(NDR_PAHEX),v1_enum,public] enum { - DRSUAPI_ATTRIBUTE_objectClass = 0x00000000, - DRSUAPI_ATTRIBUTE_description = 0x0000000d, - DRSUAPI_ATTRIBUTE_member = 0x0000001f, - DRSUAPI_ATTRIBUTE_instanceType = 0x00020001, - DRSUAPI_ATTRIBUTE_whenCreated = 0x00020002, - DRSUAPI_ATTRIBUTE_hasMasterNCs = 0x0002000e, - DRSUAPI_ATTRIBUTE_governsID = 0x00020016, - DRSUAPI_ATTRIBUTE_attributeID = 0x0002001e, - DRSUAPI_ATTRIBUTE_attributeSyntax = 0x00020020, - DRSUAPI_ATTRIBUTE_isSingleValued = 0x00020021, - DRSUAPI_ATTRIBUTE_rangeLower = 0x00020022, - DRSUAPI_ATTRIBUTE_rangeUpper = 0x00020023, - DRSUAPI_ATTRIBUTE_dMDLocation = 0x00020024, - DRSUAPI_ATTRIBUTE_objectVersion = 0x0002004c, - DRSUAPI_ATTRIBUTE_invocationId = 0x00020073, - DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly = 0x000200a9, - DRSUAPI_ATTRIBUTE_adminDisplayName = 0x000200c2, - DRSUAPI_ATTRIBUTE_adminDescription = 0x000200e2, - DRSUAPI_ATTRIBUTE_oMSyntax = 0x000200e7, - DRSUAPI_ATTRIBUTE_ntSecurityDescriptor = 0x00020119, - DRSUAPI_ATTRIBUTE_searchFlags = 0x0002014e, - DRSUAPI_ATTRIBUTE_lDAPDisplayName = 0x000201cc, - DRSUAPI_ATTRIBUTE_name = 0x00090001, - DRSUAPI_ATTRIBUTE_userAccountControl = 0x00090008, - DRSUAPI_ATTRIBUTE_currentValue = 0x0009001b, - DRSUAPI_ATTRIBUTE_homeDirectory = 0x0009002c, - DRSUAPI_ATTRIBUTE_homeDrive = 0x0009002d, - DRSUAPI_ATTRIBUTE_scriptPath = 0x0009003e, - DRSUAPI_ATTRIBUTE_profilePath = 0x0009008b, - DRSUAPI_ATTRIBUTE_objectSid = 0x00090092, - DRSUAPI_ATTRIBUTE_schemaIDGUID = 0x00090094, - DRSUAPI_ATTRIBUTE_dBCSPwd = 0x00090037,/* lmPwdHash */ - DRSUAPI_ATTRIBUTE_logonHours = 0x00090040, - DRSUAPI_ATTRIBUTE_userWorkstations = 0x00090056, - DRSUAPI_ATTRIBUTE_unicodePwd = 0x0009005a,/* ntPwdHash */ - DRSUAPI_ATTRIBUTE_ntPwdHistory = 0x0009005e, - DRSUAPI_ATTRIBUTE_priorValue = 0x00090064, - DRSUAPI_ATTRIBUTE_supplementalCredentials = 0x0009007d, - DRSUAPI_ATTRIBUTE_trustAuthIncoming = 0x00090081, - DRSUAPI_ATTRIBUTE_trustAuthOutgoing = 0x00090087, - DRSUAPI_ATTRIBUTE_lmPwdHistory = 0x000900a0, - DRSUAPI_ATTRIBUTE_sAMAccountName = 0x000900dd, - DRSUAPI_ATTRIBUTE_sAMAccountType = 0x0009012e, - DRSUAPI_ATTRIBUTE_fSMORoleOwner = 0x00090171, - DRSUAPI_ATTRIBUTE_systemFlags = 0x00090177, - DRSUAPI_ATTRIBUTE_serverReference = 0x00090203, - DRSUAPI_ATTRIBUTE_serverReferenceBL = 0x00090204, - DRSUAPI_ATTRIBUTE_initialAuthIncoming = 0x0009021b, - DRSUAPI_ATTRIBUTE_initialAuthOutgoing = 0x0009021c, - DRSUAPI_ATTRIBUTE_wellKnownObjects = 0x0009026a, - DRSUAPI_ATTRIBUTE_dNSHostName = 0x0009026b, - DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet = 0x0009027f, - DRSUAPI_ATTRIBUTE_userPrincipalName = 0x00090290, - DRSUAPI_ATTRIBUTE_groupType = 0x000902ee, - DRSUAPI_ATTRIBUTE_servicePrincipalName = 0x00090303, - DRSUAPI_ATTRIBUTE_objectCategory = 0x0009030e, - DRSUAPI_ATTRIBUTE_gPLink = 0x0009037b, - DRSUAPI_ATTRIBUTE_msDS_Behavior_Version = 0x000905b3, - DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber = 0x000906f6, - DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs = 0x0009071c, - DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c - } drsuapi_DsAttributeId; - - typedef struct { - [value(1)] uint32 version; - [value(0)] uint32 reserved1; - [range(1,0x100000)] uint32 num_attids; - [size_is(num_attids)] drsuapi_DsAttributeId attids[]; - } drsuapi_DsPartialAttributeSet; - - typedef struct { - GUID destination_dsa_guid; - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; - drsuapi_DsReplicaHighWaterMark highwatermark; - drsuapi_DsReplicaCursorCtrEx *uptodateness_vector; - drsuapi_DsReplicaNeighbourFlags replica_flags; - uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */ - uint32 max_ndr_size; /* w2k3 seems to ignore this */ - drsuapi_DsExtendedOperation extended_op; - hyper fsmo_info; - drsuapi_DsPartialAttributeSet *partial_attribute_set; - drsuapi_DsPartialAttributeSet *partial_attribute_set_ex; - drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - } drsuapi_DsGetNCChangesRequest8; - - typedef [switch_type(int32)] union { - [case(5)] drsuapi_DsGetNCChangesRequest5 req5; - [case(8)] drsuapi_DsGetNCChangesRequest8 req8; - } drsuapi_DsGetNCChangesRequest; - - typedef [public] struct { - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - hyper highest_usn; /* updated after a full replication cycle */ - NTTIME last_sync_success; - } drsuapi_DsReplicaCursor2; - - typedef struct { - [value(2)] uint32 version; - [value(0)] uint32 reserved1; - [range(0,0x100000)] uint32 count; - [value(0)] uint32 reserved2; - [size_is(count)] drsuapi_DsReplicaCursor2 cursors[]; - } drsuapi_DsReplicaCursor2CtrEx; - - /* Generic DATA_BLOB values */ - typedef struct { - [range(0,10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size; - DATA_BLOB *blob; - } drsuapi_DsAttributeValue; - - typedef struct { - [range(0,10485760)] uint32 num_values; - [size_is(num_values)] drsuapi_DsAttributeValue *values; - } drsuapi_DsAttributeValueCtr; - - /* DN String values */ - typedef [public,gensize] struct { - [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size; - [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid; - GUID guid; - dom_sid28 sid; - [value(strlen_m(dn))] uint32 __ndr_size_dn; - [charset(UTF16)] uint16 dn[__ndr_size_dn+1]; - } drsuapi_DsReplicaObjectIdentifier3; - - typedef [public,gensize] struct { - [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags))] uint32 __ndr_size; - [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid; - GUID guid; - dom_sid28 sid; - [value(strlen_m(dn))] uint32 __ndr_size_dn; - [charset(UTF16)] uint16 dn[__ndr_size_dn+1]; - [value(binary.length + 4)] uint32 __ndr_size_binary; - [flag(NDR_REMAINING)] DATA_BLOB binary; - } drsuapi_DsReplicaObjectIdentifier3Binary; - - typedef [public] struct { - drsuapi_DsAttributeId attid; - drsuapi_DsAttributeValueCtr value_ctr; - } drsuapi_DsReplicaAttribute; - - typedef struct { - [range(0,1048576)] uint32 num_attributes; - [size_is(num_attributes)] drsuapi_DsReplicaAttribute *attributes; - } drsuapi_DsReplicaAttributeCtr; - - typedef [public] bitmap { - DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER = 0x00000001, - DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC = 0x00000002, - DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY = 0x00010000 - } drsuapi_DsReplicaObjectFlags; - - typedef [public] struct { - drsuapi_DsReplicaObjectIdentifier *identifier; - drsuapi_DsReplicaObjectFlags flags; - drsuapi_DsReplicaAttributeCtr attribute_ctr; - } drsuapi_DsReplicaObject; - - typedef struct { - uint32 version; - NTTIME_1sec originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - } drsuapi_DsReplicaMetaData; - - typedef [public] struct { - [range(0,1048576)] uint32 count; - [size_is(count)] drsuapi_DsReplicaMetaData meta_data[]; - } drsuapi_DsReplicaMetaDataCtr; - - typedef [public,noprint] struct { - drsuapi_DsReplicaObjectListItemEx *next_object; - drsuapi_DsReplicaObject object; - boolean32 is_nc_prefix; - GUID *parent_object_guid; - drsuapi_DsReplicaMetaDataCtr *meta_data_ctr; - } drsuapi_DsReplicaObjectListItemEx; - - typedef [public,gensize] struct { - GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */ - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - drsuapi_DsReplicaObjectIdentifier *naming_context; - drsuapi_DsReplicaHighWaterMark old_highwatermark; - drsuapi_DsReplicaHighWaterMark new_highwatermark; - drsuapi_DsReplicaCursorCtrEx *uptodateness_vector; - drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */ - uint32 object_count; - /* this +55 is sometimes +56, so I don't know where this comes from... --metze */ - [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size; - drsuapi_DsReplicaObjectListItemEx *first_object; - boolean32 more_data; - } drsuapi_DsGetNCChangesCtr1; - - /* - * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag - * isn't there it means the value is deleted - */ - typedef [public] bitmap { - DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE = 0x00000001 - } drsuapi_DsLinkedAttributeFlags; - - typedef [public] struct { - drsuapi_DsReplicaObjectIdentifier *identifier; - drsuapi_DsAttributeId attid; - drsuapi_DsAttributeValue value; - drsuapi_DsLinkedAttributeFlags flags; - NTTIME_1sec originating_add_time; - drsuapi_DsReplicaMetaData meta_data; - } drsuapi_DsReplicaLinkedAttribute; - - typedef [public,gensize] struct { - GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */ - GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ - drsuapi_DsReplicaObjectIdentifier *naming_context; - drsuapi_DsReplicaHighWaterMark old_highwatermark; - drsuapi_DsReplicaHighWaterMark new_highwatermark; - drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector; - drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - drsuapi_DsExtendedError extended_ret; - uint32 object_count; - /* this +55 is sometimes +56, so I don't know where this comes from... --metze */ - [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size; - drsuapi_DsReplicaObjectListItemEx *first_object; - boolean32 more_data; - uint32 nc_object_count; /* estimated amount of objects in the whole NC */ - uint32 nc_linked_attributes_count; /* estimated amount of linked values in the whole NC */ - [range(0,1048576)] uint32 linked_attributes_count; - [size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes; - WERROR drs_error; - } drsuapi_DsGetNCChangesCtr6; - - typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)] - drsuapi_DsGetNCChangesCtr1 *ctr1; - } drsuapi_DsGetNCChangesMSZIPCtr1; - - typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)] - drsuapi_DsGetNCChangesCtr6 *ctr6; - } drsuapi_DsGetNCChangesMSZIPCtr6; - - typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)] - drsuapi_DsGetNCChangesCtr1 *ctr1; - } drsuapi_DsGetNCChangesXPRESSCtr1; - - typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)] - drsuapi_DsGetNCChangesCtr6 *ctr6; - } drsuapi_DsGetNCChangesXPRESSCtr6; - - typedef [enum16bit] enum { - DRSUAPI_COMPRESSION_TYPE_MSZIP = 2, - DRSUAPI_COMPRESSION_TYPE_XPRESS = 3 - } drsuapi_DsGetNCChangesCompressionType; - - typedef [nodiscriminant,flag(NDR_PAHEX)] union { - [case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1; - [case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6; - [case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1; - [case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6; - } drsuapi_DsGetNCChangesCompressedCtr; - - typedef struct { - /* - * this is a bit ugly, as the compression depends on the flags - * in the DsBind(), but only w2k uses DsGetNCChangesReq5 - * and will get DsGetNCChangesCtr2 replies, and w2k only knowns - * about MSZIP and level 1 replies - */ - [switch_is(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr; - } drsuapi_DsGetNCChangesCtr2; - - typedef struct { - [range(0,6)] int32 level; - [range(2,3)] drsuapi_DsGetNCChangesCompressionType type; - [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr; - } drsuapi_DsGetNCChangesCtr7; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1; - [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2; - [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6; - [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7; - } drsuapi_DsGetNCChangesCtr; - - WERROR drsuapi_DsGetNCChanges( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr - ); - - /*****************/ - /* Function 0x04 */ - typedef bitmap { - DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE = 0x00000002, - DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE = 0x00000004, - DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE = 0x00000008, - DRSUAPI_DS_REPLICA_UPDATE_0x00000010 = 0x00000010 - } drsuapi_DsReplicaUpdateRefsOptions; - - typedef struct { - [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; - [ref,charset(DOS),string] uint8 *dest_dsa_dns_name; - GUID dest_dsa_guid; - drsuapi_DsReplicaUpdateRefsOptions options; - } drsuapi_DsReplicaUpdateRefsRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1; - } drsuapi_DsReplicaUpdateRefsRequest; - - WERROR drsuapi_DsReplicaUpdateRefs( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req - ); - - /*****************/ - /* Function 0x05 */ - typedef bitmap { - DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_ADD_WRITEABLE = 0x00000002 - /* TODO ... */ - } drsuapi_DsReplicaAddOptions; - - WERROR DRSUAPI_REPLICA_ADD(); - - /*****************/ - /* Function 0x06 */ - typedef bitmap { - DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_DELETE_WRITEABLE = 0x00000002 - /* TODO ... */ - } drsuapi_DsReplicaDeleteOptions; - - WERROR DRSUAPI_REPLICA_DEL(); - - /*****************/ - /* Function 0x07 */ - typedef bitmap { - DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE = 0x00000002 - } drsuapi_DsReplicaModifyOptions; - - WERROR DRSUAPI_REPLICA_MODIFY(); - - /*****************/ - /* Function 0x08 */ - WERROR DRSUAPI_VERIFY_NAMES(); - - /*****************/ - /* Function 0x09 */ - - /* how are type 4 and 7 different from 2 and 3 ? */ - typedef [v1_enum] enum { - DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS = 1, - DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS = 2, - DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS = 3, - DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2 = 4, - DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS = 5, - DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS = 6, - DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2 = 7 - } drsuapi_DsMembershipType; - - typedef struct { - NTSTATUS status; - [range(0,10000)] uint32 num_memberships; - [range(0,10000)] uint32 num_sids; - [size_is(num_memberships)] drsuapi_DsReplicaObjectIdentifier **info_array; - [size_is(num_memberships)] samr_GroupAttrs *group_attrs; - [size_is(num_sids)] dom_sid28 **sids; - } drsuapi_DsGetMembershipsCtr1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1; - } drsuapi_DsGetMembershipsCtr; - - const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR = 0x1; - - typedef struct { - [range(1,10000)] uint32 count; - [size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array; - uint32 flags; - drsuapi_DsMembershipType type; - drsuapi_DsReplicaObjectIdentifier *domain; - } drsuapi_DsGetMembershipsRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetMembershipsRequest1 req1; - } drsuapi_DsGetMembershipsRequest; - - WERROR drsuapi_DsGetMemberships( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req, - [out,ref] int32 *level_out, - [out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr - ); - - /*****************/ - /* Function 0x0a */ - WERROR DRSUAPI_INTER_DOMAIN_MOVE(); - - /*****************/ - /* Function 0x0b */ - typedef struct { - uint32 unknown1; - uint32 unknown2; - [range(0,0x00A00000)] uint32 length; - [size_is(length)] uint8 *data; - } drsuapi_DsGetNT4ChangeLogRequest1; - - typedef [switch_type(uint32)] union { - [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1; - } drsuapi_DsGetNT4ChangeLogRequest; - - typedef struct { - [range(0,0x00A00000)] uint32 length1; - [range(0,0x00A00000)] uint32 length2; - hyper unknown1; - NTTIME time2; - hyper unknown3; - NTTIME time4; - hyper unknown5; - NTTIME time6; - NTSTATUS status; - [size_is(length1)] uint8 *data1; - [size_is(length2)] uint8 *data2; - } drsuapi_DsGetNT4ChangeLogInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1; - } drsuapi_DsGetNT4ChangeLogInfo; - - WERROR drsuapi_DsGetNT4ChangeLog( - [in] policy_handle *bind_handle, - [in] uint32 level, - [in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req, - [out,ref] uint32 *level_out, - [out,ref] [switch_is(*level_out)] drsuapi_DsGetNT4ChangeLogInfo *info - ); - - /*****************/ - /* Function 0x0c */ - typedef [v1_enum] enum { - DRSUAPI_DS_NAME_STATUS_OK = 0, - DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR = 1, - DRSUAPI_DS_NAME_STATUS_NOT_FOUND = 2, - DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE = 3, - DRSUAPI_DS_NAME_STATUS_NO_MAPPING = 4, - DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY = 5, - DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING = 6, - DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL = 7 - } drsuapi_DsNameStatus; - - typedef [v1_enum] enum { - DRSUAPI_DS_NAME_FLAG_NO_FLAGS = 0x0, - DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1, - DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC = 0x2, - DRSUAPI_DS_NAME_FLAG_GCVERIFY = 0x4, - DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL = 0x8 - } drsuapi_DsNameFlags; - - typedef [v1_enum] enum { - DRSUAPI_DS_NAME_FORMAT_UKNOWN = 0, - DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 1, - DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 2, - DRSUAPI_DS_NAME_FORMAT_DISPLAY = 3, - DRSUAPI_DS_NAME_FORMAT_GUID = 6, - DRSUAPI_DS_NAME_FORMAT_CANONICAL = 7, - DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL = 8, - DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX = 9, - DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL = 10, - DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY = 11, - DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN = 12 - } drsuapi_DsNameFormat; - - typedef struct { - [string,charset(UTF16)] uint16 *str; - } drsuapi_DsNameString; - - typedef struct { - uint32 codepage; /* 0x000004e4 - 1252 is german codepage*/ - uint32 language; /* 0x00000407 - german language ID*/ - drsuapi_DsNameFlags format_flags; - drsuapi_DsNameFormat format_offered; - drsuapi_DsNameFormat format_desired; - [range(1,10000)] uint32 count; - [size_is(count)] drsuapi_DsNameString *names; - } drsuapi_DsNameRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsNameRequest1 req1; - } drsuapi_DsNameRequest; - - typedef struct { - drsuapi_DsNameStatus status; - [charset(UTF16),string] uint16 *dns_domain_name; - [charset(UTF16),string] uint16 *result_name; - } drsuapi_DsNameInfo1; - - typedef struct { - uint32 count; - [size_is(count)] drsuapi_DsNameInfo1 *array; - } drsuapi_DsNameCtr1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsNameCtr1 *ctr1; - } drsuapi_DsNameCtr; - - WERROR drsuapi_DsCrackNames( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsNameRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsNameCtr *ctr - ); - - /*****************/ - /* Function 0x0d */ - typedef [v1_enum] enum { - DRSUAPI_DS_SPN_OPERATION_ADD = 0, - DRSUAPI_DS_SPN_OPERATION_REPLACE= 1, - DRSUAPI_DS_SPN_OPERATION_DELETE = 2 - } drsuapi_DsSpnOperation; - - typedef struct { - drsuapi_DsSpnOperation operation; - uint32 unknown1; - [charset(UTF16),string] uint16 *object_dn; - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsNameString *spn_names; - } drsuapi_DsWriteAccountSpnRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1; - } drsuapi_DsWriteAccountSpnRequest; - - typedef struct { - WERROR status; - } drsuapi_DsWriteAccountSpnResult1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsWriteAccountSpnResult1 res1; - } drsuapi_DsWriteAccountSpnResult; - - WERROR drsuapi_DsWriteAccountSpn( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsWriteAccountSpnRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsWriteAccountSpnResult *res - ); - - /*****************/ - /* Function 0x0e */ - typedef struct { - [charset(UTF16),string] uint16 *server_dn; - [charset(UTF16),string] uint16 *domain_dn; - uint32 unknown; /* 0x000000001 */ - } drsuapi_DsRemoveDSServerRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsRemoveDSServerRequest1 req1; - } drsuapi_DsRemoveDSServerRequest; - - typedef struct { - WERROR status; - } drsuapi_DsRemoveDSServerResult1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsRemoveDSServerResult1 res1; - } drsuapi_DsRemoveDSServerResult; - - WERROR drsuapi_DsRemoveDSServer( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsRemoveDSServerRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsRemoveDSServerResult *res - ); - - /*****************/ - /* Function 0x0f */ - WERROR DRSUAPI_REMOVE_DS_DOMAIN(); - - /*****************/ - /* Function 0x10 */ - typedef struct { - [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */ - int32 level; /* specifies the switch level for the request */ - } drsuapi_DsGetDCInfoRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetDCInfoRequest1 req1; - } drsuapi_DsGetDCInfoRequest; - - typedef struct { - [charset(UTF16),string] uint16 *netbios_name; - [charset(UTF16),string] uint16 *dns_name; - [charset(UTF16),string] uint16 *site_name; - [charset(UTF16),string] uint16 *computer_dn; - [charset(UTF16),string] uint16 *server_dn; - uint32 is_pdc; - uint32 is_enabled; - } drsuapi_DsGetDCInfo1; - - typedef struct { - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsGetDCInfo1 *array; - } drsuapi_DsGetDCInfoCtr1; - - typedef struct { - [charset(UTF16),string] uint16 *netbios_name; - [charset(UTF16),string] uint16 *dns_name; - [charset(UTF16),string] uint16 *site_name; - [charset(UTF16),string] uint16 *site_dn; - [charset(UTF16),string] uint16 *computer_dn; - [charset(UTF16),string] uint16 *server_dn; - [charset(UTF16),string] uint16 *ntds_dn; - uint32 is_pdc; - uint32 is_enabled; - uint32 is_gc; - GUID site_guid; - GUID computer_guid; - GUID server_guid; - GUID ntds_guid; - } drsuapi_DsGetDCInfo2; - - typedef struct { - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsGetDCInfo2 *array; - } drsuapi_DsGetDCInfoCtr2; - - typedef struct { - [charset(UTF16),string] uint16 *netbios_name; - [charset(UTF16),string] uint16 *dns_name; - [charset(UTF16),string] uint16 *site_name; - [charset(UTF16),string] uint16 *site_dn; - [charset(UTF16),string] uint16 *computer_dn; - [charset(UTF16),string] uint16 *server_dn; - [charset(UTF16),string] uint16 *ntds_dn; - uint32 is_pdc; - uint32 is_enabled; - uint32 is_gc; - uint32 is_rodc; - GUID site_guid; - GUID computer_guid; - GUID server_guid; - GUID ntds_guid; - } drsuapi_DsGetDCInfo3; - - typedef struct { - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsGetDCInfo3 *array; - } drsuapi_DsGetDCInfoCtr3; - - /* - * this represents an active connection to the - * Directory System Agent (DSA) - * this can be via LDAP or DRSUAPI - */ - typedef struct { - [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address; - uint32 unknown2; - uint32 connection_time; /* in seconds */ - uint32 unknown4; - uint32 unknown5; - uint32 unknown6; - /* - * client_account can be the following: - * "W2K3\Administrator" - * "Administrator@W2K3" - * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base" - * "" - * or NULL - */ - [charset(UTF16),string] uint16 *client_account; - } drsuapi_DsGetDCConnection01; - - typedef struct { - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsGetDCConnection01 *array; - } drsuapi_DsGetDCConnectionCtr01; - - typedef [v1_enum] enum { - DRSUAPI_DC_INFO_CTR_1 = 1, - DRSUAPI_DC_INFO_CTR_2 = 2, - DRSUAPI_DC_INFO_CTR_3 = 3, - DRSUAPI_DC_CONNECTION_CTR_01 = -1 - } drsuapi_DsGetDCInfoCtrLevels; - - typedef [switch_type(int32)] union { - [case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1; - [case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2; - [case(DRSUAPI_DC_INFO_CTR_3)] drsuapi_DsGetDCInfoCtr3 ctr3; - [case(DRSUAPI_DC_CONNECTION_CTR_01)] drsuapi_DsGetDCConnectionCtr01 ctr01; - } drsuapi_DsGetDCInfoCtr; - - WERROR drsuapi_DsGetDomainControllerInfo( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr - ); - - /*****************/ - /* Function 0x11 */ - typedef [public,noprint] struct { - drsuapi_DsReplicaObjectListItem *next_object; - drsuapi_DsReplicaObject object; - } drsuapi_DsReplicaObjectListItem; - - /* - * The DsAddEntry() call which creates a nTDSDSA object, - * also adds a servicePrincipalName in the following form - * to the computer account of the new domain controller - * referenced by the "serverReferenece" attribute. - * - * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name> - * - * also note that the "serverReference" isn't added to the new object! - */ - const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2"; - - /* - * please note the the current idl - * for DsAddEntry does only parse - * what I saw between 2 w2k3 boxes - * in my dssync experiments I got some other replies - * so all I want to say is that this is very incomplete yet... - * --metze - */ - typedef struct { - drsuapi_DsReplicaObjectListItem first_object; - } drsuapi_DsAddEntryRequest2; - - typedef [switch_type(int32)] union { - [case(2)] drsuapi_DsAddEntryRequest2 req2; - } drsuapi_DsAddEntryRequest; - - typedef struct { - uint32 unknown1; - WERROR status; - uint32 unknown2; - uint16 unknown3; - } drsuapi_DsAddEntryErrorInfoX; - - typedef struct { - [range(0,10485760)] uint32 size; - [size_is(size)] uint8 *data; - } drsuapi_DsAddEntryExtraErrorBuffer; - - typedef struct { - drsuapi_DsAddEntryErrorInfoX error; - drsuapi_DsAttributeId attid; - uint32 unknown2; - drsuapi_DsAddEntryExtraErrorBuffer buffer; - } drsuapi_DsAddEntryExtraError1; - - typedef /*[noprint]*/ struct { - drsuapi_DsAddEntryErrorListItem1 *next; - drsuapi_DsAddEntryExtraError1 error; - } drsuapi_DsAddEntryErrorListItem1; - - typedef struct { - drsuapi_DsReplicaObjectIdentifier *id; - WERROR status; - drsuapi_DsAddEntryErrorListItem1 first; - } drsuapi_DsAddEntryErrorInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] drsuapi_DsAddEntryErrorInfo1 error1; -/* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2; - [case(3)] drsuapi_DsAddEntryErrorInfo3 error3; -*/ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX; - [case(5)] drsuapi_DsAddEntryErrorInfoX errorX; - [case(6)] drsuapi_DsAddEntryErrorInfoX errorX; - [case(7)] drsuapi_DsAddEntryErrorInfoX errorX; - } drsuapi_DsAddEntryErrorInfo; - - typedef struct { - WERROR status; - uint32 level; - [switch_is(level)] drsuapi_DsAddEntryErrorInfo *info; - } drsuapi_DsAddEntryError1; - - typedef [switch_type(uint32)] union { - [case(1)] drsuapi_DsAddEntryError1 info1; - } drsuapi_DsAddEntryError; - - typedef struct { - GUID guid; - dom_sid28 sid; - } drsuapi_DsReplicaObjectIdentifier2; - - typedef struct { - drsuapi_DsReplicaObjectIdentifier *id; - uint32 unknown1; - drsuapi_DsAddEntryErrorInfoX error; - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects; - } drsuapi_DsAddEntryCtr2; - - typedef struct { - drsuapi_DsReplicaObjectIdentifier *id; - uint32 level; - [switch_is(level)] drsuapi_DsAddEntryError *error; - [range(0,10000)] uint32 count; - [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects; - } drsuapi_DsAddEntryCtr3; - - typedef [switch_type(int32)] union { - [case(2)] drsuapi_DsAddEntryCtr2 ctr2; - [case(3)] drsuapi_DsAddEntryCtr3 ctr3; - } drsuapi_DsAddEntryCtr; - - [public] WERROR drsuapi_DsAddEntry( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref,switch_is(level)] drsuapi_DsAddEntryRequest *req, - [out,ref] int32 *level_out, - [out,ref,switch_is(*level_out)] drsuapi_DsAddEntryCtr *ctr - ); - - /*****************/ - /* Function 0x12 */ - WERROR DRSUAPI_EXECUTE_KCC(); - - /*****************/ - /* Function 0x13 */ - typedef [v1_enum] enum { - DRSUAPI_DS_REPLICA_GET_INFO = 1, - DRSUAPI_DS_REPLICA_GET_INFO2 = 2 - } drsuapi_DsReplicaGetInfoLevel; - - typedef [v1_enum] enum { - DRSUAPI_DS_REPLICA_INFO_NEIGHBORS = 0, - DRSUAPI_DS_REPLICA_INFO_CURSORS = 1, - DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA = 2, - DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES = 3, - DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES = 4, - DRSUAPI_DS_REPLICA_INFO_PENDING_OPS = 5, - DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA = 6, - DRSUAPI_DS_REPLICA_INFO_CURSORS2 = 7, - DRSUAPI_DS_REPLICA_INFO_CURSORS3 = 8, - DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2 = 9, - DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2 = 10, - DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02 = -2, - DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04 = -4, - DRSUAPI_DS_REPLICA_INFO_CURSORS05 = -5, - DRSUAPI_DS_REPLICA_INFO_06 = -6 - } drsuapi_DsReplicaInfoType; - - typedef struct { - drsuapi_DsReplicaInfoType info_type; - [charset(UTF16),string] uint16 *object_dn; - GUID guid1; - } drsuapi_DsReplicaGetInfoRequest1; - - typedef struct { - drsuapi_DsReplicaInfoType info_type; - [charset(UTF16),string] uint16 *object_dn; - GUID guid1; - uint32 unknown1; - [charset(UTF16),string] uint16 *string1; - [charset(UTF16),string] uint16 *string2; - uint32 unknown2; - } drsuapi_DsReplicaGetInfoRequest2; - - typedef [switch_type(drsuapi_DsReplicaGetInfoLevel)] union { - [case(DRSUAPI_DS_REPLICA_GET_INFO)] drsuapi_DsReplicaGetInfoRequest1 req1; - [case(DRSUAPI_DS_REPLICA_GET_INFO2)] drsuapi_DsReplicaGetInfoRequest2 req2; - } drsuapi_DsReplicaGetInfoRequest; - - typedef struct { - [charset(UTF16),string] uint16 *naming_context_dn; - [charset(UTF16),string] uint16 *source_dsa_obj_dn; - [charset(UTF16),string] uint16 *source_dsa_address; - [charset(UTF16),string] uint16 *transport_obj_dn; - drsuapi_DsReplicaNeighbourFlags replica_flags; - uint32 reserved; - GUID naming_context_obj_guid; - GUID source_dsa_obj_guid; - GUID source_dsa_invocation_id; - GUID transport_obj_guid; - hyper tmp_highest_usn; - hyper highest_usn; - NTTIME last_success; - NTTIME last_attempt; - WERROR result_last_attempt; - uint32 consecutive_sync_failures; - } drsuapi_DsReplicaNeighbour; - - typedef struct { - uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplicaNeighbour array[]; - } drsuapi_DsReplicaNeighbourCtr; - - typedef struct { - uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplicaCursor array[]; - } drsuapi_DsReplicaCursorCtr; - - typedef struct { - [charset(UTF16),string] uint16 *attribute_name; - uint32 version; - NTTIME originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - hyper local_usn; - } drsuapi_DsReplicaObjMetaData; - - typedef struct { - uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplicaObjMetaData array[]; - } drsuapi_DsReplicaObjMetaDataCtr; - - typedef struct { - [charset(UTF16),string] uint16 *dsa_obj_dn; - GUID dsa_obj_guid; - NTTIME first_failure; - uint32 num_failures; - WERROR last_result; - } drsuapi_DsReplicaKccDsaFailure; - - typedef struct { - uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplicaKccDsaFailure array[]; - } drsuapi_DsReplicaKccDsaFailuresCtr; - - typedef enum { - DRSUAPI_DS_REPLICA_OP_TYPE_SYNC = 0, - DRSUAPI_DS_REPLICA_OP_TYPE_ADD = 1, - DRSUAPI_DS_REPLICA_OP_TYPE_DELETE = 2, - DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY = 3, - DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS = 4 - } drsuapi_DsReplicaOpType; - - typedef [switch_type(drsuapi_DsReplicaOpType)] union { - [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)] drsuapi_DsReplicaSyncOptions sync; - [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)] drsuapi_DsReplicaAddOptions add; - [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)] drsuapi_DsReplicaDeleteOptions op_delete; - [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)] drsuapi_DsReplicaModifyOptions modify; - [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)] drsuapi_DsReplicaUpdateRefsOptions update_refs; - [default] uint32 unknown; - } drsuapi_DsRplicaOpOptions; - - typedef struct { - NTTIME operation_start; - uint32 serial_num; /* unique till reboot */ - uint32 priority; - drsuapi_DsReplicaOpType operation_type; - [switch_is(operation_type)] drsuapi_DsRplicaOpOptions options; - [charset(UTF16),string] uint16 *nc_dn; - [charset(UTF16),string] uint16 *remote_dsa_obj_dn; - [charset(UTF16),string] uint16 *remote_dsa_address; - GUID nc_obj_guid; - GUID remote_dsa_obj_guid; - } drsuapi_DsReplicaOp; - - typedef struct { - NTTIME time; - uint32 count; - [size_is(count)] drsuapi_DsReplicaOp array[]; - } drsuapi_DsReplicaOpCtr; - - typedef struct { - [charset(UTF16),string] uint16 *attribute_name; - [charset(UTF16),string] uint16 *object_dn; - [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary; - DATA_BLOB *binary; - NTTIME deleted; - NTTIME created; - uint32 version; - NTTIME originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - hyper local_usn; - } drsuapi_DsReplicaAttrValMetaData; - - typedef struct { - uint32 count; - int32 enumeration_context; - [size_is(count)] drsuapi_DsReplicaAttrValMetaData array[]; - } drsuapi_DsReplicaAttrValMetaDataCtr; - - typedef struct { - uint32 count; - int32 enumeration_context; - [size_is(count)] drsuapi_DsReplicaCursor2 array[]; - } drsuapi_DsReplicaCursor2Ctr; - - typedef struct { - GUID source_dsa_invocation_id; - hyper highest_usn; - NTTIME last_sync_success; - [charset(UTF16),string] uint16 *source_dsa_obj_dn; - } drsuapi_DsReplicaCursor3; - - typedef struct { - uint32 count; - int32 enumeration_context; - [size_is(count)] drsuapi_DsReplicaCursor3 array[]; - } drsuapi_DsReplicaCursor3Ctr; - - typedef struct { - [charset(UTF16),string] uint16 *attribute_name; - uint32 version; - NTTIME originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - hyper local_usn; - [charset(UTF16),string] uint16 *originating_dsa_dn; - } drsuapi_DsReplicaObjMetaData2; - - typedef struct { - uint32 count; - int32 enumeration_context; - [size_is(count)] drsuapi_DsReplicaObjMetaData2 array[]; - } drsuapi_DsReplicaObjMetaData2Ctr; - - typedef struct { - [charset(UTF16),string] uint16 *attribute_name; - [charset(UTF16),string] uint16 *object_dn; - [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary; - DATA_BLOB *binary; - NTTIME deleted; - NTTIME created; - uint32 version; - NTTIME originating_change_time; - GUID originating_invocation_id; - hyper originating_usn; - hyper local_usn; - [charset(UTF16),string] uint16 *originating_dsa_dn; - } drsuapi_DsReplicaAttrValMetaData2; - - typedef struct { - uint32 count; - int32 enumeration_context; - [size_is(count)] drsuapi_DsReplicaAttrValMetaData2 array[]; - } drsuapi_DsReplicaAttrValMetaData2Ctr; - - typedef struct { - hyper u1; /* session number? */ - uint32 u2; - uint32 u3; - GUID bind_guid; - NTTIME_1sec bind_time; - [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address; - uint32 u5; /* this is the same value the client used as pid in the DsBindInfoX struct */ - } drsuapi_DsReplicaConnection04; - - typedef struct { - [range(0,10000)] uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplicaConnection04 array[]; - } drsuapi_DsReplicaConnection04Ctr; - - typedef struct { - [charset(UTF16),string] uint16 *str1; - uint32 u1; - uint32 u2; - uint32 u3; - uint32 u4; - uint32 u5; - hyper u6; - uint32 u7; - } drsuapi_DsReplica06; - - typedef struct { - [range(0,256)] uint32 count; - uint32 reserved; - [size_is(count)] drsuapi_DsReplica06 array[]; - } drsuapi_DsReplica06Ctr; - - typedef [switch_type(drsuapi_DsReplicaInfoType)] union { - [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS)] drsuapi_DsReplicaNeighbourCtr *neighbours; - [case(DRSUAPI_DS_REPLICA_INFO_CURSORS)] drsuapi_DsReplicaCursorCtr *cursors; - [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA)] drsuapi_DsReplicaObjMetaDataCtr *objmetadata; - [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *connectfailures; - [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *linkfailures; - [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS)] drsuapi_DsReplicaOpCtr *pendingops; - [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA)] drsuapi_DsReplicaAttrValMetaDataCtr *attrvalmetadata; - [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2)] drsuapi_DsReplicaCursor2Ctr *cursors2; - [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3)] drsuapi_DsReplicaCursor3Ctr *cursors3; - [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)] drsuapi_DsReplicaObjMetaData2Ctr *objmetadata2; - [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)] drsuapi_DsReplicaAttrValMetaData2Ctr *attrvalmetadata2; - [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02)] drsuapi_DsReplicaNeighbourCtr *neighbours02; - [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04)] drsuapi_DsReplicaConnection04Ctr *connections04; - [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05)] drsuapi_DsReplicaCursorCtrEx *cursors05; - [case(DRSUAPI_DS_REPLICA_INFO_06)] drsuapi_DsReplica06Ctr *i06; - } drsuapi_DsReplicaInfo; - - WERROR drsuapi_DsReplicaGetInfo( - [in] policy_handle *bind_handle, - [in] drsuapi_DsReplicaGetInfoLevel level, - [in,ref,switch_is(level)] drsuapi_DsReplicaGetInfoRequest *req, - [out,ref] drsuapi_DsReplicaInfoType *info_type, - [out,ref,switch_is(*info_type)] drsuapi_DsReplicaInfo *info - ); - - /*****************/ - /* Function 0x14 */ - WERROR DRSUAPI_ADD_SID_HISTORY(); - - /*****************/ - /* Function 0x15 */ - - typedef struct { - [range(0,10000)] uint32 num_entries; - [size_is(num_entries)] drsuapi_DsGetMembershipsCtr1 **ctrl_array; - } drsuapi_DsGetMemberships2Ctr1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1; - } drsuapi_DsGetMemberships2Ctr; - - typedef struct { - [range(1,10000)] uint32 num_req; - [size_is(num_req)] drsuapi_DsGetMembershipsRequest1 **req_array; - } drsuapi_DsGetMemberships2Request1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_DsGetMemberships2Request1 req1; - } drsuapi_DsGetMemberships2Request; - - WERROR drsuapi_DsGetMemberships2( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref] [switch_is(level)] drsuapi_DsGetMemberships2Request *req, - [out,ref] int32 *level_out, - [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr - ); - - - /*****************/ - /* Function 0x16 */ - WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS(); - - /*****************/ - /* Function 0x17 */ - WERROR DRSUAPI_GET_OBJECT_EXISTENCE(); - - /*****************/ - /* Function 0x18 */ - typedef struct { - WERROR error_code; - uint32 site_cost; - } drsuapi_DsSiteCostInfo; - - typedef struct { - [range(0,10000)] uint32 num_info; - [size_is(num_info)] drsuapi_DsSiteCostInfo *info; - uint32 unknown; - } drsuapi_QuerySitesByCostCtr1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1; - } drsuapi_QuerySitesByCostCtr; - - typedef struct { - [charset(UTF16),string] uint16 *site_from; - [range(1,10000)] uint32 num_req; - [size_is(num_req)] [charset(UTF16),string] uint16 **site_to; - uint32 flags; - } drsuapi_QuerySitesByCostRequest1; - - typedef [switch_type(int32)] union { - [case(1)] drsuapi_QuerySitesByCostRequest1 req1; - } drsuapi_QuerySitesByCostRequest; - - WERROR drsuapi_QuerySitesByCost( - [in] policy_handle *bind_handle, - [in] int32 level, - [in,ref] [switch_is(level)] drsuapi_QuerySitesByCostRequest *req, - [out,ref] int32 *level_out, - [out,ref] [switch_is(*level_out)] drsuapi_QuerySitesByCostCtr *ctr - ); -} diff --git a/source3/librpc/idl/dssetup.idl b/source3/librpc/idl/dssetup.idl deleted file mode 100644 index af6350cc43..0000000000 --- a/source3/librpc/idl/dssetup.idl +++ /dev/null @@ -1,101 +0,0 @@ -/* - dssetup interface definition -*/ - -import "misc.idl"; - -[ - uuid("3919286a-b10c-11d0-9ba8-00c04fd92ef5"), - version(0.0), - endpoint("ncacn_np:[\\pipe\\lsarpc]", "ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"), - pointer_default(unique), - helpstring("Active Directory Setup") -] interface dssetup -{ - /**********************************************/ - /* Function 0x00 */ - - typedef enum { - DS_ROLE_STANDALONE_WORKSTATION = 0, - DS_ROLE_MEMBER_WORKSTATION = 1, - DS_ROLE_STANDALONE_SERVER = 2, - DS_ROLE_MEMBER_SERVER = 3, - DS_ROLE_BACKUP_DC = 4, - DS_ROLE_PRIMARY_DC = 5 - } dssetup_DsRole; - - typedef [bitmap32bit] bitmap { - DS_ROLE_PRIMARY_DS_RUNNING = 0x00000001, - DS_ROLE_PRIMARY_DS_MIXED_MODE = 0x00000002, - DS_ROLE_UPGRADE_IN_PROGRESS = 0x00000004, - DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT = 0x01000000 - } dssetup_DsRoleFlags; - - typedef struct { - dssetup_DsRole role; - dssetup_DsRoleFlags flags; - [charset(UTF16),string] uint16 *domain; - [charset(UTF16),string] uint16 *dns_domain; - [charset(UTF16),string] uint16 *forest; - GUID domain_guid; - } dssetup_DsRolePrimaryDomInfoBasic; - - typedef [v1_enum] enum { - DS_ROLE_NOT_UPGRADING = 0, - DS_ROLE_UPGRADING = 1 - } dssetup_DsUpgrade; - - typedef enum { - DS_ROLE_PREVIOUS_UNKNOWN = 0, - DS_ROLE_PREVIOUS_PRIMARY = 1, - DS_ROLE_PREVIOUS_BACKUP = 2 - } dssetup_DsPrevious; - - typedef struct { - dssetup_DsUpgrade upgrading; - dssetup_DsPrevious previous_role; - } dssetup_DsRoleUpgradeStatus; - - typedef enum { - DS_ROLE_OP_IDLE = 0, - DS_ROLE_OP_ACTIVE = 1, - DS_ROLE_OP_NEEDS_REBOOT = 2 - } dssetup_DsRoleOp; - - typedef struct { - dssetup_DsRoleOp status; - } dssetup_DsRoleOpStatus; - - typedef enum { - DS_ROLE_BASIC_INFORMATION = 1, - DS_ROLE_UPGRADE_STATUS = 2, - DS_ROLE_OP_STATUS = 3 - } dssetup_DsRoleInfoLevel; - - typedef [switch_type(dssetup_DsRoleInfoLevel)] union { - [case(DS_ROLE_BASIC_INFORMATION)] dssetup_DsRolePrimaryDomInfoBasic basic; - [case(DS_ROLE_UPGRADE_STATUS)] dssetup_DsRoleUpgradeStatus upgrade; - [case(DS_ROLE_OP_STATUS)] dssetup_DsRoleOpStatus opstatus; - } dssetup_DsRoleInfo; - - WERROR dssetup_DsRoleGetPrimaryDomainInformation( - [in] dssetup_DsRoleInfoLevel level, - [out,switch_is(level),unique] dssetup_DsRoleInfo *info - ); - - /* - w2k3 has removed all the calls below from their implementation. - These stubs are left here only as a way of documenting the names - of the calls in case they ever turn up on the wire. - */ - WERROR dssetup_DsRoleDnsNameToFlatName(); - WERROR dssetup_DsRoleDcAsDc(); - WERROR dssetup_DsRoleDcAsReplica(); - WERROR dssetup_DsRoleDemoteDc(); - WERROR dssetup_DsRoleGetDcOperationProgress(); - WERROR dssetup_DsRoleGetDcOperationResults(); - WERROR dssetup_DsRoleCancel(); - WERROR dssetup_DsRoleServerSaveStateForUpgrade(); - WERROR dssetup_DsRoleUpgradeDownlevelServer(); - WERROR dssetup_DsRoleAbortDownlevelServerUpgrade(); -} diff --git a/source3/librpc/idl/echo.idl b/source3/librpc/idl/echo.idl deleted file mode 100644 index 5ea37f1ac1..0000000000 --- a/source3/librpc/idl/echo.idl +++ /dev/null @@ -1,127 +0,0 @@ - -[ - uuid("60a15ec5-4de8-11d7-a637-005056a20182"), - endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"), - pointer_default(unique), - version(1.0), - helpstring("Simple echo pipe") -] -interface rpcecho -{ - /* Add one to an integer */ - void echo_AddOne( - [in] uint32 in_data, - [out] uint32 *out_data - ); - /* Echo an array of bytes back at the caller */ - void echo_EchoData( - [in] uint32 len, - [in] [size_is(len)] uint8 in_data[], - [out] [size_is(len)] uint8 out_data[] - ); - /* Sink data to the server */ - void echo_SinkData( - [in] uint32 len, - [in,size_is(len)] uint8 data[] - ); - /* Source data from server */ - void echo_SourceData( - [in] uint32 len, - [out,size_is(len)] uint8 data[] - ); - - /* test strings */ - void echo_TestCall ( - [in,string,charset(UTF16)] uint16 *s1, - [out,string,charset(UTF16)] uint16 **s2 - ); - - - /* test some alignment issues */ - typedef struct { - uint8 v; - } echo_info1; - - typedef struct { - uint16 v; - } echo_info2; - - typedef struct { - uint32 v; - } echo_info3; - - struct echo_info4 { - hyper v; - }; - - typedef struct { - uint8 v1; - hyper v2; - } echo_info5; - - typedef struct { - uint8 v1; - echo_info1 info1; - } echo_info6; - - typedef struct { - uint8 v1; - struct echo_info4 info4; - } echo_info7; - - typedef [switch_type(uint16)] union { - [case(1)] echo_info1 info1; - [case(2)] echo_info2 info2; - [case(3)] echo_info3 info3; - [case(4)] struct echo_info4 info4; - [case(5)] echo_info5 info5; - [case(6)] echo_info6 info6; - [case(7)] echo_info7 info7; - } echo_Info; - - NTSTATUS echo_TestCall2 ( - [in] uint16 level, - [out,switch_is(level)] echo_Info *info - ); - - uint32 echo_TestSleep( - [in] uint32 seconds - ); - - typedef enum { - ECHO_ENUM1 = 1, - ECHO_ENUM2 = 2 - } echo_Enum1; - - typedef [v1_enum] enum { - ECHO_ENUM1_32 = 1, - ECHO_ENUM2_32 = 2 - } echo_Enum1_32; - - typedef struct { - echo_Enum1 e1; - echo_Enum1_32 e2; - } echo_Enum2; - - typedef [switch_type(uint16)] union { - [case(ECHO_ENUM1)] echo_Enum1 e1; - [case(ECHO_ENUM2)] echo_Enum2 e2; - } echo_Enum3; - - void echo_TestEnum( - [in,out,ref] echo_Enum1 *foo1, - [in,out,ref] echo_Enum2 *foo2, - [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3 - ); - - typedef struct { - uint32 x; - [size_is(x)] uint16 surrounding[*]; - } echo_Surrounding; - - void echo_TestSurrounding( - [in,out,ref] echo_Surrounding *data - ); - - uint16 echo_TestDoublePointer([in] uint16 ***data); -} diff --git a/source3/librpc/idl/epmapper.idl b/source3/librpc/idl/epmapper.idl deleted file mode 100644 index 5611c3de18..0000000000 --- a/source3/librpc/idl/epmapper.idl +++ /dev/null @@ -1,302 +0,0 @@ -#include "idl_types.h" - -/* - endpoint mapper interface - Related links: - http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers -http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings - -*/ - -[ - uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), - version(3.0), - endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", - "ncalrpc:[EPMAPPER]"), - helpstring("EndPoint Mapper"), - pointer_default(ptr) -] -interface epmapper -{ - - /* - note that the following IDL won't work in MIDL, and in fact - that the full towers/floors representation of epm cannot be - represented in MIDL at all. I decided to represent it using - the extended IDL syntax in pidl to make it easier to work - with. - */ - - const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6; - const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012; - const int EPMAPPER_STATUS_OK = 0; - - - - typedef [enum8bit] enum { - - /* Level 4 and higher */ - EPM_PROTOCOL_DNET_NSP = 0x04, - EPM_PROTOCOL_OSI_TP4 = 0x05, - EPM_PROTOCOL_OSI_CLNS = 0x06, - EPM_PROTOCOL_TCP = 0x07, - EPM_PROTOCOL_UDP = 0x08, - EPM_PROTOCOL_IP = 0x09, - /* These 4 are protocol identifiers, always at level 3 or lower */ - EPM_PROTOCOL_NCADG = 0x0a, /* Connectionless RPC */ - EPM_PROTOCOL_NCACN = 0x0b, - EPM_PROTOCOL_NCALRPC = 0x0c, /* Local RPC */ - EPM_PROTOCOL_UUID = 0x0d, - EPM_PROTOCOL_IPX = 0x0e, - EPM_PROTOCOL_SMB = 0x0f, - EPM_PROTOCOL_PIPE = 0x10, - EPM_PROTOCOL_NETBIOS = 0x11, - EPM_PROTOCOL_NETBEUI = 0x12, - EPM_PROTOCOL_SPX = 0x13, - EPM_PROTOCOL_NB_IPX = 0x14, /* NetBIOS over IPX */ - EPM_PROTOCOL_DSP = 0x16, /* AppleTalk Data Stream Protocol */ - EPM_PROTOCOL_DDP = 0x17, /* AppleTalk Data Datagram Protocol */ - EPM_PROTOCOL_APPLETALK = 0x18, /* AppleTalk */ - EPM_PROTOCOL_VINES_SPP = 0x1a, - EPM_PROTOCOL_VINES_IPC = 0x1b, /* Inter Process Communication */ - EPM_PROTOCOL_STREETTALK = 0x1c, /* Vines Streettalk */ - EPM_PROTOCOL_HTTP = 0x1f, - EPM_PROTOCOL_UNIX_DS = 0x20, /* Unix domain socket */ - EPM_PROTOCOL_NULL = 0x21 - } epm_protocol; - - typedef struct { - /*FIXME */ - } epm_rhs_dnet_nsp; - - typedef struct { - /*FIXME*/ - } epm_rhs_osi_tp4; - - typedef struct { - /*FIXME*/ - } epm_rhs_osi_clns; - - typedef struct { - uint16 port; - } epm_rhs_udp; - - typedef struct { - uint16 port; - } epm_rhs_tcp; - - typedef struct { - ipv4address ipaddr; - } epm_rhs_ip; - - typedef struct { - uint16 minor_version; - } epm_rhs_ncadg; - - typedef struct { - uint16 minor_version; - } epm_rhs_ncacn; - - typedef struct { - [flag(NDR_REMAINING)] DATA_BLOB unknown; - } epm_rhs_uuid; - - typedef struct { - /*FIXME */ - } epm_rhs_ipx; - - typedef struct { - astring unc; - } epm_rhs_smb; - - typedef struct { - astring path; - } epm_rhs_pipe; - - typedef struct { - astring name; - } epm_rhs_netbios; - - typedef struct { - } epm_rhs_netbeui; - - typedef struct { - } epm_rhs_spx; - - typedef struct { - } epm_rhs_nb_ipx; - - typedef struct { - uint16 port; - } epm_rhs_http; - - typedef struct { - astring path; - } epm_rhs_unix_ds; - - typedef struct { - } epm_rhs_null; - - typedef struct { - uint16 minor_version; - } epm_rhs_ncalrpc; - - typedef struct { - } epm_rhs_appletalk; - - typedef struct { - } epm_rhs_atalk_stream; - - typedef struct { - } epm_rhs_atalk_datagram; - - typedef struct { - uint16 port; - } epm_rhs_vines_spp; - - typedef struct { - uint16 port; - } epm_rhs_vines_ipc; - - typedef struct { - astring streettalk; - } epm_rhs_streettalk; - - typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union { - [case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp; - [case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4; - [case(EPM_PROTOCOL_OSI_CLNS)] epm_rhs_osi_clns osi_clns; - [case(EPM_PROTOCOL_TCP)] epm_rhs_tcp tcp; - [case(EPM_PROTOCOL_UDP)] epm_rhs_udp udp; - [case(EPM_PROTOCOL_IP)] epm_rhs_ip ip; - [case(EPM_PROTOCOL_NCADG)] epm_rhs_ncadg ncadg; - [case(EPM_PROTOCOL_NCACN)] epm_rhs_ncacn ncacn; - [case(EPM_PROTOCOL_NCALRPC)] epm_rhs_ncalrpc ncalrpc; - [case(EPM_PROTOCOL_UUID)] epm_rhs_uuid uuid; - [case(EPM_PROTOCOL_IPX)] epm_rhs_ipx ipx; - [case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb; - [case(EPM_PROTOCOL_PIPE)] epm_rhs_pipe pipe; - [case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios; - [case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui; - [case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx; - [case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx; - [case(EPM_PROTOCOL_DSP)] epm_rhs_atalk_stream atalk_stream; - [case(EPM_PROTOCOL_DDP)] epm_rhs_atalk_datagram atalk_datagram; - [case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk; - [case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp; - [case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc; - [case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk; - [case(EPM_PROTOCOL_HTTP)] epm_rhs_http http; - [case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds; - [case(EPM_PROTOCOL_NULL)] epm_rhs_null null; - [default] [flag(NDR_REMAINING)] DATA_BLOB unknown; - } epm_rhs; - - typedef struct { - epm_protocol protocol; - [flag(NDR_REMAINING)] DATA_BLOB lhs_data; - } epm_lhs; - - typedef struct { - [subcontext(2)] epm_lhs lhs; - [subcontext(2),switch_is(lhs.protocol)] epm_rhs rhs; - } epm_floor; - - /* note that the NDR_NOALIGN flag is inherited by all nested - structures. All of the towers/floors stuff is - non-aligned. I wonder what sort of wicked substance these - guys were smoking? - */ - typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct { - uint16 num_floors; - epm_floor floors[num_floors]; - } epm_tower; - - typedef struct { - [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32 tower_length; - [subcontext(4)] epm_tower tower; - } epm_twr_t; - - typedef struct { - GUID object; - epm_twr_t *tower; - ascstr2 annotation; - } epm_entry_t; - - typedef struct { - GUID uuid; - uint16 vers_major; - uint16 vers_minor; - } rpc_if_id_t; - - /**********************/ - /* Function 0x0 */ - error_status_t epm_Insert( - [in] uint32 num_ents, - [in,size_is(num_ents)] epm_entry_t entries[], - [in] uint32 replace - ); - - /**********************/ - /* Function 0x1 */ - error_status_t epm_Delete( - [in] uint32 num_ents, - [in, size_is(num_ents)] epm_entry_t entries[] - ); - - /**********************/ - /* Function 0x02 */ - error_status_t epm_Lookup( - [in] uint32 inquiry_type, - [in,ptr] GUID *object, - [in,ptr] rpc_if_id_t *interface_id, - [in] uint32 vers_option, - [in,out] policy_handle *entry_handle, - [in] uint32 max_ents, - [out] uint32 *num_ents, - [out, length_is(*num_ents), size_is(max_ents)] epm_entry_t entries[] - ); - - - /**********************/ - /* Function 0x03 */ - - typedef struct { - epm_twr_t *twr; - } epm_twr_p_t; - - [public] error_status_t epm_Map( - [in,ptr] GUID *object, - [in,ptr] epm_twr_t *map_tower, - [in,out] policy_handle *entry_handle, - [in] uint32 max_towers, - [out] uint32 *num_towers, - [out, length_is(*num_towers), size_is(max_towers)] epm_twr_p_t towers[] - ); - - - /**********************/ - /* Function 0x04 */ - error_status_t epm_LookupHandleFree( - [in,out] policy_handle *entry_handle - ); - - /**********************/ - /* Function 0x05 */ - error_status_t epm_InqObject( - [in] GUID *epm_object - ); - - - /**********************/ - /* Function 0x06 */ - error_status_t epm_MgmtDelete( - [in] uint32 object_speced, - [in,ptr] GUID *object, - [in,ptr] epm_twr_t *tower - ); - - /**********************/ - /* Function 0x07 */ - error_status_t epm_MapAuth(); -} diff --git a/source3/librpc/idl/eventlog.idl b/source3/librpc/idl/eventlog.idl deleted file mode 100644 index 18b1a0e454..0000000000 --- a/source3/librpc/idl/eventlog.idl +++ /dev/null @@ -1,181 +0,0 @@ -#include "idl_types.h" - -/* - eventlog interface definition -*/ - -import "lsa.idl", "security.idl"; - -[ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"), - version(0.0), - helpstring("Event Logger") -] interface eventlog -{ - typedef bitmap { - EVENTLOG_SEQUENTIAL_READ = 0x0001, - EVENTLOG_SEEK_READ = 0x0002, - EVENTLOG_FORWARDS_READ = 0x0004, - EVENTLOG_BACKWARDS_READ = 0x0008 - } eventlogReadFlags; - - typedef bitmap { - EVENTLOG_SUCCESS = 0x0000, - EVENTLOG_ERROR_TYPE = 0x0001, - EVENTLOG_WARNING_TYPE = 0x0002, - EVENTLOG_INFORMATION_TYPE = 0x0004, - EVENTLOG_AUDIT_SUCCESS = 0x0008, - EVENTLOG_AUDIT_FAILURE = 0x0010 - } eventlogEventTypes; - - typedef struct { - uint16 unknown0; - uint16 unknown1; - } eventlog_OpenUnknown0; - - typedef [public] struct { - uint32 size; - uint32 reserved; - uint32 record_number; - uint32 time_generated; - uint32 time_written; - uint32 event_id; - uint16 event_type; - uint16 num_of_strings; - uint16 event_category; - uint16 reserved_flags; - uint32 closing_record_number; - uint32 stringoffset; - uint32 sid_length; - uint32 sid_offset; - uint32 data_length; - uint32 data_offset; - nstring source_name; - nstring computer_name; - nstring strings[num_of_strings]; - astring raw_data; - } eventlog_Record; - - /******************/ - /* Function: 0x00 */ - NTSTATUS eventlog_ClearEventLogW( - [in] policy_handle *handle, - [in,unique] lsa_String *backupfile - ); - - /******************/ - /* Function: 0x01 */ - NTSTATUS eventlog_BackupEventLogW(); - - /******************/ - /* Function: 0x02 */ - NTSTATUS eventlog_CloseEventLog( - [in,out] policy_handle *handle - ); - - /******************/ - /* Function: 0x03 */ - NTSTATUS eventlog_DeregisterEventSource(); - - /******************/ - /* Function: 0x04 */ - NTSTATUS eventlog_GetNumRecords( - [in] policy_handle *handle, - [out] uint32 *number - ); - - /******************/ - /* Function: 0x05 */ - NTSTATUS eventlog_GetOldestRecord( - [in] policy_handle *handle, - [out,ref] uint32 *oldest_entry - ); - - /******************/ - /* Function: 0x06 */ - NTSTATUS eventlog_ChangeNotify(); - - /******************/ - /* Function: 0x07 */ - NTSTATUS eventlog_OpenEventLogW( - [in,unique] eventlog_OpenUnknown0 *unknown0, - [in,ref] lsa_String *logname, - [in,ref] lsa_String *servername, - [in] uint32 unknown2, - [in] uint32 unknown3, - [out] policy_handle *handle - ); - - /******************/ - /* Function: 0x08 */ - NTSTATUS eventlog_RegisterEventSourceW(); - - /******************/ - /* Function: 0x09 */ - NTSTATUS eventlog_OpenBackupEventLogW(); - - /******************/ - /* Function: 0x0a */ - NTSTATUS eventlog_ReadEventLogW( - [in] policy_handle *handle, - [in] uint32 flags, - [in] uint32 offset, - [in] [range(0,0x7FFFF)] uint32 number_of_bytes, - [out,ref,size_is(number_of_bytes)] uint8 *data, - [out,ref] uint32 *sent_size, - [out,ref] uint32 *real_size - ); - - /*****************/ - /* Function 0x0b */ - NTSTATUS eventlog_ReportEventW(); - - /*****************/ - /* Function 0x0c */ - NTSTATUS eventlog_ClearEventLogA(); - - /******************/ - /* Function: 0x0d */ - NTSTATUS eventlog_BackupEventLogA(); - - /*****************/ - /* Function 0x0e */ - NTSTATUS eventlog_OpenEventLogA(); - - /*****************/ - /* Function 0x0f */ - NTSTATUS eventlog_RegisterEventSourceA(); - - /*****************/ - /* Function 0x10 */ - NTSTATUS eventlog_OpenBackupEventLogA(); - - /*****************/ - /* Function 0x11 */ - NTSTATUS eventlog_ReadEventLogA(); - - /*****************/ - /* Function 0x12 */ - NTSTATUS eventlog_ReportEventA(); - - /*****************/ - /* Function 0x13 */ - NTSTATUS eventlog_RegisterClusterSvc(); - - /*****************/ - /* Function 0x14 */ - NTSTATUS eventlog_DeregisterClusterSvc(); - - /*****************/ - /* Function 0x15 */ - NTSTATUS eventlog_WriteClusterEvents(); - - /*****************/ - /* Function 0x16 */ - NTSTATUS eventlog_GetLogIntormation(); - - /*****************/ - /* Function 0x17 */ - NTSTATUS eventlog_FlushEventLog( - [in] policy_handle *handle - ); -} diff --git a/source3/librpc/idl/idl_types.h b/source3/librpc/idl/idl_types.h deleted file mode 100644 index f21f3e660d..0000000000 --- a/source3/librpc/idl/idl_types.h +++ /dev/null @@ -1,86 +0,0 @@ -#define STR_ASCII LIBNDR_FLAG_STR_ASCII -#define STR_LEN4 LIBNDR_FLAG_STR_LEN4 -#define STR_SIZE4 LIBNDR_FLAG_STR_SIZE4 -#define STR_SIZE2 LIBNDR_FLAG_STR_SIZE2 -#define STR_NOTERM LIBNDR_FLAG_STR_NOTERM -#define STR_NULLTERM LIBNDR_FLAG_STR_NULLTERM -#define STR_BYTESIZE LIBNDR_FLAG_STR_BYTESIZE -#define STR_FIXLEN32 LIBNDR_FLAG_STR_FIXLEN32 -#define STR_FIXLEN15 LIBNDR_FLAG_STR_FIXLEN15 -#define STR_CONFORMANT LIBNDR_FLAG_STR_CONFORMANT -#define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN -#define STR_UTF8 LIBNDR_FLAG_STR_UTF8 - -/* - a UCS2 string prefixed with [size], 32 bits -*/ -#define lstring [flag(STR_SIZE4)] string - -/* - a null terminated UCS2 string -*/ -#define nstring [flag(STR_NULLTERM)] string - -/* - fixed length 32 character UCS-2 string -*/ -#define string32 [flag(STR_FIXLEN32)] string - -/* - fixed length 16 character ascii string -*/ -#define astring15 [flag(STR_ASCII|STR_FIXLEN15)] string - -/* - an ascii string prefixed with [offset] [length], both 32 bits - null terminated -*/ -#define ascstr2 [flag(STR_ASCII|STR_LEN4)] string - -/* - an ascii string prefixed with [size], 32 bits -*/ -#define asclstr [flag(STR_ASCII|STR_SIZE4)] string - -/* - an ascii string prefixed with [size], 16 bits - null terminated -*/ -#define ascstr3 [flag(STR_ASCII|STR_SIZE2)] string - -/* - an ascii string prefixed with [size] [offset] [length], all 32 bits - not null terminated -*/ -#define ascstr_noterm [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string - -/* - a null terminated ascii string -*/ -#define astring [flag(STR_ASCII|STR_NULLTERM)] string - -/* - a null terminated UTF8 string -*/ -#define utf8string [flag(STR_UTF8|STR_NULLTERM)] string - -/* - a null terminated UCS2 string -*/ -#define nstring_array [flag(STR_NULLTERM)] string_array - -#define NDR_NOALIGN LIBNDR_FLAG_NOALIGN -#define NDR_REMAINING LIBNDR_FLAG_REMAINING -#define NDR_ALIGN2 LIBNDR_FLAG_ALIGN2 -#define NDR_ALIGN4 LIBNDR_FLAG_ALIGN4 -#define NDR_ALIGN8 LIBNDR_FLAG_ALIGN8 - -/* this flag is used to force a section of IDL as little endian. It is - needed for the epmapper IDL, which is defined as always being LE */ -#define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN -#define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN - -/* - this is used to control formatting of uint8 arrays -*/ -#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX diff --git a/source3/librpc/idl/initshutdown.idl b/source3/librpc/idl/initshutdown.idl deleted file mode 100644 index 8815a9a29e..0000000000 --- a/source3/librpc/idl/initshutdown.idl +++ /dev/null @@ -1,46 +0,0 @@ -#include "idl_types.h" - -/* - initshutdown interface definition -*/ - -[ - uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"), - version(1.0), - endpoint("ncacn_np:[\\pipe\\InitShutdown]"), - pointer_default(unique), - helpstring("Init shutdown service") -] interface initshutdown -{ - typedef struct { - [value(strlen_m_term(name))] uint32 name_size; - [flag(STR_LEN4|STR_NOTERM)] string name; - } initshutdown_String_sub; - - typedef [public] struct { - [value(strlen_m(name->name)*2)] uint16 name_len; - [value(strlen_m_term(name->name)*2)] uint16 name_size; - initshutdown_String_sub *name; - } initshutdown_String; - - WERROR initshutdown_Init( - [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, - [in] uint32 timeout, - [in] uint8 force_apps, - [in] uint8 do_reboot - ); - - WERROR initshutdown_Abort( - [in,unique] uint16 *server - ); - - WERROR initshutdown_InitEx( - [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, - [in] uint32 timeout, - [in] uint8 force_apps, - [in] uint8 do_reboot, - [in] uint32 reason - ); -} diff --git a/source3/librpc/idl/krb5pac.idl b/source3/librpc/idl/krb5pac.idl deleted file mode 100644 index c039502d23..0000000000 --- a/source3/librpc/idl/krb5pac.idl +++ /dev/null @@ -1,120 +0,0 @@ -/* - krb5 PAC -*/ - -#include "idl_types.h" - -import "security.idl", "netlogon.idl", "samr.idl"; - -[ - uuid("12345778-1234-abcd-0000-00000000"), - version(0.0), - pointer_default(unique), - helpstring("Active Directory KRB5 PAC") -] -interface krb5pac -{ - typedef struct { - NTTIME logon_time; - [value(2*strlen_m(account_name))] uint16 size; - [charset(UTF16)] uint8 account_name[size]; - } PAC_LOGON_NAME; - - typedef [public,flag(NDR_PAHEX)] struct { - uint32 type; - [flag(NDR_REMAINING)] DATA_BLOB signature; - } PAC_SIGNATURE_DATA; - - typedef [gensize] struct { - netr_SamInfo3 info3; - dom_sid2 *res_group_dom_sid; - samr_RidWithAttributeArray res_groups; - } PAC_LOGON_INFO; - - typedef struct { - [value(2*strlen_m(upn_name))] uint16 upn_size; - uint16 upn_offset; - [value(2*strlen_m(domain_name))] uint16 domain_size; - uint16 domain_offset; - uint16 unknown3; /* 0x01 */ - uint16 unknown4; - uint32 unknown5; - [charset(UTF16)] uint8 upn_name[upn_size+2]; - [charset(UTF16)] uint8 domain_name[domain_size+2]; - uint32 unknown6; /* padding */ - } PAC_UNKNOWN_12; - - typedef [public] struct { - [value(0x00081001)] uint32 unknown1; - [value(0xCCCCCCCC)] uint32 unknown2; - [value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info, ndr->flags)+4,8))] uint32 _ndr_size; - [value(0x00000000)] uint32 unknown3; - PAC_LOGON_INFO *info; - } PAC_LOGON_INFO_CTR; - - typedef [public,v1_enum] enum { - PAC_TYPE_LOGON_INFO = 1, - PAC_TYPE_SRV_CHECKSUM = 6, - PAC_TYPE_KDC_CHECKSUM = 7, - PAC_TYPE_LOGON_NAME = 10, - PAC_TYPE_CONSTRAINED_DELEGATION = 11, - PAC_TYPE_UNKNOWN_12 = 12 - } PAC_TYPE; - - typedef struct { - [flag(NDR_REMAINING)] DATA_BLOB remaining; - } DATA_BLOB_REM; - - typedef [public,nodiscriminant,gensize] union { - [case(PAC_TYPE_LOGON_INFO)] PAC_LOGON_INFO_CTR logon_info; - [case(PAC_TYPE_SRV_CHECKSUM)] PAC_SIGNATURE_DATA srv_cksum; - [case(PAC_TYPE_KDC_CHECKSUM)] PAC_SIGNATURE_DATA kdc_cksum; - [case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name; - [default] [subcontext(0)] DATA_BLOB_REM unknown; - /* [case(PAC_TYPE_UNKNOWN_12)] PAC_UNKNOWN_12 unknown; */ - } PAC_INFO; - - typedef [public,nopush,nopull,noprint] struct { - PAC_TYPE type; - [value(_ndr_size_PAC_INFO(info, type, 0))] uint32 _ndr_size; - [relative,switch_is(type),subcontext(0),subcontext_size(_subcontext_size_PAC_INFO(r, ndr->flags)),flag(NDR_ALIGN8)] PAC_INFO *info; - [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */ - } PAC_BUFFER; - - typedef [public] struct { - uint32 num_buffers; - uint32 version; - PAC_BUFFER buffers[num_buffers]; - } PAC_DATA; - - typedef [public] struct { - PAC_TYPE type; - uint32 ndr_size; - [relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8)),flag(NDR_ALIGN8)] DATA_BLOB_REM *info; - [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */ - } PAC_BUFFER_RAW; - - typedef [public] struct { - uint32 num_buffers; - uint32 version; - PAC_BUFFER_RAW buffers[num_buffers]; - } PAC_DATA_RAW; - - void decode_pac( - [in] PAC_DATA pac - ); - - void decode_pac_raw( - [in] PAC_DATA_RAW pac - ); - - void decode_login_info( - [in] PAC_LOGON_INFO logon_info - ); - - /* used for samba3 netsamlogon cache */ - typedef [public] struct { - time_t timestamp; - netr_SamInfo3 info3; - } netsamlogoncache_entry; -} diff --git a/source3/librpc/idl/libnetapi.idl b/source3/librpc/idl/libnetapi.idl index 039dcf4152..f2f4a16c12 100644 --- a/source3/librpc/idl/libnetapi.idl +++ b/source3/librpc/idl/libnetapi.idl @@ -517,7 +517,9 @@ interface libnetapi uint32 usriX_code_page; string usriX_profile; string usriX_home_dir_drive; + uint32 usriX_user_id; uint32 usriX_primary_group_id; + uint32 usriX_password_expired; } USER_INFO_X; [nopush,nopull] NET_API_STATUS NetUserAdd( diff --git a/source3/librpc/idl/lsa.idl b/source3/librpc/idl/lsa.idl index cb16f64dab..a443448871 100644 --- a/source3/librpc/idl/lsa.idl +++ b/source3/librpc/idl/lsa.idl @@ -4,7 +4,7 @@ lsa interface definition */ -import "security.idl"; +import "misc.idl", "security.idl"; [ uuid("12345778-1234-abcd-ef00-0123456789ab"), version(0.0), @@ -14,6 +14,7 @@ import "security.idl"; ] interface lsarpc { typedef bitmap security_secinfo security_secinfo; + typedef bitmap kerb_EncTypes kerb_EncTypes; typedef [public,noejs] struct { [value(2*strlen_m(string))] uint16 length; @@ -108,7 +109,7 @@ import "security.idl"; /******************/ /* Function: 0x05 */ - NTSTATUS lsa_ChangePassword (); + [todo] NTSTATUS lsa_ChangePassword (); /******************/ @@ -160,12 +161,11 @@ import "security.idl"; typedef struct { uint32 percent_full; - uint32 log_size; - NTTIME retention_time; + uint32 maximum_log_size; + hyper retention_time; uint8 shutdown_in_progress; - NTTIME time_to_shutdown; + hyper time_to_shutdown; uint32 next_audit_record; - uint32 unknown; } lsa_AuditLogInfo; typedef [v1_enum] enum { @@ -203,9 +203,13 @@ import "security.idl"; lsa_String name; } lsa_PDAccountInfo; + typedef [v1_enum] enum { + LSA_ROLE_BACKUP=2, + LSA_ROLE_PRIMARY=3 + } lsa_Role; + typedef struct { - uint16 unknown; /* an midl padding bug? */ - uint16 role; + lsa_Role role; } lsa_ServerRole; typedef struct { @@ -224,7 +228,7 @@ import "security.idl"; typedef struct { hyper modified_id; - NTTIME db_create_time; + NTTIME_hyper db_create_time; } lsa_ModificationInfo; typedef struct { @@ -232,7 +236,6 @@ import "security.idl"; } lsa_AuditFullSetInfo; typedef struct { - uint16 unknown; /* an midl padding bug? */ uint8 shutdown_on_full; uint8 log_is_full; } lsa_AuditFullQueryInfo; @@ -260,10 +263,12 @@ import "security.idl"; 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 } lsa_PolicyInfo; typedef [switch_type(uint16)] union { @@ -275,10 +280,12 @@ import "security.idl"; [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role; [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica; [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota; - [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db; + [case(LSA_POLICY_INFO_MOD)] lsa_ModificationInfo mod; [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset; [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery; [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns; + [case(LSA_POLICY_INFO_DNS_INT)] lsa_DnsDomainInfo dns; + [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] lsa_DomainInfo l_account_domain; } lsa_PolicyInformation; NTSTATUS lsa_QueryInfoPolicy( @@ -297,7 +304,7 @@ import "security.idl"; /******************/ /* Function: 0x09 */ - NTSTATUS lsa_ClearAuditLog (); + [todo] NTSTATUS lsa_ClearAuditLog (); /******************/ /* Function: 0x0a */ @@ -334,7 +341,7 @@ import "security.idl"; /* Function: 0x0c */ [public] NTSTATUS lsa_CreateTrustedDomain( - [in] policy_handle *handle, + [in] policy_handle *policy_handle, [in] lsa_DomainInfo *info, [in] uint32 access_mask, [out] policy_handle *trustdom_handle @@ -362,7 +369,7 @@ import "security.idl"; /******************/ /* Function: 0x0e */ - typedef enum { + typedef [public] enum { SID_NAME_USE_NONE = 0,/* NOTUSED */ SID_NAME_USER = 1, /* user */ SID_NAME_DOM_GRP = 2, /* domain group */ @@ -409,7 +416,8 @@ import "security.idl"; 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 } lsa_LookupNamesLevel; [public] NTSTATUS lsa_LookupNames ( @@ -506,28 +514,44 @@ import "security.idl"; ); /* Function: 0x15 */ - NTSTATUS lsa_GetQuotasForAccount(); + [todo] NTSTATUS lsa_GetQuotasForAccount(); /* Function: 0x16 */ - NTSTATUS lsa_SetQuotasForAccount(); + [todo] NTSTATUS lsa_SetQuotasForAccount(); + typedef [bitmap32bit] bitmap { + LSA_POLICY_MODE_INTERACTIVE = 0x00000001, + LSA_POLICY_MODE_NETWORK = 0x00000002, + LSA_POLICY_MODE_BATCH = 0x00000004, + LSA_POLICY_MODE_SERVICE = 0x00000010, + LSA_POLICY_MODE_PROXY = 0x00000020, + LSA_POLICY_MODE_DENY_INTERACTIVE = 0x00000040, + LSA_POLICY_MODE_DENY_NETWORK = 0x00000080, + LSA_POLICY_MODE_DENY_BATCH = 0x00000100, + LSA_POLICY_MODE_DENY_SERVICE = 0x00000200, + LSA_POLICY_MODE_REMOTE_INTERACTIVE = 0x00000400, + LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE = 0x00000800, + LSA_POLICY_MODE_ALL = 0x00000FF7, + LSA_POLICY_MODE_ALL_NT4 = 0x00000037 + } lsa_SystemAccessModeFlags; + /* Function: 0x17 */ NTSTATUS lsa_GetSystemAccessAccount( - [in] policy_handle *handle, + [in] policy_handle *handle, [out,ref] uint32 *access_mask ); /* Function: 0x18 */ NTSTATUS lsa_SetSystemAccessAccount( - [in] policy_handle *handle, - [in] uint32 access_mask + [in] policy_handle *handle, + [in] uint32 access_mask ); /* Function: 0x19 */ NTSTATUS lsa_OpenTrustedDomain( [in] policy_handle *handle, [in] dom_sid2 *sid, - [in] uint32 access_mask, + [in] uint32 access_mask, [out] policy_handle *trustdom_handle ); @@ -543,22 +567,53 @@ import "security.idl"; } lsa_DATA_BUF2; typedef enum { - LSA_TRUSTED_DOMAIN_INFO_NAME = 1, - LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO = 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_NAME = 1, + 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_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 } lsa_TrustDomInfoEnum; + typedef [public,bitmap32bit] bitmap { + LSA_TRUST_DIRECTION_INBOUND = 0x00000001, + LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002 + } lsa_TrustDirection; + + typedef [v1_enum] enum { + LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001, + LSA_TRUST_TYPE_UPLEVEL = 0x00000002, + LSA_TRUST_TYPE_MIT = 0x00000003 + } lsa_TrustType; + + typedef [public,bitmap32bit] bitmap { + LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001, + LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002, + LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004, + LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008, + LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010, + LSA_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020, + LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040, + LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080 + } lsa_TrustAttributes; + typedef struct { lsa_StringLarge netbios_name; } lsa_TrustDomainInfoName; + + typedef struct { + uint32 entries; + [size_is(entries)] lsa_StringLarge *netbios_names; + } lsa_TrustDomainInfoControllers; + typedef struct { uint32 posix_offset; } lsa_TrustDomainInfoPosixOffset; @@ -576,15 +631,22 @@ import "security.idl"; typedef struct { lsa_StringLarge domain_name; lsa_StringLarge netbios_name; - dom_sid2 *sid; - uint32 trust_direction; - uint32 trust_type; - uint32 trust_attributes; + dom_sid2 *sid; + lsa_TrustDirection trust_direction; + lsa_TrustType trust_type; + lsa_TrustAttributes trust_attributes; } lsa_TrustDomainInfoInfoEx; + typedef [public,v1_enum] enum { + TRUST_AUTH_TYPE_NONE = 0, + TRUST_AUTH_TYPE_NT4OWF = 1, + TRUST_AUTH_TYPE_CLEAR = 2, + TRUST_AUTH_TYPE_VERSION = 3 + } lsa_TrustAuthType; + typedef struct { NTTIME_hyper last_update_time; - uint32 secret_type; + lsa_TrustAuthType AuthType; lsa_DATA_BUF2 data; } lsa_TrustDomainInfoBuffer; @@ -604,27 +666,58 @@ import "security.idl"; } lsa_TrustDomainInfoFullInfo; typedef struct { - lsa_TrustDomainInfoInfoEx info_ex; - lsa_DATA_BUF2 data1; - } lsa_TrustDomainInfo11; + lsa_DATA_BUF2 auth_blob; + } lsa_TrustDomainInfoAuthInfoInternal; + + typedef struct { + lsa_TrustDomainInfoInfoEx info_ex; + lsa_TrustDomainInfoPosixOffset posix_offset; + lsa_TrustDomainInfoAuthInfoInternal auth_info; + } lsa_TrustDomainInfoFullInfoInternal; typedef struct { lsa_TrustDomainInfoInfoEx info_ex; - lsa_DATA_BUF2 data1; + uint32 forest_trust_length; + [size_is(forest_trust_length)] uint8 *forest_trust_data; + } lsa_TrustDomainInfoInfoEx2Internal; + + typedef struct { + lsa_TrustDomainInfoInfoEx2Internal info; lsa_TrustDomainInfoPosixOffset posix_offset; lsa_TrustDomainInfoAuthInfo auth_info; - } lsa_TrustDomainInfoInfoAll; + } lsa_TrustDomainInfoFullInfo2Internal; + + typedef struct { + kerb_EncTypes enc_types; + } lsa_TrustDomainInfoSupportedEncTypes; typedef [switch_type(lsa_TrustDomInfoEnum)] union { - [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name; - [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] lsa_TrustDomainInfoPosixOffset posix_offset; - [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password; - [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] lsa_TrustDomainInfoBasic info_basic; - [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex; - [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info; - [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info; - [case(LSA_TRUSTED_DOMAIN_INFO_11)] lsa_TrustDomainInfo11 info11; - [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all; + [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] + lsa_TrustDomainInfoName name; + [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)] + lsa_TrustDomainInfoControllers controllers; + [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] + lsa_TrustDomainInfoPosixOffset posix_offset; + [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] + lsa_TrustDomainInfoPassword password; + [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] + lsa_TrustDomainInfoBasic info_basic; + [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] + lsa_TrustDomainInfoInfoEx info_ex; + [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] + lsa_TrustDomainInfoAuthInfo auth_info; + [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] + lsa_TrustDomainInfoFullInfo full_info; + [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)] + lsa_TrustDomainInfoAuthInfoInternal auth_info_internal; + [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)] + lsa_TrustDomainInfoFullInfoInternal full_info_internal; + [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)] + lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal; + [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)] + lsa_TrustDomainInfoFullInfo2Internal full_info2_internal; + [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)] + lsa_TrustDomainInfoSupportedEncTypes enc_types; } lsa_TrustedDomainInfo; /* Function: 0x1a */ @@ -635,7 +728,11 @@ import "security.idl"; ); /* Function: 0x1b */ - NTSTATUS lsa_SetInformationTrustedDomain(); + NTSTATUS lsa_SetInformationTrustedDomain( + [in] policy_handle *trustdom_handle, + [in] lsa_TrustDomInfoEnum level, + [in,switch_is(level)] lsa_TrustedDomainInfo *info + ); /* Function: 0x1c */ [public] NTSTATUS lsa_OpenSecret( @@ -695,9 +792,10 @@ import "security.idl"; [out,ref] uint16 *returned_language_id ); - /* Function: 0x22 */ - NTSTATUS lsa_DeleteObject( - [in,out] policy_handle *handle + /*******************/ + /* Function: 0x22 */ + NTSTATUS lsa_DeleteObject ( + [in,out] policy_handle *handle ); /*******************/ @@ -732,7 +830,7 @@ import "security.idl"; [in,ref] dom_sid2 *sid, [in,ref] lsa_RightSet *rights ); - + /**********************/ /* Function: 0x26 */ NTSTATUS lsa_RemoveAccountRights ( @@ -751,7 +849,13 @@ import "security.idl"; ); /* Function: 0x28 */ - NTSTATUS lsa_SetTrustedDomainInfo(); + NTSTATUS lsa_SetTrustedDomainInfo( + [in] policy_handle *handle, + [in] dom_sid2 *dom_sid, + [in] lsa_TrustDomInfoEnum level, + [in,switch_is(level)] lsa_TrustedDomainInfo *info + ); + /* Function: 0x29 */ NTSTATUS lsa_DeleteTrustedDomain( [in] policy_handle *handle, @@ -759,9 +863,9 @@ import "security.idl"; ); /* Function: 0x2a */ - NTSTATUS lsa_StorePrivateData(); + [todo] NTSTATUS lsa_StorePrivateData(); /* Function: 0x2b */ - NTSTATUS lsa_RetrievePrivateData(); + [todo] NTSTATUS lsa_RetrievePrivateData(); /**********************/ @@ -811,7 +915,7 @@ import "security.idl"; NTSTATUS lsa_SetTrustedDomainInfoByName( [in] policy_handle *handle, [in] lsa_String trusted_domain, - [in] lsa_TrustDomInfoEnum level, + [in] lsa_TrustDomInfoEnum level, [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info ); @@ -832,9 +936,15 @@ import "security.idl"; [in] uint32 max_size ); - /* Function 0x33 */ - NTSTATUS lsa_CreateTrustedDomainEx(); + NTSTATUS lsa_CreateTrustedDomainEx( + [in] policy_handle *policy_handle, + [in] lsa_TrustDomainInfoInfoEx *info, + [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info, + [in] uint32 access_mask, + [out] policy_handle *trustdom_handle + ); + /* Function 0x34 */ NTSTATUS lsa_CloseTrustedDomainEx( @@ -892,7 +1002,7 @@ import "security.idl"; ); /* Function 0x38 */ - NTSTATUS lsa_TestCall(); + [todo] NTSTATUS lsa_TestCall(); /**********************/ /* Function 0x39 */ @@ -943,36 +1053,42 @@ import "security.idl"; [in,out,ref] lsa_TransSidArray2 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 unknown1, - [in] uint32 unknown2 + [in] uint32 lookup_options, + [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ ); /* Function 0x3b */ - NTSTATUS lsa_CreateTrustedDomainEx2(); + NTSTATUS lsa_CreateTrustedDomainEx2( + [in] policy_handle *policy_handle, + [in] lsa_TrustDomainInfoInfoEx *info, + [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info, + [in] uint32 access_mask, + [out] policy_handle *trustdom_handle + ); /* Function 0x3c */ - NTSTATUS lsa_CREDRWRITE(); + [todo] NTSTATUS lsa_CREDRWRITE(); /* Function 0x3d */ - NTSTATUS lsa_CREDRREAD(); + [todo] NTSTATUS lsa_CREDRREAD(); /* Function 0x3e */ - NTSTATUS lsa_CREDRENUMERATE(); + [todo] NTSTATUS lsa_CREDRENUMERATE(); /* Function 0x3f */ - NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS(); + [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS(); /* Function 0x40 */ - NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS(); + [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS(); /* Function 0x41 */ - NTSTATUS lsa_CREDRDELETE(); + [todo] NTSTATUS lsa_CREDRDELETE(); /* Function 0x42 */ - NTSTATUS lsa_CREDRGETTARGETINFO(); + [todo] NTSTATUS lsa_CREDRGETTARGETINFO(); /* Function 0x43 */ - NTSTATUS lsa_CREDRPROFILELOADED(); + [todo] NTSTATUS lsa_CREDRPROFILELOADED(); /**********************/ /* Function 0x44 */ @@ -980,7 +1096,7 @@ import "security.idl"; lsa_SidType sid_type; dom_sid2 *sid; uint32 sid_index; - uint32 unknown; + uint32 flags; } lsa_TranslatedSid3; typedef struct { @@ -996,21 +1112,21 @@ import "security.idl"; [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 unknown1, - [in] uint32 unknown2 + [in] uint32 lookup_options, + [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ ); /* Function 0x45 */ - NTSTATUS lsa_CREDRGETSESSIONTYPES(); + [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES(); /* Function 0x46 */ - NTSTATUS lsa_LSARREGISTERAUDITEVENT(); + [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT(); /* Function 0x47 */ - NTSTATUS lsa_LSARGENAUDITEVENT(); + [todo] NTSTATUS lsa_LSARGENAUDITEVENT(); /* Function 0x48 */ - NTSTATUS lsa_LSARUNREGISTERAUDITEVENT(); + [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT(); /* Function 0x49 */ typedef struct { @@ -1058,10 +1174,10 @@ import "security.idl"; ); /* Function 0x4a */ - NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION(); + [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION(); /* Function 0x4b */ - NTSTATUS lsa_CREDRRENAME(); + [todo] NTSTATUS lsa_CREDRRENAME(); /*****************/ /* Function 0x4c */ @@ -1076,6 +1192,11 @@ import "security.idl"; [in] uint32 unknown2 ); + const int LSA_CLIENT_REVISION_NO_DNS = 0x00000001; + const int LSA_CLIENT_REVISION_DNS = 0x00000002; + + const int LSA_LOOKUP_OPTIONS_NO_ISOLATED = 0x80000000; + /* Function 0x4d */ NTSTATUS lsa_LookupNames4( [in,range(0,1000)] uint32 num_names, @@ -1084,20 +1205,20 @@ import "security.idl"; [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 unknown1, - [in] uint32 unknown2 + [in] uint32 lookup_options, + [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ ); /* Function 0x4e */ - NTSTATUS lsa_LSAROPENPOLICYSCE(); + [todo] NTSTATUS lsa_LSAROPENPOLICYSCE(); /* Function 0x4f */ - NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE(); + [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE(); /* Function 0x50 */ - NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(); + [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(); /* Function 0x51 */ - NTSTATUS lsa_LSARADTREPORTSECURITYEVENT(); + [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT(); } diff --git a/source3/librpc/idl/misc.idl b/source3/librpc/idl/misc.idl deleted file mode 100644 index 132a81f138..0000000000 --- a/source3/librpc/idl/misc.idl +++ /dev/null @@ -1,51 +0,0 @@ -/* - miscellaneous IDL structures -*/ - - -[ - pointer_default(unique) -] -interface misc -{ - typedef [public,noprint,gensize,noejs] struct { - uint32 time_low; - uint16 time_mid; - uint16 time_hi_and_version; - uint8 clock_seq[2]; - uint8 node[6]; - } GUID; - - typedef [public] struct { - GUID uuid; - uint32 if_version; - } ndr_syntax_id; - - typedef [public] struct { - uint32 handle_type; - GUID uuid; - } policy_handle; - - /* secure channel types */ - /* Only SEC_CHAN_WKSTA can forward requests to other domains. */ - - typedef [public] enum { - SEC_CHAN_WKSTA = 2, - SEC_CHAN_DOMAIN = 4, - SEC_CHAN_BDC = 6 - } netr_SchannelType; - - /* SAM database types */ - typedef [public,v1_enum] enum { - SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */ - SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */ - SAM_DATABASE_PRIVS = 2 /* Privileges */ - } netr_SamDatabaseID; - - typedef [public,v1_enum] enum { - SAMR_REJECT_OTHER = 0, - SAMR_REJECT_TOO_SHORT = 1, - SAMR_REJECT_IN_HISTORY = 2, - SAMR_REJECT_COMPLEXITY = 5 - } samr_RejectReason; -} diff --git a/source3/librpc/idl/nbt.idl b/source3/librpc/idl/nbt.idl deleted file mode 100644 index 9f5c4a9a5f..0000000000 --- a/source3/librpc/idl/nbt.idl +++ /dev/null @@ -1,781 +0,0 @@ -#include "idl_types.h" - -/* - IDL structures for NBT operations - - NBT is not traditionally encoded using IDL/NDR. This is a bit of an - experiment, and I may well switch us back to a more traditional - encoding if it doesn't work out -*/ - -import "misc.idl", "security.idl", "svcctl.idl", "samr.idl"; -[ -helper("libcli/nbt/libnbt.h") -] -interface nbt -{ - const int NBT_NAME_SERVICE_PORT = 137; - const int NBT_DGRAM_SERVICE_PORT = 138; - - typedef [bitmap16bit] bitmap { - NBT_RCODE = 0x000F, - NBT_FLAG_BROADCAST = 0x0010, - NBT_FLAG_RECURSION_AVAIL = 0x0080, - NBT_FLAG_RECURSION_DESIRED = 0x0100, - NBT_FLAG_TRUNCATION = 0x0200, - NBT_FLAG_AUTHORITIVE = 0x0400, - NBT_OPCODE = 0x7800, - NBT_FLAG_REPLY = 0x8000 - } nbt_operation; - - /* the opcodes are in the operation field, masked with - NBT_OPCODE */ - typedef enum { - NBT_OPCODE_QUERY = (0x0<<11), - NBT_OPCODE_REGISTER = (0x5<<11), - NBT_OPCODE_RELEASE = (0x6<<11), - NBT_OPCODE_WACK = (0x7<<11), - NBT_OPCODE_REFRESH = (0x8<<11), - NBT_OPCODE_REFRESH2 = (0x9<<11), - NBT_OPCODE_MULTI_HOME_REG = (0xf<<11) - } nbt_opcode; - - /* rcode values */ - typedef enum { - NBT_RCODE_OK = 0x0, - NBT_RCODE_FMT = 0x1, - NBT_RCODE_SVR = 0x2, - NBT_RCODE_NAM = 0x3, - NBT_RCODE_IMP = 0x4, - NBT_RCODE_RFS = 0x5, - NBT_RCODE_ACT = 0x6, - NBT_RCODE_CFT = 0x7 - } nbt_rcode; - - /* we support any 8bit name type, but by defining the common - ones here we get better debug displays */ - typedef [enum8bit] enum { - NBT_NAME_CLIENT = 0x00, - NBT_NAME_MS = 0x01, - NBT_NAME_USER = 0x03, - NBT_NAME_SERVER = 0x20, - NBT_NAME_PDC = 0x1B, - NBT_NAME_LOGON = 0x1C, - NBT_NAME_MASTER = 0x1D, - NBT_NAME_BROWSER = 0x1E - } nbt_name_type; - - /* the ndr parser for nbt_name is separately defined in - nbtname.c (along with the parsers for nbt_string) */ - typedef [public,nopull,nopush] struct { - string name; - string scope; - nbt_name_type type; - } nbt_name; - - typedef [enum16bit] enum { - NBT_QCLASS_IP = 0x01 - } nbt_qclass; - - typedef [enum16bit] enum { - NBT_QTYPE_ADDRESS = 0x0001, - NBT_QTYPE_NAMESERVICE = 0x0002, - NBT_QTYPE_NULL = 0x000A, - NBT_QTYPE_NETBIOS = 0x0020, - NBT_QTYPE_STATUS = 0x0021 - } nbt_qtype; - - typedef struct { - nbt_name name; - nbt_qtype question_type; - nbt_qclass question_class; - } nbt_name_question; - - /* these are the possible values of the NBT_NM_OWNER_TYPE - field */ - typedef enum { - NBT_NODE_B = 0x0000, - NBT_NODE_P = 0x2000, - NBT_NODE_M = 0x4000, - NBT_NODE_H = 0x6000 - } nbt_node_type; - - typedef [bitmap16bit] bitmap { - NBT_NM_PERMANENT = 0x0200, - NBT_NM_ACTIVE = 0x0400, - NBT_NM_CONFLICT = 0x0800, - NBT_NM_DEREGISTER = 0x1000, - NBT_NM_OWNER_TYPE = 0x6000, - NBT_NM_GROUP = 0x8000 - } nb_flags; - - typedef struct { - nb_flags nb_flags; - ipv4address ipaddr; - } nbt_rdata_address; - - typedef struct { - uint16 length; - nbt_rdata_address addresses[length/6]; - } nbt_rdata_netbios; - - typedef struct { - uint8 unit_id[6]; - uint8 jumpers; - uint8 test_result; - uint16 version_number; - uint16 period_of_statistics; - uint16 number_of_crcs; - uint16 number_alignment_errors; - uint16 number_of_collisions; - uint16 number_send_aborts; - uint32 number_good_sends; - uint32 number_good_receives; - uint16 number_retransmits; - uint16 number_no_resource_conditions; - uint16 number_free_command_blocks; - uint16 total_number_command_blocks; - uint16 max_total_number_command_blocks; - uint16 number_pending_sessions; - uint16 max_number_pending_sessions; - uint16 max_total_sessions_possible; - uint16 session_data_packet_size; - } nbt_statistics; - - typedef struct { - [charset(DOS)] uint8 name[15]; - nbt_name_type type; - nb_flags nb_flags; - } nbt_status_name; - - typedef struct { - [value(num_names * 18 + 47)] uint16 length; - uint8 num_names; - nbt_status_name names[num_names]; - nbt_statistics statistics; - } nbt_rdata_status; - - typedef struct { - uint16 length; - uint8 data[length]; - } nbt_rdata_data; - - typedef [nodiscriminant] union { - [case(NBT_QTYPE_NETBIOS)] nbt_rdata_netbios netbios; - [case(NBT_QTYPE_STATUS)] nbt_rdata_status status; - [default] nbt_rdata_data data; - } nbt_rdata; - -/* - * this macro works arround the problem - * that we need to use nbt_rdata_data - * together with NBT_QTYPE_NETBIOS - * for WACK replies - */ -#define NBT_RES_REC_LEVEL(rr_type, rdata) (\ - (((rr_type) == NBT_QTYPE_NETBIOS) && \ - talloc_check_name(ndr, "struct ndr_push") && \ - ((rdata).data.length == 2)) \ - ? 0 : rr_type) - - typedef [flag(LIBNDR_PRINT_ARRAY_HEX)] struct { - nbt_name name; - nbt_qtype rr_type; - nbt_qclass rr_class; - uint32 ttl; - [switch_is(NBT_RES_REC_LEVEL(rr_type, rdata))] nbt_rdata rdata; - } nbt_res_rec; - - typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct { - uint16 name_trn_id; - nbt_operation operation; - uint16 qdcount; - uint16 ancount; - uint16 nscount; - uint16 arcount; - nbt_name_question questions[qdcount]; - nbt_res_rec answers[ancount]; - nbt_res_rec nsrecs[nscount]; - nbt_res_rec additional[arcount]; - [flag(NDR_REMAINING)] DATA_BLOB padding; - } nbt_name_packet; - - - /* - NBT DGRAM packets (UDP/138) - */ - - typedef [enum8bit] enum { - DGRAM_DIRECT_UNIQUE = 0x10, - DGRAM_DIRECT_GROUP = 0x11, - DGRAM_BCAST = 0x12, - DGRAM_ERROR = 0x13, - DGRAM_QUERY = 0x14, - DGRAM_QUERY_POSITIVE = 0x15, - DGRAM_QUERY_NEGATIVE = 0x16 - } dgram_msg_type; - - typedef [bitmap8bit] bitmap { - DGRAM_FLAG_MORE = 0x01, - DGRAM_FLAG_FIRST = 0x02, - DGRAM_FLAG_NODE_TYPE = 0x0C - } dgram_flags; - - typedef [enum8bit] enum { - DGRAM_NODE_B = 0x00, - DGRAM_NODE_P = 0x04, - DGRAM_NODE_M = 0x08, - DGRAM_NODE_NBDD = 0x0C - } dgram_node_type; - - /* a dgram_message is the main dgram body in general use */ - - /* the most common datagram type is a SMB_TRANSACTION - operation, where a SMB packet is used in the data section - of a dgram_message to hold a trans request, which in turn - holds a small command structure. It's a very strange beast - indeed. To make the code cleaner we define a basic SMB - packet in IDL here. This is not a general purpose SMB - packet, and won't be used in the core SMB client/server - code, but it does make working with these types of dgrams - easier */ - - const string NBT_MAILSLOT_NETLOGON = "\\MAILSLOT\\NET\\NETLOGON"; - const string NBT_MAILSLOT_NTLOGON = "\\MAILSLOT\\NET\\NTLOGON"; - const string NBT_MAILSLOT_GETDC = "\\MAILSLOT\\NET\\GETDC"; - const string NBT_MAILSLOT_BROWSE = "\\MAILSLOT\\BROWSE"; - - typedef [enum8bit] enum { - SMB_TRANSACTION = 0x25 - } smb_command; - - typedef struct { - [range(17,17),value(17)] uint8 wct; - uint16 total_param_count; - uint16 total_data_count; - uint16 max_param_count; - uint16 max_data_count; - uint8 max_setup_count; - uint8 pad; - uint16 trans_flags; - uint32 timeout; - uint16 reserved; - uint16 param_count; - uint16 param_offset; - uint16 data_count; - uint16 data_offset; - [range(3,3),value(3)] uint8 setup_count; - uint8 pad2; - uint16 opcode; - uint16 priority; - uint16 _class; - [value(strlen(mailslot_name)+1+data.length)] - uint16 byte_count; - astring mailslot_name; - [flag(NDR_REMAINING)] DATA_BLOB data; - } smb_trans_body; - - typedef [nodiscriminant] union { - [case(SMB_TRANSACTION)] smb_trans_body trans; - } smb_body; - - - typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN|NDR_PAHEX),public] struct { - smb_command smb_command; - uint8 err_class; - uint8 pad; - uint16 err_code; - uint8 flags; - uint16 flags2; - uint16 pid_high; - uint8 signature[8]; - uint16 reserved; - uint16 tid; - uint16 pid; - uint16 vuid; - uint16 mid; - [switch_is(smb_command)] smb_body body; - } dgram_smb_packet; - - const uint32 DGRAM_SMB = 0xff534d42; /* 0xffSMB */ - - typedef [nodiscriminant] union { - [case(DGRAM_SMB)] dgram_smb_packet smb; - } dgram_message_body; - - typedef struct { - uint16 length; - uint16 offset; - nbt_name source_name; - nbt_name dest_name; - uint32 dgram_body_type; - [switch_is(dgram_body_type)] dgram_message_body body; - } dgram_message; - - typedef [enum8bit] enum { - DGRAM_ERROR_NAME_NOT_PRESENT = 0x82, - DGRAM_ERROR_INVALID_SOURCE = 0x83, - DGRAM_ERROR_INVALID_DEST = 0x84 - } dgram_err_code; - - typedef [nodiscriminant] union { - [case(DGRAM_DIRECT_UNIQUE)] dgram_message msg; - [case(DGRAM_DIRECT_GROUP)] dgram_message msg; - [case(DGRAM_BCAST)] dgram_message msg; - [case(DGRAM_ERROR)] dgram_err_code error; - [case(DGRAM_QUERY)] nbt_name dest_name; - [case(DGRAM_QUERY_POSITIVE)] nbt_name dest_name; - [case(DGRAM_QUERY_NEGATIVE)] nbt_name dest_name; - } dgram_data; - - typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct { - dgram_msg_type msg_type; - dgram_flags flags; - uint16 dgram_id; - ipv4address src_addr; - uint16 src_port; - [switch_is(msg_type)] dgram_data data; - } nbt_dgram_packet; - - - /*******************************************/ - /* \MAILSLOT\NET\NETLOGON mailslot requests */ - typedef enum { - 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 - } nbt_netlogon_command; - - typedef [flag(NDR_LITTLE_ENDIAN),bitmap32bit] bitmap { - NETLOGON_VERSION_1 = 0x00000001, - NETLOGON_VERSION_5 = 0x00000002, - NETLOGON_VERSION_5EX = 0x00000004, - NETLOGON_VERSION_5EX_WITH_IP = 0x00000008, - NETLOGON_VERSION_WITH_CLOSEST_SITE = 0x00000010, - NETLOGON_VERSION_AVOID_NT4_EMUL = 0x01000000, - NETLOGON_VERSION_PDC = 0x10000000, - NETLOGON_VERSION_IP = 0x20000000, - NETLOGON_VERSION_LOCAL = 0x40000000, - NETLOGON_VERSION_GC = 0x80000000 - } nbt_netlogon_version; - - /* query for pdc request */ - typedef struct { - astring computer_name; - astring mailslot_name; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_name; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_query_for_pdc; - - /* query for pdc request - new style */ - typedef struct { - uint16 request_count; - nstring computer_name; - nstring user_name; - astring mailslot_name; - uint32 unknown[2]; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_query_for_pdc2; - - /* response from pdc */ - typedef struct { - astring pdc_name; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_pdc_name; - nstring domain_name; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_response_from_pdc; - - typedef [bitmap32bit] bitmap { - NBT_SERVER_PDC = 0x00000001, - NBT_SERVER_GC = 0x00000004, - NBT_SERVER_LDAP = 0x00000008, - NBT_SERVER_DS = 0x00000010, - NBT_SERVER_KDC = 0x00000020, - NBT_SERVER_TIMESERV = 0x00000040, - NBT_SERVER_CLOSEST = 0x00000080, - NBT_SERVER_WRITABLE = 0x00000100, - NBT_SERVER_GOOD_TIMESERV = 0x00000200, - NBT_SERVER_NDNC = 0x00000400, - NBT_SERVER_SELECT_SECRET_DOMAIN_6 = 0x00000800, - NBT_SERVER_FULL_SECRET_DOMAIN_6 = 0x00001000 - } nbt_server_type; - - typedef struct { - uint32 family; - [flag(NDR_BIG_ENDIAN)] ipv4address pdc_ip; - [flag(NDR_REMAINING)] DATA_BLOB remaining; - } nbt_dc_sock_addr; - - /* response from pdc - type2 */ - typedef struct { - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - uint8 dc_sock_addr_size; - [subcontext(0),subcontext_size(dc_sock_addr_size)] nbt_dc_sock_addr dc_sock_addr; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_response_from_pdc2; - - typedef enum netr_SamDatabaseID netr_SamDatabaseID; - - /* announce change to UAS or SAM */ - typedef struct { - netr_SamDatabaseID db_index; - hyper serial; - NTTIME timestamp; - } nbt_db_change; - - /* used to announce SAM changes */ - typedef struct { - uint32 serial_lo; - time_t timestamp; - uint32 pulse; - uint32 random; - astring pdc_name; - astring domain; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_pdc_name; - nstring unicode_domain; - uint32 db_count; - nbt_db_change dbchange[db_count]; - [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; - [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_announce_uas; - - typedef [nodiscriminant] union { - [case(NETLOGON_QUERY_FOR_PDC)] nbt_netlogon_query_for_pdc pdc; - [case(NETLOGON_QUERY_FOR_PDC2)] nbt_netlogon_query_for_pdc2 pdc2; - [case(NETLOGON_ANNOUNCE_UAS)] nbt_netlogon_announce_uas uas; - [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response; - [case(NETLOGON_RESPONSE_FROM_PDC2)] nbt_netlogon_response_from_pdc2 response2; - [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2; - } nbt_netlogon_request; - - typedef [flag(NDR_NOALIGN),public] struct { - nbt_netlogon_command command; - [switch_is(command)] nbt_netlogon_request req; - } nbt_netlogon_packet; - - /*******************************************/ - /* CLDAP netlogon response */ - - /* note that these structures are very similar to, but not - quite identical to, the netlogon structures above */ - - typedef struct { - nbt_netlogon_command type; - nstring pdc_name; - nstring user_name; - nstring domain_name; - [value(1)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_1; - - typedef struct { - nbt_netlogon_command type; - nstring pdc_name; - nstring user_name; - nstring domain_name; - GUID domain_uuid; - GUID unknown_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - ipv4address pdc_ip; - nbt_server_type server_type; - [value(3)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_3; - - typedef [public] struct { - nbt_netlogon_command type; - uint16 sbz; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - [value(5)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_5; - - typedef struct { - nbt_netlogon_command type; - uint16 sbz; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - uint8 dc_sock_addr_size; - [subcontext(0),subcontext_size(dc_sock_addr_size)] nbt_dc_sock_addr dc_sock_addr; - [value(13)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_13; - - typedef [public] struct { - nbt_netlogon_command type; - uint16 sbz; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - nbt_string next_closest_site; - [value(15)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_15; - - typedef [public] struct { - nbt_netlogon_command type; - uint16 sbz; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - uint8 dc_sock_addr_size; - [subcontext(0),subcontext_size(dc_sock_addr_size)] nbt_dc_sock_addr dc_sock_addr; - nbt_string next_closest_site; - [value(29)] nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_29; - - typedef [flag(NDR_NOALIGN),public,nodiscriminant] union { - [case(0)] nbt_cldap_netlogon_1 logon1; - [case(1)] nbt_cldap_netlogon_1 logon1; - [case(2)] nbt_cldap_netlogon_3 logon3; - [case(3)] nbt_cldap_netlogon_3 logon3; - [case(4)] nbt_cldap_netlogon_5 logon5; - [case(5)] nbt_cldap_netlogon_5 logon5; - [case(6)] nbt_cldap_netlogon_5 logon5; - [case(7)] nbt_cldap_netlogon_5 logon5; - [case(8)] nbt_cldap_netlogon_13 logon13; - [case(9)] nbt_cldap_netlogon_13 logon13; - [case(10)] nbt_cldap_netlogon_13 logon13; - [case(11)] nbt_cldap_netlogon_13 logon13; - [case(12)] nbt_cldap_netlogon_13 logon13; - [case(13)] nbt_cldap_netlogon_13 logon13; - [case(14)] nbt_cldap_netlogon_13 logon13; - [case(15)] nbt_cldap_netlogon_13 logon13; - [case(16)] nbt_cldap_netlogon_1 logon1; - [case(17)] nbt_cldap_netlogon_1 logon1; - [case(18)] nbt_cldap_netlogon_3 logon3; - [case(19)] nbt_cldap_netlogon_3 logon3; - [case(20)] nbt_cldap_netlogon_15 logon15; - [case(21)] nbt_cldap_netlogon_15 logon15; - [case(22)] nbt_cldap_netlogon_15 logon15; - [case(23)] nbt_cldap_netlogon_15 logon15; - [case(24)] nbt_cldap_netlogon_15 logon15; - [case(25)] nbt_cldap_netlogon_15 logon15; - [case(26)] nbt_cldap_netlogon_15 logon15; - [case(27)] nbt_cldap_netlogon_15 logon15; - [case(28)] nbt_cldap_netlogon_15 logon15; - [case(29)] nbt_cldap_netlogon_29 logon29; - [case(30)] nbt_cldap_netlogon_29 logon29; - [case(31)] nbt_cldap_netlogon_29 logon29; - } nbt_cldap_netlogon; - - /*******************************************/ - /* \MAILSLOT\NET\NTLOGON mailslot requests */ - typedef enum { - NTLOGON_SAM_LOGON = 0x12, - NTLOGON_SAM_LOGON_REPLY = 0x13, - NTLOGON_SAM_LOGON_REPLY15 = 0x15, - NTLOGON_RESPONSE_FROM_PDC2 = 0x17 - } nbt_ntlogon_command; - - typedef struct { - uint16 request_count; - nstring computer_name; - nstring user_name; - astring mailslot_name; - samr_AcctFlags acct_control; - [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; - [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_ntlogon_sam_logon; - - typedef struct { - nstring server; - nstring user_name; - nstring domain; - nbt_netlogon_version nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_ntlogon_sam_logon_reply; - - typedef [nodiscriminant] union { - [case(NTLOGON_SAM_LOGON)] nbt_ntlogon_sam_logon logon; - [case(NTLOGON_SAM_LOGON_REPLY)] nbt_ntlogon_sam_logon_reply reply; - [case(NTLOGON_SAM_LOGON_REPLY15)] nbt_ntlogon_sam_logon_reply reply; - [case(NTLOGON_RESPONSE_FROM_PDC2)] nbt_netlogon_response_from_pdc2 reply2; - } nbt_ntlogon_request; - - typedef [flag(NDR_NOALIGN),public] struct { - nbt_ntlogon_command command; - [switch_is(command)] nbt_ntlogon_request req; - } nbt_ntlogon_packet; - - /********************************************************/ - /* \MAILSLOT\BROWSE mailslot requests */ - /* for details see http://ubiqx.org/cifs/Browsing.html */ - /********************************************************/ - typedef bitmap svcctl_ServerType svcctl_ServerType; - - typedef [enum8bit] enum { - HostAnnouncement = 1, - AnnouncementRequest = 2, - Election = 8, - GetBackupListReq = 9, - GetBackupListResp = 10, - BecomeBackup = 11, - DomainAnnouncement = 12, - MasterAnnouncement = 13, - ResetBrowserState = 14, - LocalMasterAnnouncement = 15 - } nbt_browse_opcode; - - typedef struct { - uint8 UpdateCount; - uint32 Periodicity; - [charset(DOS)] uint8 ServerName[16]; - uint8 OSMajor; - uint8 OSMinor; - svcctl_ServerType ServerType; - uint8 BroMajorVer; - uint8 BroMinorVer; - uint16 Signature; - astring Comment; - } nbt_browse_host_announcement; - - typedef struct { - uint8 Unused; - astring ResponseName; - } nbt_browse_announcement_request; - - typedef struct { - uint8 Version; - uint32 Criteria; - uint32 UpTime; /* In milliseconds */ - uint32 Reserved; /* Must be zero */ - astring ServerName; - } nbt_browse_election_request; - - typedef struct { - uint8 ReqCount; - uint32 Token; - } nbt_browse_backup_list_request; - - typedef struct { - uint8 BackupCount; - uint32 Token; - nbt_name BackupServerList[BackupCount];/* TODO: this is wrong */ - } nbt_browse_backup_list_response; - - typedef struct { - astring BrowserName; - } nbt_browse_become_backup; - - typedef struct { - uint8 UpdateCount; - uint32 Periodicity; - [charset(DOS)] uint8 ServerName[16]; - uint8 OSMajor; - uint8 OSMinor; - svcctl_ServerType ServerType; - uint32 MysteriousField; - astring Comment; - } nbt_browse_domain_announcement; - - typedef struct { - astring ServerName; - } nbt_browse_master_announcement; - - typedef struct { - uint8 Command; - } nbt_browse_reset_state; - - typedef struct { - uint8 UpdateCount; - uint32 Periodicity; - [charset(DOS)] uint8 ServerName[16]; - uint8 OSMajor; - uint8 OSMinor; - svcctl_ServerType ServerType; - uint8 BroMajorVer; - uint8 BroMinorVer; - uint16 Signature; - astring Comment; - } nbt_browse_local_master_announcement; - - typedef [nodiscriminant] union { - [case(HostAnnouncement)] nbt_browse_host_announcement host_annoucement; - [case(AnnouncementRequest)] nbt_browse_announcement_request announcement_request; - [case(Election)] nbt_browse_election_request election_request; - [case(GetBackupListReq)] nbt_browse_backup_list_request backup_list_request; - [case(GetBackupListResp)] nbt_browse_backup_list_response backup_list_response; - [case(BecomeBackup)] nbt_browse_become_backup become_backup; - [case(DomainAnnouncement)] nbt_browse_domain_announcement domain_announcement; - [case(MasterAnnouncement)] nbt_browse_master_announcement master_announcement; - [case(ResetBrowserState)] nbt_browse_reset_state reset_browser_state; - [case(LocalMasterAnnouncement)] nbt_browse_local_master_announcement local_master_announcement; - } nbt_browse_payload; - - typedef [public,flag(NDR_NOALIGN)] struct { - nbt_browse_opcode opcode; - [switch_is(opcode)] nbt_browse_payload payload; - } nbt_browse_packet; -} diff --git a/source3/librpc/idl/netlogon.idl b/source3/librpc/idl/netlogon.idl index 74535fc073..b4e34a07ab 100644 --- a/source3/librpc/idl/netlogon.idl +++ b/source3/librpc/idl/netlogon.idl @@ -4,7 +4,7 @@ who contributed! */ -import "lsa.idl", "samr.idl", "security.idl", "nbt.idl"; +import "misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl"; #include "idl_types.h" @@ -135,13 +135,32 @@ interface netlogon netr_ChallengeResponse lm; } netr_NetworkInfo; - typedef [public,switch_type(uint16)] union { - [case(1)] netr_PasswordInfo *password; - [case(2)] netr_NetworkInfo *network; - [case(3)] netr_PasswordInfo *password; - [case(5)] netr_PasswordInfo *password; - [case(6)] netr_NetworkInfo *network; - } netr_LogonInfo; + typedef [flag(NDR_PAHEX)] struct { + netr_IdentityInfo identity_info; + lsa_String package_name; + uint32 length; + [size_is(length)] uint8 *data; + } netr_GenericInfo; + + typedef enum { + NetlogonInteractiveInformation = 1, + NetlogonNetworkInformation = 2, + NetlogonServiceInformation = 3, + NetlogonGenericInformation = 4, + NetlogonInteractiveTransitiveInformation = 5, + NetlogonNetworkTransitiveInformation = 6, + NetlogonServiceTransitiveInformation = 7 + } netr_LogonInfoClass; + + typedef [public,switch_type(netr_LogonInfoClass)] union { + [case(NetlogonInteractiveInformation)] netr_PasswordInfo *password; + [case(NetlogonNetworkInformation)] netr_NetworkInfo *network; + [case(NetlogonServiceInformation)] netr_PasswordInfo *password; + [case(NetlogonGenericInformation)] netr_GenericInfo *generic; + [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password; + [case(NetlogonNetworkTransitiveInformation)] netr_NetworkInfo *network; + [case(NetlogonServiceTransitiveInformation)] netr_PasswordInfo *password; + } netr_LogonLevel; typedef [public,flag(NDR_PAHEX)] struct { uint8 key[16]; @@ -234,12 +253,25 @@ interface netlogon lsa_String unknown4; } netr_PacInfo; + typedef [flag(NDR_PAHEX)] struct { + uint32 length; + [size_is(length)] uint8 *data; + } netr_GenericInfo2; + + typedef enum { + NetlogonValidationUasInfo = 1, + NetlogonValidationSamInfo = 2, + NetlogonValidationSamInfo2 = 3, + NetlogonValidationGenericInfo2 = 5, + NetlogonValidationSamInfo4 = 6 + } netr_ValidationInfoClass; + typedef [public,switch_type(uint16)] union { - [case(2)] netr_SamInfo2 *sam2; - [case(3)] netr_SamInfo3 *sam3; + [case(NetlogonValidationSamInfo)] netr_SamInfo2 *sam2; + [case(NetlogonValidationSamInfo2)] netr_SamInfo3 *sam3; [case(4)] netr_PacInfo *pac; - [case(5)] netr_PacInfo *pac; - [case(6)] netr_SamInfo6 *sam6; + [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2 *generic; + [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6; } netr_Validation; typedef [public, flag(NDR_PAHEX)] struct { @@ -251,21 +283,16 @@ interface netlogon time_t timestamp; } netr_Authenticator; - typedef enum { - INTERACTIVE_LOGON_TYPE = 1, - NET_LOGON_TYPE = 2 - } netr_LogonLevel; - NTSTATUS netr_LogonSamLogon( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *computer_name, - [in,unique] netr_Authenticator *credential, - [in,out,unique] netr_Authenticator *return_authenticator, - [in] netr_LogonLevel logon_level, - [in,ref] [switch_is(logon_level)] netr_LogonInfo *logon, - [in] uint16 validation_level, + [in,unique] [string,charset(UTF16)] uint16 *server_name, + [in,unique] [string,charset(UTF16)] uint16 *computer_name, + [in,unique] netr_Authenticator *credential, + [in,out,unique] netr_Authenticator *return_authenticator, + [in] netr_LogonInfoClass logon_level, + [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon, + [in] uint16 validation_level, [out,ref] [switch_is(validation_level)] netr_Validation *validation, - [out,ref] uint8 *authoritative + [out,ref] uint8 *authoritative ); @@ -277,8 +304,8 @@ interface netlogon [in,unique] [string,charset(UTF16)] uint16 *computer_name, [in,unique] netr_Authenticator *credential, [in,out,unique] netr_Authenticator *return_authenticator, - [in] netr_LogonLevel logon_level, - [in] [switch_is(logon_level)] netr_LogonInfo logon + [in] netr_LogonInfoClass logon_level, + [in] [switch_is(logon_level)] netr_LogonLevel logon ); @@ -423,7 +450,7 @@ interface netlogon typedef struct { lsa_String domain_name; - lsa_String comment; + lsa_String oem_information; /* comment */ dlong force_logoff_time; uint16 min_password_length; uint16 password_history_length; @@ -1056,11 +1083,11 @@ interface netlogon /*****************/ /* Function 0x15 */ - WERROR netr_NETRLOGONDUMMYROUTINE1(); + [todo] WERROR netr_NETRLOGONDUMMYROUTINE1(); /****************/ /* Function 0x16 */ - WERROR netr_NETRLOGONSETSERVICEBITS(); + [todo] WERROR netr_NETRLOGONSETSERVICEBITS(); /****************/ /* Function 0x17 */ @@ -1072,11 +1099,11 @@ interface netlogon /****************/ /* Function 0x18 */ - WERROR netr_NETRLOGONCOMPUTESERVERDIGEST(); + [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST(); /****************/ /* Function 0x19 */ - WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST(); + [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST(); /****************/ /* Function 0x1a */ @@ -1111,6 +1138,16 @@ interface netlogon /****************/ /* Function 0x1d */ + typedef [bitmap32bit] bitmap { + NETR_TRUST_FLAG_IN_FOREST = 0x00000001, + NETR_TRUST_FLAG_OUTBOUND = 0x00000002, + NETR_TRUST_FLAG_TREEROOT = 0x00000004, + NETR_TRUST_FLAG_PRIMARY = 0x00000008, + NETR_TRUST_FLAG_NATIVE = 0x00000010, + NETR_TRUST_FLAG_INBOUND = 0x00000020, + NETR_TRUST_FLAG_MIT_KRB5 = 0x00000080, + NETR_TRUST_FLAG_AES = 0x00000100 + } netr_TrustFlags; typedef [flag(NDR_PAHEX)] struct { uint16 length; @@ -1139,25 +1176,60 @@ interface netlogon } netr_DomainQuery; typedef struct { + /* these first 3 values come from the fact windows + actually encodes this structure as a UNICODE_STRING + - see MS-NRPC section 2.2.1.3.9 */ + [value(8)] uint32 length; + [value(0)] uint32 dummy; + [value(8)] uint32 size; + netr_TrustFlags flags; + uint32 parent_index; + uint32 trust_type; + uint32 trust_attributes; + } netr_trust_extension; + + typedef struct { + uint16 length; /* value is 16 when info != NULL, otherwise 0 */ + [value(length)] uint16 size; /* value is 16 when info != NULL, otherwise 0 */ + netr_trust_extension *info; + } netr_trust_extension_container; + + typedef struct { lsa_String domainname; lsa_String fulldomainname; lsa_String forest; GUID guid; dom_sid2 *sid; - netr_BinaryString unknown1[4]; - uint32 unknown[4]; + netr_trust_extension_container trust_extension; + lsa_String dummystring[3]; + uint32 dummy[4]; } netr_DomainTrustInfo; typedef struct { + uint32 policy_size; + [size_is(policy_size)] uint8 *policy; + } netr_LsaPolicyInfo; + + typedef [public,bitmap32bit] bitmap { + NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS = 0x00000001, + NETR_WS_FLAG_HANDLES_SPN_UPDATE = 0x00000002 + } netr_WorkstationFlags; + + typedef struct { netr_DomainTrustInfo domaininfo; uint32 num_trusts; [size_is(num_trusts)] netr_DomainTrustInfo *trusts; - uint32 unknown[14]; /* room for expansion? */ + netr_LsaPolicyInfo lsa_policy; + lsa_String dns_hostname; + lsa_String dummystring[3]; + netr_WorkstationFlags workstation_flags; + uint32 supported_enc_types; + uint32 dummy[2]; } netr_DomainInfo1; typedef union { [case(1)] netr_DomainInfo1 *info1; - [case(2)] netr_DomainInfo1 *info1; + [case(2)] netr_DomainInfo1 *info2; } netr_DomainInfo; NTSTATUS netr_LogonGetDomainInfo( @@ -1201,7 +1273,7 @@ interface netlogon /****************/ /* Function 0x20 */ - WERROR netr_NETRLOGONSENDTOSAM(); + [todo] WERROR netr_NETRLOGONSENDTOSAM(); /****************/ /* Function 0x21 */ @@ -1237,19 +1309,10 @@ interface netlogon /****************/ /* Function 0x23 */ - WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(); + [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(); /****************/ /* Function 0x24 */ - typedef [bitmap32bit] bitmap { - NETR_TRUST_FLAG_IN_FOREST = 0x00000001, - NETR_TRUST_FLAG_OUTBOUND = 0x00000002, - NETR_TRUST_FLAG_TREEROOT = 0x00000004, - NETR_TRUST_FLAG_PRIMARY = 0x00000008, - NETR_TRUST_FLAG_NATIVE = 0x00000010, - NETR_TRUST_FLAG_INBOUND = 0x00000020 - } netr_TrustFlags; - typedef [v1_enum] enum { NETR_TRUST_TYPE_DOWNLEVEL = 1, NETR_TRUST_TYPE_UPLEVEL = 2, @@ -1321,8 +1384,8 @@ interface netlogon NTSTATUS netr_LogonSamLogonEx( [in,unique] [string,charset(UTF16)] uint16 *server_name, [in,unique] [string,charset(UTF16)] uint16 *computer_name, - [in] netr_LogonLevel logon_level, - [in,ref] [switch_is(logon_level)] netr_LogonInfo *logon, + [in] netr_LogonInfoClass logon_level, + [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon, [in] uint16 validation_level, [out,ref] [switch_is(validation_level)] netr_Validation *validation, [out,ref] uint8 *authoritative, @@ -1394,8 +1457,8 @@ interface netlogon [in,unique] [string,charset(UTF16)] uint16 *computer_name, [in,unique] netr_Authenticator *credential, [in,out,unique] netr_Authenticator *return_authenticator, - [in] netr_LogonLevel logon_level, - [in] [switch_is(logon_level)] netr_LogonInfo logon, + [in] netr_LogonInfoClass logon_level, + [in] [switch_is(logon_level)] netr_LogonLevel logon, [in] uint16 validation_level, [out,ref] [switch_is(validation_level)] netr_Validation *validation, [out,ref] uint8 *authoritative, @@ -1404,5 +1467,5 @@ interface netlogon /****************/ /* Function 0x2e */ - WERROR netr_NETRSERVERGETTRUSTINFO(); + [todo] WERROR netr_NETRSERVERGETTRUSTINFO(); } diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl deleted file mode 100644 index c4e633c254..0000000000 --- a/source3/librpc/idl/notify.idl +++ /dev/null @@ -1,56 +0,0 @@ -#include "idl_types.h" - -/* - IDL structures for notify change code - - this defines the structures used in the notify database code, and - the change notify buffers -*/ - -[ - pointer_default(unique) -] -interface notify -{ - - /* structure used in the notify database */ - typedef [public] struct { - server_id server; - uint32 filter; /* filter to apply in this directory */ - uint32 subdir_filter; /* filter to apply in child directories */ - utf8string path; - uint32 path_len; /* saves some computation on search */ - pointer private_data; - } notify_entry; - - /* - to allow for efficient search for matching entries, we - divide them by the directory depth, with a separate array - per depth. The entries within each depth are sorted by path, - allowing for a bisection search. - - The max_mask and max_mask_subdir at each depth is the - bitwise or of the filters and subdir filters for all entries - at that depth. This allows a depth to be quickly skipped if - no entries will match the target filter - */ - typedef struct { - uint32 max_mask; - uint32 max_mask_subdir; - uint32 num_entries; - notify_entry entries[num_entries]; - } notify_depth; - - typedef [public] struct { - uint32 num_depths; - notify_depth depth[num_depths]; - } notify_array; - - /* structure sent between servers in notify messages */ - typedef [public] struct { - uint32 action; - utf8string path; - pointer private_data; - } notify_event; - -} diff --git a/source3/librpc/idl/ntsvcs.idl b/source3/librpc/idl/ntsvcs.idl deleted file mode 100644 index bac2549c73..0000000000 --- a/source3/librpc/idl/ntsvcs.idl +++ /dev/null @@ -1,375 +0,0 @@ -/* - plug and play services -*/ -[ - uuid("8d9f4e40-a03d-11ce-8f69-08003e30051b"), - version(1.0), - helpstring("Plug and Play services") -] -interface ntsvcs -{ - /******************/ - /* Function: 0x00 */ - - WERROR PNP_Disconnect(); - - /******************/ - /* Function: 0x01 */ - - WERROR PNP_Connect(); - - /******************/ - /* Function: 0x02 */ - - WERROR PNP_GetVersion( - [out,ref] uint16 *version - ); - - /******************/ - /* Function: 0x03 */ - - WERROR PNP_GetGlobalState(); - - /******************/ - /* Function: 0x04 */ - - WERROR PNP_InitDetection(); - - /******************/ - /* Function: 0x05 */ - - WERROR PNP_ReportLogOn(); - - /******************/ - /* Function: 0x06 */ - - WERROR PNP_ValidateDeviceInstance( - [in,ref] [string,charset(UTF16)] uint16 *devicepath, - [in] uint32 flags - ); - - /******************/ - /* Function: 0x07 */ - - WERROR PNP_GetRootDeviceInstance(); - - /******************/ - /* Function: 0x08 */ - - WERROR PNP_GetRelatedDeviceInstance(); - - /******************/ - /* Function: 0x09 */ - - WERROR PNP_EnumerateSubKeys(); - - /******************/ - /* Function: 0x0a */ - - WERROR PNP_GetDeviceList(); - - /******************/ - /* Function: 0x0b */ - - WERROR PNP_GetDeviceListSize( - [in,unique] [string,charset(UTF16)] uint16 *devicename, - [out,ref] uint32 *size, - [in] uint32 flags - ); - - /******************/ - /* Function: 0x0c */ - - WERROR PNP_GetDepth(); - - /******************/ - /* Function: 0x0d */ - - const int DEV_REGPROP_DESC = 1; - - WERROR PNP_GetDeviceRegProp( - [in,ref] [string,charset(UTF16)] uint16 *devicepath, - [in] uint32 property, - [in,out,ref] uint32 *unknown1, - [out,ref] [size_is(*buffer_size)] [length_is(*buffer_size)] uint8 *buffer, - [in,out,ref] uint32 *buffer_size, - [in,out,ref] uint32 *needed, - [in] uint32 unknown3 - ); - - /******************/ - /* Function: 0x0e */ - - WERROR PNP_SetDeviceRegProp(); - - /******************/ - /* Function: 0x0f */ - - WERROR PNP_GetClassInstance(); - - /******************/ - /* Function: 0x10 */ - - WERROR PNP_CreateKey(); - - /******************/ - /* Function: 0x11 */ - - WERROR PNP_DeleteRegistryKey(); - - /******************/ - /* Function: 0x12 */ - - WERROR PNP_GetClassCount(); - - /******************/ - /* Function: 0x13 */ - - WERROR PNP_GetClassName(); - - /******************/ - /* Function: 0x14 */ - - WERROR PNP_DeleteClassKey(); - - /******************/ - /* Function: 0x15 */ - - WERROR PNP_GetInterfaceDeviceAlias(); - - /******************/ - /* Function: 0x16 */ - - WERROR PNP_GetInterfaceDeviceList(); - - /******************/ - /* Function: 0x17 */ - - WERROR PNP_GetInterfaceDeviceListSize(); - - /******************/ - /* Function: 0x18 */ - - WERROR PNP_RegisterDeviceClassAssociation(); - - /******************/ - /* Function: 0x19 */ - - WERROR PNP_UnregisterDeviceClassAssociation(); - - /******************/ - /* Function: 0x1a */ - - WERROR PNP_GetClassRegProp(); - - /******************/ - /* Function: 0x1b */ - - WERROR PNP_SetClassRegProp(); - - /******************/ - /* Function: 0x1c */ - - WERROR PNP_CreateDevInst(); - - /******************/ - /* Function: 0x1d */ - - WERROR PNP_DeviceInstanceAction(); - - /******************/ - /* Function: 0x1e */ - - WERROR PNP_GetDeviceStatus(); - - /******************/ - /* Function: 0x1f */ - - WERROR PNP_SetDeviceProblem(); - - /******************/ - /* Function: 0x20 */ - - WERROR PNP_DisableDevInst(); - - /******************/ - /* Function: 0x21 */ - - WERROR PNP_UninstallDevInst(); - - /******************/ - /* Function: 0x22 */ - - WERROR PNP_AddID(); - - /******************/ - /* Function: 0x23 */ - - WERROR PNP_RegisterDriver(); - - /******************/ - /* Function: 0x24 */ - - WERROR PNP_QueryRemove(); - - /******************/ - /* Function: 0x25 */ - - WERROR PNP_RequestDeviceEject(); - - /******************/ - /* Function: 0x26 */ - - WERROR PNP_IsDockStationPresent(); - - /******************/ - /* Function: 0x27 */ - - WERROR PNP_RequestEjectPC(); - - /******************/ - /* Function: 0x28 */ - - WERROR PNP_HwProfFlags( - [in] uint32 unknown1, - [in,ref] [string,charset(UTF16)] uint16 *devicepath, - [in] uint32 unknown2, - [in,out,ref] uint32 *unknown3, - [in,out,unique] uint16 *unknown4, - [in,unique] [string,charset(UTF16)] uint16 *unknown5, - [out,unique] [string,charset(UTF16)] uint16 **unknown5a, - [in] uint32 unknown6, - [in] uint32 unknown7 - ); - - /******************/ - /* Function: 0x29 */ - - typedef struct { - uint32 unknown1; - uint16 unknown2[160]; - uint32 unknown3; - } PNP_HwProfInfo; - - WERROR PNP_GetHwProfInfo( - [in] uint32 idx, - [in,out,ref] PNP_HwProfInfo *info, - [in] uint32 unknown1, - [in] uint32 unknown2 - ); - - /******************/ - /* Function: 0x2a */ - - WERROR PNP_AddEmptyLogConf(); - - /******************/ - /* Function: 0x2b */ - - WERROR PNP_FreeLogConf(); - - /******************/ - /* Function: 0x2c */ - - WERROR PNP_GetFirstLogConf(); - - /******************/ - /* Function: 0x2d */ - - WERROR PNP_GetNextLogConf(); - - /******************/ - /* Function: 0x2e */ - - WERROR PNP_GetLogConfPriority(); - - /******************/ - /* Function: 0x2f */ - - WERROR PNP_AddResDes(); - - /******************/ - /* Function: 0x30 */ - - WERROR PNP_FreeResDes(); - - /******************/ - /* Function: 0x31 */ - - WERROR PNP_GetNextResDes(); - - /******************/ - /* Function: 0x32 */ - - WERROR PNP_GetResDesData(); - - /******************/ - /* Function: 0x33 */ - - WERROR PNP_GetResDesDataSize(); - - /******************/ - /* Function: 0x34 */ - - WERROR PNP_ModifyResDes(); - - /******************/ - /* Function: 0x35 */ - - WERROR PNP_DetectResourceLimit(); - - /******************/ - /* Function: 0x36 */ - - WERROR PNP_QueryResConfList(); - - /******************/ - /* Function: 0x37 */ - - WERROR PNP_SetHwProf(); - - /******************/ - /* Function: 0x38 */ - - WERROR PNP_QueryArbitratorFreeData(); - - /******************/ - /* Function: 0x39 */ - - WERROR PNP_QueryArbitratorFreeSize(); - - /******************/ - /* Function: 0x3a */ - - WERROR PNP_RunDetection(); - - /******************/ - /* Function: 0x3b */ - - WERROR PNP_RegisterNotification(); - - /******************/ - /* Function: 0x3c */ - - WERROR PNP_UnregisterNotification(); - - /******************/ - /* Function: 0x3d */ - - WERROR PNP_GetCustomDevProp(); - - /******************/ - /* Function: 0x3e */ - - WERROR PNP_GetVersionInternal(); - - /******************/ - /* Function: 0x3f */ - - WERROR PNP_GetBlockedDriverInfo(); - - /******************/ - /* Function: 0x40 */ - - WERROR PNP_GetServerSideDeviceInstallFlags(); -} diff --git a/source3/librpc/idl/samr.idl b/source3/librpc/idl/samr.idl index e823d1d77b..cd5fe07845 100644 --- a/source3/librpc/idl/samr.idl +++ b/source3/librpc/idl/samr.idl @@ -208,7 +208,7 @@ import "misc.idl", "lsa.idl", "security.idl"; typedef struct { NTTIME force_logoff_time; - lsa_String comment; + lsa_String oem_information; /* comment */ lsa_String domain_name; lsa_String primary; /* PDC name if this is a BDC */ udlong sequence_num; @@ -218,15 +218,15 @@ import "misc.idl", "lsa.idl", "security.idl"; uint32 num_users; uint32 num_groups; uint32 num_aliases; - } samr_DomInfo2; + } samr_DomGeneralInformation; typedef struct { NTTIME force_logoff_time; } samr_DomInfo3; typedef struct { - lsa_String comment; - } samr_DomInfo4; + lsa_String oem_information; /* comment */ + } samr_DomOEMInformation; typedef struct { lsa_String domain_name; @@ -250,11 +250,11 @@ import "misc.idl", "lsa.idl", "security.idl"; } samr_DomInfo9; typedef struct { - samr_DomInfo2 info2; + samr_DomGeneralInformation general; hyper lockout_duration; hyper lockout_window; uint16 lockout_threshold; - } samr_DomInfo11; + } samr_DomGeneralInformation2; typedef struct { hyper lockout_duration; @@ -271,15 +271,15 @@ import "misc.idl", "lsa.idl", "security.idl"; typedef [switch_type(uint16)] union { [case(1)] samr_DomInfo1 info1; - [case(2)] samr_DomInfo2 info2; + [case(2)] samr_DomGeneralInformation general; [case(3)] samr_DomInfo3 info3; - [case(4)] samr_DomInfo4 info4; + [case(4)] samr_DomOEMInformation oem; [case(5)] samr_DomInfo5 info5; [case(6)] samr_DomInfo6 info6; [case(7)] samr_DomInfo7 info7; [case(8)] samr_DomInfo8 info8; [case(9)] samr_DomInfo9 info9; - [case(11)] samr_DomInfo11 info11; + [case(11)] samr_DomGeneralInformation2 general2; [case(12)] samr_DomInfo12 info12; [case(13)] samr_DomInfo13 info13; } samr_DomainInfo; diff --git a/source3/librpc/idl/security.idl b/source3/librpc/idl/security.idl deleted file mode 100644 index c1dfe272e9..0000000000 --- a/source3/librpc/idl/security.idl +++ /dev/null @@ -1,376 +0,0 @@ -#include "idl_types.h" - -/* - security IDL structures -*/ - -import "misc.idl"; - -/* - use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really - just a dom sid, but with the sub_auths represented as a conformant - array. As with all in-structure conformant arrays, the array length - is placed before the start of the structure. That's what gives rise - to the extra num_auths elemenent. We don't want the Samba code to - have to bother with such esoteric NDR details, so its easier to just - define it as a dom_sid and use pidl magic to make it all work. It - just means you need to mark a sid as a "dom_sid2" in the IDL when you - know it is of the conformant array variety -*/ -cpp_quote("#define dom_sid2 dom_sid") - -/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */ -cpp_quote("#define dom_sid28 dom_sid") - -/* same struct as dom_sid but in a variable byte buffer, which is maybe empty in NDR */ -cpp_quote("#define dom_sid0 dom_sid") - -[ - pointer_default(unique) -] -interface security -{ - /* - access masks are divided up like this: - 0xabccdddd - where - a = generic rights bits SEC_GENERIC_ - b = flags SEC_FLAG_ - c = standard rights bits SEC_STD_ - d = object type specific bits SEC_{FILE,DIR,REG,xxx}_ - - common combinations of bits are prefixed with SEC_RIGHTS_ - */ - const int SEC_MASK_GENERIC = 0xF0000000; - const int SEC_MASK_FLAGS = 0x0F000000; - const int SEC_MASK_STANDARD = 0x00FF0000; - const int SEC_MASK_SPECIFIC = 0x0000FFFF; - - /* generic bits */ - const int SEC_GENERIC_ALL = 0x10000000; - const int SEC_GENERIC_EXECUTE = 0x20000000; - const int SEC_GENERIC_WRITE = 0x40000000; - const int SEC_GENERIC_READ = 0x80000000; - - /* flag bits */ - const int SEC_FLAG_SYSTEM_SECURITY = 0x01000000; - const int SEC_FLAG_MAXIMUM_ALLOWED = 0x02000000; - - /* standard bits */ - const int SEC_STD_DELETE = 0x00010000; - const int SEC_STD_READ_CONTROL = 0x00020000; - const int SEC_STD_WRITE_DAC = 0x00040000; - const int SEC_STD_WRITE_OWNER = 0x00080000; - const int SEC_STD_SYNCHRONIZE = 0x00100000; - const int SEC_STD_REQUIRED = 0x000F0000; - const int SEC_STD_ALL = 0x001F0000; - - /* file specific bits */ - const int SEC_FILE_READ_DATA = 0x00000001; - const int SEC_FILE_WRITE_DATA = 0x00000002; - const int SEC_FILE_APPEND_DATA = 0x00000004; - const int SEC_FILE_READ_EA = 0x00000008; - const int SEC_FILE_WRITE_EA = 0x00000010; - const int SEC_FILE_EXECUTE = 0x00000020; - const int SEC_FILE_READ_ATTRIBUTE = 0x00000080; - const int SEC_FILE_WRITE_ATTRIBUTE = 0x00000100; - const int SEC_FILE_ALL = 0x000001ff; - - /* directory specific bits */ - const int SEC_DIR_LIST = 0x00000001; - const int SEC_DIR_ADD_FILE = 0x00000002; - const int SEC_DIR_ADD_SUBDIR = 0x00000004; - const int SEC_DIR_READ_EA = 0x00000008; - const int SEC_DIR_WRITE_EA = 0x00000010; - const int SEC_DIR_TRAVERSE = 0x00000020; - const int SEC_DIR_DELETE_CHILD = 0x00000040; - const int SEC_DIR_READ_ATTRIBUTE = 0x00000080; - const int SEC_DIR_WRITE_ATTRIBUTE = 0x00000100; - - /* registry entry specific bits */ - const int SEC_REG_QUERY_VALUE = 0x00000001; - const int SEC_REG_SET_VALUE = 0x00000002; - const int SEC_REG_CREATE_SUBKEY = 0x00000004; - const int SEC_REG_ENUM_SUBKEYS = 0x00000008; - const int SEC_REG_NOTIFY = 0x00000010; - const int SEC_REG_CREATE_LINK = 0x00000020; - - /* ldap specific access bits */ - const int SEC_ADS_CREATE_CHILD = 0x00000001; - const int SEC_ADS_DELETE_CHILD = 0x00000002; - const int SEC_ADS_LIST = 0x00000004; - const int SEC_ADS_SELF_WRITE = 0x00000008; - const int SEC_ADS_READ_PROP = 0x00000010; - const int SEC_ADS_WRITE_PROP = 0x00000020; - const int SEC_ADS_DELETE_TREE = 0x00000040; - const int SEC_ADS_LIST_OBJECT = 0x00000080; - const int SEC_ADS_CONTROL_ACCESS = 0x00000100; - - /* generic->specific mappings for files */ - const int SEC_RIGHTS_FILE_READ = SEC_STD_READ_CONTROL | - SEC_STD_SYNCHRONIZE | - SEC_FILE_READ_DATA | - SEC_FILE_READ_ATTRIBUTE | - SEC_FILE_READ_EA; - - const int 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; - - const int SEC_RIGHTS_FILE_EXECUTE = SEC_STD_SYNCHRONIZE | - SEC_STD_READ_CONTROL | - SEC_FILE_READ_ATTRIBUTE | - SEC_FILE_EXECUTE; - - const int SEC_RIGHTS_FILE_ALL = SEC_STD_ALL | SEC_FILE_ALL; - - /* generic->specific mappings for directories (same as files) */ - const int SEC_RIGHTS_DIR_READ = SEC_RIGHTS_FILE_READ; - const int SEC_RIGHTS_DIR_WRITE = SEC_RIGHTS_FILE_WRITE; - const int SEC_RIGHTS_DIR_EXECUTE = SEC_RIGHTS_FILE_EXECUTE; - const int SEC_RIGHTS_DIR_ALL = SEC_RIGHTS_FILE_ALL; - - - /***************************************************************/ - /* WELL KNOWN SIDS */ - - /* a NULL sid */ - const string SID_NULL = "S-1-0-0"; - - /* the world domain */ - const string NAME_WORLD = "WORLD"; - - const string SID_WORLD_DOMAIN = "S-1-1"; - const string SID_WORLD = "S-1-1-0"; - - /* SECURITY_CREATOR_SID_AUTHORITY */ - const string SID_CREATOR_OWNER_DOMAIN = "S-1-3"; - const string SID_CREATOR_OWNER = "S-1-3-0"; - const string SID_CREATOR_GROUP = "S-1-3-1"; - - /* SECURITY_NT_AUTHORITY */ - const string NAME_NT_AUTHORITY = "NT AUTHORITY"; - - const string SID_NT_AUTHORITY = "S-1-5"; - const string SID_NT_DIALUP = "S-1-5-1"; - const string SID_NT_NETWORK = "S-1-5-2"; - const string SID_NT_BATCH = "S-1-5-3"; - const string SID_NT_INTERACTIVE = "S-1-5-4"; - const string SID_NT_SERVICE = "S-1-5-6"; - const string SID_NT_ANONYMOUS = "S-1-5-7"; - const string SID_NT_PROXY = "S-1-5-8"; - const string SID_NT_ENTERPRISE_DCS = "S-1-5-9"; - const string SID_NT_SELF = "S-1-5-10"; - const string SID_NT_AUTHENTICATED_USERS = "S-1-5-11"; - const string SID_NT_RESTRICTED = "S-1-5-12"; - const string SID_NT_TERMINAL_SERVER_USERS = "S-1-5-13"; - const string SID_NT_REMOTE_INTERACTIVE = "S-1-5-14"; - const string SID_NT_THIS_ORGANISATION = "S-1-5-15"; - const string SID_NT_SYSTEM = "S-1-5-18"; - const string SID_NT_LOCAL_SERVICE = "S-1-5-19"; - const string SID_NT_NETWORK_SERVICE = "S-1-5-20"; - - /* SECURITY_BUILTIN_DOMAIN_RID */ - const string NAME_BUILTIN = "BUILTIN"; - - const string SID_BUILTIN = "S-1-5-32"; - const string SID_BUILTIN_ADMINISTRATORS = "S-1-5-32-544"; - const string SID_BUILTIN_USERS = "S-1-5-32-545"; - const string SID_BUILTIN_GUESTS = "S-1-5-32-546"; - const string SID_BUILTIN_POWER_USERS = "S-1-5-32-547"; - const string SID_BUILTIN_ACCOUNT_OPERATORS = "S-1-5-32-548"; - const string SID_BUILTIN_SERVER_OPERATORS = "S-1-5-32-549"; - const string SID_BUILTIN_PRINT_OPERATORS = "S-1-5-32-550"; - const string SID_BUILTIN_BACKUP_OPERATORS = "S-1-5-32-551"; - const string SID_BUILTIN_REPLICATOR = "S-1-5-32-552"; - const string SID_BUILTIN_RAS_SERVERS = "S-1-5-32-553"; - const string SID_BUILTIN_PREW2K = "S-1-5-32-554"; - - /* well-known domain RIDs */ - const int DOMAIN_RID_LOGON = 9; - const int DOMAIN_RID_ADMINISTRATOR = 500; - const int DOMAIN_RID_GUEST = 501; - const int DOMAIN_RID_ADMINS = 512; - const int DOMAIN_RID_USERS = 513; - const int DOMAIN_RID_DOMAIN_MEMBERS = 515; - const int DOMAIN_RID_DCS = 516; - const int DOMAIN_RID_CERT_ADMINS = 517; - const int DOMAIN_RID_SCHEMA_ADMINS = 518; - const int DOMAIN_RID_ENTERPRISE_ADMINS = 519; - - - /* - privilege IDs. Please keep the IDs below 64. If we get more - than 64 then we need to change security_token - */ - typedef enum { - SEC_PRIV_SECURITY = 1, - SEC_PRIV_BACKUP = 2, - SEC_PRIV_RESTORE = 3, - SEC_PRIV_SYSTEMTIME = 4, - SEC_PRIV_SHUTDOWN = 5, - SEC_PRIV_REMOTE_SHUTDOWN = 6, - SEC_PRIV_TAKE_OWNERSHIP = 7, - SEC_PRIV_DEBUG = 8, - SEC_PRIV_SYSTEM_ENVIRONMENT = 9, - SEC_PRIV_SYSTEM_PROFILE = 10, - SEC_PRIV_PROFILE_SINGLE_PROCESS = 11, - SEC_PRIV_INCREASE_BASE_PRIORITY = 12, - SEC_PRIV_LOAD_DRIVER = 13, - SEC_PRIV_CREATE_PAGEFILE = 14, - SEC_PRIV_INCREASE_QUOTA = 15, - SEC_PRIV_CHANGE_NOTIFY = 16, - SEC_PRIV_UNDOCK = 17, - SEC_PRIV_MANAGE_VOLUME = 18, - SEC_PRIV_IMPERSONATE = 19, - SEC_PRIV_CREATE_GLOBAL = 20, - SEC_PRIV_ENABLE_DELEGATION = 21, - SEC_PRIV_INTERACTIVE_LOGON = 22, - SEC_PRIV_NETWORK_LOGON = 23, - SEC_PRIV_REMOTE_INTERACTIVE_LOGON = 24 - } sec_privilege; - - typedef [bitmap8bit] bitmap { - SEC_ACE_FLAG_OBJECT_INHERIT = 0x01, - SEC_ACE_FLAG_CONTAINER_INHERIT = 0x02, - SEC_ACE_FLAG_NO_PROPAGATE_INHERIT = 0x04, - SEC_ACE_FLAG_INHERIT_ONLY = 0x08, - SEC_ACE_FLAG_INHERITED_ACE = 0x10, - SEC_ACE_FLAG_VALID_INHERIT = 0x0f, - SEC_ACE_FLAG_SUCCESSFUL_ACCESS = 0x40, - SEC_ACE_FLAG_FAILED_ACCESS = 0x80 - } security_ace_flags; - - typedef [enum8bit] enum { - SEC_ACE_TYPE_ACCESS_ALLOWED = 0, - SEC_ACE_TYPE_ACCESS_DENIED = 1, - SEC_ACE_TYPE_SYSTEM_AUDIT = 2, - SEC_ACE_TYPE_SYSTEM_ALARM = 3, - SEC_ACE_TYPE_ALLOWED_COMPOUND = 4, - SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT = 5, - SEC_ACE_TYPE_ACCESS_DENIED_OBJECT = 6, - SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT = 7, - SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT = 8 - } security_ace_type; - - typedef [bitmap32bit] bitmap { - SEC_ACE_OBJECT_TYPE_PRESENT = 0x00000001, - SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x00000002 - } security_ace_object_flags; - - typedef [nodiscriminant] union { - /* this is the 'schemaIDGUID' attribute of the attribute object in the schema naming context */ - [case(SEC_ACE_OBJECT_TYPE_PRESENT)] GUID type; - [default]; - } security_ace_object_type; - - typedef [nodiscriminant] union { - /* this is the 'schemaIDGUID' attribute of the objectclass object in the schema naming context - * (of the parent container) - */ - [case(SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] GUID inherited_type; - [default]; - } security_ace_object_inherited_type; - - typedef struct { - security_ace_object_flags flags; - [switch_is(flags & SEC_ACE_OBJECT_TYPE_PRESENT)] security_ace_object_type type; - [switch_is(flags & SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] security_ace_object_inherited_type inherited_type; - } security_ace_object; - - typedef [nodiscriminant] union { - [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] security_ace_object object; - [case(SEC_ACE_TYPE_ACCESS_DENIED_OBJECT)] security_ace_object object; - [case(SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT)] security_ace_object object; - [case(SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT)] security_ace_object object; - [default]; - } security_ace_object_ctr; - - typedef [public,gensize,nosize] struct { - security_ace_type type; /* SEC_ACE_TYPE_* */ - security_ace_flags flags; /* SEC_ACE_FLAG_* */ - [value(ndr_size_security_ace(r,ndr->flags))] uint16 size; - uint32 access_mask; - [switch_is(type)] security_ace_object_ctr object; - dom_sid trustee; - } security_ace; - - typedef enum { - SECURITY_ACL_REVISION_NT4 = 2, - SECURITY_ACL_REVISION_ADS = 4 - } security_acl_revision; - - const uint NT4_ACL_REVISION = SECURITY_ACL_REVISION_NT4; - - typedef [public,gensize,nosize] struct { - security_acl_revision revision; - [value(ndr_size_security_acl(r,ndr->flags))] uint16 size; - [range(0,1000)] uint32 num_aces; - security_ace aces[num_aces]; - } security_acl; - - /* default revision for new ACLs */ - typedef [enum8bit] enum { - SECURITY_DESCRIPTOR_REVISION_1 = 1 - } security_descriptor_revision; - - const int SD_REVISION = SECURITY_DESCRIPTOR_REVISION_1; - - /* security_descriptor->type bits */ - typedef [bitmap16bit] bitmap { - SEC_DESC_OWNER_DEFAULTED = 0x0001, - SEC_DESC_GROUP_DEFAULTED = 0x0002, - SEC_DESC_DACL_PRESENT = 0x0004, - SEC_DESC_DACL_DEFAULTED = 0x0008, - SEC_DESC_SACL_PRESENT = 0x0010, - SEC_DESC_SACL_DEFAULTED = 0x0020, - SEC_DESC_DACL_TRUSTED = 0x0040, - SEC_DESC_SERVER_SECURITY = 0x0080, - SEC_DESC_DACL_AUTO_INHERIT_REQ = 0x0100, - SEC_DESC_SACL_AUTO_INHERIT_REQ = 0x0200, - SEC_DESC_DACL_AUTO_INHERITED = 0x0400, - SEC_DESC_SACL_AUTO_INHERITED = 0x0800, - SEC_DESC_DACL_PROTECTED = 0x1000, - SEC_DESC_SACL_PROTECTED = 0x2000, - SEC_DESC_RM_CONTROL_VALID = 0x4000, - SEC_DESC_SELF_RELATIVE = 0x8000 - } security_descriptor_type; - - typedef [gensize,nosize,public,flag(NDR_LITTLE_ENDIAN)] struct { - security_descriptor_revision revision; - security_descriptor_type type; /* SEC_DESC_xxxx flags */ - [relative] dom_sid *owner_sid; - [relative] dom_sid *group_sid; - [relative] security_acl *sacl; /* system ACL */ - [relative] security_acl *dacl; /* user (discretionary) ACL */ - } security_descriptor; - - typedef [public] struct { - [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] uint32 sd_size; - [subcontext(4)] security_descriptor *sd; - } sec_desc_buf; - - typedef [public] struct { - dom_sid *user_sid; - dom_sid *group_sid; - uint32 num_sids; - [size_is(num_sids)] dom_sid *sids[*]; - udlong privilege_mask; - } security_token; - - /* bits that determine which parts of a security descriptor - are being queried/set */ - typedef [public,bitmap32bit] bitmap { - SECINFO_OWNER = 0x00000001, - SECINFO_GROUP = 0x00000002, - SECINFO_DACL = 0x00000004, - SECINFO_SACL = 0x00000008, - SECINFO_UNPROTECTED_SACL = 0x10000000, - SECINFO_UNPROTECTED_DACL = 0x20000000, - SECINFO_PROTECTED_SACL = 0x40000000, - SECINFO_PROTECTED_DACL = 0x80000000 - } security_secinfo; -} diff --git a/source3/librpc/idl/spoolss.idl b/source3/librpc/idl/spoolss.idl deleted file mode 100644 index 2144393ebd..0000000000 --- a/source3/librpc/idl/spoolss.idl +++ /dev/null @@ -1,1571 +0,0 @@ -#include "idl_types.h" - -/* - spoolss interface definitions -*/ -import "security.idl", "winreg.idl"; - -[ uuid("12345678-1234-abcd-ef00-0123456789ab"), - version(1.0), - endpoint("ncacn_np:[\\pipe\\spoolss]"), - pointer_default(unique), - helpstring("Spooler SubSystem"), - helper("librpc/ndr/ndr_spoolss_buf.h") -] interface spoolss -{ - typedef [v1_enum] enum winreg_Type winreg_Type; - typedef struct { - uint16 year; - uint16 month; - uint16 day_of_week; - uint16 day; - uint16 hour; - uint16 minute; - uint16 second; - uint16 millisecond; - } spoolss_Time; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *servername; - uint32 cjobs; - uint32 total_jobs; - uint32 total_bytes; - spoolss_Time time; - uint32 global_counter; - uint32 total_pages; - uint32 version; - uint32 unknown10; - uint32 unknown11; - uint32 unknown12; - uint32 session_counter; - uint32 unknown14; - uint32 printer_errors; - uint32 unknown16; - uint32 unknown17; - uint32 unknown18; - uint32 unknown19; - uint32 change_id; - uint32 unknown21; - uint32 status; - uint32 unknown23; - uint32 c_setprinter; - uint16 unknown25; - uint16 unknown26; - uint32 unknown27; - uint32 unknown28; - uint32 unknown29; - } spoolss_PrinterInfo0; - - typedef [public,gensize] struct { - [charset(UTF16)] uint16 devicename[32]; - uint16 specversion; - uint16 driverversion; - uint16 size; - [value(r->driverextra_data.length)] uint16 __driverextra_length; - uint32 fields; - uint16 orientation; - uint16 papersize; - uint16 paperlength; - uint16 paperwidth; - uint16 scale; - uint16 copies; - uint16 defaultsource; - uint16 printquality; - uint16 color; - uint16 duplex; - uint16 yresolution; - uint16 ttoption; - uint16 collate; - [charset(UTF16)] uint16 formname[32]; - uint16 logpixels; - uint32 bitsperpel; - uint32 pelswidth; - uint32 pelsheight; - uint32 displayflags; - uint32 displayfrequency; - uint32 icmmethod; - uint32 icmintent; - uint32 mediatype; - uint32 dithertype; - uint32 reserved1; - uint32 reserved2; - uint32 panningwidth; - uint32 panningheight; - [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data; - } spoolss_DeviceMode; - - typedef [public] bitmap { - PRINTER_ENUM_DEFAULT = 0x00000001, - PRINTER_ENUM_LOCAL = 0x00000002, - PRINTER_ENUM_CONNECTIONS = 0x00000004, - PRINTER_ENUM_FAVORITE = 0x00000004, - PRINTER_ENUM_NAME = 0x00000008, - PRINTER_ENUM_REMOTE = 0x00000010, - PRINTER_ENUM_SHARED = 0x00000020, - PRINTER_ENUM_NETWORK = 0x00000040, - PRINTER_ENUM_EXPAND = 0x00004000, - PRINTER_ENUM_CONTAINER = 0x00008000, - PRINTER_ENUM_ICON1 = 0x00010000, - PRINTER_ENUM_ICON2 = 0x00020000, - PRINTER_ENUM_ICON3 = 0x00040000, - PRINTER_ENUM_ICON4 = 0x00080000, - PRINTER_ENUM_ICON5 = 0x00100000, - PRINTER_ENUM_ICON6 = 0x00200000, - PRINTER_ENUM_ICON7 = 0x00400000, - PRINTER_ENUM_ICON8 = 0x00800000, - PRINTER_ENUM_HIDE = 0x01000000 - } spoolss_EnumPrinterFlags; - - typedef struct { - spoolss_EnumPrinterFlags flags; - [relative] nstring *name; - [relative] nstring *description; - [relative] nstring *comment; - } spoolss_PrinterInfo1; - - typedef bitmap { - PRINTER_ATTRIBUTE_QUEUED = 0x00000001, - PRINTER_ATTRIBUTE_DIRECT = 0x00000002, - PRINTER_ATTRIBUTE_DEFAULT = 0x00000004, - PRINTER_ATTRIBUTE_SHARED = 0x00000008, - PRINTER_ATTRIBUTE_NETWORK = 0x00000010, - PRINTER_ATTRIBUTE_HIDDEN = 0x00000020, - PRINTER_ATTRIBUTE_LOCAL = 0x00000040, - PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080, - PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100, - PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200, - PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400, - PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800, - PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000, - PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000, - PRINTER_ATTRIBUTE_FAX = 0x00004000, - PRINTER_ATTRIBUTE_TS = 0x00008000 - } spoolss_PrinterAttributes; - - typedef bitmap { - PRINTER_STATUS_PAUSED = 0x00000001, - PRINTER_STATUS_ERROR = 0x00000002, - PRINTER_STATUS_PENDING_DELETION = 0x00000004, - PRINTER_STATUS_PAPER_JAM = 0x00000008, - PRINTER_STATUS_PAPER_OUT = 0x00000010, - PRINTER_STATUS_MANUAL_FEED = 0x00000020, - PRINTER_STATUS_PAPER_PROBLEM = 0x00000040, - PRINTER_STATUS_OFFLINE = 0x00000080, - PRINTER_STATUS_IO_ACTIVE = 0x00000100, - PRINTER_STATUS_BUSY = 0x00000200, - PRINTER_STATUS_PRINTING = 0x00000400, - PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800, - PRINTER_STATUS_NOT_AVAILABLE = 0x00001000, - PRINTER_STATUS_WAITING = 0x00002000, - PRINTER_STATUS_PROCESSING = 0x00004000, - PRINTER_STATUS_INITIALIZING = 0x00008000, - PRINTER_STATUS_WARMING_UP = 0x00010000, - PRINTER_STATUS_TONER_LOW = 0x00020000, - PRINTER_STATUS_NO_TONER = 0x00040000, - PRINTER_STATUS_PAGE_PUNT = 0x00080000, - PRINTER_STATUS_USER_INTERVENTION= 0x00100000, - PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000, - PRINTER_STATUS_DOOR_OPEN = 0x00400000, - PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000, - PRINTER_STATUS_POWER_SAVE = 0x01000000 - } spoolss_PrinterStatus; - - typedef struct { - [relative] nstring *servername; - [relative] nstring *printername; - [relative] nstring *sharename; - [relative] nstring *portname; - [relative] nstring *drivername; - [relative] nstring *comment; - [relative] nstring *location; - [relative,subcontext(0)] spoolss_DeviceMode *devmode; - [relative] nstring *sepfile; - [relative] nstring *printprocessor; - [relative] nstring *datatype; - [relative] nstring *parameters; - [relative,subcontext(0)] security_descriptor *secdesc; - spoolss_PrinterAttributes attributes; - uint32 priority; - uint32 defaultpriority; - uint32 starttime; - uint32 untiltime; - spoolss_PrinterStatus status; - uint32 cjobs; - uint32 averageppm; - } spoolss_PrinterInfo2; - - typedef struct { - [relative,subcontext(0)] security_descriptor *secdesc; - } spoolss_PrinterInfo3; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *servername; - spoolss_PrinterAttributes attributes; - } spoolss_PrinterInfo4; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *portname; - spoolss_PrinterAttributes attributes; - uint32 device_not_selected_timeout; - uint32 transmission_retry_timeout; - } spoolss_PrinterInfo5; - - typedef struct { - spoolss_PrinterStatus status; - } spoolss_PrinterInfo6; - - typedef bitmap { - DSPRINT_PUBLISH = 0x00000001, - DSPRINT_UPDATE = 0x00000002, - DSPRINT_UNPUBLISH = 0x00000004, - DSPRINT_REPUBLISH = 0x00000008, - DSPRINT_PENDING = 0x80000000 - } spoolss_DsPrintAction; - - typedef struct { - [relative] nstring *guid; /* text form of printer guid */ - spoolss_DsPrintAction action; - } spoolss_PrinterInfo7; - - typedef struct { - [relative,subcontext(0)] spoolss_DeviceMode *devmode; - } spoolss_DeviceModeInfo; - - typedef [nodiscriminant,relative_base,public] union { - [case(0)] spoolss_PrinterInfo0 info0; - [case(1)] spoolss_PrinterInfo1 info1; - [case(2)] spoolss_PrinterInfo2 info2; - [case(3)] spoolss_PrinterInfo3 info3; - [case(4)] spoolss_PrinterInfo4 info4; - [case(5)] spoolss_PrinterInfo5 info5; - [case(6)] spoolss_PrinterInfo6 info6; - [case(7)] spoolss_PrinterInfo7 info7; - [case(8)] spoolss_DeviceModeInfo info8; - [case(9)] spoolss_DeviceModeInfo info9; - [default]; - } spoolss_PrinterInfo; - - /******************/ - /* Function: 0x00 */ - /* we are using this as internal parsing code */ - [public,noopnum,noprint] WERROR _spoolss_EnumPrinters( - [in] spoolss_EnumPrinterFlags flags, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrinters( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PrinterInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrinters( - [in] spoolss_EnumPrinterFlags flags, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - /* what we have here is a subcontext containing an array of no discriminant unions - * and the array has no size in front - */ - [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x01 */ - typedef struct { - [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size; - [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode; - } spoolss_DevmodeContainer; - - [public] WERROR spoolss_OpenPrinter( - [in,unique] [string,charset(UTF16)] uint16 *printername, - [in,unique] [string,charset(UTF16)] uint16 *datatype, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] uint32 access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x02 */ - typedef struct { - uint32 job_id; - [relative] nstring *printer_name; - [relative] nstring *server_name; - [relative] nstring *user_name; - [relative] nstring *document_name; - [relative] nstring *data_type; - [relative] nstring *text_status; - uint32 status; - uint32 priority; - uint32 position; - uint32 total_pages; - uint32 pages_printed; - spoolss_Time time; - } spoolss_JobInfo1; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_JobInfo1 info1; - [case(2)]; /* TODO */ - [case(3)]; /* TODO */ - [default]; - } spoolss_JobInfo; - - typedef struct { - uint32 level; - [switch_is(level)] spoolss_JobInfo info; - } spoolss_JobInfoContainer; - - typedef [v1_enum] enum { - SPOOLSS_JOB_CONTROL_PAUSE = 1, - SPOOLSS_JOB_CONTROL_RESUME = 2, - SPOOLSS_JOB_CONTROL_CANCEL = 3, - SPOOLSS_JOB_CONTROL_RESTART = 4, - SPOOLSS_JOB_CONTROL_DELETE = 5, - SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6, - SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7 - } spoolss_JobControl; - - WERROR spoolss_SetJob( - [in,ref] policy_handle *handle, - [in] uint32 job_id, - [in,unique] spoolss_JobInfoContainer *ctr, - [in] spoolss_JobControl command - ); - - /******************/ - /* Function: 0x03 */ - WERROR spoolss_GetJob( - [in,ref] policy_handle *handle, - [in] uint32 job_id, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x04 */ - [public,noopnum,noprint] WERROR _spoolss_EnumJobs( - [in,ref] policy_handle *handle, - [in] uint32 firstjob, - [in] uint32 numjobs, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumJobs( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_JobInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumJobs( - [in,ref] policy_handle *handle, - [in] uint32 firstjob, - [in] uint32 numjobs, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x05 */ - WERROR spoolss_AddPrinter( - /* This function is not implemented in Samba 3 as no - clients have been observed using it. */ - ); - - /******************/ - /* Function: 0x06 */ - WERROR spoolss_DeletePrinter( - ); - - /******************/ - /* Function: 0x07 */ - typedef [v1_enum] enum { - SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0, - SPOOLSS_PRINTER_CONTROL_PAUSE = 1, - SPOOLSS_PRINTER_CONTROL_RESUME = 2, - SPOOLSS_PRINTER_CONTROL_PURGE = 3, - SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4 - } spoolss_PrinterControl; - - typedef [switch_type(uint32)] union { - [case(0)] spoolss_PrinterInfo0 *info0; - [case(1)] spoolss_PrinterInfo1 *info1; - [case(2)] spoolss_PrinterInfo2 *info2; - [case(3)] spoolss_PrinterInfo3 *info3; - [case(4)] spoolss_PrinterInfo4 *info4; - [case(5)] spoolss_PrinterInfo5 *info5; - [case(6)] spoolss_PrinterInfo6 *info6; - [case(7)] spoolss_PrinterInfo7 *info7; - [case(8)] spoolss_DeviceModeInfo *info8; - [case(9)] spoolss_DeviceModeInfo *info9; - [default]; - } spoolss_SetPrinterInfo; - - WERROR spoolss_SetPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_SetPrinterInfo info, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] sec_desc_buf secdesc_ctr, - [in] spoolss_PrinterControl command - ); - - /******************/ - /* Function: 0x08 */ - [public] WERROR spoolss_GetPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x09 */ - WERROR spoolss_AddPrinterDriver( - ); - - typedef struct { - [relative] nstring *driver_name; - } spoolss_DriverInfo1; - - typedef [v1_enum] enum { - SPOOLSS_DRIVER_VERSION_9X = 0, - SPOOLSS_DRIVER_VERSION_NT35 = 1, - SPOOLSS_DRIVER_VERSION_NT4 = 2, - SPOOLSS_DRIVER_VERSION_200X = 3 - } spoolss_DriverOSVersion; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - } spoolss_DriverInfo2; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - } spoolss_DriverInfo3; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - [relative] nstring_array *previous_names; - } spoolss_DriverInfo4; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - uint32 driver_attributes; - uint32 config_version; - uint32 driver_version; - } spoolss_DriverInfo5; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - [relative] nstring_array *previous_names; - NTTIME driver_data; - hyper driver_version; - [relative] nstring *manufacturer_name; - [relative] nstring *manufacturer_url; - [relative] nstring *hardware_id; - [relative] nstring *provider; - } spoolss_DriverInfo6; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_DriverInfo1 info1; - [case(2)] spoolss_DriverInfo2 info2; - [case(3)] spoolss_DriverInfo3 info3; - [case(4)] spoolss_DriverInfo4 info4; - [case(5)] spoolss_DriverInfo5 info5; - [case(6)] spoolss_DriverInfo6 info6; - [default]; - } spoolss_DriverInfo; - - /******************/ - /* Function: 0x0a */ - [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_DriverInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrinterDrivers( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x0b */ - WERROR spoolss_GetPrinterDriver( - ); - - /******************/ - /* Function: 0x0c */ - typedef struct { - nstring directory_name; - } spoolss_DriverDirectoryInfo1; - - /* NOTE: it's seems that w2k3 completly ignores the level - in its server code - */ - typedef [nodiscriminant,relative_base,gensize,public] union { - [case(1)] spoolss_DriverDirectoryInfo1 info1; - [default] spoolss_DriverDirectoryInfo1 info1; - } spoolss_DriverDirectoryInfo; - - [public] WERROR spoolss_GetPrinterDriverDirectory( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x0d */ - WERROR spoolss_DeletePrinterDriver( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] [string,charset(UTF16)] uint16 architecture[], - [in] [string,charset(UTF16)] uint16 driver[] - ); - - /******************/ - /* Function: 0x0e */ - WERROR spoolss_AddPrintProcessor( - ); - - /******************/ - /* Function: 0x0f */ - typedef struct { - [relative] nstring *print_processor_name; - } spoolss_PrintProcessorInfo1; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_PrintProcessorInfo1 info1; - [default]; - } spoolss_PrintProcessorInfo; - - [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrintProcessors( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PrintProcessorInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrintProcessors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x10 */ - WERROR spoolss_GetPrintProcessorDirectory( - ); - - /******************/ - /* Function: 0x11 */ - typedef struct { - [string,charset(UTF16)] uint16 *document_name; - [string,charset(UTF16)] uint16 *output_file; - [string,charset(UTF16)] uint16 *datatype; - } spoolss_DocumentInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] spoolss_DocumentInfo1 *info1; - [case(2)]; /* TODO */ - [case(3)]; /* TODO */ - [default]; - } spoolss_DocumentInfo; - - WERROR spoolss_StartDocPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_DocumentInfo info, - [out] uint32 job_id - ); - - /******************/ - /* Function: 0x12 */ - WERROR spoolss_StartPagePrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x13 */ - WERROR spoolss_WritePrinter( - [in,ref] policy_handle *handle, - [in] DATA_BLOB data, - [in,value(r->in.data.length)] uint32 _data_size, - [out] uint32 num_written - ); - - /******************/ - /* Function: 0x14 */ - WERROR spoolss_EndPagePrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x15 */ - WERROR spoolss_AbortPrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x16 */ - WERROR spoolss_ReadPrinter( - [in,ref] policy_handle *handle, - [in] uint32 data_size, - [out] DATA_BLOB data, - [out,value(r->out.data.length)] uint32 _data_size - ); - - /******************/ - /* Function: 0x17 */ - WERROR spoolss_EndDocPrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x18 */ - WERROR spoolss_AddJob( - ); - - /******************/ - /* Function: 0x19 */ - WERROR spoolss_ScheduleJob( - ); - - /******************/ - /* Function: 0x1a */ - const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86"; - - typedef [public,gensize] struct { - [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size; - uint32 major; - uint32 minor; - uint32 build; - [value(2)] uint32 unknown; - [subcontext(0),subcontext_size(256)] nstring extra_string; - } spoolss_OSVersion; - - typedef [public,gensize] struct { - [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size; - uint32 major; - uint32 minor; - uint32 build; - [value(2)] uint32 unknown1; - [subcontext(0),subcontext_size(256)] nstring extra_string; - uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/ - uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */ - } spoolss_OSVersionEx; - - typedef [v1_enum] enum { - SPOOLSS_PRINTER_DATA_TYPE_NULL = 0, - SPOOLSS_PRINTER_DATA_TYPE_STRING = 1, - SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3, - SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4, - SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7 - } spoolss_PrinterDataType; - - typedef [nodiscriminant,public,gensize] union { - [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)]; - [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string; - [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary; - [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value; - [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array; - [default,flag(NDR_REMAINING)] DATA_BLOB data; - } spoolss_PrinterData; - - [noopnum,noprint,public] WERROR _spoolss_GetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] spoolss_PrinterDataType type, - [out] DATA_BLOB data, - [out] uint32 needed - ); - [noopnum,noprint,public] void __spoolss_GetPrinterData( - [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData data - ); - [nopull,nopush,public] WERROR spoolss_GetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] spoolss_PrinterDataType type, - [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData data, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x1b */ - [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] spoolss_PrinterDataType type, - [in] DATA_BLOB data, - [in] uint32 _offered - ); - [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData( - [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData data - ); - [nopush] WERROR spoolss_SetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] spoolss_PrinterDataType type, - [in,subcontext(4),switch_is(type)] spoolss_PrinterData data, - [in,value(ndr_size_spoolss_PrinterData(&data,type,flags))] uint32 _offered - ); - - /******************/ - /* Function: 0x1c */ - WERROR spoolss_WaitForPrinterChange( - ); - - /******************/ - /* Function: 0x1d */ - [public] WERROR spoolss_ClosePrinter( - [in,out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x1e */ - typedef [v1_enum] enum { - SPOOLSS_FORM_USER = 0, - SPOOLSS_FORM_BUILTIN = 1, - SPOOLSS_FORM_PRINTER = 2 - } spoolss_FormFlags; - - typedef struct { - uint32 width; - uint32 height; - } spoolss_FormSize; - - typedef struct { - uint32 left; - uint32 top; - uint32 right; - uint32 bottom; - } spoolss_FormArea; - - typedef struct { - spoolss_FormFlags flags; - [relative] nstring *form_name; - spoolss_FormSize size; - spoolss_FormArea area; - } spoolss_FormInfo1; - - typedef [nodiscriminant,relative_base,public,gensize] union { - [case(1)] spoolss_FormInfo1 info1; - [default]; - } spoolss_FormInfo; - - typedef struct { - spoolss_FormFlags flags; - [string,charset(UTF16)] uint16 *form_name; - spoolss_FormSize size; - spoolss_FormArea area; - } spoolss_AddFormInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] spoolss_AddFormInfo1 *info1; - } spoolss_AddFormInfo; - - WERROR spoolss_AddForm( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_AddFormInfo info - ); - - /******************/ - /* Function: 0x1f */ - WERROR spoolss_DeleteForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[] - ); - - /******************/ - /* Function: 0x20 */ - WERROR spoolss_GetForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[], - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x21 */ - WERROR spoolss_SetForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[], - [in] uint32 level, - [in,switch_is(level)] spoolss_AddFormInfo info - ); - - /******************/ - /* Function: 0x22 */ - [public,noopnum,noprint] WERROR _spoolss_EnumForms( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumForms( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_FormInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumForms( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - typedef struct { - [relative] nstring *port_name; - } spoolss_PortInfo1; - - typedef bitmap { - SPOOLSS_PORT_TYPE_WRITE = 0x00000001, - SPOOLSS_PORT_TYPE_READ = 0x00000002, - SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004, - SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008 - } spoolss_PortType; - - typedef struct { - [relative] nstring *port_name; - [relative] nstring *monitor_name; - [relative] nstring *description; - spoolss_PortType port_type; - uint32 reserved; - } spoolss_PortInfo2; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_PortInfo1 info1; - [case(2)] spoolss_PortInfo2 info2; - [case(3)]; /* TODO */ - [default]; - } spoolss_PortInfo; - - /******************/ - /* Function: 0x23 */ - [public,noopnum,noprint] WERROR _spoolss_EnumPorts( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPorts( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PortInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPorts( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x24 */ - typedef struct { - [relative] nstring *monitor_name; - } spoolss_MonitorInfo1; - - typedef struct { - [relative] nstring *monitor_name; - [relative] nstring *environment; - [relative] nstring *dll_name; - } spoolss_MonitorInfo2; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_MonitorInfo1 info1; - [case(2)] spoolss_MonitorInfo2 info2; - [default]; - } spoolss_MonitorInfo; - - [public,noopnum,noprint] WERROR _spoolss_EnumMonitors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumMonitors( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_MonitorInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumMonitors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x25 */ - WERROR spoolss_AddPort( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 unknown, - [in] [string,charset(UTF16)] uint16 monitor_name[] - ); - - /******************/ - /* Function: 0x26 */ - WERROR spoolss_ConfigurePort( - ); - - /******************/ - /* Function: 0x27 */ - WERROR spoolss_DeletePort( - ); - - /******************/ - /* Function: 0x28 */ - WERROR spoolss_CreatePrinterIC( - ); - - /******************/ - /* Function: 0x29 */ - WERROR spoolss_PlayGDIScriptOnPrinterIC( - ); - - /******************/ - /* Function: 0x2a */ - WERROR spoolss_DeletePrinterIC( - ); - - /******************/ - /* Function: 0x2b */ - WERROR spoolss_AddPrinterConnection( - ); - - /******************/ - /* Function: 0x2c */ - WERROR spoolss_DeletePrinterConnection( - ); - - /******************/ - /* Function: 0x2d */ - WERROR spoolss_PrinterMessageBox( - /* Marked as obsolete in MSDN. "Not necessary and has - no effect". */ - ); - - /******************/ - /* Function: 0x2e */ - WERROR spoolss_AddMonitor( - ); - - /******************/ - /* Function: 0x2f */ - WERROR spoolss_DeleteMonitor( - ); - - /******************/ - /* Function: 0x30 */ - WERROR spoolss_DeletePrintProcessor( - ); - - /******************/ - /* Function: 0x31 */ - WERROR spoolss_AddPrintProvidor( - ); - - /******************/ - /* Function: 0x32 */ - WERROR spoolss_DeletePrintProvidor( - ); - - /******************/ - /* Function: 0x33 */ - WERROR spoolss_EnumPrintProcDataTypes( - ); - - /******************/ - /* Function: 0x34 */ - WERROR spoolss_ResetPrinter( - ); - - /******************/ - /* Function: 0x35 */ - WERROR spoolss_GetPrinterDriver2( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *architecture, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [in] uint32 client_major_version, - [in] uint32 client_minor_version, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 server_major_version, - [out] uint32 server_minor_version - ); - - /******************/ - /* Function: 0x36 */ - WERROR spoolss_FindFirstPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x37 */ - WERROR spoolss_FindNextPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x38 */ - [public] WERROR spoolss_FindClosePrinterNotify( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x39 */ - WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld( - ); - - /******************/ - /* Function: 0x3a */ - [public] WERROR spoolss_ReplyOpenPrinter( - [in,string,charset(UTF16)] uint16 server_name[], - [in] uint32 printer_local, - [in] winreg_Type type, - [in] uint32 unknown1, - [in] uint32 unknown2, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x3b */ - WERROR spoolss_RouterReplyPrinter( - ); - - /******************/ - /* Function: 0x3c */ - [public] WERROR spoolss_ReplyClosePrinter( - [in,out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x3d */ - WERROR spoolss_AddPortEx( - ); - - /******************/ - /* Function: 0x3e */ - WERROR spoolss_RouterFindFirstPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x3f */ - WERROR spoolss_SpoolerInit( - ); - - /******************/ - /* Function: 0x40 */ - WERROR spoolss_ResetPrinterEx( - ); - - typedef [enum16bit] enum { - SPOOLSS_FIELD_SERVER_NAME = 0, - SPOOLSS_FIELD_PRINTER_NAME = 1, - SPOOLSS_FIELD_SHARE_NAME = 2, - SPOOLSS_FIELD_PORT_NAME = 3, - SPOOLSS_FIELD_DRIVER_NAME = 4, - SPOOLSS_FIELD_COMMENT = 5, - SPOOLSS_FIELD_LOCATION = 6, - SPOOLSS_FIELD_DEVMODE = 7, - SPOOLSS_FIELD_SEPFILE = 8, - SPOOLSS_FIELD_PRINT_PROCESSOR = 9, - SPOOLSS_FIELD_PARAMETERS = 10, - SPOOLSS_FIELD_DATATYPE = 11, - SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12, - SPOOLSS_FIELD_ATTRIBUTES = 13, - SPOOLSS_FIELD_PRIORITY = 14, - SPOOLSS_FIELD_DEFAULT_PRIORITY = 15, - SPOOLSS_FIELD_START_TIME = 16, - SPOOLSS_FIELD_UNTIL_TIME = 17, - SPOOLSS_FIELD_STATUS = 18, - SPOOLSS_FIELD_STATUS_STRING = 19, - SPOOLSS_FIELD_CJOBS = 20, - SPOOLSS_FIELD_AVERAGE_PPM = 21, - SPOOLSS_FIELD_TOTAL_PAGES = 22, - SPOOLSS_FIELD_PAGES_PRINTED = 23, - SPOOLSS_FIELD_TOTAL_BYTES = 24, - SPOOLSS_FIELD_BYTES_PRINTED = 25 - } spoolss_Field; - - typedef [enum16bit] enum { - SPOOLSS_NOTIFY_PRINTER = 0, - SPOOLSS_NOTIFY_JOB = 1 - } spoolss_NotifyType; - - /******************/ - /* Function: 0x41 */ - typedef struct { - spoolss_NotifyType type; - uint16 u1; - uint32 u2; - uint32 u3; - uint32 count; - [size_is(count)] spoolss_Field *fields; - } spoolss_NotifyOptionsArray; - - typedef struct { - uint32 version; - uint32 flags; - uint32 count; - [size_is(count)] spoolss_NotifyOptionsArray *options; - } spoolss_NotifyOptionsContainer; - - [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx( - [in,ref] policy_handle *handle, - [in] uint32 flags, - [in] uint32 options, - [in,unique] [string,charset(UTF16)] uint16 *str, - [in] uint32 printer_local, - [in,unique] spoolss_NotifyOptionsContainer *t1 - ); - - /******************/ - /* Function: 0x42 */ - WERROR spoolss_RouterRefreshPrinterChangeNotification( - ); - - typedef struct { - uint32 size; - [size_is(size/2),unique,charset(UTF16)] uint16 *string; - } spoolss_NotifyUTF16String; - - typedef struct { - uint32 size; - [size_is(size),charset(DOS)] uint8 *string; - } spoolss_NotifyDOSString; - - typedef struct { - uint16 data[8]; - } spoolss_NotifyBlobData; - - typedef struct { - uint32 len; - [unique] spoolss_NotifyBlobData *data; - } spoolss_NotifyBlob; - - typedef [switch_type(uint32)] union { - [case(1)] dlong integer; - [case(2)] spoolss_NotifyUTF16String utf16_string; - [case(3)] spoolss_NotifyDOSString ascii_string; - [case(4)] spoolss_NotifyBlob blob; - [case(5)] spoolss_NotifyDOSString ascii_string; - } spoolss_NotifyData; - - typedef struct { - spoolss_NotifyType type; - spoolss_Field field; - uint32 variable_type; - uint32 job_id; - [switch_is(variable_type)] spoolss_NotifyData data; - } spoolss_Notify; - - typedef struct { - uint32 version; - uint32 flags; - uint32 count; - [size_is(count)] spoolss_Notify notifies[]; - } spoolss_NotifyInfo; - - /******************/ - /* Function: 0x43 */ - [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx( - [in,ref] policy_handle *handle, - [in] uint32 change_low, - [in,unique] spoolss_NotifyOptionsContainer *container, - [out, unique] spoolss_NotifyInfo *info - ); - - /******************/ - /* Function: 0x44 */ - WERROR spoolss_44( - ); - - typedef struct { - uint32 size; - [string,charset(UTF16)] uint16 *client; - [string,charset(UTF16)] uint16 *user; - uint32 build; - uint32 major; - uint32 minor; - uint32 processor; - } spoolss_UserLevel1; - - typedef union { - [case(1)] spoolss_UserLevel1 *level1; - } spoolss_UserLevel; - - typedef bitmap { - SERVER_ACCESS_ADMINISTER = 0x00000001, - SERVER_ACCESS_ENUMERATE = 0x00000002, - PRINTER_ACCESS_ADMINISTER = 0x00000004, - PRINTER_ACCESS_USE = 0x00000008, - JOB_ACCESS_ADMINISTER = 0x00000010 - } spoolss_AccessRights; - - /* Access rights for print servers */ - const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED | - SERVER_ACCESS_ADMINISTER | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_READ = SEC_STD_READ_CONTROL | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - SERVER_ACCESS_ADMINISTER | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_EXECUTE = SEC_STD_READ_CONTROL | - SERVER_ACCESS_ENUMERATE; - - /* Access rights for printers */ - const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED | - PRINTER_ACCESS_ADMINISTER | - PRINTER_ACCESS_USE; - - const int PRINTER_READ = SEC_STD_READ_CONTROL | - PRINTER_ACCESS_USE; - - const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - PRINTER_ACCESS_USE; - - const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL | - PRINTER_ACCESS_USE; - - /* Access rights for jobs */ - const int JOB_ALL_ACCESS = SEC_STD_REQUIRED | - JOB_ACCESS_ADMINISTER; - - const int JOB_READ = SEC_STD_READ_CONTROL | - JOB_ACCESS_ADMINISTER; - - const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - JOB_ACCESS_ADMINISTER; - - const int JOB_EXECUTE = SEC_STD_READ_CONTROL | - JOB_ACCESS_ADMINISTER; - - /* ACE masks for various print permissions */ - const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL | - PRINTER_ALL_ACCESS; - - const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL | - READ_CONTROL_ACCESS; - - const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS | - READ_CONTROL_ACCESS | - PRINTER_ACCESS_USE; - - /******************/ - /* Function: 0x45 */ - [public] WERROR spoolss_OpenPrinterEx( - [in,unique] [string,charset(UTF16)] uint16 *printername, - [in,unique] [string,charset(UTF16)] uint16 *datatype, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] uint32 access_mask, - [in] uint32 level, - [in,switch_is(level)] spoolss_UserLevel userlevel, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x46 */ - WERROR spoolss_AddPrinterEx( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique,switch_is(level)] spoolss_PrinterInfo *info, - [in] spoolss_DevmodeContainer devmode_ctr, - [in,unique] security_descriptor *secdesc, - [in] uint32 ulevel, - [in,switch_is(ulevel)] spoolss_UserLevel userlevel - ); - - /******************/ - /* Function: 0x47 */ - WERROR spoolss_47( - ); - - /******************/ - /* Function: 0x48 */ - WERROR spoolss_EnumPrinterData( - [in,ref] policy_handle *handle, - [in] uint32 enum_index, - [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name, - [in] uint32 value_offered, - [out,ref] uint32 *value_needed, - [out,ref] uint32 *printerdata_type, - [out,ref] DATA_BLOB *buffer, - [in] uint32 data_offered, - [out,ref] uint32 *data_needed - ); - - /******************/ - /* Function: 0x49 */ - WERROR spoolss_DeletePrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[] - ); - - /******************/ - /* Function: 0x4a */ - WERROR spoolss_4a( - ); - - /******************/ - /* Function: 0x4b */ - WERROR spoolss_4b( - ); - - /******************/ - /* Function: 0x4c */ - WERROR spoolss_4c( - ); - - /******************/ - /* Function: 0x4d */ - WERROR spoolss_SetPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 type, - [in] DATA_BLOB buffer, - [in] uint32 offered - ); - - /******************/ - /* Function: 0x4e */ - WERROR spoolss_GetPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] uint32 type, - [out] DATA_BLOB buffer, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x4f */ - [public] WERROR spoolss_EnumPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] uint32 offered, - [out] DATA_BLOB buffer, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x50 */ - [public] WERROR spoolss_EnumPrinterKey( - [in, ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [out] uint32 key_buffer_size, - [out] uint16 key_buffer[key_buffer_size], - [in,out] uint32 needed - ); - - /******************/ - /* Function: 0x51 */ - WERROR spoolss_DeletePrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[] - ); - - /******************/ - /* Function: 0x52 */ - WERROR spoolss_DeletePrinterKey( - ); - - /******************/ - /* Function: 0x53 */ - WERROR spoolss_53( - ); - - /******************/ - /* Function: 0x54 */ - WERROR spoolss_DeletePrinterDriverEx( - ); - - /******************/ - /* Function: 0x55 */ - WERROR spoolss_55( - ); - - /******************/ - /* Function: 0x56 */ - WERROR spoolss_56( - ); - - /******************/ - /* Function: 0x57 */ - WERROR spoolss_57( - ); - - /******************/ - /* Function: 0x58 */ - WERROR spoolss_XcvData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 function_name[], - [in] DATA_BLOB in_data, - [in,value(r->in.in_data.length)] uint32 _in_data_length, - [in] uint32 offered, - [in] uint32 unknown1, - [out] DATA_BLOB out_data, - [out] uint32 needed, - [out] uint32 unknown2 - ); - - /******************/ - /* Function: 0x59 */ - [public] WERROR spoolss_AddPrinterDriverEx( - ); - - /******************/ - /* Function: 0x5a */ - WERROR spoolss_5a( - ); - - /******************/ - /* Function: 0x5b */ - WERROR spoolss_5b( - ); - - /******************/ - /* Function: 0x5c */ - WERROR spoolss_5c( - ); - - /******************/ - /* Function: 0x5d */ - WERROR spoolss_5d( - ); - - /******************/ - /* Function: 0x5e */ - WERROR spoolss_5e( - ); - - /******************/ - /* Function: 0x5f */ - WERROR spoolss_5f( - ); -} diff --git a/source3/librpc/idl/srvsvc.idl b/source3/librpc/idl/srvsvc.idl index 0bbd24a5dd..39d72b73da 100644 --- a/source3/librpc/idl/srvsvc.idl +++ b/source3/librpc/idl/srvsvc.idl @@ -3,7 +3,6 @@ /* srvsvc interface definitions */ - import "security.idl", "svcctl.idl"; [ uuid("4b324fc8-1670-01d3-1278-5a47bf6ee188"), @@ -1377,7 +1376,7 @@ import "security.idl", "svcctl.idl"; /******************/ /* Function: 0x22 */ - WERROR srvsvc_NETRPRNAMECANONICALIZE( + [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE( ); /******************/ @@ -1470,56 +1469,56 @@ import "security.idl", "svcctl.idl"; /******************/ /* Function: 0x2b */ - WERROR srvsvc_NETRDFSGETVERSION( + [todo] WERROR srvsvc_NETRDFSGETVERSION( ); /******************/ /* Function: 0x2c */ - WERROR srvsvc_NETRDFSCREATELOCALPARTITION( + [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION( ); /******************/ /* Function: 0x2d */ - WERROR srvsvc_NETRDFSDELETELOCALPARTITION( + [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION( ); /******************/ /* Function: 0x2e */ - WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE( + [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE( ); /******************/ /* Function: 0x2f */ - WERROR srvsvc_NETRDFSSETSERVERINFO( + [todo] WERROR srvsvc_NETRDFSSETSERVERINFO( ); /******************/ /* Function: 0x30 */ - WERROR srvsvc_NETRDFSCREATEEXITPOINT( + [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT( ); /******************/ /* Function: 0x31 */ - WERROR srvsvc_NETRDFSDELETEEXITPOINT( + [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT( ); /******************/ /* Function: 0x32 */ - WERROR srvsvc_NETRDFSMODIFYPREFIX( + [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX( ); /******************/ /* Function: 0x33 */ - WERROR srvsvc_NETRDFSFIXLOCALVOLUME( + [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME( ); /******************/ /* Function: 0x34 */ - WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO( + [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO( ); /******************/ /* Function: 0x35 */ - WERROR srvsvc_NETRSERVERTRANSPORTDELEX( + [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX( ); } diff --git a/source3/librpc/idl/svcctl.idl b/source3/librpc/idl/svcctl.idl deleted file mode 100644 index 5a843d04ef..0000000000 --- a/source3/librpc/idl/svcctl.idl +++ /dev/null @@ -1,528 +0,0 @@ -#include "idl_types.h" - -/* - svcctl interface definitions -*/ - -[ uuid("367abb81-9844-35f1-ad32-98f038001003"), - version(2.0), - pointer_default(unique), - endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"), - helpstring("Service Control") -] interface svcctl -{ - typedef struct { - uint32 is_locked; - [string,charset(UTF16)] uint16 *lock_owner; - uint32 lock_duration; - } SERVICE_LOCK_STATUS; - - typedef struct { - uint32 type; - uint32 state; - uint32 controls_accepted; - WERROR win32_exit_code; - uint32 service_exit_code; - uint32 check_point; - uint32 wait_hint; - } SERVICE_STATUS; - - typedef struct { - [relative] astring *service_name; - [relative] astring *display_name; - SERVICE_STATUS status; - } ENUM_SERVICE_STATUS; - - const int SERVICE_TYPE_KERNEL_DRIVER = 0x01; - const int SERVICE_TYPE_FS_DRIVER = 0x02; - const int SERVICE_TYPE_ADAPTER = 0x04; - const int SERVICE_TYPE_RECOGNIZER_DRIVER = 0x08; - const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER; - const int SERVICE_TYPE_WIN32_OWN_PROCESS = 0x10; - const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20; - const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS; - - const int SERVICE_STATE_ACTIVE = 0x01; - const int SERVICE_STATE_INACTIVE = 0x02; - const int SERVICE_STATE_ALL = 0x03; - - typedef [public,bitmap32bit] bitmap { - SV_TYPE_WORKSTATION = 0x00000001, - SV_TYPE_SERVER = 0x00000002, - SV_TYPE_SQLSERVER = 0x00000004, - SV_TYPE_DOMAIN_CTRL = 0x00000008, - SV_TYPE_DOMAIN_BAKCTRL = 0x00000010, - SV_TYPE_TIME_SOURCE = 0x00000020, - SV_TYPE_AFP = 0x00000040, - SV_TYPE_NOVELL = 0x00000080, - - SV_TYPE_DOMAIN_MEMBER = 0x00000100, - SV_TYPE_PRINTQ_SERVER = 0x00000200, - SV_TYPE_DIALIN_SERVER = 0x00000400, - SV_TYPE_SERVER_UNIX = 0x00000800, - SV_TYPE_NT = 0x00001000, - SV_TYPE_WFW = 0x00002000, - SV_TYPE_SERVER_MFPN = 0x00004000, - SV_TYPE_SERVER_NT = 0x00008000, - SV_TYPE_POTENTIAL_BROWSER = 0x00010000, - SV_TYPE_BACKUP_BROWSER = 0x00020000, - SV_TYPE_MASTER_BROWSER = 0x00040000, - SV_TYPE_DOMAIN_MASTER = 0x00080000, - SV_TYPE_SERVER_OSF = 0x00100000, - SV_TYPE_SERVER_VMS = 0x00200000, - SV_TYPE_WIN95_PLUS = 0x00400000, - SV_TYPE_DFS_SERVER = 0x00800000, - SV_TYPE_ALTERNATE_XPORT = 0x20000000, - SV_TYPE_LOCAL_LIST_ONLY = 0x40000000, - SV_TYPE_DOMAIN_ENUM = 0x80000000 - } svcctl_ServerType; - - const uint32 SV_TYPE_ALL = 0xFFFFFFFF; - - /*****************/ - /* Function 0x00 */ - WERROR svcctl_CloseServiceHandle( - [in,out,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x01 */ - - typedef enum { - FIXME=1 - } SERVICE_CONTROL; - - WERROR svcctl_ControlService( - [in,ref] policy_handle *handle, - [in] uint32 control, - [out,ref] SERVICE_STATUS *service_status - ); - - /*****************/ - /* Function 0x02 */ - WERROR svcctl_DeleteService( - [in,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x03 */ - - WERROR svcctl_LockServiceDatabase( - [in,ref] policy_handle *handle, - [out,ref] policy_handle *lock - ); - - /*****************/ - /* Function 0x04 */ - WERROR svcctl_QueryServiceObjectSecurity( - [in] policy_handle *handle, - [in] uint32 security_flags, - [out,ref,size_is(buffer_size)] uint8 *buffer, - [in,range(0,0x40000)] uint32 buffer_size, - [out,ref,range(0,0x40000)] uint32 *needed - ); - - /*****************/ - /* Function 0x05 */ - WERROR svcctl_SetServiceObjectSecurity( - [in] policy_handle *handle, - [in] uint32 security_flags, - [in,ref,size_is(buffer_size)] uint8 *buffer, - [in] uint32 buffer_size - ); - - /*****************/ - /* Function 0x06 */ - WERROR svcctl_QueryServiceStatus( - [in,ref] policy_handle *handle, - [out,ref] SERVICE_STATUS *service_status - ); - - /*****************/ - /* Function 0x07 */ - WERROR svcctl_SetServiceStatus( - ); - - /*****************/ - /* Function 0x08 */ - WERROR svcctl_UnlockServiceDatabase( - [in,out,ref] policy_handle *lock - ); - - /*****************/ - /* Function 0x09 */ - WERROR svcctl_NotifyBootConfigStatus( - ); - - /*****************/ - /* Function 0x0a */ - WERROR svcctl_SCSetServiceBitsW( - [in,ref] policy_handle *handle, - [in] uint32 bits, - [in] boolean32 bitson, - [in] boolean32 immediate - ); - - /*****************/ - /* Function 0x0b */ - WERROR svcctl_ChangeServiceConfigW( - [in,ref] policy_handle *handle, - [in] uint32 type, - [in] uint32 start, - [in] uint32 error, - [in,unique] [string,charset(UTF16)] uint16 *binary_path, - [in,unique] [string,charset(UTF16)] uint16 *load_order_group, - [out,ref] uint32 *tag_id, - [in,unique] [string,charset(UTF16)] uint16 *dependencies, - [in,unique] [string,charset(UTF16)] uint16 *service_start_name, - [in,unique] [string,charset(UTF16)] uint16 *password, - [in,unique] [string,charset(UTF16)] uint16 *display_name - ); - - /*****************/ - /* Function 0x0c */ - WERROR svcctl_CreateServiceW( - [in,ref] policy_handle *scmanager_handle, - [in] [string,charset(UTF16)] uint16 ServiceName[], - [in,unique] [string,charset(UTF16)] uint16 *DisplayName, - [in] uint32 desired_access, - [in] uint32 type, - [in] uint32 start_type, - [in] uint32 error_control, - [in] [string,charset(UTF16)] uint16 binary_path[], - [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey, - [in,out,unique] uint32 *TagId, - [in,unique,size_is(dependencies_size)] uint8 *dependencies, - [in] uint32 dependencies_size, - [in,unique] [string,charset(UTF16)] uint16 *service_start_name, - [in,unique,size_is(password_size)] uint8 *password, - [in] uint32 password_size, - [out,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x0d */ - WERROR svcctl_EnumDependentServicesW( - [in,ref] policy_handle *service, - [in] uint32 state, - [out,ref,size_is(buf_size)] uint8 *service_status, - [in,range(0,0x40000)] uint32 buf_size, - [out,ref,range(0,0x40000)] uint32 *bytes_needed, - [out,ref,range(0,0x40000)] uint32 *services_returned - ); - - /*****************/ - /* Function 0x0e */ - WERROR svcctl_EnumServicesStatusW( - [in,ref] policy_handle *handle, - [in] uint32 type, - [in] uint32 state, - [in] uint32 buf_size, - [out,size_is(buf_size)] uint8 service[*], - [out,ref] uint32 *bytes_needed, - [out,ref] uint32 *services_returned, - [in,out,unique] uint32 *resume_handle - ); - - /*****************/ - /* Function 0x0f */ - typedef [bitmap32bit] bitmap { - SC_RIGHT_MGR_CONNECT = 0x0001, - SC_RIGHT_MGR_CREATE_SERVICE = 0x0002, - SC_RIGHT_MGR_ENUMERATE_SERVICE = 0x0004, - SC_RIGHT_MGR_LOCK = 0x0008, - SC_RIGHT_MGR_QUERY_LOCK_STATUS = 0x0010, - SC_RIGHT_MGR_MODIFY_BOOT_CONFIG = 0x0020 - } svcctl_MgrAccessMask; - - WERROR svcctl_OpenSCManagerW( - [in,unique] [string,charset(UTF16)] uint16 *MachineName, - [in,unique] [string,charset(UTF16)] uint16 *DatabaseName, - [in] svcctl_MgrAccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x10 */ - typedef [bitmap32bit] bitmap { - SC_RIGHT_SVC_QUERY_CONFIG = 0x0001, - SC_RIGHT_SVC_CHANGE_CONFIG = 0x0002, - SC_RIGHT_SVC_QUERY_STATUS = 0x0004, - SC_RIGHT_SVC_ENUMERATE_DEPENDENTS = 0x0008, - SC_RIGHT_SVC_START = 0x0010, - SC_RIGHT_SVC_STOP = 0x0020, - SC_RIGHT_SVC_PAUSE_CONTINUE = 0x0040, - SC_RIGHT_SVC_INTERROGATE = 0x0080, - SC_RIGHT_SVC_USER_DEFINED_CONTROL = 0x0100 - } svcctl_ServiceAccessMask; - - WERROR svcctl_OpenServiceW( - [in,ref] policy_handle *scmanager_handle, - [in] [string,charset(UTF16)] uint16 ServiceName[], - [in] svcctl_ServiceAccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x11 */ - WERROR svcctl_QueryServiceConfigW( - [in,ref] policy_handle *handle, - [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */ - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed - ); - - /*****************/ - /* Function 0x12 */ - WERROR svcctl_QueryServiceLockStatusW( - [in,ref] policy_handle *handle, - [in] uint32 buf_size, - [out,ref] SERVICE_LOCK_STATUS *lock_status, - [out,ref] uint32 *required_buf_size - ); - - /*****************/ - /* Function 0x13 */ - WERROR svcctl_StartServiceW( - [in,ref] policy_handle *handle, - [in] uint32 NumArgs, - [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments - ); - - /*****************/ - /* Function 0x14 */ - WERROR svcctl_GetServiceDisplayNameW( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *service_name, - [out,ref] [string,charset(UTF16)] uint16 **display_name, - [in,out,unique] uint32 *display_name_length - ); - - /*****************/ - /* Function 0x15 */ - WERROR svcctl_GetServiceKeyNameW( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *service_name, - [out,ref] [string,charset(UTF16)] uint16 **key_name, - [in,out,unique] uint32 *display_name_length - ); - - /*****************/ - /* Function 0x16 */ - WERROR svcctl_SCSetServiceBitsA( - [in,ref] policy_handle *handle, - [in] uint32 bits, - [in] boolean32 bitson, - [in] boolean32 immediate - ); - - /*****************/ - /* Function 0x17 */ - WERROR svcctl_ChangeServiceConfigA( - [in,ref] policy_handle *handle, - [in] uint32 type, - [in] uint32 start, - [in] uint32 error, - [in,unique] [string,charset(UTF16)] uint16 *binary_path, - [in,unique] [string,charset(UTF16)] uint16 *load_order_group, - [out,ref] uint32 *tag_id, - [in,unique] [string,charset(UTF16)] uint16 *dependencies, - [in,unique] [string,charset(UTF16)] uint16 *service_start_name, - [in,unique] [string,charset(UTF16)] uint16 *password, - [in,unique] [string,charset(UTF16)] uint16 *display_name - ); - - /*****************/ - /* Function 0x18 */ - WERROR svcctl_CreateServiceA( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *ServiceName, - [in,unique] [string,charset(UTF16)] uint16 *DisplayName, - [in] uint32 desired_access, - [in] uint32 type, - [in] uint32 start_type, - [in] uint32 error_control, - [in,unique] [string,charset(UTF16)] uint16 *binary_path, - [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey, - [out,unique] uint32 *TagId, - [in,unique] [string,charset(UTF16)] uint16 *dependencies, - [in,unique] [string,charset(UTF16)] uint16 *service_start_name, - [in,unique] [string,charset(UTF16)] uint16 *password - ); - - /*****************/ - /* Function 0x19 */ - WERROR svcctl_EnumDependentServicesA( - [in,ref] policy_handle *service, - [in] uint32 state, - [out,unique] ENUM_SERVICE_STATUS *service_status, - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed, - [out,ref] uint32 *services_returned - ); - - /*****************/ - /* Function 0x1a */ - WERROR svcctl_EnumServicesStatusA( - [in,ref] policy_handle *handle, - [in] uint32 type, - [in] uint32 state, - [in] uint32 buf_size, - [out,size_is(buf_size)] uint8 service[*], - [out,ref] uint32 *bytes_needed, - [out,ref] uint32 *services_returned, - [in,out,unique] uint32 *resume_handle - ); - - /*****************/ - /* Function 0x1b */ - WERROR svcctl_OpenSCManagerA( - [in,unique] [string,charset(UTF16)] uint16 *MachineName, - [in,unique] [string,charset(UTF16)] uint16 *DatabaseName, - [in] uint32 access_mask, - [out,ref] policy_handle *handle - ); - - /*****************/ - /* Function 0x1c */ - WERROR svcctl_OpenServiceA( - [in,ref] policy_handle *scmanager_handle, - [in,unique] [string,charset(UTF16)] uint16 *ServiceName, - [in] uint32 access_mask - ); - - /*****************/ - /* Function 0x1d */ - WERROR svcctl_QueryServiceConfigA( - [in,ref] policy_handle *handle, - [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */ - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed - ); - - /*****************/ - /* Function 0x1e */ - WERROR svcctl_QueryServiceLockStatusA( - [in,ref] policy_handle *handle, - [in] uint32 buf_size, - [out,ref] SERVICE_LOCK_STATUS *lock_status, - [out,ref] uint32 *required_buf_size - ); - - /*****************/ - /* Function 0x1f */ - WERROR svcctl_StartServiceA( - [in,ref] policy_handle *handle, - [in] uint32 NumArgs, - [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments - ); - - /*****************/ - /* Function 0x20 */ - WERROR svcctl_GetServiceDisplayNameA( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *service_name, - [out,ref] [string,charset(UTF16)] uint16 **display_name, - [in,out,unique] uint32 *display_name_length - ); - - /*****************/ - /* Function 0x21 */ - WERROR svcctl_GetServiceKeyNameA( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *service_name, - [out,ref] [string,charset(UTF16)] uint16 **key_name, - [in,out,unique] uint32 *display_name_length - ); - - /*****************/ - /* Function 0x22 */ - WERROR svcctl_GetCurrentGroupeStateW( - ); - - /*****************/ - /* Function 0x23 */ - WERROR svcctl_EnumServiceGroupW( - ); - - /*****************/ - /* Function 0x24 */ - WERROR svcctl_ChangeServiceConfig2A( - [in,ref] policy_handle *handle, - [in] uint32 info_level, - [in,unique] uint8 *info - ); - - /*****************/ - /* Function 0x25 */ - WERROR svcctl_ChangeServiceConfig2W( - [in,ref] policy_handle *handle, - [in] uint32 info_level, - [in,unique] uint8 *info - ); - - /*****************/ - /* Function 0x26 */ - WERROR svcctl_QueryServiceConfig2A( - [in,ref] policy_handle *handle, - [in] uint32 info_level, - [out] uint8 buffer[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed - ); - - /*****************/ - /* Function 0x27 */ - WERROR svcctl_QueryServiceConfig2W( - [in,ref] policy_handle *handle, - [in] uint32 info_level, - [out] uint8 buffer[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed - ); - - /*****************/ - /* Function 0x28 */ - WERROR svcctl_QueryServiceStatusEx( - [in,ref] policy_handle *handle, - [in] uint32 info_level, - [out] uint8 buffer[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed - ); - - /*****************/ - /* Function 0x29 */ - WERROR EnumServicesStatusExA( - [in,ref] policy_handle *scmanager, - [in] uint32 info_level, - [in] uint32 type, - [in] uint32 state, - [out] uint8 services[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed, - [out,ref] uint32 *service_returned, - [in,out,unique] uint32 *resume_handle, - [out,ref] [string,charset(UTF16)] uint16 **group_name - ); - - /*****************/ - /* Function 0x2a */ - WERROR EnumServicesStatusExW( - [in,ref] policy_handle *scmanager, - [in] uint32 info_level, - [in] uint32 type, - [in] uint32 state, - [out] uint8 services[buf_size], - [in] uint32 buf_size, - [out,ref] uint32 *bytes_needed, - [out,ref] uint32 *service_returned, - [in,out,unique] uint32 *resume_handle, - [out,ref] [string,charset(UTF16)] uint16 **group_name - ); - - /*****************/ - /* Function 0x2b */ - WERROR svcctl_SCSendTSMessage( - ); -} diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl deleted file mode 100644 index 2f02419af5..0000000000 --- a/source3/librpc/idl/winreg.idl +++ /dev/null @@ -1,395 +0,0 @@ -/* - winreg interface definition -*/ - -import "lsa.idl", "initshutdown.idl", "security.idl"; - -[ - uuid("338cd001-2244-31f1-aaaa-900038001003"), - version(1.0), - endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"), - pointer_default(unique), - helpstring("Remote Registry Service") -] interface winreg -{ - typedef bitmap security_secinfo security_secinfo; - - typedef [bitmap32bit] bitmap { - KEY_QUERY_VALUE = 0x00001, - KEY_SET_VALUE = 0x00002, - KEY_CREATE_SUB_KEY = 0x00004, - KEY_ENUMERATE_SUB_KEYS = 0x00008, - KEY_NOTIFY = 0x00010, - KEY_CREATE_LINK = 0x00020, - KEY_WOW64_64KEY = 0x00100, - KEY_WOW64_32KEY = 0x00200 - } winreg_AccessMask; - - typedef [v1_enum] enum { - REG_NONE = 0, - REG_SZ = 1, - REG_EXPAND_SZ = 2, - REG_BINARY = 3, - REG_DWORD = 4, - REG_DWORD_BIG_ENDIAN = 5, - REG_LINK = 6, - REG_MULTI_SZ = 7, - REG_RESOURCE_LIST = 8, - REG_FULL_RESOURCE_DESCRIPTOR = 9, - REG_RESOURCE_REQUIREMENTS_LIST = 10, - REG_QWORD = 11 - } winreg_Type; - - typedef [public,noejs] struct { - [value(strlen_m_term(name)*2)] uint16 name_len; - [value(strlen_m_term(name)*2)] uint16 name_size; - [string,charset(UTF16)] uint16 *name; - } winreg_String; - - /******************/ - /* Function: 0x00 */ - WERROR winreg_OpenHKCR( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x01 */ - WERROR winreg_OpenHKCU( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x02 */ - WERROR winreg_OpenHKLM( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x03 */ - WERROR winreg_OpenHKPD( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x04 */ - WERROR winreg_OpenHKU( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x05 */ - WERROR winreg_CloseKey( - [in,out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x06 */ - - typedef struct { - [size_is(size),length_is(len)] uint8 *data; - uint32 size; - uint32 len; - } KeySecurityData; - - typedef struct { - uint32 length; - KeySecurityData sd; - boolean8 inherit; - } winreg_SecBuf; - - typedef [v1_enum] enum { - REG_ACTION_NONE = 0, /* used by caller */ - REG_CREATED_NEW_KEY = 1, - REG_OPENED_EXISTING_KEY = 2 - } winreg_CreateAction; - - WERROR winreg_CreateKey( - [in,ref] policy_handle *handle, - [in] winreg_String name, - [in] winreg_String keyclass, - [in] uint32 options, - [in] winreg_AccessMask access_mask, - [in,unique] winreg_SecBuf *secdesc, - [out,ref] policy_handle *new_handle, - [in,out,unique] winreg_CreateAction *action_taken - ); - - /******************/ - /* Function: 0x07 */ - WERROR winreg_DeleteKey( - [in,ref] policy_handle *handle, - [in] winreg_String key - ); - - /******************/ - /* Function: 0x08 */ - WERROR winreg_DeleteValue( - [in,ref] policy_handle *handle, - [in] winreg_String value - ); - - typedef struct { - [value(strlen_m_term_null(name)*2)] uint16 length; - /* size cannot be auto-set by value() as it is the - amount of space the server is allowed to use for this - string in the reply, not its current size */ - uint16 size; - [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name; - } winreg_StringBuf; - - /******************/ - /* Function: 0x09 */ - WERROR winreg_EnumKey( - [in,ref] policy_handle *handle, - [in] uint32 enum_index, - [in,out,ref] winreg_StringBuf *name, - [in,out,unique] winreg_StringBuf *keyclass, - [in,out,unique] NTTIME *last_changed_time - ); - - typedef struct { - [value(strlen_m_term(name)*2)] uint16 length; - /* size cannot be auto-set by value() as it is the - amount of space the server is allowed to use for this - string in the reply, not its current size */ - uint16 size; - [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name; - } winreg_ValNameBuf; - - /******************/ - /* Function: 0x0a */ - - WERROR winreg_EnumValue( - [in,ref] policy_handle *handle, - [in] uint32 enum_index, - [in,out,ref] winreg_ValNameBuf *name, - [in,out,unique] winreg_Type *type, - [in,out,unique,size_is(*size),length_is(*length)] uint8 *value, - [in,out,unique] uint32 *size, - [in,out,unique] uint32 *length - ); - - /******************/ - /* Function: 0x0b */ - WERROR winreg_FlushKey( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x0c */ - WERROR winreg_GetKeySecurity( - [in,ref] policy_handle *handle, - [in] security_secinfo sec_info, - [in,out,ref] KeySecurityData *sd - ); - - /******************/ - /* Function: 0x0d */ - WERROR winreg_LoadKey( - [in,ref] policy_handle *handle, - [in,unique] winreg_String *keyname, - [in,unique] winreg_String *filename - ); - - /******************/ - /* Function: 0x0e */ - WERROR winreg_NotifyChangeKeyValue( - [in,ref] policy_handle *handle, - [in] uint8 watch_subtree, - [in] uint32 notify_filter, - [in] uint32 unknown, - [in] winreg_String string1, - [in] winreg_String string2, - [in] uint32 unknown2 - ); - - /******************/ - /* Function: 0x0f */ - WERROR winreg_OpenKey( - [in,ref] policy_handle *parent_handle, - [in] winreg_String keyname, - [in] uint32 unknown, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x10 */ - WERROR winreg_QueryInfoKey( - [in,ref] policy_handle *handle, - [in,out,ref] winreg_String *classname, - [out,ref] uint32 *num_subkeys, - [out,ref] uint32 *max_subkeylen, - [out,ref] uint32 *max_classlen, - [out,ref] uint32 *num_values, - [out,ref] uint32 *max_valnamelen, - [out,ref] uint32 *max_valbufsize, - [out,ref] uint32 *secdescsize, - [out,ref] NTTIME *last_changed_time - ); - - /******************/ - /* Function: 0x11 */ - WERROR winreg_QueryValue( - [in,ref] policy_handle *handle, - [in,ref] winreg_String *value_name, - [in,out,unique] winreg_Type *type, - [in,out,unique,size_is(*data_size),length_is(*value_length)] uint8 *data, - [in,out,unique] uint32 *data_size, - [in,out,unique] uint32 *value_length - ); - - /******************/ - /* Function: 0x12 */ - WERROR winreg_ReplaceKey( - ); - - /******************/ - /* Function: 0x13 */ - WERROR winreg_RestoreKey( - [in,ref] policy_handle *handle, - [in,ref] winreg_String *filename, - [in] uint32 flags - ); - - /******************/ - /* Function: 0x14 */ - - typedef struct { - uint32 data_size; - KeySecurityData sec_data; - uint8 inherit; - } KeySecurityAttribute; - - WERROR winreg_SaveKey( - [in,ref] policy_handle *handle, - [in,ref] winreg_String *filename, - [in,unique] KeySecurityAttribute *sec_attrib - ); - - /******************/ - /* Function: 0x15 */ - WERROR winreg_SetKeySecurity( - [in,ref] policy_handle *handle, - [in] winreg_AccessMask access_mask, - [in,ref] KeySecurityData *sd - ); - - /******************/ - /* Function: 0x16 */ - WERROR winreg_SetValue( - [in,ref] policy_handle *handle, - [in] winreg_String name, - [in] winreg_Type type, - [in,size_is(size),ref] uint8 *data, - [in] uint32 size - ); - - /******************/ - /* Function: 0x17 */ - WERROR winreg_UnLoadKey( - ); - - /******************/ - /* Function: 0x18 */ - WERROR winreg_InitiateSystemShutdown( - [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, - [in] uint32 timeout, - [in] uint8 force_apps, - [in] uint8 do_reboot - ); - - /******************/ - /* Function: 0x19 */ - WERROR winreg_AbortSystemShutdown( - [in,unique] uint16 *server - ); - - /******************/ - /* Function: 0x1a */ - WERROR winreg_GetVersion( - [in,ref] policy_handle *handle, - [out,ref] uint32 *version - ); - - /******************/ - /* Function: 0x1b */ - WERROR winreg_OpenHKCC( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x1c */ - WERROR winreg_OpenHKDD( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - typedef struct { - winreg_String *name; - winreg_Type type; - uint32 offset; - uint32 length; - } QueryMultipleValue; - - /******************/ - /* Function: 0x1d */ - WERROR winreg_QueryMultipleValues( - [in,ref] policy_handle *key_handle, - [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values, - [in] uint32 num_values, - [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer, - [in,out,ref] uint32 *buffer_size - ); - - /******************/ - /* Function: 0x1e */ - WERROR winreg_InitiateSystemShutdownEx( - [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, - [in] uint32 timeout, - [in] uint8 force_apps, - [in] uint8 do_reboot, - [in] uint32 reason - ); - - /******************/ - /* Function: 0x1f */ - WERROR winreg_SaveKeyEx( - ); - - /******************/ - /* Function: 0x20 */ - WERROR winreg_OpenHKPT( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x21 */ - WERROR winreg_OpenHKPN( - [in,unique] uint16 *system_name, - [in] winreg_AccessMask access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x22 */ - WERROR winreg_QueryMultipleValues2( - ); -} diff --git a/source3/librpc/idl/wkssvc.idl b/source3/librpc/idl/wkssvc.idl deleted file mode 100644 index 9340990e99..0000000000 --- a/source3/librpc/idl/wkssvc.idl +++ /dev/null @@ -1,795 +0,0 @@ -#include "idl_types.h" - -/* - wkssvc interface definitions -*/ - -import "srvsvc.idl", "lsa.idl"; - -[ uuid("6bffd098-a112-3610-9833-46c3f87e345a"), - version(1.0), - pointer_default(unique), - helpstring("Workstation Service"), - endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:") -] interface wkssvc -{ - typedef [v1_enum] enum srvsvc_PlatformId srvsvc_PlatformId; - -#define BOOL uint32 - - /******************/ - /* Function: 0x00 */ - - typedef struct { - srvsvc_PlatformId platform_id; - [string,charset(UTF16)] uint16 *server_name; - [string,charset(UTF16)] uint16 *domain_name; - uint32 version_major; - uint32 version_minor; - } wkssvc_NetWkstaInfo100; - - typedef struct { - srvsvc_PlatformId platform_id; - [string,charset(UTF16)] uint16 *server_name; - [string,charset(UTF16)] uint16 *domain_name; - uint32 version_major; - uint32 version_minor; - [string,charset(UTF16)] uint16 *lan_root; - } wkssvc_NetWkstaInfo101; - - typedef struct { - srvsvc_PlatformId platform_id; - [string,charset(UTF16)] uint16 *server_name; - [string,charset(UTF16)] uint16 *domain_name; - uint32 version_major; - uint32 version_minor; - [string,charset(UTF16)] uint16 *lan_root; - uint32 logged_on_users; - } wkssvc_NetWkstaInfo102; - - /* FIXME: 302, 402 */ - - typedef struct { - uint32 char_wait; - uint32 collection_time; - uint32 maximum_collection_count; - uint32 keep_connection; - uint32 max_commands; - uint32 session_timeout; - uint32 size_char_buf; - uint32 max_threads; - uint32 lock_quota; - uint32 lock_increment; - uint32 lock_maximum; - uint32 pipe_increment; - uint32 pipe_maximum; - uint32 cache_file_timeout; - uint32 dormant_file_limit; - uint32 read_ahead_throughput; - uint32 num_mailslot_buffers; - uint32 num_srv_announce_buffers; - uint32 max_illegal_dgram_events; - uint32 dgram_event_reset_freq; - BOOL log_election_packets; - BOOL use_opportunistic_locking; - BOOL use_unlock_behind; - BOOL use_close_behind; - BOOL buf_named_pipes; - BOOL use_lock_read_unlock; - BOOL utilize_nt_caching; - BOOL use_raw_read; - BOOL use_raw_write; - BOOL use_write_raw_data; - BOOL use_encryption; - BOOL buf_files_deny_write; - BOOL buf_read_only_files; - BOOL force_core_create_mode; - BOOL use_512_byte_max_transfer; - } wkssvc_NetWkstaInfo502; - - typedef struct { - uint32 char_wait; - } wkssvc_NetWkstaInfo1010; - - typedef struct { - uint32 collection_time; - } wkssvc_NetWkstaInfo1011; - - typedef struct { - uint32 maximum_collection_count; - } wkssvc_NetWkstaInfo1012; - - typedef struct { - uint32 keep_connection; - } wkssvc_NetWkstaInfo1013; - - typedef struct { - uint32 session_timeout; - } wkssvc_NetWkstaInfo1018; - - typedef struct { - uint32 size_char_buf; - } wkssvc_NetWkstaInfo1023; - - typedef struct { - uint32 errorlog_sz; - } wkssvc_NetWkstaInfo1027; - - /* downlevel */ - typedef struct { - uint32 print_buf_time; - } wkssvc_NetWkstaInfo1028; - - /* downlevel */ - typedef struct { - uint32 wrk_heuristics; - } wkssvc_NetWkstaInfo1032; - - typedef struct { - uint32 max_threads; - } wkssvc_NetWkstaInfo1033; - - typedef struct { - uint32 lock_quota; - } wkssvc_NetWkstaInfo1041; - - typedef struct { - uint32 lock_increment; - } wkssvc_NetWkstaInfo1042; - - typedef struct { - uint32 lock_maximum; - } wkssvc_NetWkstaInfo1043; - - typedef struct { - uint32 pipe_increment; - } wkssvc_NetWkstaInfo1044; - - typedef struct { - uint32 pipe_maximum; - } wkssvc_NetWkstaInfo1045; - - typedef struct { - uint32 dormant_file_limit; - } wkssvc_NetWkstaInfo1046; - - typedef struct { - uint32 cache_file_timeout; - } wkssvc_NetWkstaInfo1047; - - typedef struct { - uint32 use_opportunistic_locking; - } wkssvc_NetWkstaInfo1048; - - typedef struct { - uint32 use_unlock_behind; - } wkssvc_NetWkstaInfo1049; - - typedef struct { - uint32 use_close_behind; - } wkssvc_NetWkstaInfo1050; - - typedef struct { - uint32 buf_named_pipes; - } wkssvc_NetWkstaInfo1051; - - typedef struct { - uint32 use_lock_read_unlock; - } wkssvc_NetWkstaInfo1052; - - typedef struct { - uint32 utilize_nt_caching; - } wkssvc_NetWkstaInfo1053; - - typedef struct { - uint32 use_raw_read; - } wkssvc_NetWkstaInfo1054; - - typedef struct { - uint32 use_raw_write; - } wkssvc_NetWkstaInfo1055; - - typedef struct { - uint32 use_write_raw_data; - } wkssvc_NetWkstaInfo1056; - - typedef struct { - uint32 use_encryption; - } wkssvc_NetWkstaInfo1057; - - typedef struct { - uint32 buf_files_deny_write; - } wkssvc_NetWkstaInfo1058; - - typedef struct { - uint32 buf_read_only_files; - } wkssvc_NetWkstaInfo1059; - - typedef struct { - uint32 force_core_create_mode; - } wkssvc_NetWkstaInfo1060; - - typedef struct { - uint32 use_512_byte_max_transfer; - } wkssvc_NetWkstaInfo1061; - - typedef struct { - uint32 read_ahead_throughput; - } wkssvc_NetWkstaInfo1062; - - typedef union { - [case(100)] wkssvc_NetWkstaInfo100 *info100; - [case(101)] wkssvc_NetWkstaInfo101 *info101; - [case(102)] wkssvc_NetWkstaInfo102 *info102; - [case(502)] wkssvc_NetWkstaInfo502 *info502; - [case(1010)] wkssvc_NetWkstaInfo1010 *info1010; - [case(1011)] wkssvc_NetWkstaInfo1011 *info1011; - [case(1012)] wkssvc_NetWkstaInfo1012 *info1012; - [case(1013)] wkssvc_NetWkstaInfo1013 *info1013; - [case(1018)] wkssvc_NetWkstaInfo1018 *info1018; - [case(1023)] wkssvc_NetWkstaInfo1023 *info1023; - [case(1027)] wkssvc_NetWkstaInfo1027 *info1027; - [case(1028)] wkssvc_NetWkstaInfo1028 *info1028; - [case(1032)] wkssvc_NetWkstaInfo1032 *info1032; - [case(1033)] wkssvc_NetWkstaInfo1033 *info1033; - [case(1041)] wkssvc_NetWkstaInfo1041 *info1041; - [case(1042)] wkssvc_NetWkstaInfo1042 *info1042; - [case(1043)] wkssvc_NetWkstaInfo1043 *info1043; - [case(1044)] wkssvc_NetWkstaInfo1044 *info1044; - [case(1045)] wkssvc_NetWkstaInfo1045 *info1045; - [case(1046)] wkssvc_NetWkstaInfo1046 *info1046; - [case(1047)] wkssvc_NetWkstaInfo1047 *info1047; - [case(1048)] wkssvc_NetWkstaInfo1048 *info1048; - [case(1049)] wkssvc_NetWkstaInfo1049 *info1049; - [case(1050)] wkssvc_NetWkstaInfo1050 *info1050; - [case(1051)] wkssvc_NetWkstaInfo1051 *info1051; - [case(1052)] wkssvc_NetWkstaInfo1052 *info1052; - [case(1053)] wkssvc_NetWkstaInfo1053 *info1053; - [case(1054)] wkssvc_NetWkstaInfo1054 *info1054; - [case(1055)] wkssvc_NetWkstaInfo1055 *info1055; - [case(1056)] wkssvc_NetWkstaInfo1056 *info1056; - [case(1057)] wkssvc_NetWkstaInfo1057 *info1057; - [case(1058)] wkssvc_NetWkstaInfo1058 *info1058; - [case(1059)] wkssvc_NetWkstaInfo1059 *info1059; - [case(1060)] wkssvc_NetWkstaInfo1060 *info1060; - [case(1061)] wkssvc_NetWkstaInfo1061 *info1061; - [case(1062)] wkssvc_NetWkstaInfo1062 *info1062; - [default] ; - } wkssvc_NetWkstaInfo; - - WERROR wkssvc_NetWkstaGetInfo( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 level, - [out,switch_is(level),ref] wkssvc_NetWkstaInfo *info - ); - - - /******************/ - /* Function: 0x01 */ - WERROR wkssvc_NetWkstaSetInfo( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 level, - [in,switch_is(level),ref] wkssvc_NetWkstaInfo *info, - [in,out,ref] uint32 *parm_error - ); - - - /*****************************/ - /* Function 0x02 */ - typedef struct { - [string,charset(UTF16)] uint16 *user_name; - } wkssvc_NetrWkstaUserInfo0; - - typedef struct { - uint32 entries_read; - [size_is(entries_read)] wkssvc_NetrWkstaUserInfo0 *user0; - } wkssvc_NetWkstaEnumUsersCtr0; - - typedef struct { - [string,charset(UTF16)] uint16 *user_name; - [string,charset(UTF16)] uint16 *logon_domain; - [string,charset(UTF16)] uint16 *other_domains; - [string,charset(UTF16)] uint16 *logon_server; - } wkssvc_NetrWkstaUserInfo1; - - typedef struct { - uint32 entries_read; - [size_is(entries_read)] wkssvc_NetrWkstaUserInfo1 *user1; - } wkssvc_NetWkstaEnumUsersCtr1; - - typedef [switch_type(uint32)] union { - [case(0)] wkssvc_NetWkstaEnumUsersCtr0 *user0; - [case(1)] wkssvc_NetWkstaEnumUsersCtr1 *user1; - } wkssvc_NetWkstaEnumUsersCtr; - - typedef struct { - uint32 level; - [switch_is(level)] wkssvc_NetWkstaEnumUsersCtr ctr; - } wkssvc_NetWkstaEnumUsersInfo; - - WERROR wkssvc_NetWkstaEnumUsers( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,out,ref] wkssvc_NetWkstaEnumUsersInfo *info, - [in] uint32 prefmaxlen, - [out,ref] uint32 *entries_read, - [in,out,unique] uint32 *resume_handle - ); - - /*****************************/ - /* Function 0x03 */ - typedef struct { - [string,charset(UTF16)] uint16 *other_domains; - } wkssvc_NetrWkstaUserInfo1101; - - typedef [switch_type(uint32)] union { - [case(0)] wkssvc_NetrWkstaUserInfo0 *info0; - [case(1)] wkssvc_NetrWkstaUserInfo1 *info1; - [case(1101)] wkssvc_NetrWkstaUserInfo1101 *info1101; - } wkssvc_NetrWkstaUserInfo; - - WERROR wkssvc_NetrWkstaUserGetInfo( - [in,unique] [string,charset(UTF16)] uint16 *unknown, - [in] uint32 level, - [out,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info - ); - - /*****************************/ - /* Function 0x04 */ - WERROR wkssvc_NetrWkstaUserSetInfo( - [in,unique] [string,charset(UTF16)] uint16 *unknown, - [in] uint32 level, - [in,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info, - [in,out,unique] uint32 *parm_err - ); - - /*****************************/ - /* Function 0x05 */ - - typedef struct { - uint32 quality_of_service; - uint32 vc_count; - [string,charset(UTF16)] uint16 *name; - [string,charset(UTF16)] uint16 *address; - uint32 wan_link; - } wkssvc_NetWkstaTransportInfo0; - - typedef struct { - uint32 count; - [size_is(count)] wkssvc_NetWkstaTransportInfo0 *array; - } wkssvc_NetWkstaTransportCtr0; - - typedef union { - [case(0)] wkssvc_NetWkstaTransportCtr0 *ctr0; - } wkssvc_NetWkstaTransportCtr; - - typedef struct { - uint32 level; - [switch_is(level)] wkssvc_NetWkstaTransportCtr ctr; - } wkssvc_NetWkstaTransportInfo; - - WERROR wkssvc_NetWkstaTransportEnum ( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,out,ref] wkssvc_NetWkstaTransportInfo *info, - [in] uint32 max_buffer, - [out,ref] uint32 *total_entries, - [in,out,unique] uint32 *resume_handle - ); - - /*****************************/ - /* Function 0x06 */ - /* only supported on NT */ - WERROR wkssvc_NetrWkstaTransportAdd( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 level, /* must be 0 */ - [in,ref] wkssvc_NetWkstaTransportInfo0 *info0, - [in,out,unique] uint32 *parm_err - ); - - /*****************************/ - /* Function 0x07 */ - /* only supported on NT */ - WERROR wkssvc_NetrWkstaTransportDel( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *transport_name, - [in] uint32 unknown3 - ); - - /*****************************/ - /* Function 0x08 */ - typedef struct { - [string,charset(UTF16)] uint16 *unknown1; - [string,charset(UTF16)] uint16 *unknown2; - } wkssvc_NetrUseInfo3; - - typedef struct { - [string,charset(UTF16)] uint16 *local; - [string,charset(UTF16)] uint16 *remote; - [string,charset(UTF16)] uint16 *password; - uint32 status; - uint32 asg_type; - uint32 ref_count; - uint32 use_count; - [string,charset(UTF16)] uint16 *user_name; - [string,charset(UTF16)] uint16 *domain_name; - } wkssvc_NetrUseInfo2; - - typedef struct { - [string,charset(UTF16)] uint16 *local; - [string,charset(UTF16)] uint16 *remote; - [string,charset(UTF16)] uint16 *password; - uint32 status; - uint32 asg_type; - uint32 ref_count; - uint32 use_count; - } wkssvc_NetrUseInfo1; - - typedef struct { - [string,charset(UTF16)] uint16 *local; - [string,charset(UTF16)] uint16 *remote; - } wkssvc_NetrUseInfo0; - - typedef [switch_type(uint32)] union { - [case(0)] wkssvc_NetrUseInfo0 *info0; - [case(1)] wkssvc_NetrUseInfo1 *info1; - [case(2)] wkssvc_NetrUseInfo2 *info2; - [case(3)] wkssvc_NetrUseInfo3 *info3; - } wkssvc_NetrUseGetInfoCtr; - - WERROR wkssvc_NetrUseAdd( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 level, - [in,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr, - [in,out,unique] uint32 *parm_err - ); - - /*****************************/ - /* Function 0x09 */ - WERROR wkssvc_NetrUseGetInfo( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *use_name, - [in] uint32 level, - [out,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr - ); - - /*****************************/ - /* Function 0x0a */ - WERROR wkssvc_NetrUseDel( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *use_name, - [in] uint32 force_cond - ); - - /*****************************/ - /* Function 0x0b */ - typedef struct { - uint32 count; - [size_is(count)] wkssvc_NetrUseInfo2 *array; - } wkssvc_NetrUseEnumCtr2; - - typedef struct { - uint32 count; - [size_is(count)] wkssvc_NetrUseInfo1 *array; - } wkssvc_NetrUseEnumCtr1; - - typedef struct { - uint32 count; - [size_is(count)] wkssvc_NetrUseInfo0 *array; - } wkssvc_NetrUseEnumCtr0; - - typedef [switch_type(uint32)] union { - [case(0)] wkssvc_NetrUseEnumCtr0 *ctr0; - [case(1)] wkssvc_NetrUseEnumCtr1 *ctr1; - [case(2)] wkssvc_NetrUseEnumCtr2 *ctr2; - } wkssvc_NetrUseEnumCtr; - - typedef struct { - uint32 level; - [switch_is(level)] wkssvc_NetrUseEnumCtr ctr; - } wkssvc_NetrUseEnumInfo; - - WERROR wkssvc_NetrUseEnum( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,out,ref] wkssvc_NetrUseEnumInfo *info, - [in] uint32 prefmaxlen, - [out,ref] uint32 *entries_read, - [in,out,unique] uint32 *resume_handle - ); - - /*****************************/ - /* Function 0x0c */ - WERROR wkssvc_NetrMessageBufferSend( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *message_name, - [in,unique] [string,charset(UTF16)] uint16 *message_sender_name, - [in,ref] [size_is(message_size)] uint8 *message_buffer, - [in] uint32 message_size - ); - - /*****************************/ - /* Function 0x0d */ - typedef struct { - hyper unknown1; - hyper unknown2; - hyper unknown3; - hyper unknown4; - hyper unknown5; - hyper unknown6; - hyper unknown7; - hyper unknown8; - hyper unknown9; - hyper unknown10; - hyper unknown11; - hyper unknown12; - hyper unknown13; - uint32 unknown14; - uint32 unknown15; - uint32 unknown16; - uint32 unknown17; - uint32 unknown18; - uint32 unknown19; - uint32 unknown20; - uint32 unknown21; - uint32 unknown22; - uint32 unknown23; - uint32 unknown24; - uint32 unknown25; - uint32 unknown26; - uint32 unknown27; - uint32 unknown28; - uint32 unknown29; - uint32 unknown30; - uint32 unknown31; - uint32 unknown32; - uint32 unknown33; - uint32 unknown34; - uint32 unknown35; - uint32 unknown36; - uint32 unknown37; - uint32 unknown38; - uint32 unknown39; - uint32 unknown40; - } wkssvc_NetrWorkstationStatistics; - - WERROR wkssvc_NetrWorkstationStatisticsGet( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *unknown2, - [in] uint32 unknown3, - [in] uint32 unknown4, - [out,ref] wkssvc_NetrWorkstationStatistics **info - ); - - /*****************************/ - /* Function 0x0e */ - WERROR wkssvc_NetrLogonDomainNameAdd( - [in,ref] [string,charset(UTF16)] uint16 *domain_name - ); - - /*****************************/ - /* Function 0x0f */ - WERROR wkssvc_NetrLogonDomainNameDel( - [in,ref] [string,charset(UTF16)] uint16 *domain_name - ); - - /*****************************/ - /* Function 0x10 */ - WERROR wkssvc_NetrJoinDomain( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *domain_name, - [in,unique] [string,charset(UTF16)] uint16 *account_ou, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] [string,charset(UTF16)] uint16 *password, - [in] wkssvc_joinflags join_flags - ); - - /*****************************/ - /* Function 0x11 */ - WERROR wkssvc_NetrUnjoinDomain( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] [string,charset(UTF16)] uint16 *password, - [in] wkssvc_joinflags unjoin_flags - ); - - /*****************************/ - /* Function 0x12 */ - typedef [bitmap32bit] bitmap { - /* TRUE: create the account in the domain */ - WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE = 0x00000002 - } wkssvc_renameflags; - - WERROR wkssvc_NetrRenameMachineInDomain( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *NewMachineName, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] [string,charset(UTF16)] uint16 *password, - [in] wkssvc_renameflags RenameOptions - ); - - /*****************************/ - /* Function 0x13 */ - typedef enum { - NetSetupUnknown = 0, - NetSetupMachine = 1, - NetSetupWorkgroup = 2, - NetSetupDomain = 3, - NetSetupNonExistentDomain = 4, - NetSetupDnsMachine = 5 - } wkssvc_NetValidateNameType; - - WERROR wkssvc_NetrValidateName( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] [string,charset(UTF16)] uint16 *Password, - [in] wkssvc_NetValidateNameType name_type - ); - - /*****************************/ - /* Function 0x14 */ - typedef enum { - NET_SETUP_UNKNOWN_STATUS = 0, - NET_SETUP_UNJOINED = 1, - NET_SETUP_WORKGROUP_NAME = 2, - NET_SETUP_DOMAIN_NAME = 3 - } wkssvc_NetJoinStatus; - - WERROR wkssvc_NetrGetJoinInformation( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,out,ref] [string,charset(UTF16)] uint16 **name_buffer, - [out,ref] wkssvc_NetJoinStatus *name_type - ); - - /*****************************/ - /* Function 0x15 */ - WERROR wkssvc_NetrGetJoinableOus( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *domain_name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] [string,charset(UTF16)] uint16 *unknown, - [in,out,ref] uint32 *num_ous, - /* - * this is a [ref] pointer to a [unique] pointer to an - * array of [unique] pointers to a string array - */ - [out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous - ); - - typedef [flag(NDR_PAHEX)] struct { - uint8 data[524]; - } wkssvc_PasswordBuffer; - - typedef [bitmap32bit] bitmap { - WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME = 0x00000400, - WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT = 0x00000200, - /* TRUE: defer setting the SPN and dNSHostName until a rename operation */ - WKSSVC_JOIN_FLAGS_DEFER_SPN = 0x00000100, - - /* TRUE: set the machine password to the provided one after the join completes */ - WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED = 0x00000080, - - /* TRUE: perform an unsecured join */ - WKSSVC_JOIN_FLAGS_JOIN_UNSECURE = 0x00000040, - - /* TRUE: allow the join to complete even if the account already exists */ - WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED = 0x00000020, - - /* TRUE: this join is part of a w9x upgrade */ - WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE = 0x00000010, - - /* TRUE: delete the account when the domain is left */ - WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE = 0x00000004, - - /* TRUE: create the account in the domain */ - WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE = 0x00000002, - - /* TRUE: join domain FALSE: join workgroup */ - WKSSVC_JOIN_FLAGS_JOIN_TYPE = 0x00000001 - - } wkssvc_joinflags; - - /*****************************/ - /* Function 0x16 */ - WERROR wkssvc_NetrJoinDomain2 ( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *domain_name, - [in,unique] [string,charset(UTF16)] uint16 *account_ou, - [in,unique] [string,charset(UTF16)] uint16 *admin_account, - [in,unique] wkssvc_PasswordBuffer *encrypted_password, - [in] wkssvc_joinflags join_flags - ); - - /*****************************/ - /* Function 0x17 */ - WERROR wkssvc_NetrUnjoinDomain2 ( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *account, - [in,unique] wkssvc_PasswordBuffer *encrypted_password, - [in] wkssvc_joinflags unjoin_flags - ); - - /*****************************/ - /* Function 0x18 */ - WERROR wkssvc_NetrRenameMachineInDomain2( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *NewMachineName, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in] wkssvc_renameflags RenameOptions - ); - - /*****************************/ - /* Function 0x19 */ - WERROR wkssvc_NetrValidateName2( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in] wkssvc_NetValidateNameType name_type - ); - - /*****************************/ - /* Function 0x1a */ - WERROR wkssvc_NetrGetJoinableOus2( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,ref] [string,charset(UTF16)] uint16 *domain_name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in,out,ref] uint32 *num_ous, - /* - * this is a [ref] pointer to a [unique] pointer to an - * array of [unique] pointers to a string array - */ - [out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous - ); - - /*****************************/ - /* Function 0x1b */ - WERROR wkssvc_NetrAddAlternateComputerName( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *NewAlternateMachineName, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in] uint32 Reserved - ); - - /*****************************/ - /* Function 0x1c */ - WERROR wkssvc_NetrRemoveAlternateComputerName( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in] uint32 Reserved - ); - - /*****************************/ - /* Function 0x1d */ - WERROR wkssvc_NetrSetPrimaryComputername( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in,unique] [string,charset(UTF16)] uint16 *primary_name, - [in,unique] [string,charset(UTF16)] uint16 *Account, - [in,unique] wkssvc_PasswordBuffer *EncryptedPassword, - [in] uint32 Reserved - ); - - /*****************************/ - /* Function 0x1e */ - typedef enum { - NetPrimaryComputerName = 0, - NetAlternateComputerNames = 1, - NetAllComputerNames = 2, - NetComputerNameTypeMax = 3 - } wkssvc_ComputerNameType; - - typedef struct { - uint32 count; - [size_is(count)] lsa_String *computer_name; - } wkssvc_ComputerNamesCtr; - - WERROR wkssvc_NetrEnumerateComputerNames( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] wkssvc_ComputerNameType name_type, - [in] uint32 Reserved, - [out,ref] wkssvc_ComputerNamesCtr **ctr - ); -} diff --git a/source3/librpc/idl/xattr.idl b/source3/librpc/idl/xattr.idl deleted file mode 100644 index 23af2df404..0000000000 --- a/source3/librpc/idl/xattr.idl +++ /dev/null @@ -1,54 +0,0 @@ -#include "idl_types.h" - -/* - IDL structures for xattrs -*/ - -[ - pointer_default(unique) -] -interface xattr -{ - /* xattrs for file systems that don't have any */ - - typedef [public] struct { - utf8string name; - DATA_BLOB value; - } tdb_xattr; - - typedef [public] struct { - uint32 num_xattrs; - tdb_xattr xattrs[num_xattrs]; - } tdb_xattrs; - - /* we store the NT ACL a NTACL xattr. It is versioned so we - can later add other acl attribs (such as posix acl mapping) - - we put this xattr in the security namespace to ensure that - only trusted users can write to the ACL - - stored in "security.NTACL" - - Version 1. raw SD stored as Samba4 does it. - Version 2. raw SD + last changed timestamp so we - can discard if this doesn't match the POSIX st_ctime. - */ - - const char *XATTR_NTACL_NAME = "security.NTACL"; - - typedef [public] struct { - security_descriptor *sd; - NTTIME last_changed; - } security_descriptor_timestamp; - - typedef [switch_type(uint16)] union { - [case(1)] security_descriptor *sd; - [case(2)] security_descriptor_timestamp *sd_ts; - } xattr_NTACL_Info; - - typedef [public] struct { - uint16 version; - [switch_is(version)] xattr_NTACL_Info info; - } xattr_NTACL; - -} diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h deleted file mode 100644 index 155f5f1f7d..0000000000 --- a/source3/librpc/ndr/libndr.h +++ /dev/null @@ -1,354 +0,0 @@ -/* - Unix SMB/CIFS implementation. - rpc interface definitions - Copyright (C) Andrew Tridgell 2003 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef __LIBNDR_H__ -#define __LIBNDR_H__ - -#define _PRINTF_ATTRIBUTE(a,b) - -#include "librpc/gen_ndr/misc.h" -#include "librpc/gen_ndr/security.h" - -/* - this provides definitions for the libcli/rpc/ MSRPC library -*/ - - -/* - this is used by the token store/retrieve code -*/ -struct ndr_token_list { - struct ndr_token_list *next, *prev; - const void *key; - uint32_t value; -}; - -/* this is the base structure passed to routines that - parse MSRPC formatted data - - note that in Samba4 we use separate routines and structures for - MSRPC marshalling and unmarshalling. Also note that these routines - are being kept deliberately very simple, and are not tied to a - particular transport -*/ -struct ndr_pull { - uint32_t flags; /* LIBNDR_FLAG_* */ - uint8_t *data; - uint32_t data_size; - uint32_t offset; - - uint32_t relative_base_offset; - struct ndr_token_list *relative_base_list; - - struct ndr_token_list *relative_list; - struct ndr_token_list *array_size_list; - struct ndr_token_list *array_length_list; - struct ndr_token_list *switch_list; - - TALLOC_CTX *current_mem_ctx; - - /* this is used to ensure we generate unique reference IDs - between request and reply */ - uint32_t ptr_count; -}; - -struct ndr_pull_save { - uint32_t data_size; - uint32_t offset; - struct ndr_pull_save *next; -}; - -/* structure passed to functions that generate NDR formatted data */ -struct ndr_push { - uint32_t flags; /* LIBNDR_FLAG_* */ - uint8_t *data; - uint32_t alloc_size; - uint32_t offset; - - uint32_t relative_base_offset; - struct ndr_token_list *relative_base_list; - - struct ndr_token_list *switch_list; - struct ndr_token_list *relative_list; - struct ndr_token_list *nbt_string_list; - struct ndr_token_list *full_ptr_list; - - /* this is used to ensure we generate unique reference IDs */ - uint32_t ptr_count; -}; - -struct ndr_push_save { - uint32_t offset; - struct ndr_push_save *next; -}; - - -/* structure passed to functions that print IDL structures */ -struct ndr_print { - uint32_t flags; /* LIBNDR_FLAG_* */ - uint32_t depth; - struct ndr_token_list *switch_list; - void (*print)(struct ndr_print *, const char *, ...) PRINTF_ATTRIBUTE(2,3); - void *private_data; -}; - -#define LIBNDR_FLAG_BIGENDIAN (1<<0) -#define LIBNDR_FLAG_NOALIGN (1<<1) - -#define LIBNDR_FLAG_STR_ASCII (1<<2) -#define LIBNDR_FLAG_STR_LEN4 (1<<3) -#define LIBNDR_FLAG_STR_SIZE4 (1<<4) -#define LIBNDR_FLAG_STR_NOTERM (1<<5) -#define LIBNDR_FLAG_STR_NULLTERM (1<<6) -#define LIBNDR_FLAG_STR_SIZE2 (1<<7) -#define LIBNDR_FLAG_STR_BYTESIZE (1<<8) -#define LIBNDR_FLAG_STR_FIXLEN32 (1<<9) -#define LIBNDR_FLAG_STR_CONFORMANT (1<<10) -#define LIBNDR_FLAG_STR_CHARLEN (1<<11) -#define LIBNDR_FLAG_STR_UTF8 (1<<12) -#define LIBNDR_FLAG_STR_FIXLEN15 (1<<13) -#define LIBNDR_STRING_FLAGS (0x7FFC) - - -#define LIBNDR_FLAG_REF_ALLOC (1<<20) -#define LIBNDR_FLAG_REMAINING (1<<21) -#define LIBNDR_FLAG_ALIGN2 (1<<22) -#define LIBNDR_FLAG_ALIGN4 (1<<23) -#define LIBNDR_FLAG_ALIGN8 (1<<24) - -#define LIBNDR_ALIGN_FLAGS (LIBNDR_FLAG_ALIGN2|LIBNDR_FLAG_ALIGN4|LIBNDR_FLAG_ALIGN8) - -#define LIBNDR_PRINT_ARRAY_HEX (1<<25) -#define LIBNDR_PRINT_SET_VALUES (1<<26) - -/* used to force a section of IDL to be little-endian */ -#define LIBNDR_FLAG_LITTLE_ENDIAN (1<<27) - -/* used to check if alignment padding is zero */ -#define LIBNDR_FLAG_PAD_CHECK (1<<28) - -/* set if an object uuid will be present */ -#define LIBNDR_FLAG_OBJECT_PRESENT (1<<30) - -/* set to avoid recursion in ndr_size_*() calculation */ -#define LIBNDR_FLAG_NO_NDR_SIZE (1<<31) - -/* useful macro for debugging with DEBUG */ -#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p) -#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p) -#define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p) -#define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p) -#define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p) -#define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p) - -/* useful macro for debugging in strings */ -#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p) -#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p) -#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p) -#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p) -#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p) -#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p) - -#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN) - -enum ndr_err_code { - NDR_ERR_SUCCESS = 0, - NDR_ERR_ARRAY_SIZE, - NDR_ERR_BAD_SWITCH, - NDR_ERR_OFFSET, - NDR_ERR_RELATIVE, - NDR_ERR_CHARCNV, - NDR_ERR_LENGTH, - NDR_ERR_SUBCONTEXT, - NDR_ERR_COMPRESSION, - NDR_ERR_STRING, - NDR_ERR_VALIDATE, - NDR_ERR_BUFSIZE, - NDR_ERR_ALLOC, - NDR_ERR_RANGE, - NDR_ERR_TOKEN, - NDR_ERR_IPV4ADDRESS, - NDR_ERR_INVALID_POINTER, - NDR_ERR_UNREAD_BYTES -}; - -#define NDR_ERR_CODE_IS_SUCCESS(x) (x == NDR_ERR_SUCCESS) - -#define NDR_ERR_HAVE_NO_MEMORY(x) do { \ - if (NULL == (x)) { \ - return NDR_ERR_ALLOC; \ - } \ -} while (0) - -enum ndr_compression_alg { - NDR_COMPRESSION_MSZIP = 2, - NDR_COMPRESSION_XPRESS = 3 -}; - -/* - flags passed to control parse flow -*/ -#define NDR_SCALARS 1 -#define NDR_BUFFERS 2 - -/* - flags passed to ndr_print_*() -*/ -#define NDR_IN 1 -#define NDR_OUT 2 -#define NDR_BOTH 3 -#define NDR_SET_VALUES 4 - -#define NDR_PULL_NEED_BYTES(ndr, n) do { \ - if ((n) > ndr->data_size || ndr->offset + (n) > ndr->data_size) { \ - return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %u", (unsigned)n); \ - } \ -} while(0) - -#define NDR_ALIGN(ndr, n) ndr_align_size(ndr->offset, n) - -#define NDR_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1)) - -#define NDR_PULL_ALIGN(ndr, n) do { \ - if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \ - if (ndr->flags & LIBNDR_FLAG_PAD_CHECK) { \ - ndr_check_padding(ndr, n); \ - } \ - ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \ - } \ - if (ndr->offset > ndr->data_size) { \ - return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", (unsigned)n); \ - } \ -} while(0) - -#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n)) - -#define NDR_PUSH_ALIGN(ndr, n) do { \ - if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \ - uint32_t _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \ - while (_pad--) NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0)); \ - } \ -} while(0) - -/* these are used to make the error checking on each element in libndr - less tedious, hopefully making the code more readable */ -#define NDR_CHECK(call) do { \ - enum ndr_err_code _status; \ - _status = call; \ - if (!NDR_ERR_CODE_IS_SUCCESS(_status)) { \ - return _status; \ - } \ -} while (0) - -#define NDR_PULL_GET_MEM_CTX(ndr) (ndr->current_mem_ctx) - -#define NDR_PULL_SET_MEM_CTX(ndr, mem_ctx, flgs) do {\ - if ( !(flgs) || (ndr->flags & flgs) ) {\ - if (!(mem_ctx)) {\ - return ndr_pull_error(ndr, NDR_ERR_ALLOC, "NDR_PULL_SET_MEM_CTX(NULL): %s\n", __location__); \ - }\ - ndr->current_mem_ctx = discard_const(mem_ctx);\ - }\ -} while(0) - -#define _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr) do {\ - if (!ndr->current_mem_ctx) {\ - ndr->current_mem_ctx = talloc_new(ndr);\ - if (!ndr->current_mem_ctx) {\ - return ndr_pull_error(ndr, NDR_ERR_ALLOC, "_NDR_PULL_FIX_CURRENT_MEM_CTX() failed: %s\n", __location__); \ - }\ - }\ -} while(0) - -#define NDR_PULL_ALLOC(ndr, s) do { \ - _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\ - (s) = talloc_ptrtype(ndr->current_mem_ctx, (s)); \ - if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %s failed: %s\n", # s, __location__); \ -} while (0) - -#define NDR_PULL_ALLOC_N(ndr, s, n) do { \ - _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\ - (s) = talloc_array_ptrtype(ndr->current_mem_ctx, (s), n); \ - if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %u * %s failed: %s\n", (unsigned)n, # s, __location__); \ -} while (0) - - -#define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \ - (s) = talloc_array(ndr, uint8_t, size); \ - if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \ -} while (0) - -#define NDR_PUSH_ALLOC(ndr, s) do { \ - (s) = talloc_ptrtype(ndr, (s)); \ - if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %s failed: %s\n", # s, __location__); \ -} while (0) - -/* these are used when generic fn pointers are needed for ndr push/pull fns */ -typedef enum ndr_err_code (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, const void *); -typedef enum ndr_err_code (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *); -typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *); -typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *); - -extern const struct ndr_syntax_id ndr_transfer_syntax; -extern const struct ndr_syntax_id ndr64_transfer_syntax; - -struct ndr_interface_call { - const char *name; - size_t struct_size; - ndr_push_flags_fn_t ndr_push; - ndr_pull_flags_fn_t ndr_pull; - ndr_print_function_t ndr_print; - bool async; -}; - -struct ndr_interface_string_array { - uint32_t count; - const char * const *names; -}; - -struct ndr_interface_table { - const char *name; - struct ndr_syntax_id syntax_id; - const char *helpstring; - uint32_t num_calls; - const struct ndr_interface_call *calls; - const struct ndr_interface_string_array *endpoints; - const struct ndr_interface_string_array *authservices; -}; - -struct ndr_interface_list { - struct ndr_interface_list *prev, *next; - const struct ndr_interface_table *table; -}; - -#define NDR_SCALAR_PROTO(name, type) \ -enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, type v); \ -enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \ -void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v); - -#define NDR_BUFFER_PROTO(name, type) \ -enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ -enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \ -void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v); - - -void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid); -size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags); - -#endif /* __LIBNDR_H__ */ diff --git a/source3/librpc/ndr/ndr.c b/source3/librpc/ndr/ndr.c deleted file mode 100644 index d94d12e146..0000000000 --- a/source3/librpc/ndr/ndr.c +++ /dev/null @@ -1,1101 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - libndr interface - - Copyright (C) Andrew Tridgell 2003 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* - this provides the core routines for NDR parsing functions - - see http://www.opengroup.org/onlinepubs/9629399/chap14.htm for details - of NDR encoding rules -*/ - -#include "includes.h" - -#define NDR_BASE_MARSHALL_SIZE 1024 - -/* this guid indicates NDR encoding in a protocol tower */ -const struct ndr_syntax_id ndr_transfer_syntax = { - { 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} }, - 2 -}; - -const struct ndr_syntax_id ndr64_transfer_syntax = { - { 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} }, - 1 -}; - -/* - work out the number of bytes needed to align on a n byte boundary -*/ -_PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n) -{ - if ((offset & (n-1)) == 0) return 0; - return n - (offset & (n-1)); -} - -/* - initialise a ndr parse structure from a data blob -*/ -_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx) -{ - struct ndr_pull *ndr; - - ndr = talloc_zero(mem_ctx, struct ndr_pull); - if (!ndr) return NULL; - ndr->current_mem_ctx = mem_ctx; - - ndr->data = blob->data; - ndr->data_size = blob->length; - - return ndr; -} - -/* - advance by 'size' bytes -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size) -{ - ndr->offset += size; - if (ndr->offset > ndr->data_size) { - return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, - "ndr_pull_advance by %u failed", - size); - } - return NDR_ERR_SUCCESS; -} - -/* - set the parse offset to 'ofs' -*/ -static enum ndr_err_code ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs) -{ - ndr->offset = ofs; - if (ndr->offset > ndr->data_size) { - return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, - "ndr_pull_set_offset %u failed", - ofs); - } - return NDR_ERR_SUCCESS; -} - -/* save the offset/size of the current ndr state */ -_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save) -{ - save->offset = ndr->offset; - save->data_size = ndr->data_size; -} - -/* restore the size/offset of a ndr structure */ -_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save) -{ - ndr->offset = save->offset; - ndr->data_size = save->data_size; -} - - -/* create a ndr_push structure, ready for some marshalling */ -_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx) -{ - struct ndr_push *ndr; - - ndr = talloc_zero(mem_ctx, struct ndr_push); - if (!ndr) { - return NULL; - } - - ndr->flags = 0; - ndr->alloc_size = NDR_BASE_MARSHALL_SIZE; - ndr->data = talloc_array(ndr, uint8_t, ndr->alloc_size); - if (!ndr->data) { - return NULL; - } - - return ndr; -} - -/* return a DATA_BLOB structure for the current ndr_push marshalled data */ -_PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr) -{ - DATA_BLOB blob; - blob = data_blob_const(ndr->data, ndr->offset); - if (ndr->alloc_size > ndr->offset) { - ndr->data[ndr->offset] = 0; - } - return blob; -} - - -/* - expand the available space in the buffer to ndr->offset + extra_size -*/ -_PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size) -{ - uint32_t size = extra_size + ndr->offset; - - if (size < ndr->offset) { - /* extra_size overflowed the offset */ - return ndr_push_error(ndr, NDR_ERR_BUFSIZE, "Overflow in push_expand to %u", - size); - } - - if (ndr->alloc_size > size) { - return NDR_ERR_SUCCESS; - } - - ndr->alloc_size += NDR_BASE_MARSHALL_SIZE; - if (size+1 > ndr->alloc_size) { - ndr->alloc_size = size+1; - } - ndr->data = talloc_realloc(ndr, ndr->data, uint8_t, ndr->alloc_size); - if (!ndr->data) { - return ndr_push_error(ndr, NDR_ERR_ALLOC, "Failed to push_expand to %u", - ndr->alloc_size); - } - - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3) -{ - va_list ap; - char *s = NULL; - int i, ret; - - va_start(ap, format); - ret = vasprintf(&s, format, ap); - va_end(ap); - - if (ret == -1) { - return; - } - - for (i=0;i<ndr->depth;i++) { - DEBUGADD(0,(" ")); - } - - DEBUGADD(0,("%s\n", s)); - free(s); -} - -_PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3) -{ - va_list ap; - int i; - - for (i=0;i<ndr->depth;i++) { - ndr->private_data = talloc_asprintf_append_buffer( - (char *)ndr->private_data, " "); - } - - va_start(ap, format); - ndr->private_data = talloc_vasprintf_append_buffer((char *)ndr->private_data, - format, ap); - va_end(ap); - ndr->private_data = talloc_asprintf_append_buffer((char *)ndr->private_data, - "\n"); -} - -/* - a useful helper function for printing idl structures via DEBUG() -*/ -_PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr) -{ - struct ndr_print *ndr; - - ndr = talloc_zero(NULL, struct ndr_print); - if (!ndr) return; - ndr->print = ndr_print_debug_helper; - ndr->depth = 1; - ndr->flags = 0; - fn(ndr, name, ptr); - talloc_free(ndr); -} - -/* - a useful helper function for printing idl unions via DEBUG() -*/ -_PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr) -{ - struct ndr_print *ndr; - - ndr = talloc_zero(NULL, struct ndr_print); - if (!ndr) return; - ndr->print = ndr_print_debug_helper; - ndr->depth = 1; - ndr->flags = 0; - ndr_print_set_switch_value(ndr, ptr, level); - fn(ndr, name, ptr); - talloc_free(ndr); -} - -/* - a useful helper function for printing idl function calls via DEBUG() -*/ -_PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr) -{ - struct ndr_print *ndr; - - ndr = talloc_zero(NULL, struct ndr_print); - if (!ndr) return; - ndr->print = ndr_print_debug_helper; - ndr->depth = 1; - ndr->flags = 0; - fn(ndr, name, flags, ptr); - talloc_free(ndr); -} - -/* - a useful helper function for printing idl structures to a string -*/ -_PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr) -{ - struct ndr_print *ndr; - char *ret = NULL; - - ndr = talloc_zero(mem_ctx, struct ndr_print); - if (!ndr) return NULL; - ndr->private_data = talloc_strdup(ndr, ""); - if (!ndr->private_data) { - goto failed; - } - ndr->print = ndr_print_string_helper; - ndr->depth = 1; - ndr->flags = 0; - fn(ndr, name, ptr); - ret = talloc_steal(mem_ctx, (char *)ndr->private_data); -failed: - talloc_free(ndr); - return ret; -} - -/* - a useful helper function for printing idl unions to a string -*/ -_PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr) -{ - struct ndr_print *ndr; - char *ret = NULL; - - ndr = talloc_zero(mem_ctx, struct ndr_print); - if (!ndr) return NULL; - ndr->private_data = talloc_strdup(ndr, ""); - if (!ndr->private_data) { - goto failed; - } - ndr->print = ndr_print_string_helper; - ndr->depth = 1; - ndr->flags = 0; - ndr_print_set_switch_value(ndr, ptr, level); - fn(ndr, name, ptr); - ret = talloc_steal(mem_ctx, (char *)ndr->private_data); -failed: - talloc_free(ndr); - return ret; -} - -/* - a useful helper function for printing idl function calls to a string -*/ -_PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx, - ndr_print_function_t fn, const char *name, - int flags, void *ptr) -{ - struct ndr_print *ndr; - char *ret = NULL; - - ndr = talloc_zero(mem_ctx, struct ndr_print); - if (!ndr) return NULL; - ndr->private_data = talloc_strdup(ndr, ""); - if (!ndr->private_data) { - goto failed; - } - ndr->print = ndr_print_string_helper; - ndr->depth = 1; - ndr->flags = 0; - fn(ndr, name, flags, ptr); - ret = talloc_steal(mem_ctx, (char *)ndr->private_data); -failed: - talloc_free(ndr); - return ret; -} - -_PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags) -{ - /* the big/little endian flags are inter-dependent */ - if (new_flags & LIBNDR_FLAG_LITTLE_ENDIAN) { - (*pflags) &= ~LIBNDR_FLAG_BIGENDIAN; - } - if (new_flags & LIBNDR_FLAG_BIGENDIAN) { - (*pflags) &= ~LIBNDR_FLAG_LITTLE_ENDIAN; - } - if (new_flags & LIBNDR_FLAG_REMAINING) { - (*pflags) &= ~LIBNDR_ALIGN_FLAGS; - } - if (new_flags & LIBNDR_ALIGN_FLAGS) { - (*pflags) &= ~LIBNDR_FLAG_REMAINING; - } - (*pflags) |= new_flags; -} - -NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err) -{ - switch (ndr_err) { - case NDR_ERR_SUCCESS: - return NT_STATUS_OK; - case NDR_ERR_BUFSIZE: - return NT_STATUS_BUFFER_TOO_SMALL; - case NDR_ERR_TOKEN: - return NT_STATUS_INTERNAL_ERROR; - case NDR_ERR_ALLOC: - return NT_STATUS_NO_MEMORY; - case NDR_ERR_ARRAY_SIZE: - return NT_STATUS_ARRAY_BOUNDS_EXCEEDED; - case NDR_ERR_INVALID_POINTER: - return NT_STATUS_INVALID_PARAMETER_MIX; - case NDR_ERR_UNREAD_BYTES: - return NT_STATUS_PORT_MESSAGE_TOO_LONG; - default: - break; - } - - /* we should map all error codes to different status codes */ - return NT_STATUS_INVALID_PARAMETER; -} - -/* - * Convert an ndr error to string - */ - -const char *ndr_errstr(enum ndr_err_code err) -{ - switch (err) { - case NDR_ERR_SUCCESS: - return "NDR_ERR_SUCCESS"; - break; - case NDR_ERR_ARRAY_SIZE: - return "NDR_ERR_ARRAY_SIZE"; - break; - case NDR_ERR_BAD_SWITCH: - return "NDR_ERR_BAD_SWITCH"; - break; - case NDR_ERR_OFFSET: - return "NDR_ERR_OFFSET"; - break; - case NDR_ERR_RELATIVE: - return "NDR_ERR_RELATIVE"; - break; - case NDR_ERR_CHARCNV: - return "NDR_ERR_CHARCNV"; - break; - case NDR_ERR_LENGTH: - return "NDR_ERR_LENGTH"; - break; - case NDR_ERR_SUBCONTEXT: - return "NDR_ERR_SUBCONTEXT"; - break; - case NDR_ERR_COMPRESSION: - return "NDR_ERR_COMPRESSION"; - break; - case NDR_ERR_STRING: - return "NDR_ERR_STRING"; - break; - case NDR_ERR_VALIDATE: - return "NDR_ERR_VALIDATE"; - break; - case NDR_ERR_BUFSIZE: - return "NDR_ERR_BUFSIZE"; - break; - case NDR_ERR_ALLOC: - return "NDR_ERR_ALLOC"; - break; - case NDR_ERR_RANGE: - return "NDR_ERR_RANGE"; - break; - case NDR_ERR_TOKEN: - return "NDR_ERR_TOKEN"; - break; - case NDR_ERR_IPV4ADDRESS: - return "NDR_ERR_IPV4ADDRESS"; - break; - case NDR_ERR_INVALID_POINTER: - return "NDR_ERR_INVALID_POINTER"; - break; - case NDR_ERR_UNREAD_BYTES: - return "NDR_ERR_UNREAD_BYTES"; - break; - } - - return talloc_asprintf(talloc_tos(), "Unknown NDR error: %d", err); -} - -/* - return and possibly log an NDR error -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr, - enum ndr_err_code ndr_err, - const char *format, ...) _PRINTF_ATTRIBUTE(3,4) -{ - char *s=NULL; - va_list ap; - int ret; - - va_start(ap, format); - ret = vasprintf(&s, format, ap); - va_end(ap); - - if (ret == -1) { - return NDR_ERR_ALLOC; - } - - DEBUG(1,("ndr_pull_error(%u): %s\n", ndr_err, s)); - - free(s); - - return ndr_err; -} - -/* - return and possibly log an NDR error -*/ -_PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr, - enum ndr_err_code ndr_err, - const char *format, ...) _PRINTF_ATTRIBUTE(3,4) -{ - char *s=NULL; - va_list ap; - int ret; - - va_start(ap, format); - ret = vasprintf(&s, format, ap); - va_end(ap); - - if (ret == -1) { - return NDR_ERR_ALLOC; - } - - DEBUG(1,("ndr_push_error(%u): %s\n", ndr_err, s)); - - free(s); - - return ndr_err; -} - -/* - handle subcontext buffers, which in midl land are user-marshalled, but - we use magic in pidl to make them easier to cope with -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr, - struct ndr_pull **_subndr, - size_t header_size, - ssize_t size_is) -{ - struct ndr_pull *subndr; - uint32_t r_content_size; - - switch (header_size) { - case 0: { - uint32_t content_size = ndr->data_size - ndr->offset; - if (size_is >= 0) { - content_size = size_is; - } - r_content_size = content_size; - break; - } - - case 2: { - uint16_t content_size; - NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &content_size)); - if (size_is >= 0 && size_is != content_size) { - return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", - (int)size_is, (int)content_size); - } - r_content_size = content_size; - break; - } - - case 4: { - uint32_t content_size; - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &content_size)); - if (size_is >= 0 && size_is != content_size) { - return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", - (int)size_is, (int)content_size); - } - r_content_size = content_size; - break; - } - default: - return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) header_size %d", - (int)header_size); - } - - NDR_PULL_NEED_BYTES(ndr, r_content_size); - - subndr = talloc_zero(ndr, struct ndr_pull); - NDR_ERR_HAVE_NO_MEMORY(subndr); - subndr->flags = ndr->flags; - subndr->current_mem_ctx = ndr->current_mem_ctx; - - subndr->data = ndr->data + ndr->offset; - subndr->offset = 0; - subndr->data_size = r_content_size; - - *_subndr = subndr; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr, - struct ndr_pull *subndr, - size_t header_size, - ssize_t size_is) -{ - uint32_t advance; - if (size_is >= 0) { - advance = size_is; - } else if (header_size > 0) { - advance = subndr->data_size; - } else { - advance = subndr->offset; - } - NDR_CHECK(ndr_pull_advance(ndr, advance)); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr, - struct ndr_push **_subndr, - size_t header_size, - ssize_t size_is) -{ - struct ndr_push *subndr; - - subndr = ndr_push_init_ctx(ndr); - NDR_ERR_HAVE_NO_MEMORY(subndr); - subndr->flags = ndr->flags; - - *_subndr = subndr; - return NDR_ERR_SUCCESS; -} - -/* - push a subcontext header -*/ -_PUBLIC_ enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr, - struct ndr_push *subndr, - size_t header_size, - ssize_t size_is) -{ - if (size_is >= 0) { - ssize_t padding_len = size_is - subndr->offset; - if (padding_len > 0) { - NDR_CHECK(ndr_push_zero(subndr, padding_len)); - } else if (padding_len < 0) { - return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PUSH) content_size %d is larger than size_is(%d)", - (int)subndr->offset, (int)size_is); - } - } - - switch (header_size) { - case 0: - break; - - case 2: - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, subndr->offset)); - break; - - case 4: - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, subndr->offset)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext header size %d", - (int)header_size); - } - - NDR_CHECK(ndr_push_bytes(ndr, subndr->data, subndr->offset)); - return NDR_ERR_SUCCESS; -} - -/* - store a token in the ndr context, for later retrieval -*/ -_PUBLIC_ enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx, - struct ndr_token_list **list, - const void *key, - uint32_t value) -{ - struct ndr_token_list *tok; - tok = talloc(mem_ctx, struct ndr_token_list); - NDR_ERR_HAVE_NO_MEMORY(tok); - tok->key = key; - tok->value = value; - DLIST_ADD((*list), tok); - return NDR_ERR_SUCCESS; -} - -/* - retrieve a token from a ndr context, using cmp_fn to match the tokens -*/ -_PUBLIC_ enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v, - comparison_fn_t _cmp_fn, bool _remove_tok) -{ - struct ndr_token_list *tok; - for (tok=*list;tok;tok=tok->next) { - if (_cmp_fn && _cmp_fn(tok->key,key)==0) goto found; - else if (!_cmp_fn && tok->key == key) goto found; - } - return NDR_ERR_TOKEN; -found: - *v = tok->value; - if (_remove_tok) { - DLIST_REMOVE((*list), tok); - talloc_free(tok); - } - return NDR_ERR_SUCCESS; -} - -/* - retrieve a token from a ndr context -*/ -_PUBLIC_ enum ndr_err_code ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v) -{ - return ndr_token_retrieve_cmp_fn(list, key, v, NULL, true); -} - -/* - peek at but don't removed a token from a ndr context -*/ -_PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key) -{ - enum ndr_err_code status; - uint32_t v; - - status = ndr_token_retrieve_cmp_fn(list, key, &v, NULL, false); - if (!NDR_ERR_CODE_IS_SUCCESS(status)) { - return 0; - } - - return v; -} - -/* - pull an array size field and add it to the array_size_list token list -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p) -{ - uint32_t size; - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &size)); - return ndr_token_store(ndr, &ndr->array_size_list, p, size); -} - -/* - get the stored array size field -*/ -_PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p) -{ - return ndr_token_peek(&ndr->array_size_list, p); -} - -/* - check the stored array size field -*/ -_PUBLIC_ enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size) -{ - uint32_t stored; - stored = ndr_token_peek(&ndr->array_size_list, p); - if (stored != size) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, - "Bad array size - got %u expected %u\n", - stored, size); - } - return NDR_ERR_SUCCESS; -} - -/* - pull an array length field and add it to the array_length_list token list -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p) -{ - uint32_t length, offset; - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &offset)); - if (offset != 0) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, - "non-zero array offset %u\n", offset); - } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length)); - return ndr_token_store(ndr, &ndr->array_length_list, p, length); -} - -/* - get the stored array length field -*/ -_PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p) -{ - return ndr_token_peek(&ndr->array_length_list, p); -} - -/* - check the stored array length field -*/ -_PUBLIC_ enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length) -{ - uint32_t stored; - stored = ndr_token_peek(&ndr->array_length_list, p); - if (stored != length) { - return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, - "Bad array length - got %u expected %u\n", - stored, length); - } - return NDR_ERR_SUCCESS; -} - -/* - store a switch value - */ -_PUBLIC_ enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val) -{ - return ndr_token_store(ndr, &ndr->switch_list, p, val); -} - -_PUBLIC_ enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val) -{ - return ndr_token_store(ndr, &ndr->switch_list, p, val); -} - -_PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val) -{ - return ndr_token_store(ndr, &ndr->switch_list, p, val); -} - -/* - retrieve a switch value - */ -_PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p) -{ - return ndr_token_peek(&ndr->switch_list, p); -} - -_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p) -{ - return ndr_token_peek(&ndr->switch_list, p); -} - -_PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p) -{ - return ndr_token_peek(&ndr->switch_list, p); -} - -/* - pull a struct from a blob using NDR -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, - ndr_pull_flags_fn_t fn) -{ - struct ndr_pull *ndr; - ndr = ndr_pull_init_blob(blob, mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - return NDR_ERR_SUCCESS; -} - -/* - pull a struct from a blob using NDR - failing if all bytes are not consumed -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, - ndr_pull_flags_fn_t fn) -{ - struct ndr_pull *ndr; - ndr = ndr_pull_init_blob(blob, mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - if (ndr->offset < ndr->data_size) { - return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES, - "not all bytes consumed ofs[%u] size[%u]", - ndr->offset, ndr->data_size); - } - return NDR_ERR_SUCCESS; -} - -/* - pull a union from a blob using NDR, given the union discriminator -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, - uint32_t level, ndr_pull_flags_fn_t fn) -{ - struct ndr_pull *ndr; - ndr = ndr_pull_init_blob(blob, mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level)); - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - return NDR_ERR_SUCCESS; -} - -/* - pull a union from a blob using NDR, given the union discriminator, - failing if all bytes are not consumed -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, - uint32_t level, ndr_pull_flags_fn_t fn) -{ - struct ndr_pull *ndr; - ndr = ndr_pull_init_blob(blob, mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level)); - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - if (ndr->offset < ndr->data_size) { - return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES, - "not all bytes consumed ofs[%u] size[%u]", - ndr->offset, ndr->data_size); - } - return NDR_ERR_SUCCESS; -} - -/* - push a struct to a blob using NDR -*/ -_PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, - ndr_push_flags_fn_t fn) -{ - struct ndr_push *ndr; - ndr = ndr_push_init_ctx(mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - - *blob = ndr_push_blob(ndr); - talloc_steal(mem_ctx, blob->data); - talloc_free(ndr); - - return NDR_ERR_SUCCESS; -} - -/* - push a union to a blob using NDR -*/ -_PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, - uint32_t level, ndr_push_flags_fn_t fn) -{ - struct ndr_push *ndr; - ndr = ndr_push_init_ctx(mem_ctx); - NDR_ERR_HAVE_NO_MEMORY(ndr); - - NDR_CHECK(ndr_push_set_switch_value(ndr, p, level)); - NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); - - *blob = ndr_push_blob(ndr); - talloc_steal(mem_ctx, blob->data); - talloc_free(ndr); - - return NDR_ERR_SUCCESS; -} - -/* - generic ndr_size_*() handler for structures -*/ -_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push) -{ - struct ndr_push *ndr; - enum ndr_err_code status; - size_t ret; - - /* avoid recursion */ - if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0; - - ndr = ndr_push_init_ctx(NULL); - if (!ndr) return 0; - ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE; - status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p)); - if (!NDR_ERR_CODE_IS_SUCCESS(status)) { - talloc_free(ndr); - return 0; - } - ret = ndr->offset; - talloc_free(ndr); - return ret; -} - -/* - generic ndr_size_*() handler for unions -*/ -_PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push) -{ - struct ndr_push *ndr; - enum ndr_err_code status; - size_t ret; - - /* avoid recursion */ - if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0; - - ndr = ndr_push_init_ctx(NULL); - if (!ndr) return 0; - ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE; - - status = ndr_push_set_switch_value(ndr, p, level); - if (!NDR_ERR_CODE_IS_SUCCESS(status)) { - talloc_free(ndr); - return 0; - } - status = push(ndr, NDR_SCALARS|NDR_BUFFERS, p); - if (!NDR_ERR_CODE_IS_SUCCESS(status)) { - talloc_free(ndr); - return 0; - } - ret = ndr->offset; - talloc_free(ndr); - return ret; -} - -/* - get the current base for relative pointers for the push -*/ -_PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr) -{ - return ndr->relative_base_offset; -} - -/* - restore the old base for relative pointers for the push -*/ -_PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset) -{ - ndr->relative_base_offset = offset; -} - -/* - setup the current base for relative pointers for the push - called in the NDR_SCALAR stage -*/ -_PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset) -{ - ndr->relative_base_offset = offset; - return ndr_token_store(ndr, &ndr->relative_base_list, p, offset); -} - -/* - setup the current base for relative pointers for the push - called in the NDR_BUFFERS stage -*/ -_PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p) -{ - return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset); -} - -/* - push a relative object - stage1 - this is called during SCALARS processing -*/ -_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p) -{ - if (p == NULL) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - return NDR_ERR_SUCCESS; - } - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_token_store(ndr, &ndr->relative_list, p, ndr->offset)); - return ndr_push_uint32(ndr, NDR_SCALARS, 0xFFFFFFFF); -} - -/* - push a relative object - stage2 - this is called during buffers processing -*/ -_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p) -{ - struct ndr_push_save save; - uint32_t ptr_offset = 0xFFFFFFFF; - if (p == NULL) { - return NDR_ERR_SUCCESS; - } - ndr_push_save(ndr, &save); - NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &ptr_offset)); - if (ptr_offset > ndr->offset) { - return ndr_push_error(ndr, NDR_ERR_BUFSIZE, - "ndr_push_relative_ptr2 ptr_offset(%u) > ndr->offset(%u)", - ptr_offset, ndr->offset); - } - ndr->offset = ptr_offset; - if (save.offset < ndr->relative_base_offset) { - return ndr_push_error(ndr, NDR_ERR_BUFSIZE, - "ndr_push_relative_ptr2 save.offset(%u) < ndr->relative_base_offset(%u)", - save.offset, ndr->relative_base_offset); - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset - ndr->relative_base_offset)); - ndr_push_restore(ndr, &save); - return NDR_ERR_SUCCESS; -} - -/* - get the current base for relative pointers for the pull -*/ -_PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr) -{ - return ndr->relative_base_offset; -} - -/* - restore the old base for relative pointers for the pull -*/ -_PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset) -{ - ndr->relative_base_offset = offset; -} - -/* - setup the current base for relative pointers for the pull - called in the NDR_SCALAR stage -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset) -{ - ndr->relative_base_offset = offset; - return ndr_token_store(ndr, &ndr->relative_base_list, p, offset); -} - -/* - setup the current base for relative pointers for the pull - called in the NDR_BUFFERS stage -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p) -{ - return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset); -} - -/* - pull a relative object - stage1 - called during SCALARS processing -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset) -{ - rel_offset += ndr->relative_base_offset; - if (rel_offset > ndr->data_size) { - return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, - "ndr_pull_relative_ptr1 rel_offset(%u) > ndr->data_size(%u)", - rel_offset, ndr->data_size); - } - return ndr_token_store(ndr, &ndr->relative_list, p, rel_offset); -} - -/* - pull a relative object - stage2 - called during BUFFERS processing -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p) -{ - uint32_t rel_offset; - NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &rel_offset)); - return ndr_pull_set_offset(ndr, rel_offset); -} diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c deleted file mode 100644 index c8fa70b185..0000000000 --- a/source3/librpc/ndr/ndr_basic.c +++ /dev/null @@ -1,859 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - routines for marshalling/unmarshalling basic types - - Copyright (C) Andrew Tridgell 2003 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" -#include "system/network.h" -#include "librpc/ndr/libndr.h" - -#define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs)) -#define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs)) -#define NDR_IVALS(ndr, ofs) (NDR_BE(ndr)?RIVALS(ndr->data,ofs):IVALS(ndr->data,ofs)) -#define NDR_SSVAL(ndr, ofs, v) do { if (NDR_BE(ndr)) { RSSVAL(ndr->data,ofs,v); } else SSVAL(ndr->data,ofs,v); } while (0) -#define NDR_SIVAL(ndr, ofs, v) do { if (NDR_BE(ndr)) { RSIVAL(ndr->data,ofs,v); } else SIVAL(ndr->data,ofs,v); } while (0) -#define NDR_SIVALS(ndr, ofs, v) do { if (NDR_BE(ndr)) { RSIVALS(ndr->data,ofs,v); } else SIVALS(ndr->data,ofs,v); } while (0) - - -/* - check for data leaks from the server by looking for non-zero pad bytes - these could also indicate that real structure elements have been - mistaken for padding in the IDL -*/ -_PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n) -{ - size_t ofs2 = (ndr->offset + (n-1)) & ~(n-1); - int i; - for (i=ndr->offset;i<ofs2;i++) { - if (ndr->data[i] != 0) { - break; - } - } - if (i<ofs2) { - DEBUG(0,("WARNING: Non-zero padding to %d: ", (int)n)); - for (i=ndr->offset;i<ofs2;i++) { - DEBUG(0,("%02x ", ndr->data[i])); - } - DEBUG(0,("\n")); - } - -} - -/* - parse a int8_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v) -{ - NDR_PULL_NEED_BYTES(ndr, 1); - *v = (int8_t)CVAL(ndr->data, ndr->offset); - ndr->offset += 1; - return NDR_ERR_SUCCESS; -} - -/* - parse a uint8_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v) -{ - NDR_PULL_NEED_BYTES(ndr, 1); - *v = CVAL(ndr->data, ndr->offset); - ndr->offset += 1; - return NDR_ERR_SUCCESS; -} - -/* - parse a int16_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v) -{ - NDR_PULL_ALIGN(ndr, 2); - NDR_PULL_NEED_BYTES(ndr, 2); - *v = (uint16_t)NDR_SVAL(ndr, ndr->offset); - ndr->offset += 2; - return NDR_ERR_SUCCESS; -} - -/* - parse a uint16_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v) -{ - NDR_PULL_ALIGN(ndr, 2); - NDR_PULL_NEED_BYTES(ndr, 2); - *v = NDR_SVAL(ndr, ndr->offset); - ndr->offset += 2; - return NDR_ERR_SUCCESS; -} - -/* - parse a int32_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v) -{ - NDR_PULL_ALIGN(ndr, 4); - NDR_PULL_NEED_BYTES(ndr, 4); - *v = NDR_IVALS(ndr, ndr->offset); - ndr->offset += 4; - return NDR_ERR_SUCCESS; -} - -/* - parse a uint32_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v) -{ - NDR_PULL_ALIGN(ndr, 4); - NDR_PULL_NEED_BYTES(ndr, 4); - *v = NDR_IVAL(ndr, ndr->offset); - ndr->offset += 4; - return NDR_ERR_SUCCESS; -} - -/* - parse a pointer referent identifier -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) -{ - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v)); - if (*v != 0) { - ndr->ptr_count++; - } - return NDR_ERR_SUCCESS; -} - -/* - parse a ref pointer referent identifier -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v) -{ - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v)); - /* ref pointers always point to data */ - *v = 1; - return NDR_ERR_SUCCESS; -} - -/* - parse a udlong -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) -{ - NDR_PULL_ALIGN(ndr, 4); - NDR_PULL_NEED_BYTES(ndr, 8); - *v = NDR_IVAL(ndr, ndr->offset); - *v |= (uint64_t)(NDR_IVAL(ndr, ndr->offset+4)) << 32; - ndr->offset += 8; - return NDR_ERR_SUCCESS; -} - -/* - parse a udlongr -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) -{ - NDR_PULL_ALIGN(ndr, 4); - NDR_PULL_NEED_BYTES(ndr, 8); - *v = ((uint64_t)NDR_IVAL(ndr, ndr->offset)) << 32; - *v |= NDR_IVAL(ndr, ndr->offset+4); - ndr->offset += 8; - return NDR_ERR_SUCCESS; -} - -/* - parse a dlong -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v) -{ - return ndr_pull_udlong(ndr, ndr_flags, (uint64_t *)v); -} - -/* - parse a hyper -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v) -{ - NDR_PULL_ALIGN(ndr, 8); - return ndr_pull_udlong(ndr, ndr_flags, v); -} - -/* - parse a pointer -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v) -{ - uintptr_t h; - NDR_PULL_ALIGN(ndr, sizeof(h)); - NDR_PULL_NEED_BYTES(ndr, sizeof(h)); - memcpy(&h, ndr->data+ndr->offset, sizeof(h)); - ndr->offset += sizeof(h); - *v = (void *)h; - return NDR_ERR_SUCCESS; -} - -/* - pull a NTSTATUS -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status) -{ - uint32_t v; - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); - *status = NT_STATUS(v); - return NDR_ERR_SUCCESS; -} - -/* - push a NTSTATUS -*/ -_PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status) -{ - return ndr_push_uint32(ndr, ndr_flags, NT_STATUS_V(status)); -} - -_PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r) -{ - ndr->print(ndr, "%-25s: %s", name, nt_errstr(r)); -} - -/* - pull a WERROR -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status) -{ - uint32_t v; - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); - *status = W_ERROR(v); - return NDR_ERR_SUCCESS; -} - -/* - push a WERROR -*/ -_PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status) -{ - return ndr_push_uint32(ndr, NDR_SCALARS, W_ERROR_V(status)); -} - -_PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r) -{ - ndr->print(ndr, "%-25s: %s", name, win_errstr(r)); -} - -/* - parse a set of bytes -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n) -{ - NDR_PULL_NEED_BYTES(ndr, n); - memcpy(data, ndr->data + ndr->offset, n); - ndr->offset += n; - return NDR_ERR_SUCCESS; -} - -/* - pull an array of uint8 -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n) -{ - if (!(ndr_flags & NDR_SCALARS)) { - return NDR_ERR_SUCCESS; - } - return ndr_pull_bytes(ndr, data, n); -} - -/* - push a int8_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v) -{ - NDR_PUSH_NEED_BYTES(ndr, 1); - SCVAL(ndr->data, ndr->offset, (uint8_t)v); - ndr->offset += 1; - return NDR_ERR_SUCCESS; -} - -/* - push a uint8_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v) -{ - NDR_PUSH_NEED_BYTES(ndr, 1); - SCVAL(ndr->data, ndr->offset, v); - ndr->offset += 1; - return NDR_ERR_SUCCESS; -} - -/* - push a int16_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v) -{ - NDR_PUSH_ALIGN(ndr, 2); - NDR_PUSH_NEED_BYTES(ndr, 2); - NDR_SSVAL(ndr, ndr->offset, (uint16_t)v); - ndr->offset += 2; - return NDR_ERR_SUCCESS; -} - -/* - push a uint16_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v) -{ - NDR_PUSH_ALIGN(ndr, 2); - NDR_PUSH_NEED_BYTES(ndr, 2); - NDR_SSVAL(ndr, ndr->offset, v); - ndr->offset += 2; - return NDR_ERR_SUCCESS; -} - -/* - push a int32_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v) -{ - NDR_PUSH_ALIGN(ndr, 4); - NDR_PUSH_NEED_BYTES(ndr, 4); - NDR_SIVALS(ndr, ndr->offset, v); - ndr->offset += 4; - return NDR_ERR_SUCCESS; -} - -/* - push a uint32_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v) -{ - NDR_PUSH_ALIGN(ndr, 4); - NDR_PUSH_NEED_BYTES(ndr, 4); - NDR_SIVAL(ndr, ndr->offset, v); - ndr->offset += 4; - return NDR_ERR_SUCCESS; -} - -/* - push a udlong -*/ -_PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v) -{ - NDR_PUSH_ALIGN(ndr, 4); - NDR_PUSH_NEED_BYTES(ndr, 8); - NDR_SIVAL(ndr, ndr->offset, (v & 0xFFFFFFFF)); - NDR_SIVAL(ndr, ndr->offset+4, (v>>32)); - ndr->offset += 8; - return NDR_ERR_SUCCESS; -} - -/* - push a udlongr -*/ -_PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v) -{ - NDR_PUSH_ALIGN(ndr, 4); - NDR_PUSH_NEED_BYTES(ndr, 8); - NDR_SIVAL(ndr, ndr->offset, (v>>32)); - NDR_SIVAL(ndr, ndr->offset+4, (v & 0xFFFFFFFF)); - ndr->offset += 8; - return NDR_ERR_SUCCESS; -} - -/* - push a dlong -*/ -_PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v) -{ - return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)v); -} - -/* - push a hyper -*/ -_PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v) -{ - NDR_PUSH_ALIGN(ndr, 8); - return ndr_push_udlong(ndr, NDR_SCALARS, v); -} - -/* - push a pointer -*/ -_PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v) -{ - uintptr_t h = (intptr_t)v; - NDR_PUSH_ALIGN(ndr, sizeof(h)); - NDR_PUSH_NEED_BYTES(ndr, sizeof(h)); - memcpy(ndr->data+ndr->offset, &h, sizeof(h)); - ndr->offset += sizeof(h); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size) -{ - NDR_PUSH_ALIGN(ndr, size); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size) -{ - NDR_PULL_ALIGN(ndr, size); - return NDR_ERR_SUCCESS; -} - -/* - push some bytes -*/ -_PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n) -{ - NDR_PUSH_NEED_BYTES(ndr, n); - memcpy(ndr->data + ndr->offset, data, n); - ndr->offset += n; - return NDR_ERR_SUCCESS; -} - -/* - push some zero bytes -*/ -_PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n) -{ - NDR_PUSH_NEED_BYTES(ndr, n); - memset(ndr->data + ndr->offset, 0, n); - ndr->offset += n; - return NDR_ERR_SUCCESS; -} - -/* - push an array of uint8 -*/ -_PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n) -{ - if (!(ndr_flags & NDR_SCALARS)) { - return NDR_ERR_SUCCESS; - } - return ndr_push_bytes(ndr, data, n); -} - -/* - save the current position - */ -_PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save) -{ - save->offset = ndr->offset; -} - -/* - restore the position - */ -_PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save) -{ - ndr->offset = save->offset; -} - -/* - push a unique non-zero value if a pointer is non-NULL, otherwise 0 -*/ -_PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p) -{ - uint32_t ptr = 0; - if (p) { - ptr = ndr->ptr_count * 4; - ptr |= 0x00020000; - ndr->ptr_count++; - } - return ndr_push_uint32(ndr, NDR_SCALARS, ptr); -} - -/* - push a 'simple' full non-zero value if a pointer is non-NULL, otherwise 0 -*/ -_PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p) -{ - uint32_t ptr = 0; - if (p) { - /* Check if the pointer already exists and has an id */ - ptr = ndr_token_peek(&ndr->full_ptr_list, p); - if (ptr == 0) { - ndr->ptr_count++; - ptr = ndr->ptr_count; - ndr_token_store(ndr, &ndr->full_ptr_list, p, ptr); - } - } - return ndr_push_uint32(ndr, NDR_SCALARS, ptr); -} - -/* - push always a 0, if a pointer is NULL it's a fatal error -*/ -_PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr) -{ - return ndr_push_uint32(ndr, NDR_SCALARS, 0xAEF1AEF1); -} - - -/* - push a NTTIME -*/ -_PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t) -{ - NDR_CHECK(ndr_push_udlong(ndr, ndr_flags, t)); - return NDR_ERR_SUCCESS; -} - -/* - pull a NTTIME -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) -{ - NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, t)); - return NDR_ERR_SUCCESS; -} - -/* - push a NTTIME -*/ -_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t) -{ - t /= 10000000; - NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); - return NDR_ERR_SUCCESS; -} - -/* - pull a NTTIME_1sec -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) -{ - NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t)); - (*t) *= 10000000; - return NDR_ERR_SUCCESS; -} - -/* - pull a NTTIME_hyper -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t) -{ - NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t)); - return NDR_ERR_SUCCESS; -} - -/* - push a NTTIME_hyper -*/ -_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t) -{ - NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t)); - return NDR_ERR_SUCCESS; -} - -/* - push a time_t -*/ -_PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t) -{ - return ndr_push_uint32(ndr, ndr_flags, t); -} - -/* - pull a time_t -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t) -{ - uint32_t tt; - NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &tt)); - *t = tt; - return NDR_ERR_SUCCESS; -} - - -/* - pull a ipv4address -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address) -{ - struct in_addr in; - NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &in.s_addr)); - in.s_addr = htonl(in.s_addr); - *address = talloc_strdup(ndr->current_mem_ctx, inet_ntoa(in)); - NDR_ERR_HAVE_NO_MEMORY(*address); - return NDR_ERR_SUCCESS; -} - -/* - push a ipv4address -*/ -_PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address) -{ - uint32_t addr; - if (!is_ipaddress(address)) { - return ndr_push_error(ndr, NDR_ERR_IPV4ADDRESS, - "Invalid IPv4 address: '%s'", - address); - } - addr = inet_addr(address); - NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr))); - return NDR_ERR_SUCCESS; -} - -/* - print a ipv4address -*/ -_PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, - const char *address) -{ - ndr->print(ndr, "%-25s: %s", name, address); -} - - -_PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type) -{ - ndr->print(ndr, "%s: struct %s", name, type); -} - -_PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, - const char *val, uint32_t value) -{ - if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { - ndr->print(ndr, "%-25s: %s (0x%X)", name, val?val:"UNKNOWN_ENUM_VALUE", value); - } else { - ndr->print(ndr, "%-25s: %s (%d)", name, val?val:"UNKNOWN_ENUM_VALUE", value); - } -} - -_PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value) -{ - /* this is an attempt to support multi-bit bitmap masks */ - value &= flag; - - while (!(flag & 1)) { - flag >>= 1; - value >>= 1; - } - if (flag == 1) { - ndr->print(ndr, " %d: %-25s", value, flag_name); - } else { - ndr->print(ndr, "0x%02x: %-25s (%d)", value, flag_name, value); - } -} - -_PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v) -{ - ndr->print(ndr, "%-25s: %d", name, v); -} - -_PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v) -{ - ndr->print(ndr, "%-25s: 0x%02x (%u)", name, v, v); -} - -_PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v) -{ - ndr->print(ndr, "%-25s: %d", name, v); -} - -_PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v) -{ - ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v); -} - -_PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v) -{ - ndr->print(ndr, "%-25s: %d", name, v); -} - -_PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v) -{ - ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v); -} - -_PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v) -{ - ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, (unsigned long long)v, (unsigned long long)v); -} - -_PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v) -{ - ndr_print_udlong(ndr, name, v); -} - -_PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v) -{ - ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, (unsigned long long)v, (long long)v); -} - -_PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v) -{ - ndr_print_dlong(ndr, name, v); -} - -_PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v) -{ - ndr->print(ndr, "%-25s: %p", name, v); -} - -_PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p) -{ - if (p) { - ndr->print(ndr, "%-25s: *", name); - } else { - ndr->print(ndr, "%-25s: NULL", name); - } -} - -_PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t) -{ - ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t)); -} - -_PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t) -{ - /* this is a standard NTTIME here - * as it's already converted in the pull/push code - */ - ndr_print_NTTIME(ndr, name, t); -} - -_PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t) -{ - ndr_print_NTTIME(ndr, name, t); -} - -_PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t) -{ - if (t == (time_t)-1 || t == 0) { - ndr->print(ndr, "%-25s: (time_t)%d", name, (int)t); - } else { - ndr->print(ndr, "%-25s: %s", name, timestring(ndr, t)); - } -} - -_PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type) -{ - if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { - ndr->print(ndr, "%-25s: union %s(case 0x%X)", name, type, level); - } else { - ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level); - } -} - -_PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level) -{ - ndr->print(ndr, "UNKNOWN LEVEL %u", level); -} - -_PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, - const uint8_t *data, uint32_t count) -{ - int i; - - if (count <= 600 && (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) { - char s[1202]; - for (i=0;i<count;i++) { - snprintf(&s[i*2], 3, "%02x", data[i]); - } - s[i*2] = 0; - ndr->print(ndr, "%-25s: %s", name, s); - return; - } - - ndr->print(ndr, "%s: ARRAY(%d)", name, count); - ndr->depth++; - for (i=0;i<count;i++) { - char *idx=NULL; - if (asprintf(&idx, "[%d]", i) != -1) { - ndr_print_uint8(ndr, idx, data[i]); - free(idx); - } - } - ndr->depth--; -} - -_PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r) -{ - ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, (unsigned)r.length); - if (r.length) { - dump_data(10, r.data, r.length); - } -} - - -/* - push a DATA_BLOB onto the wire. -*/ -_PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob) -{ - if (ndr->flags & LIBNDR_ALIGN_FLAGS) { - if (ndr->flags & LIBNDR_FLAG_ALIGN2) { - blob.length = NDR_ALIGN(ndr, 2); - } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { - blob.length = NDR_ALIGN(ndr, 4); - } else if (ndr->flags & LIBNDR_FLAG_ALIGN8) { - blob.length = NDR_ALIGN(ndr, 8); - } - NDR_PUSH_ALLOC_SIZE(ndr, blob.data, blob.length); - data_blob_clear(&blob); - } else if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) { - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length)); - } - NDR_CHECK(ndr_push_bytes(ndr, blob.data, blob.length)); - return NDR_ERR_SUCCESS; -} - -/* - pull a DATA_BLOB from the wire. -*/ -_PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob) -{ - uint32_t length = 0; - - if (ndr->flags & LIBNDR_ALIGN_FLAGS) { - if (ndr->flags & LIBNDR_FLAG_ALIGN2) { - length = NDR_ALIGN(ndr, 2); - } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) { - length = NDR_ALIGN(ndr, 4); - } else if (ndr->flags & LIBNDR_FLAG_ALIGN8) { - length = NDR_ALIGN(ndr, 8); - } - if (ndr->data_size - ndr->offset < length) { - length = ndr->data_size - ndr->offset; - } - } else if (ndr->flags & LIBNDR_FLAG_REMAINING) { - length = ndr->data_size - ndr->offset; - } else { - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length)); - } - NDR_PULL_NEED_BYTES(ndr, length); - *blob = data_blob_talloc(ndr->current_mem_ctx, ndr->data+ndr->offset, length); - ndr->offset += length; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags) -{ - if (!data) return ret; - return ret + data->length; -} - -_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b) -{ - ndr->print(ndr, "%-25s: %s", name, b?"true":"false"); -} - -_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss) -{ - char addr[INET6_ADDRSTRLEN]; - ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss)); -} diff --git a/source3/librpc/ndr/ndr_compression.c b/source3/librpc/ndr/ndr_compression.c deleted file mode 100644 index 9da0773f28..0000000000 --- a/source3/librpc/ndr/ndr_compression.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - libndr compression support - - Copyright (C) Stefan Metzmacher 2005 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" -#include "lib/compression/mszip.h" -#include "librpc/ndr/libndr.h" -#include "librpc/ndr/ndr_compression.h" - -static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpull, - struct ndr_push *ndrpush, - struct decomp_state *decomp_state, - bool *last) -{ - DATA_BLOB comp_chunk; - uint32_t comp_chunk_offset; - uint32_t comp_chunk_size; - DATA_BLOB plain_chunk; - uint32_t plain_chunk_offset; - uint32_t plain_chunk_size; - int ret; - - NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size)); - if (plain_chunk_size > 0x00008000) { - return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad MSZIP plain chunk size %08X > 0x00008000 (PULL)", - plain_chunk_size); - } - - NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size)); - - DEBUG(10,("MSZIP plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n", - plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size)); - - comp_chunk_offset = ndrpull->offset; - NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size)); - comp_chunk.length = comp_chunk_size; - comp_chunk.data = ndrpull->data + comp_chunk_offset; - - plain_chunk_offset = ndrpush->offset; - NDR_CHECK(ndr_push_zero(ndrpush, plain_chunk_size)); - plain_chunk.length = plain_chunk_size; - plain_chunk.data = ndrpush->data + plain_chunk_offset; - - ret = ZIPdecompress(decomp_state, &comp_chunk, &plain_chunk); - if (ret != DECR_OK) { - return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad ZIPdecompress() error %d (PULL)", - ret); - } - - if ((plain_chunk_size < 0x00008000) || (ndrpull->offset+4 >= ndrpull->data_size)) { - /* this is the last chunk */ - *last = true; - } - - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_compression_mszip(struct ndr_pull *subndr, - struct ndr_pull **_comndr, - ssize_t decompressed_len) -{ - struct ndr_push *ndrpush; - struct ndr_pull *comndr; - DATA_BLOB uncompressed; - uint32_t payload_header[4]; - uint32_t payload_size; - uint32_t payload_offset; - uint8_t *payload; - struct decomp_state *decomp_state; - bool last = false; - - ndrpush = ndr_push_init_ctx(subndr); - NDR_ERR_HAVE_NO_MEMORY(ndrpush); - - decomp_state = ZIPdecomp_state(subndr); - NDR_ERR_HAVE_NO_MEMORY(decomp_state); - - while (!last) { - NDR_CHECK(ndr_pull_compression_mszip_chunk(subndr, ndrpush, decomp_state, &last)); - } - - uncompressed = ndr_push_blob(ndrpush); - - if (uncompressed.length != decompressed_len) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP uncompressed_len [%u] != [%d] (PULL)", - (int)uncompressed.length, (int)decompressed_len); - } - - comndr = talloc_zero(subndr, struct ndr_pull); - NDR_ERR_HAVE_NO_MEMORY(comndr); - comndr->flags = subndr->flags; - comndr->current_mem_ctx = subndr->current_mem_ctx; - - comndr->data = uncompressed.data; - comndr->data_size = uncompressed.length; - comndr->offset = 0; - - NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[0])); - NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[1])); - NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[2])); - NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[3])); - - if (payload_header[0] != 0x00081001) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[0] [0x%08X] != [0x00081001] (PULL)", - payload_header[0]); - } - if (payload_header[1] != 0xCCCCCCCC) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[1] [0x%08X] != [0xCCCCCCCC] (PULL)", - payload_header[1]); - } - - payload_size = payload_header[2]; - - if (payload_header[3] != 0x00000000) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[3] [0x%08X] != [0x00000000] (PULL)", - payload_header[3]); - } - - payload_offset = comndr->offset; - NDR_CHECK(ndr_pull_advance(comndr, payload_size)); - payload = comndr->data + payload_offset; - - comndr->data = payload; - comndr->data_size = payload_size; - comndr->offset = 0; - - *_comndr = comndr; - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_push_compression_mszip(struct ndr_push *subndr, - struct ndr_push *comndr) -{ - return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Sorry MSZIP compression is not supported yet (PUSH)"); -} - -static enum ndr_err_code ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull, - struct ndr_push *ndrpush, - bool *last) -{ - DATA_BLOB comp_chunk; - uint32_t comp_chunk_offset; - uint32_t comp_chunk_size; - uint32_t plain_chunk_size; - - comp_chunk_offset = ndrpull->offset; - - NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size)); - if (plain_chunk_size > 0x00010000) { - return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad XPRESS plain chunk size %08X > 0x00010000 (PULL)", - plain_chunk_size); - } - - NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size)); - - NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size)); - comp_chunk.length = comp_chunk_size + 8; - comp_chunk.data = ndrpull->data + comp_chunk_offset; - - DEBUG(10,("XPRESS plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n", - plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size)); - - /* For now, we just copy over the compressed blob */ - NDR_CHECK(ndr_push_bytes(ndrpush, comp_chunk.data, comp_chunk.length)); - - if ((plain_chunk_size < 0x00010000) || (ndrpull->offset+4 >= ndrpull->data_size)) { - /* this is the last chunk */ - *last = true; - } - - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_pull_compression_xpress(struct ndr_pull *subndr, - struct ndr_pull **_comndr, - ssize_t decompressed_len) -{ - struct ndr_push *ndrpush; - struct ndr_pull *comndr; - DATA_BLOB uncompressed; - bool last = false; - - ndrpush = ndr_push_init_ctx(subndr); - NDR_ERR_HAVE_NO_MEMORY(ndrpush); - - while (!last) { - NDR_CHECK(ndr_pull_compression_xpress_chunk(subndr, ndrpush, &last)); - } - - uncompressed = ndr_push_blob(ndrpush); - - comndr = talloc_zero(subndr, struct ndr_pull); - NDR_ERR_HAVE_NO_MEMORY(comndr); - comndr->flags = subndr->flags; - comndr->current_mem_ctx = subndr->current_mem_ctx; - - comndr->data = uncompressed.data; - comndr->data_size = uncompressed.length; - comndr->offset = 0; - - *_comndr = comndr; - return NDR_ERR_SUCCESS; -} - -static enum ndr_err_code ndr_push_compression_xpress(struct ndr_push *subndr, - struct ndr_push *comndr) -{ - return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "XPRESS compression is not supported yet (PUSH)"); -} - -/* - handle compressed subcontext buffers, which in midl land are user-marshalled, but - we use magic in pidl to make them easier to cope with -*/ -enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr, - struct ndr_pull **_comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len) -{ - switch (compression_alg) { - case NDR_COMPRESSION_MSZIP: - return ndr_pull_compression_mszip(subndr, _comndr, decompressed_len); - case NDR_COMPRESSION_XPRESS: - return ndr_pull_compression_xpress(subndr, _comndr, decompressed_len); - default: - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PULL)", - compression_alg); - } - return NDR_ERR_SUCCESS; -} - -enum ndr_err_code ndr_pull_compression_end(struct ndr_pull *subndr, - struct ndr_pull *comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len) -{ - return NDR_ERR_SUCCESS; -} - -/* - push a compressed subcontext -*/ -enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr, - struct ndr_push **_comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len) -{ - struct ndr_push *comndr; - - comndr = ndr_push_init_ctx(subndr); - NDR_ERR_HAVE_NO_MEMORY(comndr); - comndr->flags = subndr->flags; - - *_comndr = comndr; - return NDR_ERR_SUCCESS; -} - -/* - push a compressed subcontext -*/ -enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr, - struct ndr_push *comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len) -{ - switch (compression_alg) { - case NDR_COMPRESSION_MSZIP: - return ndr_push_compression_mszip(subndr, comndr); - case NDR_COMPRESSION_XPRESS: - return ndr_push_compression_xpress(subndr, comndr); - default: - return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PUSH)", - compression_alg); - } - return NDR_ERR_SUCCESS; -} diff --git a/source3/librpc/ndr/ndr_compression.h b/source3/librpc/ndr/ndr_compression.h deleted file mode 100644 index 4cebbe190c..0000000000 --- a/source3/librpc/ndr/ndr_compression.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __LIBRPC_NDR_NDR_COMPRESSION_H__ -#define __LIBRPC_NDR_NDR_COMPRESSION_H__ - -#undef _PRINTF_ATTRIBUTE -#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) -/* This file was automatically generated by mkproto.pl. DO NOT EDIT */ - -#ifndef _PUBLIC_ -#define _PUBLIC_ -#endif - -#ifndef _PURE_ -#define _PURE_ -#endif - -#ifndef _NORETURN_ -#define _NORETURN_ -#endif - -#ifndef _DEPRECATED_ -#define _DEPRECATED_ -#endif - -#ifndef _WARN_UNUSED_RESULT_ -#define _WARN_UNUSED_RESULT_ -#endif - - -/* The following definitions come from librpc/ndr/ndr_compression.c */ - -enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr, - struct ndr_pull **_comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len); -enum ndr_err_code ndr_pull_compression_end(struct ndr_pull *subndr, - struct ndr_pull *comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len); -enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr, - struct ndr_push **_comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len); -enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr, - struct ndr_push *comndr, - enum ndr_compression_alg compression_alg, - ssize_t decompressed_len); -#undef _PRINTF_ATTRIBUTE -#define _PRINTF_ATTRIBUTE(a1, a2) - -#endif /* __LIBRPC_NDR_NDR_COMPRESSION_H__ */ - diff --git a/source3/librpc/ndr/ndr_drsuapi.c b/source3/librpc/ndr/ndr_drsuapi.c deleted file mode 100644 index aeb81c87bd..0000000000 --- a/source3/librpc/ndr/ndr_drsuapi.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - routines for printing some linked list structs in DRSUAPI - - Copyright (C) Stefan (metze) Metzmacher 2005 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#include "includes.h" -#include "librpc/gen_ndr/ndr_drsuapi.h" -#include "librpc/gen_ndr/ndr_misc.h" - -void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, - const struct drsuapi_DsReplicaObjectListItem *r) -{ - ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem"); - ndr->depth++; - ndr_print_ptr(ndr, "next_object", r->next_object); - ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object); - ndr->depth--; - if (r->next_object) { - ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "next_object", r->next_object); - } -} - -void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r) -{ - ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItemEx"); - ndr->depth++; - ndr_print_ptr(ndr, "next_object", r->next_object); - ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object); - ndr_print_uint32(ndr, "is_nc_prefix", r->is_nc_prefix); - ndr_print_ptr(ndr, "parent_object_guid", r->parent_object_guid); - ndr->depth++; - if (r->parent_object_guid) { - ndr_print_GUID(ndr, "parent_object_guid", r->parent_object_guid); - } - ndr->depth--; - ndr_print_ptr(ndr, "meta_data_ctr", r->meta_data_ctr); - ndr->depth++; - if (r->meta_data_ctr) { - ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, "meta_data_ctr", r->meta_data_ctr); - } - ndr->depth--; - ndr->depth--; - if (r->next_object) { - ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object); - } -} - -#define _OID_PUSH_CHECK(call) do { \ - bool _status; \ - _status = call; \ - if (_status != true) { \ - return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \ - } \ -} while (0) - -#define _OID_PULL_CHECK(call) do { \ - bool _status; \ - _status = call; \ - if (_status != true) { \ - return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \ - } \ -} while (0) - -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0))); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid)); - } - if (ndr_flags & NDR_BUFFERS) { - if (r->oid) { - DATA_BLOB blob; - - if (StrnCaseCmp("ff", r->oid, 2) == 0) { - blob = strhex_to_data_blob(NULL, r->oid); - if (!blob.data) { - return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, - "HEX String Conversion Error: %s\n", - __location__); - } - } else { - _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid)); - } - talloc_steal(ndr, blob.data); - - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length)); - } - } - return NDR_ERR_SUCCESS; -} - -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) -{ - uint32_t _ptr_oid; - TALLOC_CTX *_mem_save_oid_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size)); - if (r->__ndr_size < 0 || r->__ndr_size > 10000) { - return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); - } - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid)); - if (_ptr_oid) { - NDR_PULL_ALLOC(ndr, r->oid); - } else { - r->oid = NULL; - } - } - if (ndr_flags & NDR_BUFFERS) { - if (r->oid) { - DATA_BLOB _oid_array; - const char *_oid; - - _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, ndr, 0); - NDR_CHECK(ndr_pull_array_size(ndr, &r->oid)); - _oid_array.length = ndr_get_array_size(ndr, &r->oid); - NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length); - NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0); - - if (_oid_array.length && _oid_array.data[0] == 0xFF) { - _oid = data_blob_hex_string(ndr, &_oid_array); - NDR_ERR_HAVE_NO_MEMORY(_oid); - } else { - _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid)); - } - TALLOC_FREE(_oid_array.data); - talloc_steal(r->oid, _oid); - r->oid = _oid; - } - if (r->oid) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size)); - } - } - return NDR_ERR_SUCCESS; -} - -size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags) -{ - DATA_BLOB _blob; - size_t ret = 0; - - if (!oid) return 0; - - if (StrnCaseCmp("ff", oid, 2) == 0) { - _blob = strhex_to_data_blob(NULL, oid); - if (_blob.data) { - ret = _blob.length; - } - } else { - if (ber_write_OID_String(&_blob, oid)) { - ret = _blob.length; - } - } - data_blob_free(&_blob); - return ret; -} diff --git a/source3/librpc/ndr/ndr_drsuapi.h b/source3/librpc/ndr/ndr_drsuapi.h deleted file mode 100644 index c663eadd7a..0000000000 --- a/source3/librpc/ndr/ndr_drsuapi.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - routines for printing some linked list structs in DRSUAPI - - Copyright (C) Stefan (metze) Metzmacher 2005-2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef _LIBRPC_NDR_NDR_DRSUAPI_H -#define _LIBRPC_NDR_NDR_DRSUAPI_H - -void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, - const struct drsuapi_DsReplicaObjectListItem *r); - -void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, - const struct drsuapi_DsReplicaObjectListItemEx *r); - -enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); -enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); -size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags); - -#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */ diff --git a/source3/librpc/ndr/ndr_krb5pac.c b/source3/librpc/ndr/ndr_krb5pac.c deleted file mode 100644 index b0eab44012..0000000000 --- a/source3/librpc/ndr/ndr_krb5pac.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - routines for marshalling/unmarshalling spoolss subcontext buffer structures - - Copyright (C) Stefan Metzmacher 2005 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#include "includes.h" - -#include "librpc/gen_ndr/ndr_krb5pac.h" - -static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags) -{ - size_t s = ndr_size_PAC_INFO(r, level, flags); - switch (level) { - case PAC_TYPE_LOGON_INFO: - return NDR_ROUND(s,8); - default: - return s; - } -} - -static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags) -{ - size_t s = ndr_size_PAC_INFO(r, level, flags); - return NDR_ROUND(s,8); -} - -enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,0))); - { - uint32_t _flags_save_PAC_INFO = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); - NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info)); - ndr->flags = _flags_save_PAC_INFO; - } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - } - if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_PAC_INFO = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); - if (r->info) { - NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info)); - { - struct ndr_push *_ndr_info; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0))); - NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->info, r->type)); - NDR_CHECK(ndr_push_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info)); - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0))); - } - } - ndr->flags = _flags_save_PAC_INFO; - } - } - return NDR_ERR_SUCCESS; -} - -enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r) -{ - uint32_t _ptr_info; - TALLOC_CTX *_mem_save_info_0; - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size)); - { - uint32_t _flags_save_PAC_INFO = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); - if (_ptr_info) { - NDR_PULL_ALLOC(ndr, r->info); - NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info)); - } else { - r->info = NULL; - } - ndr->flags = _flags_save_PAC_INFO; - } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad)); - } - if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_PAC_INFO = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8); - if (r->info) { - uint32_t _relative_save_offset; - _relative_save_offset = ndr->offset; - NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info)); - _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->info, 0); - { - struct ndr_pull *_ndr_info; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, r->_ndr_size)); - NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->info, r->type)); - NDR_CHECK(ndr_pull_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info)); - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, r->_ndr_size)); - } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); - ndr->offset = _relative_save_offset; - } - ndr->flags = _flags_save_PAC_INFO; - } - } - return NDR_ERR_SUCCESS; -} - -void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r) -{ - ndr_print_struct(ndr, name, "PAC_BUFFER"); - ndr->depth++; - ndr_print_PAC_TYPE(ndr, "type", r->type); - ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,0):r->_ndr_size); - ndr_print_ptr(ndr, "info", r->info); - ndr->depth++; - if (r->info) { - ndr_print_set_switch_value(ndr, r->info, r->type); - ndr_print_PAC_INFO(ndr, "info", r->info); - } - ndr->depth--; - ndr_print_uint32(ndr, "_pad", r->_pad); - ndr->depth--; -} diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c deleted file mode 100644 index e86842527c..0000000000 --- a/source3/librpc/ndr/ndr_misc.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - UUID/GUID/policy_handle functions - - Copyright (C) Theodore Ts'o 1996, 1997, - Copyright (C) Jim McDonough 2002. - Copyright (C) Andrew Tridgell 2003. - Copyright (C) Stefan (metze) Metzmacher 2004. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" - -/** - * see if a range of memory is all zero. A NULL pointer is considered - * to be all zero - */ -bool all_zero(const uint8_t *ptr, size_t size) -{ - int i; - if (!ptr) return True; - for (i=0;i<size;i++) { - if (ptr[i]) return False; - } - return True; -} - -void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid) -{ - ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid)); -} - -bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, - const struct ndr_syntax_id *i2) -{ - return GUID_equal(&i1->uuid, &i2->uuid) - && (i1->if_version == i2->if_version); -} - -enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r) -{ - if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, - (uint32_t)r->pid)); -#ifdef CLUSTER_SUPPORT - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, - (uint32_t)r->vnn)); -#endif - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r) -{ - if (ndr_flags & NDR_SCALARS) { - uint32_t pid; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid)); -#ifdef CLUSTER_SUPPORT - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn)); -#endif - r->pid = (pid_t)pid; - } - if (ndr_flags & NDR_BUFFERS) { - } - return NDR_ERR_SUCCESS; -} - -void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r) -{ - ndr_print_struct(ndr, name, "server_id"); - ndr->depth++; - ndr_print_uint32(ndr, "id", (uint32_t)r->pid); -#ifdef CLUSTER_SUPPORT - ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn); -#endif - ndr->depth--; -} diff --git a/source3/librpc/ndr/ndr_string.c b/source3/librpc/ndr/ndr_string.c index e2c9ed5946..86d7b26586 100644 --- a/source3/librpc/ndr/ndr_string.c +++ b/source3/librpc/ndr/ndr_string.c @@ -89,7 +89,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, (len2 + c_len_term)*byte_mul)); @@ -127,7 +127,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul)); @@ -166,7 +166,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul)); @@ -201,7 +201,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, (len3 + c_len_term)*byte_mul)); @@ -233,7 +233,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, len3)); @@ -252,28 +252,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } NDR_CHECK(ndr_pull_advance(ndr, len1)); *s = as; break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: - len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - NDR_PULL_NEED_BYTES(ndr, len1*byte_mul); - if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX, - ndr->data+ndr->offset, len1*byte_mul, - (void **)(void *)&as, - &converted_size, false)) - { - return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); - } - NDR_CHECK(ndr_pull_advance(ndr, len1*byte_mul)); - *s = as; - break; - case LIBNDR_FLAG_STR_NOTERM: if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) { return ndr_pull_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x (missing NDR_REMAINING)\n", @@ -293,7 +277,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } } NDR_CHECK(ndr_pull_advance(ndr, len1)); @@ -346,17 +330,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, flags &= ~LIBNDR_FLAG_STR_CONFORMANT; - if (!(flags & - (LIBNDR_FLAG_STR_NOTERM | - LIBNDR_FLAG_STR_FIXLEN15 | - LIBNDR_FLAG_STR_FIXLEN32))) { + if (!(flags & LIBNDR_FLAG_STR_NOTERM)) { s_len++; } if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len, (void **)(void *)&dest, &d_len, false)) { return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } if (flags & LIBNDR_FLAG_STR_BYTESIZE) { @@ -397,21 +378,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: { - ssize_t fix_len = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - uint32_t pad_len = fix_len - d_len; - if (d_len > fix_len) { - return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); - } - NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); - if (pad_len != 0) { - NDR_CHECK(ndr_push_zero(ndr, pad_len)); - } - break; - } - default: if (ndr->flags & LIBNDR_FLAG_REMAINING) { NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); @@ -437,13 +403,6 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) unsigned byte_mul = 2; unsigned c_len_term = 1; - if (flags & LIBNDR_FLAG_STR_FIXLEN32) { - return 32; - } - if (flags & LIBNDR_FLAG_STR_FIXLEN15) { - return 15; - } - c_len = s?strlen_m(s):0; if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) { @@ -653,21 +612,21 @@ _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size) _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size) { uint32_t i; - struct ndr_pull_save save_offset; + uint32_t save_offset; - ndr_pull_save(ndr, &save_offset); + save_offset = ndr->offset; ndr_pull_advance(ndr, (count - 1) * element_size); NDR_PULL_NEED_BYTES(ndr, element_size); for (i = 0; i < element_size; i++) { if (ndr->data[ndr->offset+i] != 0) { - ndr_pull_restore(ndr, &save_offset); + ndr->offset = save_offset; return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "String terminator not present or outside string boundaries"); } } - ndr_pull_restore(ndr, &save_offset); + ndr->offset = save_offset; return NDR_ERR_SUCCESS; } @@ -693,7 +652,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, &converted_size, false)) { return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } NDR_CHECK(ndr_pull_advance(ndr, length*byte_mul)); @@ -716,7 +675,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, ndr->data+ndr->offset, required, false); if (ret == -1) { return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad char conversion"); + "Bad character conversion"); } /* Make sure the remaining part of the string is filled with zeroes */ diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c new file mode 100644 index 0000000000..457615ce22 --- /dev/null +++ b/source3/librpc/ndr/util.c @@ -0,0 +1,174 @@ +/* + Unix SMB/CIFS implementation. + + libndr interface + + Copyright (C) Andrew Tridgell 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "includes.h" + +NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err) +{ + switch (ndr_err) { + case NDR_ERR_SUCCESS: + return NT_STATUS_OK; + case NDR_ERR_BUFSIZE: + return NT_STATUS_BUFFER_TOO_SMALL; + case NDR_ERR_TOKEN: + return NT_STATUS_INTERNAL_ERROR; + case NDR_ERR_ALLOC: + return NT_STATUS_NO_MEMORY; + case NDR_ERR_ARRAY_SIZE: + return NT_STATUS_ARRAY_BOUNDS_EXCEEDED; + case NDR_ERR_INVALID_POINTER: + return NT_STATUS_INVALID_PARAMETER_MIX; + case NDR_ERR_UNREAD_BYTES: + return NT_STATUS_PORT_MESSAGE_TOO_LONG; + default: + break; + } + + /* we should map all error codes to different status codes */ + return NT_STATUS_INVALID_PARAMETER; +} + +/* + * Convert an ndr error to string + */ + +const char *ndr_errstr(enum ndr_err_code err) +{ + switch (err) { + case NDR_ERR_SUCCESS: + return "NDR_ERR_SUCCESS"; + break; + case NDR_ERR_ARRAY_SIZE: + return "NDR_ERR_ARRAY_SIZE"; + break; + case NDR_ERR_BAD_SWITCH: + return "NDR_ERR_BAD_SWITCH"; + break; + case NDR_ERR_OFFSET: + return "NDR_ERR_OFFSET"; + break; + case NDR_ERR_RELATIVE: + return "NDR_ERR_RELATIVE"; + break; + case NDR_ERR_CHARCNV: + return "NDR_ERR_CHARCNV"; + break; + case NDR_ERR_LENGTH: + return "NDR_ERR_LENGTH"; + break; + case NDR_ERR_SUBCONTEXT: + return "NDR_ERR_SUBCONTEXT"; + break; + case NDR_ERR_COMPRESSION: + return "NDR_ERR_COMPRESSION"; + break; + case NDR_ERR_STRING: + return "NDR_ERR_STRING"; + break; + case NDR_ERR_VALIDATE: + return "NDR_ERR_VALIDATE"; + break; + case NDR_ERR_BUFSIZE: + return "NDR_ERR_BUFSIZE"; + break; + case NDR_ERR_ALLOC: + return "NDR_ERR_ALLOC"; + break; + case NDR_ERR_RANGE: + return "NDR_ERR_RANGE"; + break; + case NDR_ERR_TOKEN: + return "NDR_ERR_TOKEN"; + break; + case NDR_ERR_IPV4ADDRESS: + return "NDR_ERR_IPV4ADDRESS"; + break; + case NDR_ERR_INVALID_POINTER: + return "NDR_ERR_INVALID_POINTER"; + break; + case NDR_ERR_UNREAD_BYTES: + return "NDR_ERR_UNREAD_BYTES"; + break; + } + + return talloc_asprintf(talloc_tos(), "Unknown NDR error: %d", err); +} + +enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, + (uint32_t)r->pid)); +#ifdef CLUSTER_SUPPORT + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, + (uint32_t)r->vnn)); +#endif + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r) +{ + if (ndr_flags & NDR_SCALARS) { + uint32_t pid; + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid)); +#ifdef CLUSTER_SUPPORT + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn)); +#endif + r->pid = (pid_t)pid; + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r) +{ + ndr_print_struct(ndr, name, "server_id"); + ndr->depth++; + ndr_print_uint32(ndr, "id", (uint32_t)r->pid); +#ifdef CLUSTER_SUPPORT + ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn); +#endif + ndr->depth--; +} + +_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b) +{ + ndr->print(ndr, "%-25s: %s", name, b?"true":"false"); +} + +_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss) +{ + char addr[INET6_ADDRSTRLEN]; + ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss)); +} + +void *global_loadparm; +void *cmdline_lp_ctx; +struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx) +{ + return NULL; +} diff --git a/source3/librpc/ndr/uuid.c b/source3/librpc/ndr/uuid.c deleted file mode 100644 index e92df22494..0000000000 --- a/source3/librpc/ndr/uuid.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - UUID/GUID functions - - Copyright (C) Theodore Ts'o 1996, 1997, - Copyright (C) Jim McDonough 2002. - Copyright (C) Andrew Tridgell 2003. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" -#include "librpc/ndr/libndr.h" - -/** - build a GUID from a string -*/ -_PUBLIC_ NTSTATUS GUID_from_string(const char *s, struct GUID *guid) -{ - NTSTATUS status = NT_STATUS_INVALID_PARAMETER; - uint32_t time_low; - uint32_t time_mid, time_hi_and_version; - uint32_t clock_seq[2]; - uint32_t node[6]; - int i; - - if (s == NULL) { - return NT_STATUS_INVALID_PARAMETER; - } - - if (11 == sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - &time_low, &time_mid, &time_hi_and_version, - &clock_seq[0], &clock_seq[1], - &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) { - status = NT_STATUS_OK; - } else if (11 == sscanf(s, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - &time_low, &time_mid, &time_hi_and_version, - &clock_seq[0], &clock_seq[1], - &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) { - status = NT_STATUS_OK; - } - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - guid->time_low = time_low; - guid->time_mid = time_mid; - guid->time_hi_and_version = time_hi_and_version; - guid->clock_seq[0] = clock_seq[0]; - guid->clock_seq[1] = clock_seq[1]; - for (i=0;i<6;i++) { - guid->node[i] = node[i]; - } - - return NT_STATUS_OK; -} - -/** - build a GUID from a string -*/ -_PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid) -{ - NTSTATUS status = NT_STATUS_INVALID_PARAMETER; - uint32_t time_low; - uint32_t time_mid, time_hi_and_version; - uint32_t clock_seq[2]; - uint32_t node[6]; - int i; - - if (s == NULL) { - return NT_STATUS_INVALID_PARAMETER; - } - - if (11 == sscanf(s, "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x", - &time_low, &time_mid, &time_hi_and_version, - &clock_seq[0], &clock_seq[1], - &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) { - status = NT_STATUS_OK; - } - - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - guid->time_low = time_low; - guid->time_mid = time_mid; - guid->time_hi_and_version = time_hi_and_version; - guid->clock_seq[0] = clock_seq[0]; - guid->clock_seq[1] = clock_seq[1]; - for (i=0;i<6;i++) { - guid->node[i] = node[i]; - } - - return NT_STATUS_OK; -} - -/** - * generate a random GUID - */ -struct GUID GUID_random(void) -{ - struct GUID guid; - - generate_random_buffer((uint8_t *)&guid, sizeof(guid)); - guid.clock_seq[0] = (guid.clock_seq[0] & 0x3F) | 0x80; - guid.time_hi_and_version = (guid.time_hi_and_version & 0x0FFF) | 0x4000; - - return guid; -} - -/** - * generate an empty GUID - */ -_PUBLIC_ struct GUID GUID_zero(void) -{ - struct GUID guid; - - ZERO_STRUCT(guid); - - return guid; -} - -_PUBLIC_ bool GUID_all_zero(const struct GUID *u) -{ - if (u->time_low != 0 || - u->time_mid != 0 || - u->time_hi_and_version != 0 || - u->clock_seq[0] != 0 || - u->clock_seq[1] != 0 || - !all_zero(u->node, 6)) { - return false; - } - return true; -} - -_PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2) -{ - if (u1->time_low != u2->time_low || - u1->time_mid != u2->time_mid || - u1->time_hi_and_version != u2->time_hi_and_version || - u1->clock_seq[0] != u2->clock_seq[0] || - u1->clock_seq[1] != u2->clock_seq[1] || - memcmp(u1->node, u2->node, 6) != 0) { - return false; - } - return true; -} - -_PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2) -{ - if (u1->time_low != u2->time_low) { - return u1->time_low - u2->time_low; - } - - if (u1->time_mid != u2->time_mid) { - return u1->time_mid - u2->time_mid; - } - - if (u1->time_hi_and_version != u2->time_hi_and_version) { - return u1->time_hi_and_version - u2->time_hi_and_version; - } - - if (u1->clock_seq[0] != u2->clock_seq[0]) { - return u1->clock_seq[0] - u2->clock_seq[0]; - } - - if (u1->clock_seq[1] != u2->clock_seq[1]) { - return u1->clock_seq[1] - u2->clock_seq[1]; - } - - return memcmp(u1->node, u2->node, 6); -} - -/** - its useful to be able to display these in debugging messages -*/ -_PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid) -{ - return talloc_asprintf(mem_ctx, - "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->time_low, guid->time_mid, - guid->time_hi_and_version, - guid->clock_seq[0], - guid->clock_seq[1], - guid->node[0], guid->node[1], - guid->node[2], guid->node[3], - guid->node[4], guid->node[5]); -} - -_PUBLIC_ char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid) -{ - char *ret, *s = GUID_string(mem_ctx, guid); - ret = talloc_asprintf(mem_ctx, "{%s}", s); - talloc_free(s); - return ret; -} - -_PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid) -{ - return talloc_asprintf(mem_ctx, - "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x", - guid->time_low, guid->time_mid, - guid->time_hi_and_version, - guid->clock_seq[0], - guid->clock_seq[1], - guid->node[0], guid->node[1], - guid->node[2], guid->node[3], - guid->node[4], guid->node[5]); -} - -_PUBLIC_ bool policy_handle_empty(struct policy_handle *h) -{ - return (h->handle_type == 0 && GUID_all_zero(&h->uuid)); -} diff --git a/source3/librpc/rpc/binding.c b/source3/librpc/rpc/binding.c deleted file mode 100644 index 01e3479c23..0000000000 --- a/source3/librpc/rpc/binding.c +++ /dev/null @@ -1,709 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - dcerpc utility functions - - Copyright (C) Andrew Tridgell 2003 - Copyright (C) Jelmer Vernooij 2004 - Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005 - Copyright (C) Rafal Szczesniak 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" - -#define MAX_PROTSEQ 10 - -static const struct { - const char *name; - enum dcerpc_transport_t transport; - int num_protocols; - enum epm_protocol protseq[MAX_PROTSEQ]; -} transports[] = { - { "ncacn_np", NCACN_NP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }}, - { "ncacn_ip_tcp", NCACN_IP_TCP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } }, - { "ncacn_http", NCACN_HTTP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } }, - { "ncadg_ip_udp", NCACN_IP_UDP, 3, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } }, - { "ncalrpc", NCALRPC, 2, - { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } }, - { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } }, - { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } }, - { "ncacn_at_dsp", NCACN_AT_DSP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } }, - { "ncadg_at_ddp", NCADG_AT_DDP, 3, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } }, - { "ncacn_vns_ssp", NCACN_VNS_SPP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } }, - { "ncacn_vns_ipc", NCACN_VNS_IPC, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, }, - { "ncadg_ipx", NCADG_IPX, 2, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX }, - }, - { "ncacn_spx", NCACN_SPX, 3, - /* I guess some MS programmer confused the identifier for - * EPM_PROTOCOL_UUID (0x0D or 13) with the one for - * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/ - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID }, - }, -}; - -static const struct { - const char *name; - uint32_t flag; -} ncacn_options[] = { - { "", 0 } -}; - -const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) -{ - struct ndr_syntax_id syntax; - NTSTATUS status; - - switch(epm_floor->lhs.protocol) { - case EPM_PROTOCOL_UUID: - status = dcerpc_floor_get_lhs_data(epm_floor, &syntax); - if (NT_STATUS_IS_OK(status)) { - /* lhs is used: UUID */ - char *uuidstr; - - if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) { - return "NDR"; - } - - if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) { - return "NDR64"; - } - - uuidstr = GUID_string(mem_ctx, &syntax.uuid); - - return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version); - } else { /* IPX */ - return NULL; - } - - case EPM_PROTOCOL_NCACN: - return "RPC-C"; - - case EPM_PROTOCOL_NCADG: - return "RPC"; - - case EPM_PROTOCOL_NCALRPC: - return "NCALRPC"; - - case EPM_PROTOCOL_DNET_NSP: - return "DNET/NSP"; - - case EPM_PROTOCOL_IP: - return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr); - - case EPM_PROTOCOL_PIPE: - return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path); - - case EPM_PROTOCOL_SMB: - return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc); - - case EPM_PROTOCOL_UNIX_DS: - return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path); - - case EPM_PROTOCOL_NETBIOS: - return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name); - - case EPM_PROTOCOL_NETBEUI: - return "NETBeui"; - - case EPM_PROTOCOL_SPX: - return "SPX"; - - case EPM_PROTOCOL_NB_IPX: - return "NB_IPX"; - - case EPM_PROTOCOL_HTTP: - return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port); - - case EPM_PROTOCOL_TCP: - return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port); - - case EPM_PROTOCOL_UDP: - return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port); - - default: - return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol); - } -} - - -/* - form a binding string from a binding structure -*/ -_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b) -{ - char *s = talloc_strdup(mem_ctx, ""); - int i; - const char *t_name = NULL; - - if (b->transport != NCA_UNKNOWN) { - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].transport == b->transport) { - t_name = transports[i].name; - } - } - if (!t_name) { - return NULL; - } - } - - if (!GUID_all_zero(&b->object.uuid)) { - s = talloc_asprintf(s, "%s@", - GUID_string(mem_ctx, &b->object.uuid)); - } - - if (t_name != NULL) { - s = talloc_asprintf_append_buffer(s, "%s:", t_name); - if (s == NULL) { - return NULL; - } - } - - if (b->host) { - s = talloc_asprintf_append_buffer(s, "%s", b->host); - } - - if (!b->endpoint && !b->options && !b->flags) { - return s; - } - - s = talloc_asprintf_append_buffer(s, "["); - - if (b->endpoint) { - s = talloc_asprintf_append_buffer(s, "%s", b->endpoint); - } - - /* this is a *really* inefficent way of dealing with strings, - but this is rarely called and the strings are always short, - so I don't care */ - for (i=0;b->options && b->options[i];i++) { - s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]); - if (!s) return NULL; - } - - for (i=0;i<ARRAY_SIZE(ncacn_options);i++) { - if (b->flags & ncacn_options[i].flag) { - s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name); - if (!s) return NULL; - } - } - - s = talloc_asprintf_append_buffer(s, "]"); - - return s; -} - -/* - parse a binding string into a dcerpc_binding structure -*/ -_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out) -{ - struct dcerpc_binding *b; - char *options; - char *p; - int i, j, comma_count; - - b = talloc(mem_ctx, struct dcerpc_binding); - if (!b) { - return NT_STATUS_NO_MEMORY; - } - - p = strchr(s, '@'); - - if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */ - NTSTATUS status; - - status = GUID_from_string(s, &b->object.uuid); - - if (NT_STATUS_IS_ERR(status)) { - DEBUG(0, ("Failed parsing UUID\n")); - return status; - } - - s = p + 1; - } else { - ZERO_STRUCT(b->object); - } - - b->object.if_version = 0; - - p = strchr(s, ':'); - - if (p == NULL) { - b->transport = NCA_UNKNOWN; - } else { - char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s)); - if (!type) { - return NT_STATUS_NO_MEMORY; - } - - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (strcmp(type, transports[i].name) == 0) { - b->transport = transports[i].transport; - break; - } - } - - if (i==ARRAY_SIZE(transports)) { - DEBUG(0,("Unknown dcerpc transport '%s'\n", type)); - return NT_STATUS_INVALID_PARAMETER; - } - - talloc_free(type); - - s = p+1; - } - - p = strchr(s, '['); - if (p) { - b->host = talloc_strndup(b, s, PTR_DIFF(p, s)); - options = talloc_strdup(mem_ctx, p+1); - if (options[strlen(options)-1] != ']') { - return NT_STATUS_INVALID_PARAMETER; - } - options[strlen(options)-1] = 0; - } else { - b->host = talloc_strdup(b, s); - options = NULL; - } - if (!b->host) { - return NT_STATUS_NO_MEMORY; - } - - b->target_hostname = b->host; - - b->options = NULL; - b->flags = 0; - b->assoc_group_id = 0; - b->endpoint = NULL; - - if (!options) { - *b_out = b; - return NT_STATUS_OK; - } - - comma_count = count_chars(options, ','); - - b->options = talloc_array(b, const char *, comma_count+2); - if (!b->options) { - return NT_STATUS_NO_MEMORY; - } - - for (i=0; (p = strchr(options, ',')); i++) { - b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options)); - if (!b->options[i]) { - return NT_STATUS_NO_MEMORY; - } - options = p+1; - } - b->options[i] = options; - b->options[i+1] = NULL; - - /* some options are pre-parsed for convenience */ - for (i=0;b->options[i];i++) { - for (j=0;j<ARRAY_SIZE(ncacn_options);j++) { - if (strcmp(ncacn_options[j].name, b->options[i]) == 0) { - int k; - b->flags |= ncacn_options[j].flag; - for (k=i;b->options[k];k++) { - b->options[k] = b->options[k+1]; - } - i--; - break; - } - } - } - - if (b->options[0]) { - /* Endpoint is first option */ - b->endpoint = b->options[0]; - if (strlen(b->endpoint) == 0) b->endpoint = NULL; - - for (i=0;b->options[i];i++) { - b->options[i] = b->options[i+1]; - } - } - - if (b->options[0] == NULL) - b->options = NULL; - - *b_out = b; - return NT_STATUS_OK; -} - -_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax) -{ - TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data"); - struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx); - enum ndr_err_code ndr_err; - uint16_t if_version=0; - - ndr->flags |= LIBNDR_FLAG_NOALIGN; - - ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(mem_ctx); - return ndr_map_error2ntstatus(ndr_err); - } - - ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(mem_ctx); - return ndr_map_error2ntstatus(ndr_err); - } - - syntax->if_version = if_version; - - talloc_free(mem_ctx); - - return NT_STATUS_OK; -} - -static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax) -{ - struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx); - - ndr->flags |= LIBNDR_FLAG_NOALIGN; - - ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); - ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version); - - return ndr_push_blob(ndr); -} - -const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) -{ - switch (epm_floor->lhs.protocol) { - case EPM_PROTOCOL_TCP: - if (epm_floor->rhs.tcp.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port); - - case EPM_PROTOCOL_UDP: - if (epm_floor->rhs.udp.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port); - - case EPM_PROTOCOL_HTTP: - if (epm_floor->rhs.http.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port); - - case EPM_PROTOCOL_IP: - return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr); - - case EPM_PROTOCOL_NCACN: - return NULL; - - case EPM_PROTOCOL_NCADG: - return NULL; - - case EPM_PROTOCOL_SMB: - if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc); - - case EPM_PROTOCOL_PIPE: - if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path); - - case EPM_PROTOCOL_NETBIOS: - if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name); - - case EPM_PROTOCOL_NCALRPC: - return NULL; - - case EPM_PROTOCOL_VINES_SPP: - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port); - - case EPM_PROTOCOL_VINES_IPC: - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port); - - case EPM_PROTOCOL_STREETTALK: - return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk); - - case EPM_PROTOCOL_UNIX_DS: - if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path); - - case EPM_PROTOCOL_NULL: - return NULL; - - default: - DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol)); - break; - } - - return NULL; -} - -static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, - struct epm_floor *epm_floor, - const char *data) -{ - switch (epm_floor->lhs.protocol) { - case EPM_PROTOCOL_TCP: - epm_floor->rhs.tcp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_UDP: - epm_floor->rhs.udp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_HTTP: - epm_floor->rhs.http.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_IP: - epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCACN: - epm_floor->rhs.ncacn.minor_version = 0; - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCADG: - epm_floor->rhs.ncadg.minor_version = 0; - return NT_STATUS_OK; - - case EPM_PROTOCOL_SMB: - epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc); - return NT_STATUS_OK; - - case EPM_PROTOCOL_PIPE: - epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NETBIOS: - epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCALRPC: - return NT_STATUS_OK; - - case EPM_PROTOCOL_VINES_SPP: - epm_floor->rhs.vines_spp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_VINES_IPC: - epm_floor->rhs.vines_ipc.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_STREETTALK: - epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk); - return NT_STATUS_OK; - - case EPM_PROTOCOL_UNIX_DS: - epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NULL: - return NT_STATUS_OK; - - default: - DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol)); - break; - } - - return NT_STATUS_NOT_SUPPORTED; -} - -enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot) -{ - int i; - - /* Find a transport that has 'prot' as 4th protocol */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].num_protocols >= 2 && - transports[i].protseq[1] == prot) { - return transports[i].transport; - } - } - - /* Unknown transport */ - return (unsigned int)-1; -} - -_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower) -{ - int i; - - /* Find a transport that matches this tower */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - int j; - if (transports[i].num_protocols != tower->num_floors - 2) { - continue; - } - - for (j = 0; j < transports[i].num_protocols; j++) { - if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) { - break; - } - } - - if (j == transports[i].num_protocols) { - return transports[i].transport; - } - } - - /* Unknown transport */ - return (unsigned int)-1; -} - -_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, - struct epm_tower *tower, - struct dcerpc_binding **b_out) -{ - NTSTATUS status; - struct dcerpc_binding *binding; - - binding = talloc(mem_ctx, struct dcerpc_binding); - NT_STATUS_HAVE_NO_MEMORY(binding); - - ZERO_STRUCT(binding->object); - binding->options = NULL; - binding->host = NULL; - binding->target_hostname = NULL; - binding->flags = 0; - binding->assoc_group_id = 0; - - binding->transport = dcerpc_transport_by_tower(tower); - - if (binding->transport == (unsigned int)-1) { - return NT_STATUS_NOT_SUPPORTED; - } - - if (tower->num_floors < 1) { - return NT_STATUS_OK; - } - - /* Set object uuid */ - status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object); - - if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status))); - return status; - } - - /* Ignore floor 1, it contains the NDR version info */ - - binding->options = NULL; - - /* Set endpoint */ - if (tower->num_floors >= 4) { - binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]); - } else { - binding->endpoint = NULL; - } - - /* Set network address */ - if (tower->num_floors >= 5) { - binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]); - NT_STATUS_HAVE_NO_MEMORY(binding->host); - binding->target_hostname = binding->host; - } - *b_out = binding; - return NT_STATUS_OK; -} - -_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower) -{ - const enum epm_protocol *protseq = NULL; - int num_protocols = -1, i; - NTSTATUS status; - - /* Find transport */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].transport == binding->transport) { - protseq = transports[i].protseq; - num_protocols = transports[i].num_protocols; - break; - } - } - - if (num_protocols == -1) { - DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport)); - return NT_STATUS_UNSUCCESSFUL; - } - - tower->num_floors = 2 + num_protocols; - tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors); - - /* Floor 0 */ - tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID; - - tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object); - - tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2); - - /* Floor 1 */ - tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID; - - tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, - &ndr_transfer_syntax); - - tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2); - - /* Floor 2 to num_protocols */ - for (i = 0; i < num_protocols; i++) { - tower->floors[2 + i].lhs.protocol = protseq[i]; - tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0); - ZERO_STRUCT(tower->floors[2 + i].rhs); - dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], ""); - } - - /* The 4th floor contains the endpoint */ - if (num_protocols >= 2 && binding->endpoint) { - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint); - if (NT_STATUS_IS_ERR(status)) { - return status; - } - } - - /* The 5th contains the network address */ - if (num_protocols >= 3 && binding->host) { - if (is_ipaddress(binding->host)) { - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], - binding->host); - } else { - /* note that we don't attempt to resolve the - name here - when we get a hostname here we - are in the client code, and want to put in - a wildcard all-zeros IP for the server to - fill in */ - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], - "0.0.0.0"); - } - if (NT_STATUS_IS_ERR(status)) { - return status; - } - } - - return NT_STATUS_OK; -} diff --git a/source3/librpc/rpc/dcerpc.c b/source3/librpc/rpc/dcerpc.c index 58d676a9d9..77bb7b33a2 100644 --- a/source3/librpc/rpc/dcerpc.c +++ b/source3/librpc/rpc/dcerpc.c @@ -43,7 +43,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct ret->call = call; ret->r = r; - push = ndr_push_init_ctx(mem_ctx); + push = ndr_push_init_ctx(mem_ctx, NULL); if (!push) { return NULL; } @@ -100,7 +100,7 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req) prs_mem_free( &r_ps ); - pull = ndr_pull_init_blob(&blob, req); + pull = ndr_pull_init_blob(&blob, req, NULL); if (pull == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/librpc/rpc/dcerpc.h b/source3/librpc/rpc/dcerpc.h index 739e60a341..1a1fd83060 100644 --- a/source3/librpc/rpc/dcerpc.h +++ b/source3/librpc/rpc/dcerpc.h @@ -72,4 +72,52 @@ struct dcerpc_binding { uint32_t assoc_group_id; }; + +/* dcerpc pipe flags */ +#define DCERPC_DEBUG_PRINT_IN (1<<0) +#define DCERPC_DEBUG_PRINT_OUT (1<<1) +#define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT) + +#define DCERPC_DEBUG_VALIDATE_IN (1<<2) +#define DCERPC_DEBUG_VALIDATE_OUT (1<<3) +#define DCERPC_DEBUG_VALIDATE_BOTH (DCERPC_DEBUG_VALIDATE_IN | DCERPC_DEBUG_VALIDATE_OUT) + +#define DCERPC_CONNECT (1<<4) +#define DCERPC_SIGN (1<<5) +#define DCERPC_SEAL (1<<6) + +#define DCERPC_PUSH_BIGENDIAN (1<<7) +#define DCERPC_PULL_BIGENDIAN (1<<8) + +#define DCERPC_SCHANNEL (1<<9) + +/* use a 128 bit session key */ +#define DCERPC_SCHANNEL_128 (1<<12) + +/* check incoming pad bytes */ +#define DCERPC_DEBUG_PAD_CHECK (1<<13) + +/* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */ +#define DCERPC_NDR_REF_ALLOC (1<<14) + +#define DCERPC_AUTH_OPTIONS (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL|DCERPC_AUTH_SPNEGO|DCERPC_AUTH_KRB5|DCERPC_AUTH_NTLM) + +/* select spnego auth */ +#define DCERPC_AUTH_SPNEGO (1<<15) + +/* select krb5 auth */ +#define DCERPC_AUTH_KRB5 (1<<16) + +#define DCERPC_SMB2 (1<<17) + +/* select NTLM auth */ +#define DCERPC_AUTH_NTLM (1<<18) + +/* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */ +#define DCERPC_CONCURRENT_MULTIPLEX (1<<19) + +/* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */ +#define DCERPC_HEADER_SIGNING (1<<20) + + #endif /* __DCERPC_H__ */ diff --git a/source3/librpc/rpc/dcerpc_util.c b/source3/librpc/rpc/dcerpc_util.c deleted file mode 100644 index 3b8768ccc2..0000000000 --- a/source3/librpc/rpc/dcerpc_util.c +++ /dev/null @@ -1,1438 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - dcerpc utility functions - - Copyright (C) Andrew Tridgell 2003 - Copyright (C) Jelmer Vernooij 2004 - Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005 - Copyright (C) Rafal Szczesniak 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" -#include "lib/events/events.h" -#include "libcli/composite/composite.h" -#include "librpc/gen_ndr/ndr_epmapper_c.h" -#include "librpc/gen_ndr/ndr_dcerpc.h" -#include "librpc/gen_ndr/ndr_misc.h" -#include "librpc/rpc/dcerpc_proto.h" -#include "auth/credentials/credentials.h" -#include "param/param.h" - -/* - find a dcerpc call on an interface by name -*/ -const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interface_table *iface, - const char *name) -{ - int i; - for (i=0;i<iface->num_calls;i++) { - if (strcmp(iface->calls[i].name, name) == 0) { - return &iface->calls[i]; - } - } - return NULL; -} - -/* - push a ncacn_packet into a blob, potentially with auth info -*/ -NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, - struct smb_iconv_convenience *iconv_convenience, - struct ncacn_packet *pkt, - struct dcerpc_auth *auth_info) -{ - struct ndr_push *ndr; - enum ndr_err_code ndr_err; - - ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience); - if (!ndr) { - return NT_STATUS_NO_MEMORY; - } - - if (!(pkt->drep[0] & DCERPC_DREP_LE)) { - ndr->flags |= LIBNDR_FLAG_BIGENDIAN; - } - - if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) { - ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT; - } - - if (auth_info) { - pkt->auth_length = auth_info->credentials.length; - } else { - pkt->auth_length = 0; - } - - ndr_err = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return ndr_map_error2ntstatus(ndr_err); - } - - if (auth_info) { - ndr_err = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, auth_info); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return ndr_map_error2ntstatus(ndr_err); - } - } - - *blob = ndr_push_blob(ndr); - - /* fill in the frag length */ - dcerpc_set_frag_length(blob, blob->length); - - return NT_STATUS_OK; -} - -#define MAX_PROTSEQ 10 - -static const struct { - const char *name; - enum dcerpc_transport_t transport; - int num_protocols; - enum epm_protocol protseq[MAX_PROTSEQ]; -} transports[] = { - { "ncacn_np", NCACN_NP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }}, - { "ncacn_ip_tcp", NCACN_IP_TCP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } }, - { "ncacn_http", NCACN_HTTP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } }, - { "ncadg_ip_udp", NCACN_IP_UDP, 3, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } }, - { "ncalrpc", NCALRPC, 2, - { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } }, - { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } }, - { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } }, - { "ncacn_at_dsp", NCACN_AT_DSP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } }, - { "ncadg_at_ddp", NCADG_AT_DDP, 3, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } }, - { "ncacn_vns_ssp", NCACN_VNS_SPP, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } }, - { "ncacn_vns_ipc", NCACN_VNS_IPC, 3, - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, }, - { "ncadg_ipx", NCADG_IPX, 2, - { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX }, - }, - { "ncacn_spx", NCACN_SPX, 3, - /* I guess some MS programmer confused the identifier for - * EPM_PROTOCOL_UUID (0x0D or 13) with the one for - * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/ - { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID }, - }, -}; - -static const struct { - const char *name; - uint32_t flag; -} ncacn_options[] = { - {"sign", DCERPC_SIGN}, - {"seal", DCERPC_SEAL}, - {"connect", DCERPC_CONNECT}, - {"spnego", DCERPC_AUTH_SPNEGO}, - {"ntlm", DCERPC_AUTH_NTLM}, - {"krb5", DCERPC_AUTH_KRB5}, - {"validate", DCERPC_DEBUG_VALIDATE_BOTH}, - {"print", DCERPC_DEBUG_PRINT_BOTH}, - {"padcheck", DCERPC_DEBUG_PAD_CHECK}, - {"bigendian", DCERPC_PUSH_BIGENDIAN}, - {"smb2", DCERPC_SMB2} -}; - -const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) -{ - struct ndr_syntax_id syntax; - NTSTATUS status; - - switch(epm_floor->lhs.protocol) { - case EPM_PROTOCOL_UUID: - status = dcerpc_floor_get_lhs_data(epm_floor, &syntax); - if (NT_STATUS_IS_OK(status)) { - /* lhs is used: UUID */ - char *uuidstr; - - if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) { - return "NDR"; - } - - if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) { - return "NDR64"; - } - - uuidstr = GUID_string(mem_ctx, &syntax.uuid); - - return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version); - } else { /* IPX */ - return talloc_asprintf(mem_ctx, "IPX:%s", - data_blob_hex_string(mem_ctx, &epm_floor->rhs.uuid.unknown)); - } - - case EPM_PROTOCOL_NCACN: - return "RPC-C"; - - case EPM_PROTOCOL_NCADG: - return "RPC"; - - case EPM_PROTOCOL_NCALRPC: - return "NCALRPC"; - - case EPM_PROTOCOL_DNET_NSP: - return "DNET/NSP"; - - case EPM_PROTOCOL_IP: - return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr); - - case EPM_PROTOCOL_PIPE: - return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path); - - case EPM_PROTOCOL_SMB: - return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc); - - case EPM_PROTOCOL_UNIX_DS: - return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path); - - case EPM_PROTOCOL_NETBIOS: - return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name); - - case EPM_PROTOCOL_NETBEUI: - return "NETBeui"; - - case EPM_PROTOCOL_SPX: - return "SPX"; - - case EPM_PROTOCOL_NB_IPX: - return "NB_IPX"; - - case EPM_PROTOCOL_HTTP: - return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port); - - case EPM_PROTOCOL_TCP: - return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port); - - case EPM_PROTOCOL_UDP: - return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port); - - default: - return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol); - } -} - - -/* - form a binding string from a binding structure -*/ -_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b) -{ - char *s = talloc_strdup(mem_ctx, ""); - int i; - const char *t_name = NULL; - - if (b->transport != NCA_UNKNOWN) { - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].transport == b->transport) { - t_name = transports[i].name; - } - } - if (!t_name) { - return NULL; - } - } - - if (!GUID_all_zero(&b->object.uuid)) { - s = talloc_asprintf(s, "%s@", - GUID_string(mem_ctx, &b->object.uuid)); - } - - if (t_name != NULL) { - s = talloc_asprintf_append_buffer(s, "%s:", t_name); - if (s == NULL) { - return NULL; - } - } - - if (b->host) { - s = talloc_asprintf_append_buffer(s, "%s", b->host); - } - - if (!b->endpoint && !b->options && !b->flags) { - return s; - } - - s = talloc_asprintf_append_buffer(s, "["); - - if (b->endpoint) { - s = talloc_asprintf_append_buffer(s, "%s", b->endpoint); - } - - /* this is a *really* inefficent way of dealing with strings, - but this is rarely called and the strings are always short, - so I don't care */ - for (i=0;b->options && b->options[i];i++) { - s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]); - if (!s) return NULL; - } - - for (i=0;i<ARRAY_SIZE(ncacn_options);i++) { - if (b->flags & ncacn_options[i].flag) { - s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name); - if (!s) return NULL; - } - } - - s = talloc_asprintf_append_buffer(s, "]"); - - return s; -} - -/* - parse a binding string into a dcerpc_binding structure -*/ -_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out) -{ - struct dcerpc_binding *b; - char *options; - char *p; - int i, j, comma_count; - - b = talloc(mem_ctx, struct dcerpc_binding); - if (!b) { - return NT_STATUS_NO_MEMORY; - } - - p = strchr(s, '@'); - - if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */ - NTSTATUS status; - - status = GUID_from_string(s, &b->object.uuid); - - if (NT_STATUS_IS_ERR(status)) { - DEBUG(0, ("Failed parsing UUID\n")); - return status; - } - - s = p + 1; - } else { - ZERO_STRUCT(b->object); - } - - b->object.if_version = 0; - - p = strchr(s, ':'); - - if (p == NULL) { - b->transport = NCA_UNKNOWN; - } else { - char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s)); - if (!type) { - return NT_STATUS_NO_MEMORY; - } - - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (strcasecmp(type, transports[i].name) == 0) { - b->transport = transports[i].transport; - break; - } - } - - if (i==ARRAY_SIZE(transports)) { - DEBUG(0,("Unknown dcerpc transport '%s'\n", type)); - return NT_STATUS_INVALID_PARAMETER; - } - - talloc_free(type); - - s = p+1; - } - - p = strchr(s, '['); - if (p) { - b->host = talloc_strndup(b, s, PTR_DIFF(p, s)); - options = talloc_strdup(mem_ctx, p+1); - if (options[strlen(options)-1] != ']') { - return NT_STATUS_INVALID_PARAMETER; - } - options[strlen(options)-1] = 0; - } else { - b->host = talloc_strdup(b, s); - options = NULL; - } - if (!b->host) { - return NT_STATUS_NO_MEMORY; - } - - b->target_hostname = b->host; - - b->options = NULL; - b->flags = 0; - b->assoc_group_id = 0; - b->endpoint = NULL; - - if (!options) { - *b_out = b; - return NT_STATUS_OK; - } - - comma_count = count_chars(options, ','); - - b->options = talloc_array(b, const char *, comma_count+2); - if (!b->options) { - return NT_STATUS_NO_MEMORY; - } - - for (i=0; (p = strchr(options, ',')); i++) { - b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options)); - if (!b->options[i]) { - return NT_STATUS_NO_MEMORY; - } - options = p+1; - } - b->options[i] = options; - b->options[i+1] = NULL; - - /* some options are pre-parsed for convenience */ - for (i=0;b->options[i];i++) { - for (j=0;j<ARRAY_SIZE(ncacn_options);j++) { - if (strcasecmp(ncacn_options[j].name, b->options[i]) == 0) { - int k; - b->flags |= ncacn_options[j].flag; - for (k=i;b->options[k];k++) { - b->options[k] = b->options[k+1]; - } - i--; - break; - } - } - } - - if (b->options[0]) { - /* Endpoint is first option */ - b->endpoint = b->options[0]; - if (strlen(b->endpoint) == 0) b->endpoint = NULL; - - for (i=0;b->options[i];i++) { - b->options[i] = b->options[i+1]; - } - } - - if (b->options[0] == NULL) - b->options = NULL; - - *b_out = b; - return NT_STATUS_OK; -} - -_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax) -{ - TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data"); - struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL); - enum ndr_err_code ndr_err; - uint16_t if_version=0; - - ndr->flags |= LIBNDR_FLAG_NOALIGN; - - ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(mem_ctx); - return ndr_map_error2ntstatus(ndr_err); - } - - ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(mem_ctx); - return ndr_map_error2ntstatus(ndr_err); - } - - syntax->if_version = if_version; - - talloc_free(mem_ctx); - - return NT_STATUS_OK; -} - -static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax) -{ - struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL); - - ndr->flags |= LIBNDR_FLAG_NOALIGN; - - ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); - ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version); - - return ndr_push_blob(ndr); -} - -const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor) -{ - switch (epm_floor->lhs.protocol) { - case EPM_PROTOCOL_TCP: - if (epm_floor->rhs.tcp.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port); - - case EPM_PROTOCOL_UDP: - if (epm_floor->rhs.udp.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port); - - case EPM_PROTOCOL_HTTP: - if (epm_floor->rhs.http.port == 0) return NULL; - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port); - - case EPM_PROTOCOL_IP: - return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr); - - case EPM_PROTOCOL_NCACN: - return NULL; - - case EPM_PROTOCOL_NCADG: - return NULL; - - case EPM_PROTOCOL_SMB: - if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc); - - case EPM_PROTOCOL_PIPE: - if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path); - - case EPM_PROTOCOL_NETBIOS: - if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name); - - case EPM_PROTOCOL_NCALRPC: - return NULL; - - case EPM_PROTOCOL_VINES_SPP: - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port); - - case EPM_PROTOCOL_VINES_IPC: - return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port); - - case EPM_PROTOCOL_STREETTALK: - return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk); - - case EPM_PROTOCOL_UNIX_DS: - if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL; - return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path); - - case EPM_PROTOCOL_NULL: - return NULL; - - default: - DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol)); - break; - } - - return NULL; -} - -static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, - struct epm_floor *epm_floor, - const char *data) -{ - switch (epm_floor->lhs.protocol) { - case EPM_PROTOCOL_TCP: - epm_floor->rhs.tcp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_UDP: - epm_floor->rhs.udp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_HTTP: - epm_floor->rhs.http.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_IP: - epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCACN: - epm_floor->rhs.ncacn.minor_version = 0; - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCADG: - epm_floor->rhs.ncadg.minor_version = 0; - return NT_STATUS_OK; - - case EPM_PROTOCOL_SMB: - epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc); - return NT_STATUS_OK; - - case EPM_PROTOCOL_PIPE: - epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NETBIOS: - epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NCALRPC: - return NT_STATUS_OK; - - case EPM_PROTOCOL_VINES_SPP: - epm_floor->rhs.vines_spp.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_VINES_IPC: - epm_floor->rhs.vines_ipc.port = atoi(data); - return NT_STATUS_OK; - - case EPM_PROTOCOL_STREETTALK: - epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk); - return NT_STATUS_OK; - - case EPM_PROTOCOL_UNIX_DS: - epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data); - NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path); - return NT_STATUS_OK; - - case EPM_PROTOCOL_NULL: - return NT_STATUS_OK; - - default: - DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol)); - break; - } - - return NT_STATUS_NOT_SUPPORTED; -} - -enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot) -{ - int i; - - /* Find a transport that has 'prot' as 4th protocol */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].num_protocols >= 2 && - transports[i].protseq[1] == prot) { - return transports[i].transport; - } - } - - /* Unknown transport */ - return (unsigned int)-1; -} - -_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower) -{ - int i; - - /* Find a transport that matches this tower */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - int j; - if (transports[i].num_protocols != tower->num_floors - 2) { - continue; - } - - for (j = 0; j < transports[i].num_protocols; j++) { - if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) { - break; - } - } - - if (j == transports[i].num_protocols) { - return transports[i].transport; - } - } - - /* Unknown transport */ - return (unsigned int)-1; -} - -_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, - struct epm_tower *tower, - struct dcerpc_binding **b_out) -{ - NTSTATUS status; - struct dcerpc_binding *binding; - - binding = talloc(mem_ctx, struct dcerpc_binding); - NT_STATUS_HAVE_NO_MEMORY(binding); - - ZERO_STRUCT(binding->object); - binding->options = NULL; - binding->host = NULL; - binding->target_hostname = NULL; - binding->flags = 0; - binding->assoc_group_id = 0; - - binding->transport = dcerpc_transport_by_tower(tower); - - if (binding->transport == (unsigned int)-1) { - return NT_STATUS_NOT_SUPPORTED; - } - - if (tower->num_floors < 1) { - return NT_STATUS_OK; - } - - /* Set object uuid */ - status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object); - - if (!NT_STATUS_IS_OK(status)) { - DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status))); - return status; - } - - /* Ignore floor 1, it contains the NDR version info */ - - binding->options = NULL; - - /* Set endpoint */ - if (tower->num_floors >= 4) { - binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]); - } else { - binding->endpoint = NULL; - } - - /* Set network address */ - if (tower->num_floors >= 5) { - binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]); - NT_STATUS_HAVE_NO_MEMORY(binding->host); - binding->target_hostname = binding->host; - } - *b_out = binding; - return NT_STATUS_OK; -} - -_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower) -{ - const enum epm_protocol *protseq = NULL; - int num_protocols = -1, i; - NTSTATUS status; - - /* Find transport */ - for (i=0;i<ARRAY_SIZE(transports);i++) { - if (transports[i].transport == binding->transport) { - protseq = transports[i].protseq; - num_protocols = transports[i].num_protocols; - break; - } - } - - if (num_protocols == -1) { - DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport)); - return NT_STATUS_UNSUCCESSFUL; - } - - tower->num_floors = 2 + num_protocols; - tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors); - - /* Floor 0 */ - tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID; - - tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object); - - tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2); - - /* Floor 1 */ - tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID; - - tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, - &ndr_transfer_syntax); - - tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2); - - /* Floor 2 to num_protocols */ - for (i = 0; i < num_protocols; i++) { - tower->floors[2 + i].lhs.protocol = protseq[i]; - tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0); - ZERO_STRUCT(tower->floors[2 + i].rhs); - dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], ""); - } - - /* The 4th floor contains the endpoint */ - if (num_protocols >= 2 && binding->endpoint) { - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint); - if (NT_STATUS_IS_ERR(status)) { - return status; - } - } - - /* The 5th contains the network address */ - if (num_protocols >= 3 && binding->host) { - if (is_ipaddress(binding->host)) { - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], - binding->host); - } else { - /* note that we don't attempt to resolve the - name here - when we get a hostname here we - are in the client code, and want to put in - a wildcard all-zeros IP for the server to - fill in */ - status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], - "0.0.0.0"); - } - if (NT_STATUS_IS_ERR(status)) { - return status; - } - } - - return NT_STATUS_OK; -} - - -struct epm_map_binding_state { - struct dcerpc_binding *binding; - const struct ndr_interface_table *table; - struct dcerpc_pipe *pipe; - struct policy_handle handle; - struct GUID guid; - struct epm_twr_t twr; - struct epm_twr_t *twr_r; - struct epm_Map r; -}; - - -static void continue_epm_recv_binding(struct composite_context *ctx); -static void continue_epm_map(struct rpc_request *req); - - -/* - Stage 2 of epm_map_binding: Receive connected rpc pipe and send endpoint - mapping rpc request -*/ -static void continue_epm_recv_binding(struct composite_context *ctx) -{ - struct rpc_request *map_req; - - struct composite_context *c = talloc_get_type(ctx->async.private_data, - struct composite_context); - struct epm_map_binding_state *s = talloc_get_type(c->private_data, - struct epm_map_binding_state); - - /* receive result of rpc pipe connect request */ - c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe); - if (!composite_is_ok(c)) return; - - s->pipe->conn->flags |= DCERPC_NDR_REF_ALLOC; - - /* prepare requested binding parameters */ - s->binding->object = s->table->syntax_id; - - c->status = dcerpc_binding_build_tower(s->pipe, s->binding, &s->twr.tower); - if (!composite_is_ok(c)) return; - - /* with some nice pretty paper around it of course */ - s->r.in.object = &s->guid; - s->r.in.map_tower = &s->twr; - s->r.in.entry_handle = &s->handle; - s->r.in.max_towers = 1; - s->r.out.entry_handle = &s->handle; - - /* send request for an endpoint mapping - a rpc request on connected pipe */ - map_req = dcerpc_epm_Map_send(s->pipe, c, &s->r); - if (composite_nomem(map_req, c)) return; - - composite_continue_rpc(c, map_req, continue_epm_map, c); -} - - -/* - Stage 3 of epm_map_binding: Receive endpoint mapping and provide binding details -*/ -static void continue_epm_map(struct rpc_request *req) -{ - struct composite_context *c = talloc_get_type(req->async.private_data, - struct composite_context); - struct epm_map_binding_state *s = talloc_get_type(c->private_data, - struct epm_map_binding_state); - - /* receive result of a rpc request */ - c->status = dcerpc_ndr_request_recv(req); - if (!composite_is_ok(c)) return; - - /* check the details */ - if (s->r.out.result != 0 || *s->r.out.num_towers != 1) { - composite_error(c, NT_STATUS_PORT_UNREACHABLE); - return; - } - - s->twr_r = s->r.out.towers[0].twr; - if (s->twr_r == NULL) { - composite_error(c, NT_STATUS_PORT_UNREACHABLE); - return; - } - - if (s->twr_r->tower.num_floors != s->twr.tower.num_floors || - s->twr_r->tower.floors[3].lhs.protocol != s->twr.tower.floors[3].lhs.protocol) { - composite_error(c, NT_STATUS_PORT_UNREACHABLE); - return; - } - - /* get received endpoint */ - s->binding->endpoint = talloc_reference(s->binding, - dcerpc_floor_get_rhs_data(c, &s->twr_r->tower.floors[3])); - if (composite_nomem(s->binding->endpoint, c)) return; - - composite_done(c); -} - - -/* - Request for endpoint mapping of dcerpc binding - try to request for endpoint - unless there is default one. -*/ -struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx, - struct dcerpc_binding *binding, - const struct ndr_interface_table *table, - struct event_context *ev, - struct loadparm_context *lp_ctx) -{ - struct composite_context *c; - struct epm_map_binding_state *s; - struct composite_context *pipe_connect_req; - struct cli_credentials *anon_creds; - struct event_context *new_ev = NULL; - - NTSTATUS status; - struct dcerpc_binding *epmapper_binding; - int i; - - /* Try to find event context in memory context in case passed - * event_context (argument) was NULL. If there's none, just - * create a new one. - */ - if (ev == NULL) { - ev = event_context_find(mem_ctx); - if (ev == NULL) { - new_ev = event_context_init(mem_ctx); - if (new_ev == NULL) return NULL; - ev = new_ev; - } - } - - /* composite context allocation and setup */ - c = composite_create(mem_ctx, ev); - if (c == NULL) { - talloc_free(new_ev); - return NULL; - } - talloc_steal(c, new_ev); - - s = talloc_zero(c, struct epm_map_binding_state); - if (composite_nomem(s, c)) return c; - c->private_data = s; - - s->binding = binding; - s->table = table; - - /* anonymous credentials for rpc connection used to get endpoint mapping */ - anon_creds = cli_credentials_init(mem_ctx); - cli_credentials_set_event_context(anon_creds, ev); - cli_credentials_set_anonymous(anon_creds); - - /* - First, check if there is a default endpoint specified in the IDL - */ - if (table != NULL) { - struct dcerpc_binding *default_binding; - - /* Find one of the default pipes for this interface */ - for (i = 0; i < table->endpoints->count; i++) { - status = dcerpc_parse_binding(mem_ctx, table->endpoints->names[i], &default_binding); - - if (NT_STATUS_IS_OK(status)) { - if (binding->transport == NCA_UNKNOWN) - binding->transport = default_binding->transport; - if (default_binding->transport == binding->transport && - default_binding->endpoint) { - binding->endpoint = talloc_reference(binding, default_binding->endpoint); - talloc_free(default_binding); - - composite_done(c); - return c; - - } else { - talloc_free(default_binding); - } - } - } - } - - epmapper_binding = talloc_zero(c, struct dcerpc_binding); - if (composite_nomem(epmapper_binding, c)) return c; - - /* basic endpoint mapping data */ - epmapper_binding->transport = binding->transport; - epmapper_binding->host = talloc_reference(epmapper_binding, binding->host); - epmapper_binding->target_hostname = epmapper_binding->host; - epmapper_binding->options = NULL; - epmapper_binding->flags = 0; - epmapper_binding->assoc_group_id = 0; - epmapper_binding->endpoint = NULL; - - /* initiate rpc pipe connection */ - pipe_connect_req = dcerpc_pipe_connect_b_send(c, epmapper_binding, - &ndr_table_epmapper, - anon_creds, c->event_ctx, - lp_ctx); - if (composite_nomem(pipe_connect_req, c)) return c; - - composite_continue(c, pipe_connect_req, continue_epm_recv_binding, c); - return c; -} - - -/* - Receive result of endpoint mapping request - */ -NTSTATUS dcerpc_epm_map_binding_recv(struct composite_context *c) -{ - NTSTATUS status = composite_wait(c); - - talloc_free(c); - return status; -} - - -/* - Get endpoint mapping for rpc connection -*/ -_PUBLIC_ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, - const struct ndr_interface_table *table, struct event_context *ev, - struct loadparm_context *lp_ctx) -{ - struct composite_context *c; - - c = dcerpc_epm_map_binding_send(mem_ctx, binding, table, ev, lp_ctx); - return dcerpc_epm_map_binding_recv(c); -} - - -struct pipe_auth_state { - struct dcerpc_pipe *pipe; - struct dcerpc_binding *binding; - const struct ndr_interface_table *table; - struct loadparm_context *lp_ctx; - struct cli_credentials *credentials; -}; - - -static void continue_auth_schannel(struct composite_context *ctx); -static void continue_auth(struct composite_context *ctx); -static void continue_auth_none(struct composite_context *ctx); -static void continue_ntlmssp_connection(struct composite_context *ctx); -static void continue_spnego_after_wrong_pass(struct composite_context *ctx); - - -/* - Stage 2 of pipe_auth: Receive result of schannel bind request -*/ -static void continue_auth_schannel(struct composite_context *ctx) -{ - struct composite_context *c = talloc_get_type(ctx->async.private_data, - struct composite_context); - - c->status = dcerpc_bind_auth_schannel_recv(ctx); - if (!composite_is_ok(c)) return; - - composite_done(c); -} - - -/* - Stage 2 of pipe_auth: Receive result of authenticated bind request -*/ -static void continue_auth(struct composite_context *ctx) -{ - struct composite_context *c = talloc_get_type(ctx->async.private_data, - struct composite_context); - - c->status = dcerpc_bind_auth_recv(ctx); - if (!composite_is_ok(c)) return; - - composite_done(c); -} -/* - Stage 2 of pipe_auth: Receive result of authenticated bind request, but handle fallbacks: - SPNEGO -> NTLMSSP -*/ -static void continue_auth_auto(struct composite_context *ctx) -{ - struct composite_context *c = talloc_get_type(ctx->async.private_data, - struct composite_context); - struct pipe_auth_state *s = talloc_get_type(c->private_data, struct pipe_auth_state); - struct composite_context *sec_conn_req; - - c->status = dcerpc_bind_auth_recv(ctx); - if (NT_STATUS_EQUAL(c->status, NT_STATUS_INVALID_PARAMETER)) { - /* - * Retry with NTLMSSP auth as fallback - * send a request for secondary rpc connection - */ - sec_conn_req = dcerpc_secondary_connection_send(s->pipe, - s->binding); - composite_continue(c, sec_conn_req, continue_ntlmssp_connection, c); - return; - } else if (NT_STATUS_EQUAL(c->status, NT_STATUS_LOGON_FAILURE)) { - if (cli_credentials_wrong_password(s->credentials)) { - /* - * Retry SPNEGO with a better password - * send a request for secondary rpc connection - */ - sec_conn_req = dcerpc_secondary_connection_send(s->pipe, - s->binding); - composite_continue(c, sec_conn_req, continue_spnego_after_wrong_pass, c); - return; - } - } - - if (!composite_is_ok(c)) return; - - composite_done(c); -} - -/* - Stage 3 of pipe_auth (fallback to NTLMSSP case): Receive secondary - rpc connection (the first one can't be used any more, due to the - bind nak) and perform authenticated bind request -*/ -static void continue_ntlmssp_connection(struct composite_context *ctx) -{ - struct composite_context *c; - struct pipe_auth_state *s; - struct composite_context *auth_req; - struct dcerpc_pipe *p2; - - c = talloc_get_type(ctx->async.private_data, struct composite_context); - s = talloc_get_type(c->private_data, struct pipe_auth_state); - - /* receive secondary rpc connection */ - c->status = dcerpc_secondary_connection_recv(ctx, &p2); - if (!composite_is_ok(c)) return; - - talloc_steal(s, p2); - talloc_steal(p2, s->pipe); - s->pipe = p2; - - /* initiate a authenticated bind */ - auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table, - s->credentials, s->lp_ctx, - DCERPC_AUTH_TYPE_NTLMSSP, - dcerpc_auth_level(s->pipe->conn), - s->table->authservices->names[0]); - composite_continue(c, auth_req, continue_auth, c); -} - -/* - Stage 3 of pipe_auth (retry on wrong password): Receive secondary - rpc connection (the first one can't be used any more, due to the - bind nak) and perform authenticated bind request -*/ -static void continue_spnego_after_wrong_pass(struct composite_context *ctx) -{ - struct composite_context *c; - struct pipe_auth_state *s; - struct composite_context *auth_req; - struct dcerpc_pipe *p2; - - c = talloc_get_type(ctx->async.private_data, struct composite_context); - s = talloc_get_type(c->private_data, struct pipe_auth_state); - - /* receive secondary rpc connection */ - c->status = dcerpc_secondary_connection_recv(ctx, &p2); - if (!composite_is_ok(c)) return; - - talloc_steal(s, p2); - talloc_steal(p2, s->pipe); - s->pipe = p2; - - /* initiate a authenticated bind */ - auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table, - s->credentials, s->lp_ctx, DCERPC_AUTH_TYPE_SPNEGO, - dcerpc_auth_level(s->pipe->conn), - s->table->authservices->names[0]); - composite_continue(c, auth_req, continue_auth, c); -} - - -/* - Stage 2 of pipe_auth: Receive result of non-authenticated bind request -*/ -static void continue_auth_none(struct composite_context *ctx) -{ - struct composite_context *c = talloc_get_type(ctx->async.private_data, - struct composite_context); - - c->status = dcerpc_bind_auth_none_recv(ctx); - if (!composite_is_ok(c)) return; - - composite_done(c); -} - - -/* - Request to perform an authenticated bind if required. Authentication - is determined using credentials passed and binding flags. -*/ -struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p, - struct dcerpc_binding *binding, - const struct ndr_interface_table *table, - struct cli_credentials *credentials, - struct loadparm_context *lp_ctx) -{ - struct composite_context *c; - struct pipe_auth_state *s; - struct composite_context *auth_schannel_req; - struct composite_context *auth_req; - struct composite_context *auth_none_req; - struct dcerpc_connection *conn; - uint8_t auth_type; - - /* composite context allocation and setup */ - c = composite_create(p, p->conn->event_ctx); - if (c == NULL) return NULL; - - s = talloc_zero(c, struct pipe_auth_state); - if (composite_nomem(s, c)) return c; - c->private_data = s; - - /* store parameters in state structure */ - s->binding = binding; - s->table = table; - s->credentials = credentials; - s->pipe = p; - s->lp_ctx = lp_ctx; - - conn = s->pipe->conn; - conn->flags = binding->flags; - - /* remember the binding string for possible secondary connections */ - conn->binding_string = dcerpc_binding_string(p, binding); - - if (cli_credentials_is_anonymous(s->credentials)) { - auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe, s->table); - composite_continue(c, auth_none_req, continue_auth_none, c); - return c; - } - - if ((binding->flags & DCERPC_SCHANNEL) && - !cli_credentials_get_netlogon_creds(s->credentials)) { - /* If we don't already have netlogon credentials for - * the schannel bind, then we have to get these - * first */ - auth_schannel_req = dcerpc_bind_auth_schannel_send(c, s->pipe, s->table, - s->credentials, s->lp_ctx, - dcerpc_auth_level(conn)); - composite_continue(c, auth_schannel_req, continue_auth_schannel, c); - return c; - } - - /* - * we rely on the already authenticated CIFS connection - * if not doing sign or seal - */ - if (conn->transport.transport == NCACN_NP && - !(s->binding->flags & (DCERPC_SIGN|DCERPC_SEAL))) { - auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe, s->table); - composite_continue(c, auth_none_req, continue_auth_none, c); - return c; - } - - - /* Perform an authenticated DCE-RPC bind - */ - if (!(conn->flags & (DCERPC_SIGN|DCERPC_SEAL))) { - /* - we are doing an authenticated connection, - but not using sign or seal. We must force - the CONNECT dcerpc auth type as a NONE auth - type doesn't allow authentication - information to be passed. - */ - conn->flags |= DCERPC_CONNECT; - } - - if (s->binding->flags & DCERPC_AUTH_SPNEGO) { - auth_type = DCERPC_AUTH_TYPE_SPNEGO; - - } else if (s->binding->flags & DCERPC_AUTH_KRB5) { - auth_type = DCERPC_AUTH_TYPE_KRB5; - - } else if (s->binding->flags & DCERPC_SCHANNEL) { - auth_type = DCERPC_AUTH_TYPE_SCHANNEL; - - } else if (s->binding->flags & DCERPC_AUTH_NTLM) { - auth_type = DCERPC_AUTH_TYPE_NTLMSSP; - - } else { - /* try SPNEGO with fallback to NTLMSSP */ - auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table, - s->credentials, s->lp_ctx, DCERPC_AUTH_TYPE_SPNEGO, - dcerpc_auth_level(conn), - s->table->authservices->names[0]); - composite_continue(c, auth_req, continue_auth_auto, c); - return c; - } - - auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table, - s->credentials, s->lp_ctx, auth_type, - dcerpc_auth_level(conn), - s->table->authservices->names[0]); - composite_continue(c, auth_req, continue_auth, c); - return c; -} - - -/* - Receive result of authenticated bind request on dcerpc pipe - - This returns *p, which may be different to the one originally - supllied, as it rebinds to a new pipe due to authentication fallback - -*/ -NTSTATUS dcerpc_pipe_auth_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, - struct dcerpc_pipe **p) -{ - NTSTATUS status; - - struct pipe_auth_state *s = talloc_get_type(c->private_data, - struct pipe_auth_state); - status = composite_wait(c); - if (!NT_STATUS_IS_OK(status)) { - char *uuid_str = GUID_string(s->pipe, &s->table->syntax_id.uuid); - DEBUG(0, ("Failed to bind to uuid %s - %s\n", uuid_str, nt_errstr(status))); - talloc_free(uuid_str); - } else { - talloc_steal(mem_ctx, s->pipe); - *p = s->pipe; - } - - talloc_free(c); - return status; -} - - -/* - Perform an authenticated bind if needed - sync version - - This may change *p, as it rebinds to a new pipe due to authentication fallback -*/ -_PUBLIC_ NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx, - struct dcerpc_pipe **p, - struct dcerpc_binding *binding, - const struct ndr_interface_table *table, - struct cli_credentials *credentials, - struct loadparm_context *lp_ctx) -{ - struct composite_context *c; - - c = dcerpc_pipe_auth_send(*p, binding, table, credentials, lp_ctx); - return dcerpc_pipe_auth_recv(c, mem_ctx, p); -} - - -NTSTATUS dcerpc_generic_session_key(struct dcerpc_connection *c, - DATA_BLOB *session_key) -{ - /* this took quite a few CPU cycles to find ... */ - session_key->data = discard_const_p(unsigned char, "SystemLibraryDTC"); - session_key->length = 16; - return NT_STATUS_OK; -} - -/* - fetch the user session key - may be default (above) or the SMB session key -*/ -_PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p, - DATA_BLOB *session_key) -{ - return p->conn->security_state.session_key(p->conn, session_key); -} - - -/* - log a rpc packet in a format suitable for ndrdump. This is especially useful - for sealed packets, where ethereal cannot easily see the contents - - this triggers on a debug level of >= 10 -*/ -_PUBLIC_ void dcerpc_log_packet(const struct ndr_interface_table *ndr, - uint32_t opnum, uint32_t flags, - DATA_BLOB *pkt) -{ - const int num_examples = 20; - int i; - - if (DEBUGLEVEL < 10) return; - - for (i=0;i<num_examples;i++) { - char *name=NULL; - asprintf(&name, "%s/rpclog/%s-%u.%d.%s", - lp_lockdir(global_loadparm), ndr->name, opnum, i, - (flags&NDR_IN)?"in":"out"); - if (name == NULL) { - return; - } - if (!file_exist(name)) { - if (file_save(name, pkt->data, pkt->length)) { - DEBUG(10,("Logged rpc packet to %s\n", name)); - } - free(name); - break; - } - free(name); - } -} - - - -/* - create a secondary context from a primary connection - - this uses dcerpc_alter_context() to create a new dcerpc context_id -*/ -_PUBLIC_ NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, - struct dcerpc_pipe **pp2, - const struct ndr_interface_table *table) -{ - NTSTATUS status; - struct dcerpc_pipe *p2; - - p2 = talloc_zero(p, struct dcerpc_pipe); - if (p2 == NULL) { - return NT_STATUS_NO_MEMORY; - } - p2->conn = talloc_reference(p2, p->conn); - p2->request_timeout = p->request_timeout; - - p2->context_id = ++p->conn->next_context_id; - - p2->syntax = table->syntax_id; - - p2->transfer_syntax = ndr_transfer_syntax; - - p2->binding = talloc_reference(p2, p->binding); - - status = dcerpc_alter_context(p2, p2, &p2->syntax, &p2->transfer_syntax); - if (!NT_STATUS_IS_OK(status)) { - talloc_free(p2); - return status; - } - - *pp2 = p2; - - return NT_STATUS_OK; -} diff --git a/source3/librpc/tools/ndrdump.c b/source3/librpc/tools/ndrdump.c index dc7f2be32f..5b96e152bb 100644 --- a/source3/librpc/tools/ndrdump.c +++ b/source3/librpc/tools/ndrdump.c @@ -281,11 +281,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug exit(1); } -#if (_SAMBA_BUILD_ >= 4) - data = (uint8_t *)file_load(ctx_filename, &size, mem_ctx); -#else - data = (uint8_t *)file_load(ctx_filename, &size, 0); -#endif + data = (uint8_t *)file_load(ctx_filename, &size, 0, mem_ctx); if (!data) { perror(ctx_filename); exit(1); @@ -294,7 +290,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug blob.data = data; blob.length = size; - ndr_pull = ndr_pull_init_blob(&blob, mem_ctx); + ndr_pull = ndr_pull_init_blob(&blob, mem_ctx, NULL); ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = f->ndr_pull(ndr_pull, NDR_IN, st); @@ -312,11 +308,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug } if (filename) -#if (_SAMBA_BUILD_ >= 4) - data = (uint8_t *)file_load(filename, &size, mem_ctx); -#else - data = (uint8_t *)file_load(filename, &size, 0); -#endif + data = (uint8_t *)file_load(filename, &size, 0, mem_ctx); else data = (uint8_t *)stdin_load(mem_ctx, &size); @@ -331,7 +323,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug blob.data = data; blob.length = size; - ndr_pull = ndr_pull_init_blob(&blob, mem_ctx); + ndr_pull = ndr_pull_init_blob(&blob, mem_ctx, NULL); ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = f->ndr_pull(ndr_pull, flags, st); @@ -368,7 +360,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug uint8_t byte_a, byte_b; bool differ; - ndr_v_push = ndr_push_init_ctx(mem_ctx); + ndr_v_push = ndr_push_init_ctx(mem_ctx, NULL); ndr_err = f->ndr_push(ndr_v_push, flags, st); status = ndr_map_error2ntstatus(ndr_err); @@ -385,7 +377,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug dump_data(0, v_blob.data, v_blob.length); } - ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx); + ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx, NULL); ndr_v_pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = f->ndr_pull(ndr_v_pull, flags, v_st); |