summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-19 01:27:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:45 -0500
commit6ef0edb38ee014394026d2d51af5dd82b694b2fb (patch)
tree06c9d6c26beae3b5f1de6f5a37730c210b515c1a /source3/librpc/gen_ndr
parent72e9a5d9e658514568586fb6e7ec4a8e479bf8ad (diff)
downloadsamba-6ef0edb38ee014394026d2d51af5dd82b694b2fb.tar.gz
samba-6ef0edb38ee014394026d2d51af5dd82b694b2fb.tar.bz2
samba-6ef0edb38ee014394026d2d51af5dd82b694b2fb.zip
r18666: checking in generated netlogon files
(This used to be commit ac5561103caccac7d14fddbdc9a0fa972be45c6f)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.c1014
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.h51
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c13129
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.h247
-rw-r--r--source3/librpc/gen_ndr/netlogon.h1352
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.c2653
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.h53
7 files changed, 18499 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c
new file mode 100644
index 0000000000..ee9839e58e
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_netlogon.c
@@ -0,0 +1,1014 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_netlogon.h"
+
+NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info)
+{
+ struct netr_LogonUasLogon r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.workstation = workstation;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONUASLOGON, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonUasLogon, (ndr_push_flags_fn_t)ndr_push_netr_LogonUasLogon);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info)
+{
+ struct netr_LogonUasLogoff r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.workstation = workstation;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONUASLOGOFF, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonUasLogoff, (ndr_push_flags_fn_t)ndr_push_netr_LogonUasLogoff);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative)
+{
+ struct netr_LogonSamLogon r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.logon_level = logon_level;
+ r.in.logon = logon;
+ r.in.validation_level = validation_level;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGON, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogon, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogon);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *validation = *r.out.validation;
+ *authoritative = *r.out.authoritative;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon)
+{
+ struct netr_LogonSamLogoff r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.logon_level = logon_level;
+ r.in.logon = logon;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGOFF, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogoff, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogoff);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Credential *credentials)
+{
+ struct netr_ServerReqChallenge r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credentials = credentials;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERREQCHALLENGE, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerReqChallenge, (ndr_push_flags_fn_t)ndr_push_netr_ServerReqChallenge);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *credentials = *r.out.credentials;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials)
+{
+ struct netr_ServerAuthenticate r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.secure_channel_type = secure_channel_type;
+ r.in.computer_name = computer_name;
+ r.in.credentials = credentials;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *credentials = *r.out.credentials;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct samr_Password new_password, struct netr_Authenticator *return_authenticator)
+{
+ struct netr_ServerPasswordSet r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.secure_channel_type = secure_channel_type;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.new_password = new_password;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERPASSWORDSET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerPasswordSet, (ndr_push_flags_fn_t)ndr_push_netr_ServerPasswordSet);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+{
+ struct netr_DatabaseDeltas r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.database_id = database_id;
+ r.in.sequence_num = sequence_num;
+ r.in.preferredmaximumlength = preferredmaximumlength;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASEDELTAS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseDeltas, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseDeltas);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *sequence_num = *r.out.sequence_num;
+ *delta_enum_array = *r.out.delta_enum_array;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+{
+ struct netr_DatabaseSync r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.database_id = database_id;
+ r.in.sync_context = sync_context;
+ r.in.preferredmaximumlength = preferredmaximumlength;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASESYNC, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseSync, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseSync);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *sync_context = *r.out.sync_context;
+ *delta_enum_array = *r.out.delta_enum_array;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, struct netr_UAS_INFO_0 uas, uint32_t count, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, struct netr_UAS_INFO_0 *recordid)
+{
+ struct netr_AccountDeltas r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.uas = uas;
+ r.in.count = count;
+ r.in.level = level;
+ r.in.buffersize = buffersize;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_ACCOUNTDELTAS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_AccountDeltas, (ndr_push_flags_fn_t)ndr_push_netr_AccountDeltas);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *buffer = *r.out.buffer;
+ *count_returned = *r.out.count_returned;
+ *total_entries = *r.out.total_entries;
+ *recordid = *r.out.recordid;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint32_t reference, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, uint32_t *next_reference, struct netr_UAS_INFO_0 *recordid)
+{
+ struct netr_AccountSync r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.reference = reference;
+ r.in.level = level;
+ r.in.buffersize = buffersize;
+ r.in.recordid = recordid;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_ACCOUNTSYNC, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_AccountSync, (ndr_push_flags_fn_t)ndr_push_netr_AccountSync);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *buffer = *r.out.buffer;
+ *count_returned = *r.out.count_returned;
+ *total_entries = *r.out.total_entries;
+ *next_reference = *r.out.next_reference;
+ *recordid = *r.out.recordid;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname)
+{
+ struct netr_GetDcName r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.domainname = domainname;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_GETDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_GetDcName, (ndr_push_flags_fn_t)ndr_push_netr_GetDcName);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *dcname = *r.out.dcname;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, enum netr_LogonControlCode function_code, uint32_t level, union netr_CONTROL_QUERY_INFORMATION *info)
+{
+ struct netr_LogonControl r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.function_code = function_code;
+ r.in.level = level;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname)
+{
+ struct netr_GetAnyDCName r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.domainname = domainname;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_GETANYDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_GetAnyDCName, (ndr_push_flags_fn_t)ndr_push_netr_GetAnyDCName);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *dcname = *r.out.dcname;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query)
+{
+ struct netr_LogonControl2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.function_code = function_code;
+ r.in.level = level;
+ r.in.data = data;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl2, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl2);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *query = *r.out.query;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags)
+{
+ struct netr_ServerAuthenticate2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.secure_channel_type = secure_channel_type;
+ r.in.computer_name = computer_name;
+ r.in.credentials = credentials;
+ r.in.negotiate_flags = negotiate_flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate2, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate2);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *credentials = *r.out.credentials;
+ *negotiate_flags = *r.out.negotiate_flags;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+{
+ struct netr_DatabaseSync2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.database_id = database_id;
+ r.in.restart_state = restart_state;
+ r.in.sync_context = sync_context;
+ r.in.preferredmaximumlength = preferredmaximumlength;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASESYNC2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseSync2, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseSync2);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *sync_context = *r.out.sync_context;
+ *delta_enum_array = *r.out.delta_enum_array;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+{
+ struct netr_DatabaseRedo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.computername = computername;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.change_log_entry = change_log_entry;
+ r.in.change_log_entry_size = change_log_entry_size;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASEREDO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseRedo, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseRedo);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *delta_enum_array = *r.out.delta_enum_array;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query)
+{
+ struct netr_LogonControl2Ex r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.logon_server = logon_server;
+ r.in.function_code = function_code;
+ r.in.level = level;
+ r.in.data = data;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL2EX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl2Ex, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl2Ex);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *query = *r.out.query;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRENUMERATETRUSTEDDOMAINS r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS, (ndr_push_flags_fn_t)ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
+{
+ struct netr_DsRGetDCName r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.domain_name = domain_name;
+ r.in.domain_guid = domain_guid;
+ r.in.site_guid = site_guid;
+ r.in.flags = flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCName, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCName);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONDUMMYROUTINE1 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONDUMMYROUTINE1, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONDUMMYROUTINE1, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONDUMMYROUTINE1);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONSETSERVICEBITS r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONSETSERVICEBITS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONSETSERVICEBITS, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONSETSERVICEBITS);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONGETTRUSTRID r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONGETTRUSTRID, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONGETTRUSTRID, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONGETTRUSTRID);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONCOMPUTESERVERDIGEST, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONCOMPUTECLIENTDIGEST, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags, uint32_t *rid)
+{
+ struct netr_ServerAuthenticate3 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.secure_channel_type = secure_channel_type;
+ r.in.computer_name = computer_name;
+ r.in.credentials = credentials;
+ r.in.negotiate_flags = negotiate_flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE3, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate3, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate3);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *credentials = *r.out.credentials;
+ *negotiate_flags = *r.out.negotiate_flags;
+ *rid = *r.out.rid;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
+{
+ struct netr_DsRGetDCNameEx r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.domain_name = domain_name;
+ r.in.domain_guid = domain_guid;
+ r.in.site_name = site_name;
+ r.in.flags = flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAMEEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameEx, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameEx);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site)
+{
+ struct netr_DsRGetSiteName r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.computer_name = computer_name;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETSITENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetSiteName, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetSiteName);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *site = *r.out.site;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint32_t level, union netr_DomainQuery query, union netr_DomainInfo *info)
+{
+ struct netr_LogonGetDomainInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.level = level;
+ r.in.query = query;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONGETDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonGetDomainInfo, (ndr_push_flags_fn_t)ndr_push_netr_LogonGetDomainInfo);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *info = *r.out.info;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct netr_CryptPassword new_password, struct netr_Authenticator *return_authenticator)
+{
+ struct netr_ServerPasswordSet2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.account_name = account_name;
+ r.in.secure_channel_type = secure_channel_type;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.new_password = new_password;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERPASSWORDSET2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerPasswordSet2, (ndr_push_flags_fn_t)ndr_push_netr_ServerPasswordSet2);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRSERVERPASSWORDGET r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERPASSWORDGET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERPASSWORDGET, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERPASSWORDGET);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONSENDTOSAM r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONSENDTOSAM, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONSENDTOSAM, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONSENDTOSAM);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_DSRADDRESSTOSITENAMESW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRADDRESSTOSITENAMESW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRADDRESSTOSITENAMESW, (ndr_push_flags_fn_t)ndr_push_netr_DSRADDRESSTOSITENAMESW);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
+{
+ struct netr_DsRGetDCNameEx2 r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_unc = server_unc;
+ r.in.client_account = client_account;
+ r.in.mask = mask;
+ r.in.domain_name = domain_name;
+ r.in.domain_guid = domain_guid;
+ r.in.site_name = site_name;
+ r.in.flags = flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAMEEX2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameEx2, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameEx2);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRENUMERATETRUSTEDDOMAINSEX r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX, (ndr_push_flags_fn_t)ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_DSRADDRESSTOSITENAMESEXW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRADDRESSTOSITENAMESEXW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRADDRESSTOSITENAMESEXW, (ndr_push_flags_fn_t)ndr_push_netr_DSRADDRESSTOSITENAMESEXW);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_DSRGETDCSITECOVERAGEW r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCSITECOVERAGEW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRGETDCSITECOVERAGEW, (ndr_push_flags_fn_t)ndr_push_netr_DSRGETDCSITECOVERAGEW);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags)
+{
+ struct netr_LogonSamLogonEx r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.logon_level = logon_level;
+ r.in.logon = logon;
+ r.in.validation_level = validation_level;
+ r.in.flags = flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGONEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogonEx, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogonEx);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *validation = *r.out.validation;
+ *authoritative = *r.out.authoritative;
+ *flags = *r.out.flags;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, uint32_t *count, struct netr_DomainTrust **trusts)
+{
+ struct netr_DsrEnumerateDomainTrusts r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.trust_flags = trust_flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRENUMERATEDOMAINTRUSTS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsrEnumerateDomainTrusts, (ndr_push_flags_fn_t)ndr_push_netr_DsrEnumerateDomainTrusts);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *count = *r.out.count;
+ *trusts = *r.out.trusts;
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_DSRDEREGISTERDNSHOSTRECORDS r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRDEREGISTERDNSHOSTRECORDS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS, (ndr_push_flags_fn_t)ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRSERVERTRUSTPASSWORDSGET r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERTRUSTPASSWORDSGET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_DSRGETFORESTTRUSTINFORMATION r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_netr_DSRGETFORESTTRUSTINFORMATION);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRGETFORESTTRUSTINFORMATION r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRGETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_netr_NETRGETFORESTTRUSTINFORMATION);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags)
+{
+ struct netr_LogonSamLogonWithFlags r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.logon_level = logon_level;
+ r.in.logon = logon;
+ r.in.validation_level = validation_level;
+ r.in.flags = flags;
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGONWITHFLAGS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogonWithFlags, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogonWithFlags);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *validation = *r.out.validation;
+ *authoritative = *r.out.authoritative;
+ *flags = *r.out.flags;
+
+ /* Return result */
+ return r.out.result;
+}
+
+NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+ struct netr_NETRSERVERGETTRUSTINFO r;
+ NTSTATUS status;
+
+ /* In parameters */
+ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERGETTRUSTINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERGETTRUSTINFO, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERGETTRUSTINFO);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return werror_to_ntstatus(r.out.result);
+}
+
diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h
new file mode 100644
index 0000000000..b88dcca92f
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_netlogon.h
@@ -0,0 +1,51 @@
+#include "librpc/gen_ndr/ndr_netlogon.h"
+#ifndef __CLI_NETLOGON__
+#define __CLI_NETLOGON__
+NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info);
+NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info);
+NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative);
+NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon);
+NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Credential *credentials);
+NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials);
+NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct samr_Password new_password, struct netr_Authenticator *return_authenticator);
+NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, struct netr_UAS_INFO_0 uas, uint32_t count, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, struct netr_UAS_INFO_0 *recordid);
+NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint32_t reference, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, uint32_t *next_reference, struct netr_UAS_INFO_0 *recordid);
+NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname);
+NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, enum netr_LogonControlCode function_code, uint32_t level, union netr_CONTROL_QUERY_INFORMATION *info);
+NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname);
+NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
+NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags);
+NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
+NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags, uint32_t *rid);
+NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site);
+NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint32_t level, union netr_DomainQuery query, union netr_DomainInfo *info);
+NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct netr_CryptPassword new_password, struct netr_Authenticator *return_authenticator);
+NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
+NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, uint32_t *count, struct netr_DomainTrust **trusts);
+NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
+NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+#endif /* __CLI_NETLOGON__ */
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
new file mode 100644
index 0000000000..b014c6aa07
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_netlogon.c
@@ -0,0 +1,13129 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
+
+#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_security.h"
+NTSTATUS ndr_push_netr_UasInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priv));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_flags));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bad_pw_count));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logon));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->last_logoff));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->logoff_time));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->kickoff_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->password_age));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_can_change));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->pw_must_change));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->script_path));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->account_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->computer) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer, ndr_charset_length(r->computer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->script_path) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->script_path, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->script_path, ndr_charset_length(r->script_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_UasInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasInfo *r)
+{
+ uint32_t _ptr_account_name;
+ TALLOC_CTX *_mem_save_account_name_0;
+ uint32_t _ptr_computer;
+ TALLOC_CTX *_mem_save_computer_0;
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ uint32_t _ptr_script_path;
+ TALLOC_CTX *_mem_save_script_path_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
+ if (_ptr_account_name) {
+ NDR_PULL_ALLOC(ndr, r->account_name);
+ } else {
+ r->account_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priv));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_count));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bad_pw_count));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logon));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->last_logoff));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->logoff_time));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->kickoff_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->password_age));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_can_change));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->pw_must_change));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer));
+ if (_ptr_computer) {
+ NDR_PULL_ALLOC(ndr, r->computer);
+ } else {
+ r->computer = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_script_path));
+ if (_ptr_script_path) {
+ NDR_PULL_ALLOC(ndr, r->script_path);
+ } else {
+ r->script_path = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->account_name) {
+ _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
+ if (ndr_get_array_length(ndr, &r->account_name) > ndr_get_array_size(ndr, &r->account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->account_name), ndr_get_array_length(ndr, &r->account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, ndr_get_array_length(ndr, &r->account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
+ }
+ if (r->computer) {
+ _mem_save_computer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->computer, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->computer));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->computer));
+ if (ndr_get_array_length(ndr, &r->computer) > ndr_get_array_size(ndr, &r->computer)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->computer), ndr_get_array_length(ndr, &r->computer));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->computer), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer, ndr_get_array_length(ndr, &r->computer), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_0, 0);
+ }
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ if (r->script_path) {
+ _mem_save_script_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->script_path, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->script_path));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->script_path));
+ if (ndr_get_array_length(ndr, &r->script_path) > ndr_get_array_size(ndr, &r->script_path)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->script_path), ndr_get_array_length(ndr, &r->script_path));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->script_path), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->script_path, ndr_get_array_length(ndr, &r->script_path), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_script_path_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_UasInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "account_name", r->account_name);
+ ndr->depth++;
+ if (r->account_name) {
+ ndr_print_string(ndr, "account_name", r->account_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "priv", r->priv);
+ ndr_print_uint32(ndr, "auth_flags", r->auth_flags);
+ ndr_print_uint32(ndr, "logon_count", r->logon_count);
+ ndr_print_uint32(ndr, "bad_pw_count", r->bad_pw_count);
+ ndr_print_time_t(ndr, "last_logon", r->last_logon);
+ ndr_print_time_t(ndr, "last_logoff", r->last_logoff);
+ ndr_print_time_t(ndr, "logoff_time", r->logoff_time);
+ ndr_print_time_t(ndr, "kickoff_time", r->kickoff_time);
+ ndr_print_uint32(ndr, "password_age", r->password_age);
+ ndr_print_time_t(ndr, "pw_can_change", r->pw_can_change);
+ ndr_print_time_t(ndr, "pw_must_change", r->pw_must_change);
+ ndr_print_ptr(ndr, "computer", r->computer);
+ ndr->depth++;
+ if (r->computer) {
+ ndr_print_string(ndr, "computer", r->computer);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "script_path", r->script_path);
+ ndr->depth++;
+ if (r->script_path) {
+ ndr_print_string(ndr, "script_path", r->script_path);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_UasLogoffInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_UasLogoffInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->duration));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_UasLogoffInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_UasLogoffInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->duration));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_UasLogoffInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "duration", r->duration);
+ ndr_print_uint16(ndr, "logon_count", r->logon_count);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const struct netr_AcctLockStr *r)
+{
+ uint32_t cntr_bindata_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->bindata));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->bindata) {
+ 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, r->length/2));
+ for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length/2; cntr_bindata_1++) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bindata[cntr_bindata_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct netr_AcctLockStr *r)
+{
+ uint32_t _ptr_bindata;
+ uint32_t cntr_bindata_1;
+ TALLOC_CTX *_mem_save_bindata_0;
+ TALLOC_CTX *_mem_save_bindata_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bindata));
+ if (_ptr_bindata) {
+ NDR_PULL_ALLOC(ndr, r->bindata);
+ } else {
+ r->bindata = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->bindata) {
+ _mem_save_bindata_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->bindata, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->bindata));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->bindata));
+ if (ndr_get_array_length(ndr, &r->bindata) > ndr_get_array_size(ndr, &r->bindata)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->bindata), ndr_get_array_length(ndr, &r->bindata));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->bindata, ndr_get_array_size(ndr, &r->bindata));
+ _mem_save_bindata_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->bindata, 0);
+ for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length/2; cntr_bindata_1++) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bindata[cntr_bindata_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bindata_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bindata_0, 0);
+ }
+ if (r->bindata) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bindata, r->size/2));
+ }
+ if (r->bindata) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bindata, r->length/2));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r)
+{
+ uint32_t cntr_bindata_1;
+ ndr_print_struct(ndr, name, "netr_AcctLockStr");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "size", r->size);
+ ndr_print_uint16(ndr, "length", r->length);
+ ndr_print_ptr(ndr, "bindata", r->bindata);
+ ndr->depth++;
+ if (r->bindata) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "bindata", r->length/2);
+ ndr->depth++;
+ for (cntr_bindata_1=0;cntr_bindata_1<r->length/2;cntr_bindata_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_bindata_1);
+ if (idx_1) {
+ ndr_print_uint16(ndr, "bindata", r->bindata[cntr_bindata_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_IdentityInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_IdentityInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parameter_control));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_id_low));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_id_high));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstation));
+ }
+ 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->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_IdentityInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_IdentityInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parameter_control));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_id_low));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_id_high));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstation));
+ }
+ 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->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstation));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_IdentityInfo");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
+ ndr_print_uint32(ndr, "parameter_control", r->parameter_control);
+ ndr_print_uint32(ndr, "logon_id_low", r->logon_id_low);
+ ndr_print_uint32(ndr, "logon_id_high", r->logon_id_high);
+ ndr_print_lsa_String(ndr, "account_name", &r->account_name);
+ ndr_print_lsa_String(ndr, "workstation", &r->workstation);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordInfo *r)
+{
+ 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_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
+ }
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordInfo *r)
+{
+ 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_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
+ }
+ 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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_PasswordInfo");
+ ndr->depth++;
+ ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
+ ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
+ ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ChallengeResponse(struct ndr_push *ndr, int ndr_flags, const struct netr_ChallengeResponse *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+ 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_uint32(ndr, NDR_SCALARS, 0));
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ChallengeResponse(struct ndr_pull *ndr, int ndr_flags, struct netr_ChallengeResponse *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_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ 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_CHECK(ndr_pull_array_length(ndr, &r->data));
+ if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(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_length(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));
+ }
+ if (r->data) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r)
+{
+ ndr_print_struct(ndr, name, "netr_ChallengeResponse");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ 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, "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;
+ }
+}
+
+NTSTATUS ndr_push_netr_NetworkInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_NetworkInfo *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_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
+ NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
+ NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
+ NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
+ NDR_CHECK(ndr_push_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NetworkInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_NetworkInfo *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->challenge, 8));
+ NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->nt));
+ NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_SCALARS, &r->lm));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
+ NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->nt));
+ NDR_CHECK(ndr_pull_netr_ChallengeResponse(ndr, NDR_BUFFERS, &r->lm));
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_NetworkInfo");
+ {
+ 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_array_uint8(ndr, "challenge", r->challenge, 8);
+ ndr_print_netr_ChallengeResponse(ndr, "nt", &r->nt);
+ ndr_print_netr_ChallengeResponse(ndr, "lm", &r->lm);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+ break;
+
+ case 6:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 1:
+ if (r->password) {
+ NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+ }
+ break;
+
+ case 2:
+ if (r->network) {
+ NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
+ }
+ break;
+
+ case 3:
+ if (r->password) {
+ NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+ }
+ break;
+
+ case 5:
+ if (r->password) {
+ NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+ }
+ break;
+
+ case 6:
+ if (r->network) {
+ NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS 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;
+ 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 netr_LogonLevel", _level);
+ }
+ switch (level) {
+ case 1: {
+ 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; }
+
+ case 2: {
+ uint32_t _ptr_network;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
+ if (_ptr_network) {
+ NDR_PULL_ALLOC(ndr, r->network);
+ } else {
+ r->network = NULL;
+ }
+ break; }
+
+ case 3: {
+ 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; }
+
+ case 5: {
+ 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; }
+
+ case 6: {
+ uint32_t _ptr_network;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
+ if (_ptr_network) {
+ NDR_PULL_ALLOC(ndr, r->network);
+ } else {
+ r->network = 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:
+ 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;
+
+ case 2:
+ if (r->network) {
+ _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
+ NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
+ }
+ break;
+
+ case 3:
+ 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;
+
+ case 5:
+ 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;
+
+ case 6:
+ if (r->network) {
+ _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
+ NDR_CHECK(ndr_pull_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_network_0, 0);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_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_LogonLevel");
+ switch (level) {
+ case 1:
+ ndr_print_ptr(ndr, "password", r->password);
+ ndr->depth++;
+ if (r->password) {
+ ndr_print_netr_PasswordInfo(ndr, "password", r->password);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "network", r->network);
+ ndr->depth++;
+ if (r->network) {
+ ndr_print_netr_NetworkInfo(ndr, "network", r->network);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "password", r->password);
+ ndr->depth++;
+ if (r->password) {
+ ndr_print_netr_PasswordInfo(ndr, "password", r->password);
+ }
+ ndr->depth--;
+ break;
+
+ case 5:
+ ndr_print_ptr(ndr, "password", r->password);
+ ndr->depth++;
+ if (r->password) {
+ ndr_print_netr_PasswordInfo(ndr, "password", r->password);
+ }
+ ndr->depth--;
+ break;
+
+ case 6:
+ ndr_print_ptr(ndr, "network", r->network);
+ ndr->depth++;
+ if (r->network) {
+ ndr_print_netr_NetworkInfo(ndr, "network", r->network);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_GroupMembership(struct ndr_push *ndr, int ndr_flags, const struct netr_GroupMembership *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_GroupMembership(struct ndr_pull *ndr, int ndr_flags, struct netr_GroupMembership *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_GroupMembership(struct ndr_print *ndr, const char *name, const struct netr_GroupMembership *r)
+{
+ ndr_print_struct(ndr, name, "netr_GroupMembership");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "rid", r->rid);
+ ndr_print_uint32(ndr, "attributes", r->attributes);
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, 16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r)
+{
+ ndr_print_struct(ndr, name, "netr_UserSessionKey");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "key", r->key, 16);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, 8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r)
+{
+ ndr_print_struct(ndr, name, "netr_LMSessionKey");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "key", r->key, 8);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_UserFlags(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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_UserFlags(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_GUEST", NETLOGON_GUEST, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NOENCRYPTION", NETLOGON_NOENCRYPTION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_CACHED_ACCOUNT", NETLOGON_CACHED_ACCOUNT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_USED_LM_PASSWORD", NETLOGON_USED_LM_PASSWORD, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_EXTRA_SIDS", NETLOGON_EXTRA_SIDS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SUBAUTH_SESSION_KEY", NETLOGON_SUBAUTH_SESSION_KEY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_SERVER_TRUST_ACCOUNT", NETLOGON_SERVER_TRUST_ACCOUNT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NTLMV2_ENABLED", NETLOGON_NTLMV2_ENABLED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_RESOURCE_GROUPS", NETLOGON_RESOURCE_GROUPS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_PROFILE_PATH_RETURNED", NETLOGON_PROFILE_PATH_RETURNED, r);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_SamBaseInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_SamBaseInfo *r)
+{
+ uint32_t cntr_unknown_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->allow_password_change));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_password_change));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
+ NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
+ NDR_CHECK(ndr_push_netr_UserFlags(ndr, NDR_SCALARS, r->user_flags));
+ NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_sid));
+ NDR_CHECK(ndr_push_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
+ NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
+ for (cntr_unknown_0 = 0; cntr_unknown_0 < 7; 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_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
+ NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain));
+ if (r->domain_sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_SamBaseInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_SamBaseInfo *r)
+{
+ uint32_t _ptr_domain_sid;
+ TALLOC_CTX *_mem_save_domain_sid_0;
+ uint32_t cntr_unknown_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->allow_password_change));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_password_change));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
+ NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->groups));
+ NDR_CHECK(ndr_pull_netr_UserFlags(ndr, NDR_SCALARS, &r->user_flags));
+ NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->key));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->logon_server));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_sid));
+ if (_ptr_domain_sid) {
+ NDR_PULL_ALLOC(ndr, r->domain_sid);
+ } else {
+ r->domain_sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_LMSessionKey(ndr, NDR_SCALARS, &r->LMSessKey));
+ NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
+ for (cntr_unknown_0 = 0; cntr_unknown_0 < 7; 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_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
+ NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->groups));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->logon_server));
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain));
+ if (r->domain_sid) {
+ _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r)
+{
+ uint32_t cntr_unknown_0;
+ ndr_print_struct(ndr, name, "netr_SamBaseInfo");
+ ndr->depth++;
+ ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
+ ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
+ ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
+ ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
+ ndr_print_NTTIME(ndr, "allow_password_change", r->allow_password_change);
+ ndr_print_NTTIME(ndr, "force_password_change", r->force_password_change);
+ ndr_print_lsa_String(ndr, "account_name", &r->account_name);
+ ndr_print_lsa_String(ndr, "full_name", &r->full_name);
+ ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
+ ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
+ ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
+ ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
+ ndr_print_uint16(ndr, "logon_count", r->logon_count);
+ ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
+ ndr_print_uint32(ndr, "rid", r->rid);
+ ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
+ ndr_print_samr_RidWithAttributeArray(ndr, "groups", &r->groups);
+ ndr_print_netr_UserFlags(ndr, "user_flags", r->user_flags);
+ ndr_print_netr_UserSessionKey(ndr, "key", &r->key);
+ ndr_print_lsa_StringLarge(ndr, "logon_server", &r->logon_server);
+ ndr_print_lsa_StringLarge(ndr, "domain", &r->domain);
+ ndr_print_ptr(ndr, "domain_sid", r->domain_sid);
+ ndr->depth++;
+ if (r->domain_sid) {
+ ndr_print_dom_sid2(ndr, "domain_sid", r->domain_sid);
+ }
+ ndr->depth--;
+ ndr_print_netr_LMSessionKey(ndr, "LMSessKey", &r->LMSessKey);
+ ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown", 7);
+ ndr->depth++;
+ for (cntr_unknown_0=0;cntr_unknown_0<7;cntr_unknown_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_SamInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_SamInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_SamInfo2");
+ ndr->depth++;
+ ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_SidAttr(struct ndr_push *ndr, int ndr_flags, const struct netr_SidAttr *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_SidAttr(struct ndr_pull *ndr, int ndr_flags, struct netr_SidAttr *r)
+{
+ uint32_t _ptr_sid;
+ TALLOC_CTX *_mem_save_sid_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ 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);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r)
+{
+ ndr_print_struct(ndr, name, "netr_SidAttr");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "attribute", r->attribute);
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r)
+{
+ uint32_t cntr_sids_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ if (r->sids) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+ }
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r)
+{
+ uint32_t _ptr_sids;
+ uint32_t cntr_sids_1;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_sids_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+ if (_ptr_sids) {
+ NDR_PULL_ALLOC(ndr, r->sids);
+ } else {
+ r->sids = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ if (r->sids) {
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+ NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+ _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+ }
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+ }
+ if (r->sids) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r)
+{
+ uint32_t cntr_sids_1;
+ ndr_print_struct(ndr, name, "netr_SamInfo3");
+ ndr->depth++;
+ ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
+ ndr_print_uint32(ndr, "sidcount", r->sidcount);
+ ndr_print_ptr(ndr, "sids", r->sids);
+ ndr->depth++;
+ if (r->sids) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->sidcount);
+ ndr->depth++;
+ for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_sids_1);
+ if (idx_1) {
+ ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo6 *r)
+{
+ uint32_t cntr_sids_1;
+ uint32_t cntr_unknown4_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->forest));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principle));
+ for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ if (r->sids) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+ }
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+ }
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->forest));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principle));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo6 *r)
+{
+ uint32_t _ptr_sids;
+ uint32_t cntr_sids_1;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_sids_1;
+ uint32_t cntr_unknown4_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sidcount));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+ if (_ptr_sids) {
+ NDR_PULL_ALLOC(ndr, r->sids);
+ } else {
+ r->sids = NULL;
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->forest));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principle));
+ for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_SamBaseInfo(ndr, NDR_BUFFERS, &r->base));
+ if (r->sids) {
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+ NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+ _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+ }
+ for (cntr_sids_1 = 0; cntr_sids_1 < r->sidcount; cntr_sids_1++) {
+ NDR_CHECK(ndr_pull_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->forest));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principle));
+ if (r->sids) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r)
+{
+ uint32_t cntr_sids_1;
+ uint32_t cntr_unknown4_0;
+ ndr_print_struct(ndr, name, "netr_SamInfo6");
+ ndr->depth++;
+ ndr_print_netr_SamBaseInfo(ndr, "base", &r->base);
+ ndr_print_uint32(ndr, "sidcount", r->sidcount);
+ ndr_print_ptr(ndr, "sids", r->sids);
+ ndr->depth++;
+ if (r->sids) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->sidcount);
+ ndr->depth++;
+ for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_sids_1);
+ if (idx_1) {
+ ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_lsa_String(ndr, "forest", &r->forest);
+ ndr_print_lsa_String(ndr, "principle", &r->principle);
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown4", 20);
+ ndr->depth++;
+ for (cntr_unknown4_0=0;cntr_unknown4_0<20;cntr_unknown4_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown4_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_PacInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_PacInfo *r)
+{
+ uint32_t cntr_expansionroom_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->auth));
+ NDR_CHECK(ndr_push_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
+ for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < 10; cntr_expansionroom_0++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->expansionroom[cntr_expansionroom_0]));
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->pac) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pac_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pac, r->pac_size));
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
+ if (r->auth) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->auth, r->auth_size));
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_PacInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_PacInfo *r)
+{
+ uint32_t _ptr_pac;
+ TALLOC_CTX *_mem_save_pac_0;
+ uint32_t _ptr_auth;
+ TALLOC_CTX *_mem_save_auth_0;
+ uint32_t cntr_expansionroom_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pac_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
+ if (_ptr_pac) {
+ NDR_PULL_ALLOC(ndr, r->pac);
+ } else {
+ r->pac = NULL;
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_domain));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_server));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principal_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_auth));
+ if (_ptr_auth) {
+ NDR_PULL_ALLOC(ndr, r->auth);
+ } else {
+ r->auth = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_UserSessionKey(ndr, NDR_SCALARS, &r->user_session_key));
+ for (cntr_expansionroom_0 = 0; cntr_expansionroom_0 < 10; cntr_expansionroom_0++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->expansionroom[cntr_expansionroom_0]));
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ 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_array_size(ndr, &r->pac));
+ NDR_PULL_ALLOC_N(ndr, r->pac, ndr_get_array_size(ndr, &r->pac));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pac, ndr_get_array_size(ndr, &r->pac)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_domain));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_server));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principal_name));
+ if (r->auth) {
+ _mem_save_auth_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->auth, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->auth));
+ NDR_PULL_ALLOC_N(ndr, r->auth, ndr_get_array_size(ndr, &r->auth));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->auth, ndr_get_array_size(ndr, &r->auth)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_0, 0);
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ if (r->pac) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pac, r->pac_size));
+ }
+ if (r->auth) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->auth, r->auth_size));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r)
+{
+ uint32_t cntr_expansionroom_0;
+ ndr_print_struct(ndr, name, "netr_PacInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "pac_size", r->pac_size);
+ ndr_print_ptr(ndr, "pac", r->pac);
+ ndr->depth++;
+ if (r->pac) {
+ ndr_print_array_uint8(ndr, "pac", r->pac, r->pac_size);
+ }
+ ndr->depth--;
+ ndr_print_lsa_String(ndr, "logon_domain", &r->logon_domain);
+ ndr_print_lsa_String(ndr, "logon_server", &r->logon_server);
+ ndr_print_lsa_String(ndr, "principal_name", &r->principal_name);
+ ndr_print_uint32(ndr, "auth_size", r->auth_size);
+ ndr_print_ptr(ndr, "auth", r->auth);
+ ndr->depth++;
+ if (r->auth) {
+ ndr_print_array_uint8(ndr, "auth", r->auth, r->auth_size);
+ }
+ ndr->depth--;
+ ndr_print_netr_UserSessionKey(ndr, "user_session_key", &r->user_session_key);
+ ndr->print(ndr, "%s: ARRAY(%d)", "expansionroom", 10);
+ ndr->depth++;
+ for (cntr_expansionroom_0=0;cntr_expansionroom_0<10;cntr_expansionroom_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_expansionroom_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
+ break;
+
+ case 4:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
+ break;
+
+ case 6:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 2:
+ if (r->sam2) {
+ NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
+ }
+ break;
+
+ case 3:
+ if (r->sam3) {
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
+ }
+ break;
+
+ case 4:
+ if (r->pac) {
+ NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
+ }
+ break;
+
+ case 5:
+ if (r->pac) {
+ NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
+ }
+ break;
+
+ case 6:
+ if (r->sam6) {
+ NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r)
+{
+ int level;
+ uint16_t _level;
+ TALLOC_CTX *_mem_save_sam2_0;
+ TALLOC_CTX *_mem_save_sam3_0;
+ TALLOC_CTX *_mem_save_pac_0;
+ TALLOC_CTX *_mem_save_sam6_0;
+ 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 netr_Validation", _level);
+ }
+ switch (level) {
+ case 2: {
+ uint32_t _ptr_sam2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
+ if (_ptr_sam2) {
+ NDR_PULL_ALLOC(ndr, r->sam2);
+ } else {
+ r->sam2 = NULL;
+ }
+ break; }
+
+ case 3: {
+ uint32_t _ptr_sam3;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
+ if (_ptr_sam3) {
+ NDR_PULL_ALLOC(ndr, r->sam3);
+ } else {
+ r->sam3 = NULL;
+ }
+ break; }
+
+ case 4: {
+ uint32_t _ptr_pac;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
+ if (_ptr_pac) {
+ NDR_PULL_ALLOC(ndr, r->pac);
+ } else {
+ r->pac = NULL;
+ }
+ 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);
+ } else {
+ r->pac = NULL;
+ }
+ break; }
+
+ case 6: {
+ uint32_t _ptr_sam6;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
+ if (_ptr_sam6) {
+ NDR_PULL_ALLOC(ndr, r->sam6);
+ } else {
+ r->sam6 = 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 2:
+ if (r->sam2) {
+ _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
+ NDR_CHECK(ndr_pull_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam2_0, 0);
+ }
+ break;
+
+ case 3:
+ if (r->sam3) {
+ _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam3_0, 0);
+ }
+ break;
+
+ case 4:
+ 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);
+ }
+ 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);
+ }
+ break;
+
+ case 6:
+ if (r->sam6) {
+ _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
+ NDR_CHECK(ndr_pull_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam6_0, 0);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_Validation");
+ switch (level) {
+ case 2:
+ ndr_print_ptr(ndr, "sam2", r->sam2);
+ ndr->depth++;
+ if (r->sam2) {
+ ndr_print_netr_SamInfo2(ndr, "sam2", r->sam2);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "sam3", r->sam3);
+ ndr->depth++;
+ if (r->sam3) {
+ ndr_print_netr_SamInfo3(ndr, "sam3", r->sam3);
+ }
+ ndr->depth--;
+ break;
+
+ case 4:
+ ndr_print_ptr(ndr, "pac", r->pac);
+ ndr->depth++;
+ if (r->pac) {
+ ndr_print_netr_PacInfo(ndr, "pac", r->pac);
+ }
+ ndr->depth--;
+ break;
+
+ case 5:
+ ndr_print_ptr(ndr, "pac", r->pac);
+ ndr->depth++;
+ if (r->pac) {
+ ndr_print_netr_PacInfo(ndr, "pac", r->pac);
+ }
+ ndr->depth--;
+ break;
+
+ case 6:
+ ndr_print_ptr(ndr, "sam6", r->sam6);
+ ndr->depth++;
+ if (r->sam6) {
+ ndr_print_netr_SamInfo6(ndr, "sam6", r->sam6);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 1));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r)
+{
+ ndr_print_struct(ndr, name, "netr_Credential");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "data", r->data, 8);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->cred));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->cred));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r)
+{
+ ndr_print_struct(ndr, name, "netr_Authenticator");
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "cred", &r->cred);
+ ndr_print_time_t(ndr, "timestamp", r->timestamp);
+ ndr->depth--;
+}
+
+NTSTATUS 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) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->account_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_DELETE_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_USER *r)
+{
+ uint32_t _ptr_account_name;
+ TALLOC_CTX *_mem_save_account_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
+ if (_ptr_account_name) {
+ NDR_PULL_ALLOC(ndr, r->account_name);
+ } else {
+ r->account_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->account_name) {
+ _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->account_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
+ if (ndr_get_array_length(ndr, &r->account_name) > ndr_get_array_size(ndr, &r->account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->account_name), ndr_get_array_length(ndr, &r->account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, ndr_get_array_length(ndr, &r->account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_DELETE_USER");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "account_name", r->account_name);
+ ndr->depth++;
+ if (r->account_name) {
+ ndr_print_string(ndr, "account_name", r->account_name);
+ }
+ ndr->depth--;
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY16 *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_uint32(ndr, NDR_SCALARS, r->flags));
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY16 *r)
+{
+ 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_uint32(ndr, NDR_SCALARS, &r->flags));
+ 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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r)
+{
+ ndr_print_struct(ndr, name, "netr_USER_KEY16");
+ 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_uint32(ndr, "flags", r->flags);
+ ndr_print_samr_Password(ndr, "pwd", &r->pwd);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_PasswordHistory(struct ndr_push *ndr, int ndr_flags, const struct netr_PasswordHistory *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_length));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nt_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_flags));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_length));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lm_flags));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_PasswordHistory(struct ndr_pull *ndr, int ndr_flags, struct netr_PasswordHistory *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nt_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_flags));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lm_flags));
+ NDR_PULL_ALLOC_N(ndr, r->nt_history, r->nt_length);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->nt_history, r->nt_length));
+ NDR_PULL_ALLOC_N(ndr, r->lm_history, r->lm_length);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->lm_history, r->lm_length));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r)
+{
+ ndr_print_struct(ndr, name, "netr_PasswordHistory");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "nt_length", r->nt_length);
+ ndr_print_uint16(ndr, "nt_size", r->nt_size);
+ ndr_print_uint32(ndr, "nt_flags", r->nt_flags);
+ ndr_print_uint16(ndr, "lm_length", r->lm_length);
+ ndr_print_uint16(ndr, "lm_size", r->lm_size);
+ ndr_print_uint32(ndr, "lm_flags", r->lm_flags);
+ ndr_print_array_uint8(ndr, "nt_history", r->nt_history, r->nt_length);
+ ndr_print_array_uint8(ndr, "lm_history", r->lm_history, r->lm_length);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
+ NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->lmhistory));
+ }
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS2 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_SCALARS, &r->ntpassword));
+ NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->lmhistory));
+ }
+ 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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_USER_KEYS2");
+ ndr->depth++;
+ ndr_print_netr_USER_KEY16(ndr, "lmpassword", &r->lmpassword);
+ ndr_print_netr_USER_KEY16(ndr, "ntpassword", &r->ntpassword);
+ ndr_print_netr_PasswordHistory(ndr, "lmhistory", &r->lmhistory);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEY_UNION *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEY_UNION *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ 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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r)
+{
+ ndr_print_struct(ndr, name, "netr_USER_KEY_UNION");
+ ndr->depth++;
+ ndr_print_netr_USER_KEYS2(ndr, "keys2", &r->keys2);
+ ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *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_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 NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *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_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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r)
+{
+ ndr_print_struct(ndr, name, "netr_USER_KEYS");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "version", r->version);
+ ndr_print_netr_USER_KEY_UNION(ndr, "keys", &r->keys);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_USER_PRIVATE_INFO(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_PRIVATE_INFO *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->SensitiveDataFlag));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
+ {
+ uint32_t _flags_save_uint8 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->SensitiveData));
+ ndr->flags = _flags_save_uint8;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_uint8 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (r->SensitiveData) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, r->DataLength));
+ }
+ ndr->flags = _flags_save_uint8;
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_USER_PRIVATE_INFO(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_PRIVATE_INFO *r)
+{
+ uint32_t _ptr_SensitiveData;
+ TALLOC_CTX *_mem_save_SensitiveData_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->SensitiveDataFlag));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
+ {
+ uint32_t _flags_save_uint8 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_SensitiveData));
+ if (_ptr_SensitiveData) {
+ NDR_PULL_ALLOC(ndr, r->SensitiveData);
+ } else {
+ r->SensitiveData = NULL;
+ }
+ ndr->flags = _flags_save_uint8;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_uint8 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (r->SensitiveData) {
+ _mem_save_SensitiveData_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->SensitiveData, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->SensitiveData));
+ NDR_PULL_ALLOC_N(ndr, r->SensitiveData, ndr_get_array_size(ndr, &r->SensitiveData));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SensitiveData, ndr_get_array_size(ndr, &r->SensitiveData)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_SensitiveData_0, 0);
+ }
+ ndr->flags = _flags_save_uint8;
+ }
+ if (r->SensitiveData) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->SensitiveData, r->DataLength));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r)
+{
+ ndr_print_struct(ndr, name, "netr_USER_PRIVATE_INFO");
+ ndr->depth++;
+ ndr_print_uint8(ndr, "SensitiveDataFlag", r->SensitiveDataFlag);
+ ndr_print_uint32(ndr, "DataLength", r->DataLength);
+ ndr_print_ptr(ndr, "SensitiveData", r->SensitiveData);
+ ndr->depth++;
+ if (r->SensitiveData) {
+ ndr_print_array_uint8(ndr, "SensitiveData", r->SensitiveData, r->DataLength);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_USER *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->full_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->primary_gid));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->workstations));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logon));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_logoff));
+ NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bad_password_count));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logon_count));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_password_change));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->acct_expiry));
+ NDR_CHECK(ndr_push_samr_AcctFlags(ndr, NDR_SCALARS, r->acct_flags));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->nt_password_present));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->parameters));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
+ NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->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));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_USER *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->full_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->primary_gid));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_directory));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->home_drive));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->logon_script));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->workstations));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logon));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_logoff));
+ NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_SCALARS, &r->logon_hours));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bad_password_count));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logon_count));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_password_change));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->acct_expiry));
+ NDR_CHECK(ndr_pull_samr_AcctFlags(ndr, NDR_SCALARS, &r->acct_flags));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->lmpassword));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->ntpassword));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->nt_password_present));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->parameters));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
+ NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->profile_path));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->full_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_directory));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->home_drive));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->logon_script));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->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));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_USER");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "account_name", &r->account_name);
+ ndr_print_lsa_String(ndr, "full_name", &r->full_name);
+ ndr_print_uint32(ndr, "rid", r->rid);
+ ndr_print_uint32(ndr, "primary_gid", r->primary_gid);
+ ndr_print_lsa_String(ndr, "home_directory", &r->home_directory);
+ ndr_print_lsa_String(ndr, "home_drive", &r->home_drive);
+ ndr_print_lsa_String(ndr, "logon_script", &r->logon_script);
+ ndr_print_lsa_String(ndr, "description", &r->description);
+ ndr_print_lsa_String(ndr, "workstations", &r->workstations);
+ ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
+ ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
+ ndr_print_samr_LogonHours(ndr, "logon_hours", &r->logon_hours);
+ ndr_print_uint16(ndr, "bad_password_count", r->bad_password_count);
+ ndr_print_uint16(ndr, "logon_count", r->logon_count);
+ ndr_print_NTTIME(ndr, "last_password_change", r->last_password_change);
+ ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry);
+ ndr_print_samr_AcctFlags(ndr, "acct_flags", r->acct_flags);
+ ndr_print_samr_Password(ndr, "lmpassword", &r->lmpassword);
+ ndr_print_samr_Password(ndr, "ntpassword", &r->ntpassword);
+ ndr_print_uint8(ndr, "nt_password_present", r->nt_password_present);
+ ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
+ ndr_print_uint8(ndr, "password_expired", r->password_expired);
+ ndr_print_lsa_String(ndr, "comment", &r->comment);
+ ndr_print_lsa_String(ndr, "parameters", &r->parameters);
+ ndr_print_uint16(ndr, "country_code", r->country_code);
+ ndr_print_uint16(ndr, "code_page", r->code_page);
+ ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "profile_path", &r->profile_path);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DOMAIN *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
+ 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));
+ NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->max_password_age));
+ NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->min_password_age));
+ NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->domain_create_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_netr_AcctLockStr(ndr, NDR_SCALARS, &r->account_lockout));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logon_to_chgpass));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ 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_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_netr_AcctLockStr(ndr, NDR_BUFFERS, &r->account_lockout));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DOMAIN *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
+ 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));
+ NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->max_password_age));
+ NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->min_password_age));
+ NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->domain_create_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_netr_AcctLockStr(ndr, NDR_SCALARS, &r->account_lockout));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logon_to_chgpass));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ 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_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_netr_AcctLockStr(ndr, NDR_BUFFERS, &r->account_lockout));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r)
+{
+ 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_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);
+ ndr_print_dlong(ndr, "max_password_age", r->max_password_age);
+ ndr_print_dlong(ndr, "min_password_age", r->min_password_age);
+ ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
+ ndr_print_NTTIME(ndr, "domain_create_time", r->domain_create_time);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_netr_AcctLockStr(ndr, "account_lockout", &r->account_lockout);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "logon_to_chgpass", r->logon_to_chgpass);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_GROUP(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->group_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_GROUP(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->group_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->group_name));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_GROUP");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "group_name", &r->group_name);
+ ndr_print_uint32(ndr, "rid", r->rid);
+ ndr_print_uint32(ndr, "attributes", r->attributes);
+ ndr_print_lsa_String(ndr, "description", &r->description);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_RENAME(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_RENAME *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->OldName));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->NewName));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_RENAME(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_RENAME *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->OldName));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->NewName));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->OldName));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->NewName));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_RENAME");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "OldName", &r->OldName);
+ ndr_print_lsa_String(ndr, "NewName", &r->NewName);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_GROUP_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_GROUP_MEMBER *r)
+{
+ uint32_t cntr_rids_1;
+ uint32_t cntr_attribs_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->rids));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribs));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
+ 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));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->rids) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
+ for (cntr_rids_1 = 0; cntr_rids_1 < r->num_rids; cntr_rids_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rids[cntr_rids_1]));
+ }
+ }
+ if (r->attribs) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_rids));
+ for (cntr_attribs_1 = 0; cntr_attribs_1 < r->num_rids; cntr_attribs_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribs[cntr_attribs_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_GROUP_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_GROUP_MEMBER *r)
+{
+ uint32_t _ptr_rids;
+ uint32_t cntr_rids_1;
+ TALLOC_CTX *_mem_save_rids_0;
+ TALLOC_CTX *_mem_save_rids_1;
+ uint32_t _ptr_attribs;
+ uint32_t cntr_attribs_1;
+ TALLOC_CTX *_mem_save_attribs_0;
+ TALLOC_CTX *_mem_save_attribs_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rids));
+ if (_ptr_rids) {
+ NDR_PULL_ALLOC(ndr, r->rids);
+ } else {
+ r->rids = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribs));
+ if (_ptr_attribs) {
+ NDR_PULL_ALLOC(ndr, r->attribs);
+ } else {
+ r->attribs = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_rids));
+ 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->unknown3));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->rids) {
+ _mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
+ NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
+ _mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
+ for (cntr_rids_1 = 0; cntr_rids_1 < r->num_rids; cntr_rids_1++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
+ }
+ if (r->attribs) {
+ _mem_save_attribs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->attribs));
+ NDR_PULL_ALLOC_N(ndr, r->attribs, ndr_get_array_size(ndr, &r->attribs));
+ _mem_save_attribs_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->attribs, 0);
+ for (cntr_attribs_1 = 0; cntr_attribs_1 < r->num_rids; cntr_attribs_1++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribs[cntr_attribs_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribs_0, 0);
+ }
+ if (r->rids) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->rids, r->num_rids));
+ }
+ if (r->attribs) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attribs, r->num_rids));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r)
+{
+ uint32_t cntr_rids_1;
+ uint32_t cntr_attribs_1;
+ ndr_print_struct(ndr, name, "netr_DELTA_GROUP_MEMBER");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "rids", r->rids);
+ ndr->depth++;
+ if (r->rids) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "rids", r->num_rids);
+ ndr->depth++;
+ for (cntr_rids_1=0;cntr_rids_1<r->num_rids;cntr_rids_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_rids_1);
+ if (idx_1) {
+ ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "attribs", r->attribs);
+ ndr->depth++;
+ if (r->attribs) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "attribs", r->num_rids);
+ ndr->depth++;
+ for (cntr_attribs_1=0;cntr_attribs_1<r->num_rids;cntr_attribs_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_attribs_1);
+ if (idx_1) {
+ ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "num_rids", r->num_rids);
+ ndr_print_uint32(ndr, "unknown1", r->unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_uint32(ndr, "unknown3", r->unknown3);
+ ndr_print_uint32(ndr, "unknown4", r->unknown4);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_ALIAS(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ALIAS(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->alias_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->description));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->alias_name));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_ALIAS");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "alias_name", &r->alias_name);
+ ndr_print_uint32(ndr, "rid", r->rid);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "description", &r->description);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_ALIAS_MEMBER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ALIAS_MEMBER *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
+ 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));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ALIAS_MEMBER(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ALIAS_MEMBER *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS, &r->sids));
+ 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->unknown3));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_BUFFERS, &r->sids));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_ALIAS_MEMBER");
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", &r->sids);
+ ndr_print_uint32(ndr, "unknown1", r->unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_uint32(ndr, "unknown3", r->unknown3);
+ ndr_print_uint32(ndr, "unknown4", r->unknown4);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_QUOTA_LIMITS(struct ndr_push *ndr, int ndr_flags, const struct netr_QUOTA_LIMITS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagedpoollimit));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nonpagedpoollimit));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minimumworkingsetsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maximumworkingsetsize));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefilelimit));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timelimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_QUOTA_LIMITS(struct ndr_pull *ndr, int ndr_flags, struct netr_QUOTA_LIMITS *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagedpoollimit));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nonpagedpoollimit));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minimumworkingsetsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maximumworkingsetsize));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefilelimit));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timelimit));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r)
+{
+ ndr_print_struct(ndr, name, "netr_QUOTA_LIMITS");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "pagedpoollimit", r->pagedpoollimit);
+ ndr_print_uint32(ndr, "nonpagedpoollimit", r->nonpagedpoollimit);
+ ndr_print_uint32(ndr, "minimumworkingsetsize", r->minimumworkingsetsize);
+ ndr_print_uint32(ndr, "maximumworkingsetsize", r->maximumworkingsetsize);
+ ndr_print_uint32(ndr, "pagefilelimit", r->pagefilelimit);
+ ndr_print_NTTIME(ndr, "timelimit", r->timelimit);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_POLICY *r)
+{
+ uint32_t cntr_eventauditoptions_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlogsize));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->auditretentionperiod));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auditingmode));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->eventauditoptions));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
+ NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->eventauditoptions) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount+1));
+ for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount+1; cntr_eventauditoptions_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
+ }
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_POLICY *r)
+{
+ uint32_t _ptr_eventauditoptions;
+ uint32_t cntr_eventauditoptions_1;
+ TALLOC_CTX *_mem_save_eventauditoptions_0;
+ TALLOC_CTX *_mem_save_eventauditoptions_1;
+ uint32_t _ptr_sid;
+ TALLOC_CTX *_mem_save_sid_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlogsize));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->auditretentionperiod));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auditingmode));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxauditeventcount));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventauditoptions));
+ if (_ptr_eventauditoptions) {
+ NDR_PULL_ALLOC(ndr, r->eventauditoptions);
+ } else {
+ r->eventauditoptions = NULL;
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary_domain_name));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quota_limits));
+ NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->eventauditoptions) {
+ _mem_save_eventauditoptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->eventauditoptions));
+ NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, ndr_get_array_size(ndr, &r->eventauditoptions));
+ _mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
+ for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount+1; cntr_eventauditoptions_1++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_0, 0);
+ }
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary_domain_name));
+ 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);
+ }
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ if (r->eventauditoptions) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount+1));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r)
+{
+ uint32_t cntr_eventauditoptions_1;
+ ndr_print_struct(ndr, name, "netr_DELTA_POLICY");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "maxlogsize", r->maxlogsize);
+ ndr_print_NTTIME(ndr, "auditretentionperiod", r->auditretentionperiod);
+ ndr_print_uint8(ndr, "auditingmode", r->auditingmode);
+ ndr_print_uint32(ndr, "maxauditeventcount", r->maxauditeventcount);
+ ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
+ ndr->depth++;
+ if (r->eventauditoptions) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "eventauditoptions", r->maxauditeventcount+1);
+ ndr->depth++;
+ for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1<r->maxauditeventcount+1;cntr_eventauditoptions_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1);
+ if (idx_1) {
+ ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_lsa_String(ndr, "primary_domain_name", &r->primary_domain_name);
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ ndr_print_netr_QUOTA_LIMITS(ndr, "quota_limits", &r->quota_limits);
+ ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
+ ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_TRUSTED_DOMAIN(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_TRUSTED_DOMAIN *r)
+{
+ uint32_t cntr_controller_names_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->controller_names));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
+ if (r->controller_names) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_controllers));
+ for (cntr_controller_names_1 = 0; cntr_controller_names_1 < r->num_controllers; cntr_controller_names_1++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
+ }
+ for (cntr_controller_names_1 = 0; cntr_controller_names_1 < r->num_controllers; cntr_controller_names_1++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
+ }
+ }
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_TRUSTED_DOMAIN(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_TRUSTED_DOMAIN *r)
+{
+ uint32_t _ptr_controller_names;
+ uint32_t cntr_controller_names_1;
+ TALLOC_CTX *_mem_save_controller_names_0;
+ TALLOC_CTX *_mem_save_controller_names_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_controllers));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_controller_names));
+ if (_ptr_controller_names) {
+ NDR_PULL_ALLOC(ndr, r->controller_names);
+ } else {
+ r->controller_names = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
+ if (r->controller_names) {
+ _mem_save_controller_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->controller_names));
+ NDR_PULL_ALLOC_N(ndr, r->controller_names, ndr_get_array_size(ndr, &r->controller_names));
+ _mem_save_controller_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->controller_names, 0);
+ for (cntr_controller_names_1 = 0; cntr_controller_names_1 < r->num_controllers; cntr_controller_names_1++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->controller_names[cntr_controller_names_1]));
+ }
+ for (cntr_controller_names_1 = 0; cntr_controller_names_1 < r->num_controllers; cntr_controller_names_1++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->controller_names[cntr_controller_names_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_controller_names_0, 0);
+ }
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ if (r->controller_names) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->controller_names, r->num_controllers));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r)
+{
+ uint32_t cntr_controller_names_1;
+ ndr_print_struct(ndr, name, "netr_DELTA_TRUSTED_DOMAIN");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
+ ndr_print_uint32(ndr, "num_controllers", r->num_controllers);
+ ndr_print_ptr(ndr, "controller_names", r->controller_names);
+ ndr->depth++;
+ if (r->controller_names) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "controller_names", r->num_controllers);
+ ndr->depth++;
+ for (cntr_controller_names_1=0;cntr_controller_names_1<r->num_controllers;cntr_controller_names_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_controller_names_1);
+ if (idx_1) {
+ ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_DELETE_TRUST(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_TRUST *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_DELETE_TRUST(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_TRUST *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_TRUST *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_DELETE_TRUST");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ACCOUNT *r)
+{
+ uint32_t cntr_privilege_attrib_1;
+ uint32_t cntr_privilege_name_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_control));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_attrib));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->privilege_name));
+ NDR_CHECK(ndr_push_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->system_flags));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->privilege_attrib) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
+ for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < r->privilege_entries; cntr_privilege_attrib_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_attrib[cntr_privilege_attrib_1]));
+ }
+ }
+ if (r->privilege_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->privilege_entries));
+ for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < r->privilege_entries; cntr_privilege_name_1++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
+ }
+ for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < r->privilege_entries; cntr_privilege_name_1++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
+ }
+ }
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ACCOUNT *r)
+{
+ uint32_t _ptr_privilege_attrib;
+ uint32_t cntr_privilege_attrib_1;
+ TALLOC_CTX *_mem_save_privilege_attrib_0;
+ TALLOC_CTX *_mem_save_privilege_attrib_1;
+ uint32_t _ptr_privilege_name;
+ uint32_t cntr_privilege_name_1;
+ TALLOC_CTX *_mem_save_privilege_name_0;
+ TALLOC_CTX *_mem_save_privilege_name_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_entries));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_control));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_attrib));
+ if (_ptr_privilege_attrib) {
+ NDR_PULL_ALLOC(ndr, r->privilege_attrib);
+ } else {
+ r->privilege_attrib = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privilege_name));
+ if (_ptr_privilege_name) {
+ NDR_PULL_ALLOC(ndr, r->privilege_name);
+ } else {
+ r->privilege_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_QUOTA_LIMITS(ndr, NDR_SCALARS, &r->quotalimits));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->system_flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->privilege_attrib) {
+ _mem_save_privilege_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_attrib));
+ NDR_PULL_ALLOC_N(ndr, r->privilege_attrib, ndr_get_array_size(ndr, &r->privilege_attrib));
+ _mem_save_privilege_attrib_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->privilege_attrib, 0);
+ for (cntr_privilege_attrib_1 = 0; cntr_privilege_attrib_1 < r->privilege_entries; cntr_privilege_attrib_1++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->privilege_attrib[cntr_privilege_attrib_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_attrib_0, 0);
+ }
+ if (r->privilege_name) {
+ _mem_save_privilege_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->privilege_name));
+ NDR_PULL_ALLOC_N(ndr, r->privilege_name, ndr_get_array_size(ndr, &r->privilege_name));
+ _mem_save_privilege_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->privilege_name, 0);
+ for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < r->privilege_entries; cntr_privilege_name_1++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->privilege_name[cntr_privilege_name_1]));
+ }
+ for (cntr_privilege_name_1 = 0; cntr_privilege_name_1 < r->privilege_entries; cntr_privilege_name_1++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->privilege_name[cntr_privilege_name_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privilege_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ if (r->privilege_attrib) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_attrib, r->privilege_entries));
+ }
+ if (r->privilege_name) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privilege_name, r->privilege_entries));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r)
+{
+ uint32_t cntr_privilege_attrib_1;
+ uint32_t cntr_privilege_name_1;
+ ndr_print_struct(ndr, name, "netr_DELTA_ACCOUNT");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "privilege_entries", r->privilege_entries);
+ ndr_print_uint32(ndr, "privilege_control", r->privilege_control);
+ ndr_print_ptr(ndr, "privilege_attrib", r->privilege_attrib);
+ ndr->depth++;
+ if (r->privilege_attrib) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "privilege_attrib", r->privilege_entries);
+ ndr->depth++;
+ for (cntr_privilege_attrib_1=0;cntr_privilege_attrib_1<r->privilege_entries;cntr_privilege_attrib_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1);
+ if (idx_1) {
+ ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "privilege_name", r->privilege_name);
+ ndr->depth++;
+ if (r->privilege_name) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "privilege_name", r->privilege_entries);
+ ndr->depth++;
+ for (cntr_privilege_name_1=0;cntr_privilege_name_1<r->privilege_entries;cntr_privilege_name_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_privilege_name_1);
+ if (idx_1) {
+ ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_netr_QUOTA_LIMITS(ndr, "quotalimits", &r->quotalimits);
+ ndr_print_uint32(ndr, "system_flags", r->system_flags);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_DELETE_ACCOUNT(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_ACCOUNT *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_DELETE_ACCOUNT(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_ACCOUNT *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_ACCOUNT *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_DELETE_ACCOUNT");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_DELETE_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_SECRET *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_DELETE_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_DELETE_SECRET *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_SECRET *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_DELETE_SECRET");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_CIPHER_VALUE(struct ndr_push *ndr, int ndr_flags, const struct netr_CIPHER_VALUE *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->cipher_data));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->cipher_data) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlen));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->cipher_data, r->len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_CIPHER_VALUE(struct ndr_pull *ndr, int ndr_flags, struct netr_CIPHER_VALUE *r)
+{
+ uint32_t _ptr_cipher_data;
+ TALLOC_CTX *_mem_save_cipher_data_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlen));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cipher_data));
+ if (_ptr_cipher_data) {
+ NDR_PULL_ALLOC(ndr, r->cipher_data);
+ } else {
+ r->cipher_data = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->cipher_data) {
+ _mem_save_cipher_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->cipher_data, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->cipher_data));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->cipher_data));
+ if (ndr_get_array_length(ndr, &r->cipher_data) > ndr_get_array_size(ndr, &r->cipher_data)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->cipher_data), ndr_get_array_length(ndr, &r->cipher_data));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->cipher_data, ndr_get_array_size(ndr, &r->cipher_data));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->cipher_data, ndr_get_array_length(ndr, &r->cipher_data)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cipher_data_0, 0);
+ }
+ if (r->cipher_data) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->cipher_data, r->maxlen));
+ }
+ if (r->cipher_data) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->cipher_data, r->len));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r)
+{
+ ndr_print_struct(ndr, name, "netr_CIPHER_VALUE");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "len", r->len);
+ ndr_print_uint32(ndr, "maxlen", r->maxlen);
+ ndr_print_ptr(ndr, "cipher_data", r->cipher_data);
+ ndr->depth++;
+ if (r->cipher_data) {
+ ndr_print_array_uint8(ndr, "cipher_data", r->cipher_data, r->len);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_SECRET(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_SECRET *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->current_cipher_set_time));
+ NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->old_cipher_set_time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SecurityInformation));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
+ NDR_CHECK(ndr_push_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
+ NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_SECRET(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_SECRET *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->current_cipher));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->current_cipher_set_time));
+ NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_SCALARS, &r->old_cipher));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->old_cipher_set_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SecurityInformation));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown8));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->current_cipher));
+ NDR_CHECK(ndr_pull_netr_CIPHER_VALUE(ndr, NDR_BUFFERS, &r->old_cipher));
+ NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown1));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_SECRET");
+ ndr->depth++;
+ ndr_print_netr_CIPHER_VALUE(ndr, "current_cipher", &r->current_cipher);
+ ndr_print_NTTIME(ndr, "current_cipher_set_time", r->current_cipher_set_time);
+ ndr_print_netr_CIPHER_VALUE(ndr, "old_cipher", &r->old_cipher);
+ ndr_print_NTTIME(ndr, "old_cipher_set_time", r->old_cipher_set_time);
+ ndr_print_uint32(ndr, "SecurityInformation", r->SecurityInformation);
+ ndr_print_sec_desc_buf(ndr, "sdbuf", &r->sdbuf);
+ ndr_print_lsa_String(ndr, "unknown1", &r->unknown1);
+ ndr_print_lsa_String(ndr, "unknown2", &r->unknown2);
+ ndr_print_lsa_String(ndr, "unknown3", &r->unknown3);
+ ndr_print_lsa_String(ndr, "unknown4", &r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->unknown7);
+ ndr_print_uint32(ndr, "unknown8", r->unknown8);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DeltaEnum(struct ndr_push *ndr, int ndr_flags, enum netr_DeltaEnum r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DeltaEnum(struct ndr_pull *ndr, int ndr_flags, enum netr_DeltaEnum *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case NETR_DELTA_DOMAIN: val = "NETR_DELTA_DOMAIN"; break;
+ case NETR_DELTA_GROUP: val = "NETR_DELTA_GROUP"; break;
+ case NETR_DELTA_DELETE_GROUP: val = "NETR_DELTA_DELETE_GROUP"; break;
+ case NETR_DELTA_RENAME_GROUP: val = "NETR_DELTA_RENAME_GROUP"; break;
+ case NETR_DELTA_USER: val = "NETR_DELTA_USER"; break;
+ case NETR_DELTA_DELETE_USER: val = "NETR_DELTA_DELETE_USER"; break;
+ case NETR_DELTA_RENAME_USER: val = "NETR_DELTA_RENAME_USER"; break;
+ case NETR_DELTA_GROUP_MEMBER: val = "NETR_DELTA_GROUP_MEMBER"; break;
+ case NETR_DELTA_ALIAS: val = "NETR_DELTA_ALIAS"; break;
+ case NETR_DELTA_DELETE_ALIAS: val = "NETR_DELTA_DELETE_ALIAS"; break;
+ case NETR_DELTA_RENAME_ALIAS: val = "NETR_DELTA_RENAME_ALIAS"; break;
+ case NETR_DELTA_ALIAS_MEMBER: val = "NETR_DELTA_ALIAS_MEMBER"; break;
+ case NETR_DELTA_POLICY: val = "NETR_DELTA_POLICY"; break;
+ case NETR_DELTA_TRUSTED_DOMAIN: val = "NETR_DELTA_TRUSTED_DOMAIN"; break;
+ case NETR_DELTA_DELETE_TRUST: val = "NETR_DELTA_DELETE_TRUST"; break;
+ case NETR_DELTA_ACCOUNT: val = "NETR_DELTA_ACCOUNT"; break;
+ case NETR_DELTA_DELETE_ACCOUNT: val = "NETR_DELTA_DELETE_ACCOUNT"; break;
+ case NETR_DELTA_SECRET: val = "NETR_DELTA_SECRET"; break;
+ case NETR_DELTA_DELETE_SECRET: val = "NETR_DELTA_DELETE_SECRET"; break;
+ case NETR_DELTA_DELETE_GROUP2: val = "NETR_DELTA_DELETE_GROUP2"; break;
+ case NETR_DELTA_DELETE_USER2: val = "NETR_DELTA_DELETE_USER2"; break;
+ case NETR_DELTA_MODIFY_COUNT: val = "NETR_DELTA_MODIFY_COUNT"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_netr_DELTA_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_UNION *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ break;
+
+ case NETR_DELTA_GROUP:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->group));
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_group));
+ break;
+
+ case NETR_DELTA_USER:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_user));
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_member));
+ break;
+
+ case NETR_DELTA_ALIAS:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias));
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->rename_alias));
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->alias_member));
+ break;
+
+ case NETR_DELTA_POLICY:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusted_domain));
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ NDR_CHECK(ndr_push_netr_DELTA_DELETE_TRUST(ndr, NDR_SCALARS, &r->delete_trust));
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->account));
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ NDR_CHECK(ndr_push_netr_DELTA_DELETE_ACCOUNT(ndr, NDR_SCALARS, &r->delete_account));
+ break;
+
+ case NETR_DELTA_SECRET:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->secret));
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ NDR_CHECK(ndr_push_netr_DELTA_DELETE_SECRET(ndr, NDR_SCALARS, &r->delete_secret));
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_group));
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->delete_user));
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->modified_count));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ if (r->domain) {
+ NDR_CHECK(ndr_push_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
+ }
+ break;
+
+ case NETR_DELTA_GROUP:
+ if (r->group) {
+ NDR_CHECK(ndr_push_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ if (r->rename_group) {
+ NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
+ }
+ break;
+
+ case NETR_DELTA_USER:
+ if (r->user) {
+ NDR_CHECK(ndr_push_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ if (r->rename_user) {
+ NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
+ }
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ if (r->group_member) {
+ NDR_CHECK(ndr_push_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
+ }
+ break;
+
+ case NETR_DELTA_ALIAS:
+ if (r->alias) {
+ NDR_CHECK(ndr_push_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ if (r->rename_alias) {
+ NDR_CHECK(ndr_push_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
+ }
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ if (r->alias_member) {
+ NDR_CHECK(ndr_push_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
+ }
+ break;
+
+ case NETR_DELTA_POLICY:
+ if (r->policy) {
+ NDR_CHECK(ndr_push_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
+ }
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ if (r->trusted_domain) {
+ NDR_CHECK(ndr_push_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ if (r->account) {
+ NDR_CHECK(ndr_push_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ break;
+
+ case NETR_DELTA_SECRET:
+ if (r->secret) {
+ NDR_CHECK(ndr_push_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ if (r->delete_group) {
+ NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ if (r->delete_user) {
+ NDR_CHECK(ndr_push_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
+ }
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ if (r->modified_count) {
+ NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->modified_count));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_UNION *r)
+{
+ int level;
+ uint16_t _level;
+ TALLOC_CTX *_mem_save_domain_0;
+ TALLOC_CTX *_mem_save_group_0;
+ TALLOC_CTX *_mem_save_rename_group_0;
+ TALLOC_CTX *_mem_save_user_0;
+ TALLOC_CTX *_mem_save_rename_user_0;
+ TALLOC_CTX *_mem_save_group_member_0;
+ TALLOC_CTX *_mem_save_alias_0;
+ TALLOC_CTX *_mem_save_rename_alias_0;
+ TALLOC_CTX *_mem_save_alias_member_0;
+ TALLOC_CTX *_mem_save_policy_0;
+ TALLOC_CTX *_mem_save_trusted_domain_0;
+ TALLOC_CTX *_mem_save_account_0;
+ TALLOC_CTX *_mem_save_secret_0;
+ TALLOC_CTX *_mem_save_delete_group_0;
+ TALLOC_CTX *_mem_save_delete_user_0;
+ TALLOC_CTX *_mem_save_modified_count_0;
+ 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 netr_DELTA_UNION", _level);
+ }
+ switch (level) {
+ case NETR_DELTA_DOMAIN: {
+ uint32_t _ptr_domain;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_GROUP: {
+ uint32_t _ptr_group;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group));
+ if (_ptr_group) {
+ NDR_PULL_ALLOC(ndr, r->group);
+ } else {
+ r->group = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_GROUP: {
+ break; }
+
+ case NETR_DELTA_RENAME_GROUP: {
+ uint32_t _ptr_rename_group;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_group));
+ if (_ptr_rename_group) {
+ NDR_PULL_ALLOC(ndr, r->rename_group);
+ } else {
+ r->rename_group = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_USER: {
+ uint32_t _ptr_user;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
+ if (_ptr_user) {
+ NDR_PULL_ALLOC(ndr, r->user);
+ } else {
+ r->user = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_USER: {
+ break; }
+
+ case NETR_DELTA_RENAME_USER: {
+ uint32_t _ptr_rename_user;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_user));
+ if (_ptr_rename_user) {
+ NDR_PULL_ALLOC(ndr, r->rename_user);
+ } else {
+ r->rename_user = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_GROUP_MEMBER: {
+ uint32_t _ptr_group_member;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_member));
+ if (_ptr_group_member) {
+ NDR_PULL_ALLOC(ndr, r->group_member);
+ } else {
+ r->group_member = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_ALIAS: {
+ uint32_t _ptr_alias;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias));
+ if (_ptr_alias) {
+ NDR_PULL_ALLOC(ndr, r->alias);
+ } else {
+ r->alias = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_ALIAS: {
+ break; }
+
+ case NETR_DELTA_RENAME_ALIAS: {
+ uint32_t _ptr_rename_alias;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rename_alias));
+ if (_ptr_rename_alias) {
+ NDR_PULL_ALLOC(ndr, r->rename_alias);
+ } else {
+ r->rename_alias = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_ALIAS_MEMBER: {
+ uint32_t _ptr_alias_member;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alias_member));
+ if (_ptr_alias_member) {
+ NDR_PULL_ALLOC(ndr, r->alias_member);
+ } else {
+ r->alias_member = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_POLICY: {
+ uint32_t _ptr_policy;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
+ if (_ptr_policy) {
+ NDR_PULL_ALLOC(ndr, r->policy);
+ } else {
+ r->policy = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_TRUSTED_DOMAIN: {
+ uint32_t _ptr_trusted_domain;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusted_domain));
+ if (_ptr_trusted_domain) {
+ NDR_PULL_ALLOC(ndr, r->trusted_domain);
+ } else {
+ r->trusted_domain = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_TRUST: {
+ NDR_CHECK(ndr_pull_netr_DELTA_DELETE_TRUST(ndr, NDR_SCALARS, &r->delete_trust));
+ break; }
+
+ case NETR_DELTA_ACCOUNT: {
+ uint32_t _ptr_account;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account));
+ if (_ptr_account) {
+ NDR_PULL_ALLOC(ndr, r->account);
+ } else {
+ r->account = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_ACCOUNT: {
+ NDR_CHECK(ndr_pull_netr_DELTA_DELETE_ACCOUNT(ndr, NDR_SCALARS, &r->delete_account));
+ break; }
+
+ case NETR_DELTA_SECRET: {
+ uint32_t _ptr_secret;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secret));
+ if (_ptr_secret) {
+ NDR_PULL_ALLOC(ndr, r->secret);
+ } else {
+ r->secret = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_SECRET: {
+ NDR_CHECK(ndr_pull_netr_DELTA_DELETE_SECRET(ndr, NDR_SCALARS, &r->delete_secret));
+ break; }
+
+ case NETR_DELTA_DELETE_GROUP2: {
+ uint32_t _ptr_delete_group;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_group));
+ if (_ptr_delete_group) {
+ NDR_PULL_ALLOC(ndr, r->delete_group);
+ } else {
+ r->delete_group = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_USER2: {
+ uint32_t _ptr_delete_user;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delete_user));
+ if (_ptr_delete_user) {
+ NDR_PULL_ALLOC(ndr, r->delete_user);
+ } else {
+ r->delete_user = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_MODIFY_COUNT: {
+ uint32_t _ptr_modified_count;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_modified_count));
+ if (_ptr_modified_count) {
+ NDR_PULL_ALLOC(ndr, r->modified_count);
+ } else {
+ r->modified_count = 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 NETR_DELTA_DOMAIN:
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_GROUP:
+ if (r->group) {
+ _mem_save_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->group, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_GROUP(ndr, NDR_SCALARS|NDR_BUFFERS, r->group));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ if (r->rename_group) {
+ _mem_save_rename_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->rename_group, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_group));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_group_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_USER:
+ if (r->user) {
+ _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->user));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ if (r->rename_user) {
+ _mem_save_rename_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->rename_user, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_user));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_user_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ if (r->group_member) {
+ _mem_save_group_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->group_member, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_GROUP_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->group_member));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_member_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_ALIAS:
+ if (r->alias) {
+ _mem_save_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->alias, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ALIAS(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ if (r->rename_alias) {
+ _mem_save_rename_alias_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->rename_alias, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_RENAME(ndr, NDR_SCALARS|NDR_BUFFERS, r->rename_alias));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rename_alias_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ if (r->alias_member) {
+ _mem_save_alias_member_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->alias_member, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ALIAS_MEMBER(ndr, NDR_SCALARS|NDR_BUFFERS, r->alias_member));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alias_member_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_POLICY:
+ 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_netr_DELTA_POLICY(ndr, NDR_SCALARS|NDR_BUFFERS, r->policy));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ if (r->trusted_domain) {
+ _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->trusted_domain, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_TRUSTED_DOMAIN(ndr, NDR_SCALARS|NDR_BUFFERS, r->trusted_domain));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ if (r->account) {
+ _mem_save_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->account, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ACCOUNT(ndr, NDR_SCALARS|NDR_BUFFERS, r->account));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ break;
+
+ case NETR_DELTA_SECRET:
+ if (r->secret) {
+ _mem_save_secret_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->secret, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_SECRET(ndr, NDR_SCALARS|NDR_BUFFERS, r->secret));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secret_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ if (r->delete_group) {
+ _mem_save_delete_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->delete_group, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_group));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_group_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ if (r->delete_user) {
+ _mem_save_delete_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->delete_user, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_DELETE_USER(ndr, NDR_SCALARS|NDR_BUFFERS, r->delete_user));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delete_user_0, 0);
+ }
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ if (r->modified_count) {
+ _mem_save_modified_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->modified_count, 0);
+ NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->modified_count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_modified_count_0, 0);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_DELTA_UNION");
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_netr_DELTA_DOMAIN(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_GROUP:
+ ndr_print_ptr(ndr, "group", r->group);
+ ndr->depth++;
+ if (r->group) {
+ ndr_print_netr_DELTA_GROUP(ndr, "group", r->group);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ ndr_print_ptr(ndr, "rename_group", r->rename_group);
+ ndr->depth++;
+ if (r->rename_group) {
+ ndr_print_netr_DELTA_RENAME(ndr, "rename_group", r->rename_group);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_USER:
+ ndr_print_ptr(ndr, "user", r->user);
+ ndr->depth++;
+ if (r->user) {
+ ndr_print_netr_DELTA_USER(ndr, "user", r->user);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ ndr_print_ptr(ndr, "rename_user", r->rename_user);
+ ndr->depth++;
+ if (r->rename_user) {
+ ndr_print_netr_DELTA_RENAME(ndr, "rename_user", r->rename_user);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ ndr_print_ptr(ndr, "group_member", r->group_member);
+ ndr->depth++;
+ if (r->group_member) {
+ ndr_print_netr_DELTA_GROUP_MEMBER(ndr, "group_member", r->group_member);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_ALIAS:
+ ndr_print_ptr(ndr, "alias", r->alias);
+ ndr->depth++;
+ if (r->alias) {
+ ndr_print_netr_DELTA_ALIAS(ndr, "alias", r->alias);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ ndr_print_ptr(ndr, "rename_alias", r->rename_alias);
+ ndr->depth++;
+ if (r->rename_alias) {
+ ndr_print_netr_DELTA_RENAME(ndr, "rename_alias", r->rename_alias);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ ndr_print_ptr(ndr, "alias_member", r->alias_member);
+ ndr->depth++;
+ if (r->alias_member) {
+ ndr_print_netr_DELTA_ALIAS_MEMBER(ndr, "alias_member", r->alias_member);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_POLICY:
+ ndr_print_ptr(ndr, "policy", r->policy);
+ ndr->depth++;
+ if (r->policy) {
+ ndr_print_netr_DELTA_POLICY(ndr, "policy", r->policy);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ ndr_print_ptr(ndr, "trusted_domain", r->trusted_domain);
+ ndr->depth++;
+ if (r->trusted_domain) {
+ ndr_print_netr_DELTA_TRUSTED_DOMAIN(ndr, "trusted_domain", r->trusted_domain);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ ndr_print_netr_DELTA_DELETE_TRUST(ndr, "delete_trust", &r->delete_trust);
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ ndr_print_ptr(ndr, "account", r->account);
+ ndr->depth++;
+ if (r->account) {
+ ndr_print_netr_DELTA_ACCOUNT(ndr, "account", r->account);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ ndr_print_netr_DELTA_DELETE_ACCOUNT(ndr, "delete_account", &r->delete_account);
+ break;
+
+ case NETR_DELTA_SECRET:
+ ndr_print_ptr(ndr, "secret", r->secret);
+ ndr->depth++;
+ if (r->secret) {
+ ndr_print_netr_DELTA_SECRET(ndr, "secret", r->secret);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ ndr_print_netr_DELTA_DELETE_SECRET(ndr, "delete_secret", &r->delete_secret);
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ ndr_print_ptr(ndr, "delete_group", r->delete_group);
+ ndr->depth++;
+ if (r->delete_group) {
+ ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_group", r->delete_group);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ ndr_print_ptr(ndr, "delete_user", r->delete_user);
+ ndr->depth++;
+ if (r->delete_user) {
+ ndr_print_netr_DELTA_DELETE_USER(ndr, "delete_user", r->delete_user);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ ndr_print_ptr(ndr, "modified_count", r->modified_count);
+ ndr->depth++;
+ if (r->modified_count) {
+ ndr_print_udlong(ndr, "modified_count", *r->modified_count);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_netr_DELTA_ID_UNION(struct ndr_push *ndr, int ndr_flags, const union netr_DELTA_ID_UNION *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_GROUP:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_USER:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_ALIAS:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_POLICY:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ break;
+
+ case NETR_DELTA_SECRET:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ break;
+
+ case NETR_DELTA_GROUP:
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ break;
+
+ case NETR_DELTA_USER:
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ break;
+
+ case NETR_DELTA_ALIAS:
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ break;
+
+ case NETR_DELTA_POLICY:
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+ }
+ break;
+
+ case NETR_DELTA_SECRET:
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ if (r->name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ID_UNION(struct ndr_pull *ndr, int ndr_flags, union netr_DELTA_ID_UNION *r)
+{
+ int level;
+ uint16_t _level;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_name_0;
+ 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 netr_DELTA_ID_UNION", _level);
+ }
+ switch (level) {
+ case NETR_DELTA_DOMAIN: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_GROUP: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_DELETE_GROUP: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_RENAME_GROUP: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_USER: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_DELETE_USER: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_RENAME_USER: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_GROUP_MEMBER: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_ALIAS: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_DELETE_ALIAS: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_RENAME_ALIAS: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_ALIAS_MEMBER: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_POLICY: {
+ uint32_t _ptr_sid;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_TRUSTED_DOMAIN: {
+ uint32_t _ptr_sid;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_TRUST: {
+ uint32_t _ptr_sid;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_ACCOUNT: {
+ uint32_t _ptr_sid;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_ACCOUNT: {
+ uint32_t _ptr_sid;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_SECRET: {
+ uint32_t _ptr_name;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_SECRET: {
+ uint32_t _ptr_name;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->name);
+ } else {
+ r->name = NULL;
+ }
+ break; }
+
+ case NETR_DELTA_DELETE_GROUP2: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_DELETE_USER2: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+ break; }
+
+ case NETR_DELTA_MODIFY_COUNT: {
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ break;
+
+ case NETR_DELTA_GROUP:
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ break;
+
+ case NETR_DELTA_USER:
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ break;
+
+ case NETR_DELTA_ALIAS:
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ break;
+
+ case NETR_DELTA_POLICY:
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_SECRET:
+ 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_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ 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_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
+ 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);
+ }
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_DELTA_ID_UNION");
+ switch (level) {
+ case NETR_DELTA_DOMAIN:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_GROUP:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_DELETE_GROUP:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_RENAME_GROUP:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_USER:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_DELETE_USER:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_RENAME_USER:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_GROUP_MEMBER:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_ALIAS:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_DELETE_ALIAS:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_RENAME_ALIAS:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_ALIAS_MEMBER:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_POLICY:
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_TRUSTED_DOMAIN:
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_TRUST:
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_ACCOUNT:
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_ACCOUNT:
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_SECRET:
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_SECRET:
+ ndr_print_ptr(ndr, "name", r->name);
+ ndr->depth++;
+ if (r->name) {
+ ndr_print_string(ndr, "name", r->name);
+ }
+ ndr->depth--;
+ break;
+
+ case NETR_DELTA_DELETE_GROUP2:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_DELETE_USER2:
+ ndr_print_uint32(ndr, "rid", r->rid);
+ break;
+
+ case NETR_DELTA_MODIFY_COUNT:
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_netr_DELTA_ENUM(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_DeltaEnum(ndr, NDR_SCALARS, r->delta_type));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
+ NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->delta_union, r->delta_type));
+ NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
+ NDR_CHECK(ndr_push_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ENUM(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_DeltaEnum(ndr, NDR_SCALARS, &r->delta_type));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_id_union, r->delta_type));
+ NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_SCALARS, &r->delta_id_union));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->delta_union, r->delta_type));
+ NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_SCALARS, &r->delta_union));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_DELTA_ID_UNION(ndr, NDR_BUFFERS, &r->delta_id_union));
+ NDR_CHECK(ndr_pull_netr_DELTA_UNION(ndr, NDR_BUFFERS, &r->delta_union));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r)
+{
+ ndr_print_struct(ndr, name, "netr_DELTA_ENUM");
+ ndr->depth++;
+ ndr_print_netr_DeltaEnum(ndr, "delta_type", r->delta_type);
+ ndr_print_set_switch_value(ndr, &r->delta_id_union, r->delta_type);
+ ndr_print_netr_DELTA_ID_UNION(ndr, "delta_id_union", &r->delta_id_union);
+ ndr_print_set_switch_value(ndr, &r->delta_union, r->delta_type);
+ ndr_print_netr_DELTA_UNION(ndr, "delta_union", &r->delta_union);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DELTA_ENUM_ARRAY(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_ENUM_ARRAY *r)
+{
+ uint32_t cntr_delta_enum_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->delta_enum));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->delta_enum) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_deltas));
+ for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < r->num_deltas; cntr_delta_enum_1++) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
+ }
+ for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < r->num_deltas; cntr_delta_enum_1++) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DELTA_ENUM_ARRAY(struct ndr_pull *ndr, int ndr_flags, struct netr_DELTA_ENUM_ARRAY *r)
+{
+ uint32_t _ptr_delta_enum;
+ uint32_t cntr_delta_enum_1;
+ TALLOC_CTX *_mem_save_delta_enum_0;
+ TALLOC_CTX *_mem_save_delta_enum_1;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_deltas));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum));
+ if (_ptr_delta_enum) {
+ NDR_PULL_ALLOC(ndr, r->delta_enum);
+ } else {
+ r->delta_enum = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->delta_enum) {
+ _mem_save_delta_enum_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->delta_enum));
+ NDR_PULL_ALLOC_N(ndr, r->delta_enum, ndr_get_array_size(ndr, &r->delta_enum));
+ _mem_save_delta_enum_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->delta_enum, 0);
+ for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < r->num_deltas; cntr_delta_enum_1++) {
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_SCALARS, &r->delta_enum[cntr_delta_enum_1]));
+ }
+ for (cntr_delta_enum_1 = 0; cntr_delta_enum_1 < r->num_deltas; cntr_delta_enum_1++) {
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM(ndr, NDR_BUFFERS, &r->delta_enum[cntr_delta_enum_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_0, 0);
+ }
+ if (r->delta_enum) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->delta_enum, r->num_deltas));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r)
+{
+ uint32_t cntr_delta_enum_1;
+ ndr_print_struct(ndr, name, "netr_DELTA_ENUM_ARRAY");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_deltas", r->num_deltas);
+ ndr_print_ptr(ndr, "delta_enum", r->delta_enum);
+ ndr->depth++;
+ if (r->delta_enum) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "delta_enum", r->num_deltas);
+ ndr->depth++;
+ for (cntr_delta_enum_1=0;cntr_delta_enum_1<r->num_deltas;cntr_delta_enum_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_delta_enum_1);
+ if (idx_1) {
+ ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_UAS_INFO_0(struct ndr_push *ndr, int ndr_flags, const struct netr_UAS_INFO_0 *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_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timecreated));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_UAS_INFO_0(struct ndr_pull *ndr, int ndr_flags, struct netr_UAS_INFO_0 *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->computer_name, 16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timecreated));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r)
+{
+ ndr_print_struct(ndr, name, "netr_UAS_INFO_0");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "computer_name", r->computer_name, 16);
+ ndr_print_uint32(ndr, "timecreated", r->timecreated);
+ ndr_print_uint32(ndr, "serial_number", r->serial_number);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+NTSTATUS ndr_push_netr_AccountBuffer(struct ndr_push *ndr, int ndr_flags, const struct netr_AccountBuffer *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_AccountBuffer(struct ndr_pull *ndr, int ndr_flags, struct netr_AccountBuffer *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r)
+{
+ ndr_print_struct(ndr, name, "netr_AccountBuffer");
+ ndr->depth++;
+ ndr_print_DATA_BLOB(ndr, "blob", r->blob);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETLOGON_INFO_1(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_1 *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->pdc_connection_status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETLOGON_INFO_1(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_1 *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->pdc_connection_status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_1");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", r->flags);
+ ndr_print_uint32(ndr, "pdc_connection_status", r->pdc_connection_status);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETLOGON_INFO_2(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_2 *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->pdc_connection_status));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->trusted_dc_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->trusted_dc_name, ndr_charset_length(r->trusted_dc_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tc_connection_status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETLOGON_INFO_2(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_2 *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->pdc_connection_status));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->trusted_dc_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->trusted_dc_name));
+ if (ndr_get_array_length(ndr, &r->trusted_dc_name) > ndr_get_array_size(ndr, &r->trusted_dc_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->trusted_dc_name), ndr_get_array_length(ndr, &r->trusted_dc_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->trusted_dc_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->trusted_dc_name, ndr_get_array_length(ndr, &r->trusted_dc_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tc_connection_status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_2");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", r->flags);
+ ndr_print_uint32(ndr, "pdc_connection_status", r->pdc_connection_status);
+ ndr_print_string(ndr, "trusted_dc_name", r->trusted_dc_name);
+ ndr_print_uint32(ndr, "tc_connection_status", r->tc_connection_status);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETLOGON_INFO_3(struct ndr_push *ndr, int ndr_flags, const struct netr_NETLOGON_INFO_3 *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->logon_attempts));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
+ 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_uint32(ndr, NDR_SCALARS, r->unknown5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETLOGON_INFO_3(struct ndr_pull *ndr, int ndr_flags, struct netr_NETLOGON_INFO_3 *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->logon_attempts));
+ 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->unknown3));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETLOGON_INFO_3");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", r->flags);
+ ndr_print_uint32(ndr, "logon_attempts", r->logon_attempts);
+ ndr_print_uint32(ndr, "unknown1", r->unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_uint32(ndr, "unknown3", r->unknown3);
+ ndr_print_uint32(ndr, "unknown4", r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_CONTROL_QUERY_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_QUERY_INFORMATION *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
+ break;
+
+ case 3:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 1:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_netr_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
+ }
+ break;
+
+ case 2:
+ if (r->info2) {
+ NDR_CHECK(ndr_push_netr_NETLOGON_INFO_2(ndr, NDR_SCALARS, r->info2));
+ }
+ break;
+
+ case 3:
+ if (r->info3) {
+ NDR_CHECK(ndr_push_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_CONTROL_QUERY_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_QUERY_INFORMATION *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info1_0;
+ TALLOC_CTX *_mem_save_info2_0;
+ TALLOC_CTX *_mem_save_info3_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for netr_CONTROL_QUERY_INFORMATION", _level);
+ }
+ switch (level) {
+ case 1: {
+ uint32_t _ptr_info1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
+ if (_ptr_info1) {
+ NDR_PULL_ALLOC(ndr, r->info1);
+ } else {
+ r->info1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_info2;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
+ if (_ptr_info2) {
+ NDR_PULL_ALLOC(ndr, r->info2);
+ } else {
+ r->info2 = NULL;
+ }
+ break; }
+
+ case 3: {
+ uint32_t _ptr_info3;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
+ if (_ptr_info3) {
+ NDR_PULL_ALLOC(ndr, r->info3);
+ } else {
+ r->info3 = 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:
+ 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_NETLOGON_INFO_1(ndr, NDR_SCALARS, r->info1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
+ }
+ break;
+
+ case 2:
+ 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_NETLOGON_INFO_2(ndr, NDR_SCALARS, r->info2));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
+ }
+ break;
+
+ case 3:
+ if (r->info3) {
+ _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
+ NDR_CHECK(ndr_pull_netr_NETLOGON_INFO_3(ndr, NDR_SCALARS, r->info3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_CONTROL_QUERY_INFORMATION");
+ switch (level) {
+ case 1:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_netr_NETLOGON_INFO_1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "info2", r->info2);
+ ndr->depth++;
+ if (r->info2) {
+ ndr_print_netr_NETLOGON_INFO_2(ndr, "info2", r->info2);
+ }
+ ndr->depth--;
+ break;
+
+ case 3:
+ ndr_print_ptr(ndr, "info3", r->info3);
+ ndr->depth++;
+ if (r->info3) {
+ ndr_print_netr_NETLOGON_INFO_3(ndr, "info3", r->info3);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_netr_LogonControlCode(struct ndr_push *ndr, int ndr_flags, enum netr_LogonControlCode r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonControlCode(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonControlCode *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
+ case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
+ case NETLOGON_CONTROL_SET_DBFLAG: val = "NETLOGON_CONTROL_SET_DBFLAG"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_netr_CONTROL_DATA_INFORMATION(struct ndr_push *ndr, int ndr_flags, const union netr_CONTROL_DATA_INFORMATION *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case NETLOGON_CONTROL_REDISCOVER:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ break;
+
+ case NETLOGON_CONTROL_TC_QUERY:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ break;
+
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ break;
+
+ case NETLOGON_CONTROL_SET_DBFLAG:
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->debug_level));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETLOGON_CONTROL_REDISCOVER:
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ break;
+
+ case NETLOGON_CONTROL_TC_QUERY:
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ break;
+
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ break;
+
+ case NETLOGON_CONTROL_SET_DBFLAG:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_CONTROL_DATA_INFORMATION(struct ndr_pull *ndr, int ndr_flags, union netr_CONTROL_DATA_INFORMATION *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_domain_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for netr_CONTROL_DATA_INFORMATION", _level);
+ }
+ switch (level) {
+ case NETLOGON_CONTROL_REDISCOVER: {
+ uint32_t _ptr_domain;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ break; }
+
+ case NETLOGON_CONTROL_TC_QUERY: {
+ uint32_t _ptr_domain;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ break; }
+
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY: {
+ uint32_t _ptr_domain;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ break; }
+
+ case NETLOGON_CONTROL_SET_DBFLAG: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->debug_level));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETLOGON_CONTROL_REDISCOVER:
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ break;
+
+ case NETLOGON_CONTROL_TC_QUERY:
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ break;
+
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ break;
+
+ case NETLOGON_CONTROL_SET_DBFLAG:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_CONTROL_DATA_INFORMATION");
+ switch (level) {
+ case NETLOGON_CONTROL_REDISCOVER:
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ break;
+
+ case NETLOGON_CONTROL_TC_QUERY:
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ break;
+
+ case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ break;
+
+ case NETLOGON_CONTROL_SET_DBFLAG:
+ ndr_print_uint32(ndr, "debug_level", r->debug_level);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_unc));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_address));
+ NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->dc_address_type));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dc_flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->dc_site_name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_site_name));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->dc_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_unc, ndr_charset_length(r->dc_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->dc_address) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_address, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ 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));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->forest_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest_name, ndr_charset_length(r->forest_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->dc_site_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dc_site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dc_site_name, ndr_charset_length(r->dc_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->client_site_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_site_name, ndr_charset_length(r->client_site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r)
+{
+ uint32_t _ptr_dc_unc;
+ TALLOC_CTX *_mem_save_dc_unc_0;
+ uint32_t _ptr_dc_address;
+ TALLOC_CTX *_mem_save_dc_address_0;
+ uint32_t _ptr_domain_name;
+ TALLOC_CTX *_mem_save_domain_name_0;
+ uint32_t _ptr_forest_name;
+ TALLOC_CTX *_mem_save_forest_name_0;
+ uint32_t _ptr_dc_site_name;
+ TALLOC_CTX *_mem_save_dc_site_name_0;
+ uint32_t _ptr_client_site_name;
+ TALLOC_CTX *_mem_save_client_site_name_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_unc));
+ if (_ptr_dc_unc) {
+ NDR_PULL_ALLOC(ndr, r->dc_unc);
+ } else {
+ r->dc_unc = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_address));
+ if (_ptr_dc_address) {
+ NDR_PULL_ALLOC(ndr, r->dc_address);
+ } else {
+ r->dc_address = NULL;
+ }
+ NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->dc_address_type));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
+ if (_ptr_domain_name) {
+ NDR_PULL_ALLOC(ndr, r->domain_name);
+ } else {
+ r->domain_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_name));
+ if (_ptr_forest_name) {
+ NDR_PULL_ALLOC(ndr, r->forest_name);
+ } else {
+ r->forest_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dc_flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dc_site_name));
+ if (_ptr_dc_site_name) {
+ NDR_PULL_ALLOC(ndr, r->dc_site_name);
+ } else {
+ r->dc_site_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_site_name));
+ if (_ptr_client_site_name) {
+ NDR_PULL_ALLOC(ndr, r->client_site_name);
+ } else {
+ r->client_site_name = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->dc_unc) {
+ _mem_save_dc_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dc_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_unc));
+ if (ndr_get_array_length(ndr, &r->dc_unc) > ndr_get_array_size(ndr, &r->dc_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dc_unc), ndr_get_array_length(ndr, &r->dc_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dc_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_unc, ndr_get_array_length(ndr, &r->dc_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_unc_0, 0);
+ }
+ if (r->dc_address) {
+ _mem_save_dc_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dc_address, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_address));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_address));
+ if (ndr_get_array_length(ndr, &r->dc_address) > ndr_get_array_size(ndr, &r->dc_address)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dc_address), ndr_get_array_length(ndr, &r->dc_address));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dc_address), sizeof(uint16_t)));
+ 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);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
+ if (ndr_get_array_length(ndr, &r->domain_name) > ndr_get_array_size(ndr, &r->domain_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain_name), ndr_get_array_length(ndr, &r->domain_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, ndr_get_array_length(ndr, &r->domain_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
+ }
+ if (r->forest_name) {
+ _mem_save_forest_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->forest_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->forest_name));
+ if (ndr_get_array_length(ndr, &r->forest_name) > ndr_get_array_size(ndr, &r->forest_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->forest_name), ndr_get_array_length(ndr, &r->forest_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->forest_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest_name, ndr_get_array_length(ndr, &r->forest_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_name_0, 0);
+ }
+ if (r->dc_site_name) {
+ _mem_save_dc_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dc_site_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->dc_site_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->dc_site_name));
+ if (ndr_get_array_length(ndr, &r->dc_site_name) > ndr_get_array_size(ndr, &r->dc_site_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->dc_site_name), ndr_get_array_length(ndr, &r->dc_site_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dc_site_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dc_site_name, ndr_get_array_length(ndr, &r->dc_site_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dc_site_name_0, 0);
+ }
+ if (r->client_site_name) {
+ _mem_save_client_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->client_site_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->client_site_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->client_site_name));
+ if (ndr_get_array_length(ndr, &r->client_site_name) > ndr_get_array_size(ndr, &r->client_site_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->client_site_name), ndr_get_array_length(ndr, &r->client_site_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_site_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_site_name, ndr_get_array_length(ndr, &r->client_site_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_site_name_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_DsRGetDCNameInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "dc_unc", r->dc_unc);
+ ndr->depth++;
+ if (r->dc_unc) {
+ ndr_print_string(ndr, "dc_unc", r->dc_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dc_address", r->dc_address);
+ ndr->depth++;
+ if (r->dc_address) {
+ ndr_print_string(ndr, "dc_address", r->dc_address);
+ }
+ ndr->depth--;
+ ndr_print_int32(ndr, "dc_address_type", r->dc_address_type);
+ ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
+ ndr_print_ptr(ndr, "domain_name", r->domain_name);
+ ndr->depth++;
+ if (r->domain_name) {
+ ndr_print_string(ndr, "domain_name", r->domain_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "forest_name", r->forest_name);
+ ndr->depth++;
+ if (r->forest_name) {
+ ndr_print_string(ndr, "forest_name", r->forest_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "dc_flags", r->dc_flags);
+ ndr_print_ptr(ndr, "dc_site_name", r->dc_site_name);
+ ndr->depth++;
+ if (r->dc_site_name) {
+ ndr_print_string(ndr, "dc_site_name", r->dc_site_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "client_site_name", r->client_site_name);
+ ndr->depth++;
+ if (r->client_site_name) {
+ ndr_print_string(ndr, "client_site_name", r->client_site_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->data) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_Blob(struct ndr_pull *ndr, int ndr_flags, struct netr_Blob *r)
+{
+ uint32_t _ptr_data;
+ TALLOC_CTX *_mem_save_data_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+ if (_ptr_data) {
+ NDR_PULL_ALLOC(ndr, r->data);
+ } else {
+ r->data = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->data) {
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+ NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ }
+ if (r->data) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r)
+{
+ ndr_print_struct(ndr, name, "netr_Blob");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "length", r->length);
+ ndr_print_ptr(ndr, "data", r->data);
+ ndr->depth++;
+ if (r->data) {
+ ndr_print_array_uint8(ndr, "data", r->data, r->length);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r)
+{
+ uint32_t cntr_data_1;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+ 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->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length/2));
+ for (cntr_data_1 = 0; cntr_data_1 < r->length/2; cntr_data_1++) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data[cntr_data_1]));
+ }
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct netr_BinaryString *r)
+{
+ uint32_t _ptr_data;
+ uint32_t cntr_data_1;
+ TALLOC_CTX *_mem_save_data_0;
+ TALLOC_CTX *_mem_save_data_1;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ 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_CHECK(ndr_pull_array_length(ndr, &r->data));
+ if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(ndr, &r->data));
+ }
+ NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+ _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+ for (cntr_data_1 = 0; cntr_data_1 < r->length/2; cntr_data_1++) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data[cntr_data_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
+ 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->size/2));
+ }
+ if (r->data) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length/2));
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r)
+{
+ uint32_t cntr_data_1;
+ ndr_print_struct(ndr, name, "netr_BinaryString");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_uint16(ndr, "length", r->length);
+ ndr_print_uint16(ndr, "size", r->size);
+ ndr_print_ptr(ndr, "data", r->data);
+ ndr->depth++;
+ if (r->data) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "data", r->length/2);
+ ndr->depth++;
+ for (cntr_data_1=0;cntr_data_1<r->length/2;cntr_data_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_data_1);
+ if (idx_1) {
+ ndr_print_uint16(ndr, "data", r->data[cntr_data_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+NTSTATUS ndr_push_netr_DomainQuery1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainQuery1 *r)
+{
+ uint32_t cntr_unknown7_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_SCALARS, &r->blob));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_domain));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->workstation_site));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown1));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown3));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown4));
+ NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_SCALARS, &r->blob2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->product));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->unknown6));
+ for (cntr_unknown7_0 = 0; cntr_unknown7_0 < 4; cntr_unknown7_0++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7[cntr_unknown7_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_Blob(ndr, NDR_BUFFERS, &r->blob));
+ if (r->workstation_domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->workstation_domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->workstation_domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->workstation_domain, ndr_charset_length(r->workstation_domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->workstation_site) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->workstation_site, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->workstation_site, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->workstation_site, ndr_charset_length(r->workstation_site, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->unknown1) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown1, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown1, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown1, ndr_charset_length(r->unknown1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->unknown2) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->unknown3) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown3, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown3, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown3, ndr_charset_length(r->unknown3, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->unknown4) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown4, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown4, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown4, ndr_charset_length(r->unknown4, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_BUFFERS, &r->blob2));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->product));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown5));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown6));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainQuery1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainQuery1 *r)
+{
+ uint32_t _ptr_workstation_domain;
+ TALLOC_CTX *_mem_save_workstation_domain_0;
+ uint32_t _ptr_workstation_site;
+ TALLOC_CTX *_mem_save_workstation_site_0;
+ uint32_t _ptr_unknown1;
+ TALLOC_CTX *_mem_save_unknown1_0;
+ uint32_t _ptr_unknown2;
+ TALLOC_CTX *_mem_save_unknown2_0;
+ uint32_t _ptr_unknown3;
+ TALLOC_CTX *_mem_save_unknown3_0;
+ uint32_t _ptr_unknown4;
+ TALLOC_CTX *_mem_save_unknown4_0;
+ uint32_t cntr_unknown7_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_SCALARS, &r->blob));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_workstation_domain));
+ if (_ptr_workstation_domain) {
+ NDR_PULL_ALLOC(ndr, r->workstation_domain);
+ } else {
+ r->workstation_domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_workstation_site));
+ if (_ptr_workstation_site) {
+ NDR_PULL_ALLOC(ndr, r->workstation_site);
+ } else {
+ r->workstation_site = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown1));
+ if (_ptr_unknown1) {
+ NDR_PULL_ALLOC(ndr, r->unknown1);
+ } else {
+ r->unknown1 = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
+ if (_ptr_unknown2) {
+ NDR_PULL_ALLOC(ndr, r->unknown2);
+ } else {
+ r->unknown2 = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown3));
+ if (_ptr_unknown3) {
+ NDR_PULL_ALLOC(ndr, r->unknown3);
+ } else {
+ r->unknown3 = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4));
+ if (_ptr_unknown4) {
+ NDR_PULL_ALLOC(ndr, r->unknown4);
+ } else {
+ r->unknown4 = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_SCALARS, &r->blob2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->product));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->unknown6));
+ for (cntr_unknown7_0 = 0; cntr_unknown7_0 < 4; cntr_unknown7_0++) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7[cntr_unknown7_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_Blob(ndr, NDR_BUFFERS, &r->blob));
+ if (r->workstation_domain) {
+ _mem_save_workstation_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->workstation_domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->workstation_domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->workstation_domain));
+ if (ndr_get_array_length(ndr, &r->workstation_domain) > ndr_get_array_size(ndr, &r->workstation_domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->workstation_domain), ndr_get_array_length(ndr, &r->workstation_domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->workstation_domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->workstation_domain, ndr_get_array_length(ndr, &r->workstation_domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_workstation_domain_0, 0);
+ }
+ if (r->workstation_site) {
+ _mem_save_workstation_site_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->workstation_site, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->workstation_site));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->workstation_site));
+ if (ndr_get_array_length(ndr, &r->workstation_site) > ndr_get_array_size(ndr, &r->workstation_site)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->workstation_site), ndr_get_array_length(ndr, &r->workstation_site));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->workstation_site), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->workstation_site, ndr_get_array_length(ndr, &r->workstation_site), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_workstation_site_0, 0);
+ }
+ if (r->unknown1) {
+ _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->unknown1, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown1));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown1));
+ if (ndr_get_array_length(ndr, &r->unknown1) > ndr_get_array_size(ndr, &r->unknown1)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown1), ndr_get_array_length(ndr, &r->unknown1));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown1), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown1, ndr_get_array_length(ndr, &r->unknown1), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, 0);
+ }
+ if (r->unknown2) {
+ _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
+ if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown2), ndr_get_array_length(ndr, &r->unknown2));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
+ }
+ if (r->unknown3) {
+ _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->unknown3, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown3));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown3));
+ if (ndr_get_array_length(ndr, &r->unknown3) > ndr_get_array_size(ndr, &r->unknown3)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown3), ndr_get_array_length(ndr, &r->unknown3));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown3), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown3, ndr_get_array_length(ndr, &r->unknown3), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, 0);
+ }
+ if (r->unknown4) {
+ _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->unknown4, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown4));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown4));
+ if (ndr_get_array_length(ndr, &r->unknown4) > ndr_get_array_size(ndr, &r->unknown4)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown4), ndr_get_array_length(ndr, &r->unknown4));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown4), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown4, ndr_get_array_length(ndr, &r->unknown4), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0);
+ }
+ NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_BUFFERS, &r->blob2));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->product));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown5));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown6));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r)
+{
+ uint32_t cntr_unknown7_0;
+ ndr_print_struct(ndr, name, "netr_DomainQuery1");
+ ndr->depth++;
+ ndr_print_netr_Blob(ndr, "blob", &r->blob);
+ ndr_print_ptr(ndr, "workstation_domain", r->workstation_domain);
+ ndr->depth++;
+ if (r->workstation_domain) {
+ ndr_print_string(ndr, "workstation_domain", r->workstation_domain);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "workstation_site", r->workstation_site);
+ ndr->depth++;
+ if (r->workstation_site) {
+ ndr_print_string(ndr, "workstation_site", r->workstation_site);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown1", r->unknown1);
+ ndr->depth++;
+ if (r->unknown1) {
+ ndr_print_string(ndr, "unknown1", r->unknown1);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown2", r->unknown2);
+ ndr->depth++;
+ if (r->unknown2) {
+ ndr_print_string(ndr, "unknown2", r->unknown2);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown3", r->unknown3);
+ ndr->depth++;
+ if (r->unknown3) {
+ ndr_print_string(ndr, "unknown3", r->unknown3);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown4", r->unknown4);
+ ndr->depth++;
+ if (r->unknown4) {
+ ndr_print_string(ndr, "unknown4", r->unknown4);
+ }
+ ndr->depth--;
+ ndr_print_netr_BinaryString(ndr, "blob2", &r->blob2);
+ ndr_print_lsa_String(ndr, "product", &r->product);
+ ndr_print_lsa_String(ndr, "unknown5", &r->unknown5);
+ ndr_print_lsa_String(ndr, "unknown6", &r->unknown6);
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown7", 4);
+ ndr->depth++;
+ for (cntr_unknown7_0=0;cntr_unknown7_0<4;cntr_unknown7_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown7_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "unknown7", r->unknown7[cntr_unknown7_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DomainQuery(struct ndr_push *ndr, int ndr_flags, const union netr_DomainQuery *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->query1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->query1));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 1:
+ if (r->query1) {
+ NDR_CHECK(ndr_push_netr_DomainQuery1(ndr, NDR_SCALARS|NDR_BUFFERS, r->query1));
+ }
+ break;
+
+ case 2:
+ if (r->query1) {
+ NDR_CHECK(ndr_push_netr_DomainQuery1(ndr, NDR_SCALARS|NDR_BUFFERS, r->query1));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainQuery(struct ndr_pull *ndr, int ndr_flags, union netr_DomainQuery *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_query1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for netr_DomainQuery", _level);
+ }
+ switch (level) {
+ case 1: {
+ uint32_t _ptr_query1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_query1));
+ if (_ptr_query1) {
+ NDR_PULL_ALLOC(ndr, r->query1);
+ } else {
+ r->query1 = NULL;
+ }
+ break; }
+
+ case 2: {
+ uint32_t _ptr_query1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_query1));
+ if (_ptr_query1) {
+ NDR_PULL_ALLOC(ndr, r->query1);
+ } else {
+ r->query1 = 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:
+ if (r->query1) {
+ _mem_save_query1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->query1, 0);
+ NDR_CHECK(ndr_pull_netr_DomainQuery1(ndr, NDR_SCALARS|NDR_BUFFERS, r->query1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query1_0, 0);
+ }
+ break;
+
+ case 2:
+ if (r->query1) {
+ _mem_save_query1_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->query1, 0);
+ NDR_CHECK(ndr_pull_netr_DomainQuery1(ndr, NDR_SCALARS|NDR_BUFFERS, r->query1));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query1_0, 0);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_DomainQuery");
+ switch (level) {
+ case 1:
+ ndr_print_ptr(ndr, "query1", r->query1);
+ ndr->depth++;
+ if (r->query1) {
+ ndr_print_netr_DomainQuery1(ndr, "query1", r->query1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "query1", r->query1);
+ ndr->depth++;
+ if (r->query1) {
+ ndr_print_netr_DomainQuery1(ndr, "query1", r->query1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS 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;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domainname));
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->fulldomainname));
+ 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]));
+ }
+ 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]));
+ }
+ }
+ 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]));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrustInfo *r)
+{
+ uint32_t _ptr_sid;
+ TALLOC_CTX *_mem_save_sid_0;
+ uint32_t cntr_unknown1_0;
+ uint32_t cntr_unknown_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domainname));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->fulldomainname));
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->forest));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } 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]));
+ }
+ 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]));
+ }
+ }
+ 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]));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_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;
+ ndr_print_struct(ndr, name, "netr_DomainTrustInfo");
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "domainname", &r->domainname);
+ ndr_print_lsa_String(ndr, "fulldomainname", &r->fulldomainname);
+ ndr_print_lsa_String(ndr, "forest", &r->forest);
+ ndr_print_GUID(ndr, "guid", &r->guid);
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown1", 4);
+ ndr->depth++;
+ for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown1_0);
+ if (idx_0) {
+ ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown", 4);
+ ndr->depth++;
+ for (cntr_unknown_0=0;cntr_unknown_0<4;cntr_unknown_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS 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;
+ 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]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->domaininfo));
+ if (r->trusts) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_trusts));
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->num_trusts; cntr_trusts_1++) {
+ NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->trusts[cntr_trusts_1]));
+ }
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->num_trusts; cntr_trusts_1++) {
+ NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->trusts[cntr_trusts_1]));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainInfo1 *r)
+{
+ uint32_t _ptr_trusts;
+ uint32_t cntr_trusts_1;
+ TALLOC_CTX *_mem_save_trusts_0;
+ TALLOC_CTX *_mem_save_trusts_1;
+ uint32_t cntr_unknown_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->domaininfo));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_trusts));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_trusts));
+ if (_ptr_trusts) {
+ NDR_PULL_ALLOC(ndr, r->trusts);
+ } 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]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->domaininfo));
+ if (r->trusts) {
+ _mem_save_trusts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->trusts, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->trusts));
+ NDR_PULL_ALLOC_N(ndr, r->trusts, ndr_get_array_size(ndr, &r->trusts));
+ _mem_save_trusts_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->trusts, 0);
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->num_trusts; cntr_trusts_1++) {
+ NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->trusts[cntr_trusts_1]));
+ }
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->num_trusts; cntr_trusts_1++) {
+ NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->trusts[cntr_trusts_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, 0);
+ }
+ if (r->trusts) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusts, r->num_trusts));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_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;
+ ndr_print_struct(ndr, name, "netr_DomainInfo1");
+ ndr->depth++;
+ ndr_print_netr_DomainTrustInfo(ndr, "domaininfo", &r->domaininfo);
+ ndr_print_uint32(ndr, "num_trusts", r->num_trusts);
+ ndr_print_ptr(ndr, "trusts", r->trusts);
+ ndr->depth++;
+ if (r->trusts) {
+ ndr->print(ndr, "%s: ARRAY(%d)", "trusts", r->num_trusts);
+ ndr->depth++;
+ for (cntr_trusts_1=0;cntr_trusts_1<r->num_trusts;cntr_trusts_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_trusts_1);
+ if (idx_1) {
+ ndr_print_netr_DomainTrustInfo(ndr, "trusts", &r->trusts[cntr_trusts_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown", 14);
+ ndr->depth++;
+ for (cntr_unknown_0=0;cntr_unknown_0<14;cntr_unknown_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_unknown_0);
+ if (idx_0) {
+ ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_flags, const union netr_DomainInfo *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 1:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ case 2:
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 1:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ }
+ break;
+
+ case 2:
+ if (r->info1) {
+ NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+ }
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, union netr_DomainInfo *r)
+{
+ int level;
+ uint32_t _level;
+ TALLOC_CTX *_mem_save_info1_0;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for netr_DomainInfo", _level);
+ }
+ switch (level) {
+ case 1: {
+ uint32_t _ptr_info1;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
+ if (_ptr_info1) {
+ NDR_PULL_ALLOC(ndr, r->info1);
+ } else {
+ r->info1 = NULL;
+ }
+ 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);
+ } else {
+ r->info1 = 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:
+ 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);
+ }
+ 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);
+ }
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_DomainInfo");
+ switch (level) {
+ case 1:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_netr_DomainInfo1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ case 2:
+ ndr_print_ptr(ndr, "info1", r->info1);
+ ndr->depth++;
+ if (r->info1) {
+ ndr_print_netr_DomainInfo1(ndr, "info1", r->info1);
+ }
+ ndr->depth--;
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+NTSTATUS ndr_push_netr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct netr_CryptPassword *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, 512));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct netr_CryptPassword *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 512));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r)
+{
+ ndr_print_struct(ndr, name, "netr_CryptPassword");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "data", r->data, 512);
+ ndr_print_uint32(ndr, "length", r->length);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+NTSTATUS ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS 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 NT_STATUS_OK;
+}
+
+_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--;
+}
+
+NTSTATUS ndr_push_netr_TrustType(struct ndr_push *ndr, int ndr_flags, enum netr_TrustType r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_TrustType(struct ndr_pull *ndr, int ndr_flags, enum netr_TrustType *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case NETR_TRUST_TYPE_DOWNLEVEL: val = "NETR_TRUST_TYPE_DOWNLEVEL"; break;
+ case NETR_TRUST_TYPE_UPLEVEL: val = "NETR_TRUST_TYPE_UPLEVEL"; break;
+ case NETR_TRUST_TYPE_MIT: val = "NETR_TRUST_TYPE_MIT"; break;
+ case NETR_TRUST_TYPE_DCE: val = "NETR_TRUST_TYPE_DCE"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_netr_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_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 NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_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), "NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE", NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY", NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_WITHIN_FOREST", NETR_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DomainTrust(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrust *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
+ NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->trust_flags));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
+ NDR_CHECK(ndr_push_netr_TrustType(ndr, NDR_SCALARS, r->trust_type));
+ NDR_CHECK(ndr_push_netr_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->netbios_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->dns_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ 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 NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DomainTrust(struct ndr_pull *ndr, int ndr_flags, struct netr_DomainTrust *r)
+{
+ uint32_t _ptr_netbios_name;
+ TALLOC_CTX *_mem_save_netbios_name_0;
+ uint32_t _ptr_dns_name;
+ TALLOC_CTX *_mem_save_dns_name_0;
+ uint32_t _ptr_sid;
+ TALLOC_CTX *_mem_save_sid_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
+ if (_ptr_netbios_name) {
+ NDR_PULL_ALLOC(ndr, r->netbios_name);
+ } else {
+ r->netbios_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
+ if (_ptr_dns_name) {
+ NDR_PULL_ALLOC(ndr, r->dns_name);
+ } else {
+ r->dns_name = NULL;
+ }
+ NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->trust_flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
+ NDR_CHECK(ndr_pull_netr_TrustType(ndr, NDR_SCALARS, &r->trust_type));
+ NDR_CHECK(ndr_pull_netr_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->netbios_name) {
+ _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
+ if (ndr_get_array_length(ndr, &r->netbios_name) > ndr_get_array_size(ndr, &r->netbios_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->netbios_name), ndr_get_array_length(ndr, &r->netbios_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->netbios_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, ndr_get_array_length(ndr, &r->netbios_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
+ }
+ if (r->dns_name) {
+ _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
+ if (ndr_get_array_length(ndr, &r->dns_name) > ndr_get_array_size(ndr, &r->dns_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->dns_name), ndr_get_array_length(ndr, &r->dns_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dns_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, ndr_get_array_length(ndr, &r->dns_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
+ }
+ 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);
+ }
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r)
+{
+ ndr_print_struct(ndr, name, "netr_DomainTrust");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
+ ndr->depth++;
+ if (r->netbios_name) {
+ ndr_print_string(ndr, "netbios_name", r->netbios_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dns_name", r->dns_name);
+ ndr->depth++;
+ if (r->dns_name) {
+ ndr_print_string(ndr, "dns_name", r->dns_name);
+ }
+ ndr->depth--;
+ ndr_print_netr_TrustFlags(ndr, "trust_flags", r->trust_flags);
+ ndr_print_uint32(ndr, "parent_index", r->parent_index);
+ ndr_print_netr_TrustType(ndr, "trust_type", r->trust_type);
+ ndr_print_netr_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid2(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ ndr_print_GUID(ndr, "guid", &r->guid);
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonUasLogon(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogon *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonUasLogon(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogon *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
+ if (ndr_get_array_length(ndr, &r->in.workstation) > ndr_get_array_size(ndr, &r->in.workstation)) {
+ 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.workstation), ndr_get_array_length(ndr, &r->in.workstation));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_netr_UasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonUasLogon");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonUasLogon");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_string(ndr, "workstation", r->in.workstation);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonUasLogon");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_netr_UasInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonUasLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonUasLogoff *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.workstation, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.workstation, ndr_charset_length(r->in.workstation, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonUasLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonUasLogoff *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.workstation));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.workstation));
+ if (ndr_get_array_length(ndr, &r->in.workstation) > ndr_get_array_size(ndr, &r->in.workstation)) {
+ 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.workstation), ndr_get_array_length(ndr, &r->in.workstation));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.workstation, ndr_get_array_length(ndr, &r->in.workstation), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_UasLogoffInfo(ndr, NDR_SCALARS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonUasLogoff");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonUasLogoff");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_string(ndr, "workstation", r->in.workstation);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonUasLogoff");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_netr_UasLogoffInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogon *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
+ if (r->in.credential) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
+ if (r->in.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
+ if (r->out.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ }
+ if (r->out.validation == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ if (r->out.authoritative == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogon *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_computer_name;
+ uint32_t _ptr_credential;
+ uint32_t _ptr_return_authenticator;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_validation_0;
+ TALLOC_CTX *_mem_save_authoritative_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
+ if (_ptr_credential) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ } else {
+ r->in.credential = NULL;
+ }
+ if (r->in.credential) {
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ } else {
+ r->in.return_authenticator = NULL;
+ }
+ if (r->in.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
+ 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_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ ZERO_STRUCTP(r->out.validation);
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ ZERO_STRUCTP(r->out.authoritative);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ } else {
+ r->out.return_authenticator = NULL;
+ }
+ if (r->out.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ }
+ _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ }
+ _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonSamLogon");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonSamLogon");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ if (r->in.credential) {
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ if (r->in.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
+ ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonSamLogon");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ if (r->out.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "validation", r->out.validation);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
+ ndr_print_netr_Validation(ndr, "validation", r->out.validation);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
+ ndr->depth++;
+ ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogoff *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
+ if (r->in.credential) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
+ if (r->in.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
+ if (r->out.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogoff *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_computer_name;
+ uint32_t _ptr_credential;
+ uint32_t _ptr_return_authenticator;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
+ if (_ptr_credential) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ } else {
+ r->in.credential = NULL;
+ }
+ if (r->in.credential) {
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ } else {
+ r->in.return_authenticator = NULL;
+ }
+ if (r->in.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
+ 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_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ } else {
+ r->out.return_authenticator = NULL;
+ }
+ if (r->out.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonSamLogoff");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonSamLogoff");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ if (r->in.credential) {
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ if (r->in.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
+ ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonSamLogoff");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ if (r->out.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr, int flags, const struct netr_ServerReqChallenge *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ if (r->in.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr, int flags, struct netr_ServerReqChallenge *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_credentials_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ *r->out.credentials = *r->in.credentials;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerReqChallenge");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerReqChallenge");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_ptr(ndr, "credentials", r->in.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ if (r->in.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_credentials_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ *r->out.credentials = *r->in.credentials;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerAuthenticate");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerAuthenticate");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_ptr(ndr, "credentials", r->in.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ ZERO_STRUCTP(r->out.return_authenticator);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerPasswordSet");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerPasswordSet");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_samr_Password(ndr, "new_password", &r->in.new_password);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerPasswordSet");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int flags, const struct netr_DatabaseDeltas *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
+ if (r->in.sequence_num == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->in.sequence_num));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.sequence_num == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, *r->out.sequence_num));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array));
+ if (r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r)
+{
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_sequence_num_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sequence_num);
+ }
+ _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sequence_num, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->in.sequence_num));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.sequence_num);
+ *r->out.sequence_num = *r->in.sequence_num;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sequence_num);
+ }
+ _mem_save_sequence_num_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sequence_num, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, r->out.sequence_num));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sequence_num_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
+ } else {
+ r->out.delta_enum_array = NULL;
+ }
+ if (r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r)
+{
+ ndr_print_struct(ndr, name, "netr_DatabaseDeltas");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DatabaseDeltas");
+ ndr->depth++;
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
+ ndr_print_ptr(ndr, "sequence_num", r->in.sequence_num);
+ ndr->depth++;
+ ndr_print_udlong(ndr, "sequence_num", *r->in.sequence_num);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DatabaseDeltas");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sequence_num", r->out.sequence_num);
+ ndr->depth++;
+ ndr_print_udlong(ndr, "sequence_num", *r->out.sequence_num);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr->depth++;
+ if (r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DatabaseSync(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
+ if (r->in.sync_context == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.sync_context == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array));
+ if (r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DatabaseSync(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync *r)
+{
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_sync_context_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sync_context);
+ }
+ _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.sync_context);
+ *r->out.sync_context = *r->in.sync_context;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sync_context);
+ }
+ _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
+ } else {
+ r->out.delta_enum_array = NULL;
+ }
+ if (r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r)
+{
+ ndr_print_struct(ndr, name, "netr_DatabaseSync");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DatabaseSync");
+ ndr->depth++;
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
+ ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DatabaseSync");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr->depth++;
+ if (r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_AccountDeltas(struct ndr_push *ndr, int flags, const struct netr_AccountDeltas *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.buffer == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ {
+ struct ndr_push *_ndr_buffer;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
+ NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
+ }
+ if (r->out.count_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
+ if (r->out.total_entries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
+ if (r->out.recordid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_AccountDeltas(struct ndr_pull *ndr, int flags, struct netr_AccountDeltas *r)
+{
+ uint32_t _ptr_logon_server;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_buffer_0;
+ TALLOC_CTX *_mem_save_count_returned_0;
+ TALLOC_CTX *_mem_save_total_entries_0;
+ TALLOC_CTX *_mem_save_recordid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, &r->in.uas));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.buffer);
+ ZERO_STRUCTP(r->out.buffer);
+ NDR_PULL_ALLOC(ndr, r->out.count_returned);
+ ZERO_STRUCTP(r->out.count_returned);
+ NDR_PULL_ALLOC(ndr, r->out.total_entries);
+ ZERO_STRUCTP(r->out.total_entries);
+ NDR_PULL_ALLOC(ndr, r->out.recordid);
+ ZERO_STRUCTP(r->out.recordid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.buffer);
+ }
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
+ {
+ struct ndr_pull *_ndr_buffer;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
+ NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count_returned);
+ }
+ _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.total_entries);
+ }
+ _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.recordid);
+ }
+ _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r)
+{
+ ndr_print_struct(ndr, name, "netr_AccountDeltas");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_AccountDeltas");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_netr_UAS_INFO_0(ndr, "uas", &r->in.uas);
+ ndr_print_uint32(ndr, "count", r->in.count);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_AccountDeltas");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "recordid", r->out.recordid);
+ ndr->depth++;
+ ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_AccountSync(struct ndr_push *ndr, int flags, const struct netr_AccountSync *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reference));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffersize));
+ if (r->in.recordid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.buffer == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ {
+ struct ndr_push *_ndr_buffer;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_buffer, 4, -1));
+ NDR_CHECK(ndr_push_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_buffer, 4, -1));
+ }
+ if (r->out.count_returned == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count_returned));
+ if (r->out.total_entries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
+ if (r->out.next_reference == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.next_reference));
+ if (r->out.recordid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_AccountSync(struct ndr_pull *ndr, int flags, struct netr_AccountSync *r)
+{
+ uint32_t _ptr_logon_server;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_buffer_0;
+ TALLOC_CTX *_mem_save_count_returned_0;
+ TALLOC_CTX *_mem_save_total_entries_0;
+ TALLOC_CTX *_mem_save_next_reference_0;
+ TALLOC_CTX *_mem_save_recordid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reference));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffersize));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.recordid);
+ }
+ _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.recordid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->in.recordid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.buffer);
+ ZERO_STRUCTP(r->out.buffer);
+ NDR_PULL_ALLOC(ndr, r->out.count_returned);
+ ZERO_STRUCTP(r->out.count_returned);
+ NDR_PULL_ALLOC(ndr, r->out.total_entries);
+ ZERO_STRUCTP(r->out.total_entries);
+ NDR_PULL_ALLOC(ndr, r->out.next_reference);
+ ZERO_STRUCTP(r->out.next_reference);
+ NDR_PULL_ALLOC(ndr, r->out.recordid);
+ *r->out.recordid = *r->in.recordid;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.buffer);
+ }
+ _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, LIBNDR_FLAG_REF_ALLOC);
+ {
+ struct ndr_pull *_ndr_buffer;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_buffer, 4, -1));
+ NDR_CHECK(ndr_pull_netr_AccountBuffer(_ndr_buffer, NDR_SCALARS, r->out.buffer));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_buffer, 4, -1));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count_returned);
+ }
+ _mem_save_count_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count_returned, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count_returned));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_returned_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.total_entries);
+ }
+ _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.next_reference);
+ }
+ _mem_save_next_reference_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.next_reference, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.next_reference));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_reference_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.recordid);
+ }
+ _mem_save_recordid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.recordid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_UAS_INFO_0(ndr, NDR_SCALARS, r->out.recordid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_recordid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r)
+{
+ ndr_print_struct(ndr, name, "netr_AccountSync");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_AccountSync");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "reference", r->in.reference);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_uint32(ndr, "buffersize", r->in.buffersize);
+ ndr_print_ptr(ndr, "recordid", r->in.recordid);
+ ndr->depth++;
+ ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->in.recordid);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_AccountSync");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ ndr_print_netr_AccountBuffer(ndr, "buffer", r->out.buffer);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count_returned", r->out.count_returned);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count_returned", *r->out.count_returned);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "next_reference", r->out.next_reference);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "next_reference", *r->out.next_reference);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "recordid", r->out.recordid);
+ ndr->depth++;
+ ndr_print_netr_UAS_INFO_0(ndr, "recordid", r->out.recordid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_GetDcName(struct ndr_push *ndr, int flags, const struct netr_GetDcName *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
+ if (r->in.domainname) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.dcname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.dcname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_GetDcName(struct ndr_pull *ndr, int flags, struct netr_GetDcName *r)
+{
+ uint32_t _ptr_domainname;
+ uint32_t _ptr_dcname;
+ TALLOC_CTX *_mem_save_domainname_0;
+ TALLOC_CTX *_mem_save_dcname_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
+ if (_ptr_domainname) {
+ NDR_PULL_ALLOC(ndr, r->in.domainname);
+ } else {
+ r->in.domainname = NULL;
+ }
+ if (r->in.domainname) {
+ _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
+ if (ndr_get_array_length(ndr, &r->in.domainname) > ndr_get_array_size(ndr, &r->in.domainname)) {
+ 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.domainname), ndr_get_array_length(ndr, &r->in.domainname));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domainname), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, ndr_get_array_length(ndr, &r->in.domainname), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.dcname);
+ ZERO_STRUCTP(r->out.dcname);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.dcname);
+ }
+ _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dcname));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
+ if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r)
+{
+ ndr_print_struct(ndr, name, "netr_GetDcName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_GetDcName");
+ ndr->depth++;
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ ndr_print_ptr(ndr, "domainname", r->in.domainname);
+ ndr->depth++;
+ if (r->in.domainname) {
+ ndr_print_string(ndr, "domainname", r->in.domainname);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_GetDcName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "dcname", r->out.dcname);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "dcname", *r->out.dcname);
+ ndr->depth++;
+ ndr_print_string(ndr, "dcname", *r->out.dcname);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonControl(struct ndr_push *ndr, int flags, const struct netr_LogonControl *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_netr_LogonControlCode(ndr, NDR_SCALARS, r->in.function_code));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int flags, struct netr_LogonControl *r)
+{
+ uint32_t _ptr_logon_server;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonControl");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonControl");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_netr_LogonControlCode(ndr, "function_code", r->in.function_code);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonControl");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_GetAnyDCName(struct ndr_push *ndr, int flags, const struct netr_GetAnyDCName *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domainname));
+ if (r->in.domainname) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domainname, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domainname, ndr_charset_length(r->in.domainname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.dcname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.dcname == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.dcname, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.dcname, ndr_charset_length(*r->out.dcname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_GetAnyDCName(struct ndr_pull *ndr, int flags, struct netr_GetAnyDCName *r)
+{
+ uint32_t _ptr_logon_server;
+ uint32_t _ptr_domainname;
+ uint32_t _ptr_dcname;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_domainname_0;
+ TALLOC_CTX *_mem_save_dcname_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domainname));
+ if (_ptr_domainname) {
+ NDR_PULL_ALLOC(ndr, r->in.domainname);
+ } else {
+ r->in.domainname = NULL;
+ }
+ if (r->in.domainname) {
+ _mem_save_domainname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domainname, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domainname));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domainname));
+ if (ndr_get_array_length(ndr, &r->in.domainname) > ndr_get_array_size(ndr, &r->in.domainname)) {
+ 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.domainname), ndr_get_array_length(ndr, &r->in.domainname));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domainname), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domainname, ndr_get_array_length(ndr, &r->in.domainname), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domainname_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.dcname);
+ ZERO_STRUCTP(r->out.dcname);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.dcname);
+ }
+ _mem_save_dcname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.dcname, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dcname));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.dcname));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.dcname));
+ if (ndr_get_array_length(ndr, r->out.dcname) > ndr_get_array_size(ndr, r->out.dcname)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.dcname), ndr_get_array_length(ndr, r->out.dcname));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.dcname, ndr_get_array_length(ndr, r->out.dcname), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dcname_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r)
+{
+ ndr_print_struct(ndr, name, "netr_GetAnyDCName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_GetAnyDCName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domainname", r->in.domainname);
+ ndr->depth++;
+ if (r->in.domainname) {
+ ndr_print_string(ndr, "domainname", r->in.domainname);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_GetAnyDCName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "dcname", r->out.dcname);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "dcname", *r->out.dcname);
+ ndr->depth++;
+ ndr_print_string(ndr, "dcname", *r->out.dcname);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonControl2(struct ndr_push *ndr, int flags, const struct netr_LogonControl2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.function_code));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.query == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
+ NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int flags, struct netr_LogonControl2 *r)
+{
+ uint32_t _ptr_logon_server;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_query_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.function_code));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ NDR_PULL_ALLOC(ndr, r->out.query);
+ ZERO_STRUCTP(r->out.query);
+ }
+ if (flags & NDR_OUT) {
+ 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_set_switch_value(ndr, r->out.query, r->in.level));
+ NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonControl2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonControl2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "function_code", r->in.function_code);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.data, r->in.function_code);
+ ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", &r->in.data);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonControl2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "query", r->out.query);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
+ ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ if (r->in.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ if (r->in.negotiate_flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.negotiate_flags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ if (r->out.negotiate_flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.negotiate_flags));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate2 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_credentials_0;
+ TALLOC_CTX *_mem_save_negotiate_flags_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
+ }
+ _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.negotiate_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ *r->out.credentials = *r->in.credentials;
+ NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
+ *r->out.negotiate_flags = *r->in.negotiate_flags;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
+ }
+ _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.negotiate_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerAuthenticate2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerAuthenticate2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_ptr(ndr, "credentials", r->in.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "negotiate_flags", *r->in.negotiate_flags);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "negotiate_flags", *r->out.negotiate_flags);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int flags, const struct netr_DatabaseSync2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.restart_state));
+ if (r->in.sync_context == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.sync_context));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferredmaximumlength));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.sync_context == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sync_context));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array));
+ if (r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r)
+{
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_sync_context_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.restart_state));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sync_context);
+ }
+ _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sync_context, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.sync_context));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferredmaximumlength));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.sync_context);
+ *r->out.sync_context = *r->in.sync_context;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sync_context);
+ }
+ _mem_save_sync_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sync_context, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sync_context));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sync_context_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
+ } else {
+ r->out.delta_enum_array = NULL;
+ }
+ if (r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_DatabaseSync2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DatabaseSync2");
+ ndr->depth++;
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id);
+ ndr_print_uint16(ndr, "restart_state", r->in.restart_state);
+ ndr_print_ptr(ndr, "sync_context", r->in.sync_context);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sync_context", *r->in.sync_context);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "preferredmaximumlength", r->in.preferredmaximumlength);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DatabaseSync2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sync_context", r->out.sync_context);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sync_context", *r->out.sync_context);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr->depth++;
+ if (r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int flags, const struct netr_DatabaseRedo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.change_log_entry));
+ if (r->in.change_log_entry) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, r->in.change_log_entry_size));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.delta_enum_array));
+ if (r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int flags, struct netr_DatabaseRedo *r)
+{
+ uint32_t _ptr_change_log_entry;
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_change_log_entry_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computername));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computername));
+ if (ndr_get_array_length(ndr, &r->in.computername) > ndr_get_array_size(ndr, &r->in.computername)) {
+ 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.computername), ndr_get_array_length(ndr, &r->in.computername));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_change_log_entry));
+ if (_ptr_change_log_entry) {
+ NDR_PULL_ALLOC(ndr, r->in.change_log_entry);
+ } else {
+ r->in.change_log_entry = NULL;
+ }
+ if (r->in.change_log_entry) {
+ _mem_save_change_log_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.change_log_entry, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.change_log_entry));
+ NDR_PULL_ALLOC_N(ndr, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_change_log_entry_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ if (r->in.change_log_entry) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.change_log_entry, r->in.change_log_entry_size));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
+ } else {
+ r->out.delta_enum_array = NULL;
+ }
+ if (r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r)
+{
+ ndr_print_struct(ndr, name, "netr_DatabaseRedo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DatabaseRedo");
+ ndr->depth++;
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ ndr_print_string(ndr, "computername", r->in.computername);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "change_log_entry", r->in.change_log_entry);
+ ndr->depth++;
+ if (r->in.change_log_entry) {
+ ndr_print_array_uint8(ndr, "change_log_entry", r->in.change_log_entry, r->in.change_log_entry_size);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "change_log_entry_size", r->in.change_log_entry_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DatabaseRedo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr->depth++;
+ if (r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonControl2Ex(struct ndr_push *ndr, int flags, const struct netr_LogonControl2Ex *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logon_server));
+ if (r->in.logon_server) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.logon_server, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logon_server, ndr_charset_length(r->in.logon_server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.function_code));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.query == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level));
+ NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonControl2Ex(struct ndr_pull *ndr, int flags, struct netr_LogonControl2Ex *r)
+{
+ uint32_t _ptr_logon_server;
+ TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_query_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logon_server));
+ if (_ptr_logon_server) {
+ NDR_PULL_ALLOC(ndr, r->in.logon_server);
+ } else {
+ r->in.logon_server = NULL;
+ }
+ if (r->in.logon_server) {
+ _mem_save_logon_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon_server, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logon_server));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logon_server));
+ if (ndr_get_array_length(ndr, &r->in.logon_server) > ndr_get_array_size(ndr, &r->in.logon_server)) {
+ 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.logon_server), ndr_get_array_length(ndr, &r->in.logon_server));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logon_server, ndr_get_array_length(ndr, &r->in.logon_server), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_server_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.function_code));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ NDR_PULL_ALLOC(ndr, r->out.query);
+ ZERO_STRUCTP(r->out.query);
+ }
+ if (flags & NDR_OUT) {
+ 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_set_switch_value(ndr, r->out.query, r->in.level));
+ NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonControl2Ex");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonControl2Ex");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "logon_server", r->in.logon_server);
+ ndr->depth++;
+ if (r->in.logon_server) {
+ ndr_print_string(ndr, "logon_server", r->in.logon_server);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "function_code", r->in.function_code);
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.data, r->in.function_code);
+ ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", &r->in.data);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonControl2Ex");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "query", r->out.query);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.query, r->in.level);
+ ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRENUMERATETRUSTEDDOMAINS");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRENUMERATETRUSTEDDOMAINS");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRENUMERATETRUSTEDDOMAINS");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCName *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
+ if (r->in.domain_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
+ if (r->in.domain_guid) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.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_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCName *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_domain_name;
+ uint32_t _ptr_domain_guid;
+ uint32_t _ptr_site_guid;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_domain_name_0;
+ TALLOC_CTX *_mem_save_domain_guid_0;
+ TALLOC_CTX *_mem_save_site_guid_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
+ if (_ptr_domain_name) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_name);
+ } else {
+ r->in.domain_name = NULL;
+ }
+ if (r->in.domain_name) {
+ _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
+ if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
+ if (_ptr_domain_guid) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_guid);
+ } else {
+ r->in.domain_guid = NULL;
+ }
+ if (r->in.domain_guid) {
+ _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_guid));
+ if (_ptr_site_guid) {
+ NDR_PULL_ALLOC(ndr, r->in.site_guid);
+ } else {
+ r->in.site_guid = NULL;
+ }
+ 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_PULL_SET_MEM_CTX(ndr, _mem_save_site_guid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r)
+{
+ ndr_print_struct(ndr, name, "netr_DsRGetDCName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DsRGetDCName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
+ ndr->depth++;
+ if (r->in.domain_name) {
+ ndr_print_string(ndr, "domain_name", r->in.domain_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
+ ndr->depth++;
+ if (r->in.domain_guid) {
+ ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "site_guid", r->in.site_guid);
+ ndr->depth++;
+ if (r->in.site_guid) {
+ ndr_print_GUID(ndr, "site_guid", r->in.site_guid);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DsRGetDCName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONDUMMYROUTINE1(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONDUMMYROUTINE1 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONDUMMYROUTINE1");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONDUMMYROUTINE1");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONDUMMYROUTINE1");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONSETSERVICEBITS(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONSETSERVICEBITS(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSETSERVICEBITS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONSETSERVICEBITS");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONSETSERVICEBITS");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONSETSERVICEBITS");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONGETTRUSTRID(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTRUSTRID *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONGETTRUSTRID(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTRUSTRID *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONGETTRUSTRID(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTRUSTRID *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONGETTRUSTRID");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTRUSTRID");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTRUSTRID");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTESERVERDIGEST");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTESERVERDIGEST");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTESERVERDIGEST");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONCOMPUTECLIENTDIGEST");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONCOMPUTECLIENTDIGEST");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerAuthenticate3(struct ndr_push *ndr, int flags, const struct netr_ServerAuthenticate3 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ if (r->in.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ if (r->in.negotiate_flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.negotiate_flags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.credentials == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ if (r->out.negotiate_flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.negotiate_flags));
+ if (r->out.rid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.rid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerAuthenticate3(struct ndr_pull *ndr, int flags, struct netr_ServerAuthenticate3 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_credentials_0;
+ TALLOC_CTX *_mem_save_negotiate_flags_0;
+ TALLOC_CTX *_mem_save_rid_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.negotiate_flags);
+ }
+ _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.negotiate_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ *r->out.credentials = *r->in.credentials;
+ NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
+ *r->out.negotiate_flags = *r->in.negotiate_flags;
+ NDR_PULL_ALLOC(ndr, r->out.rid);
+ ZERO_STRUCTP(r->out.rid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.credentials);
+ }
+ _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
+ }
+ _mem_save_negotiate_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.negotiate_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.rid);
+ }
+ _mem_save_rid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.rid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.rid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerAuthenticate3");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerAuthenticate3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_ptr(ndr, "credentials", r->in.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->in.credentials);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "negotiate_flags", r->in.negotiate_flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "negotiate_flags", *r->in.negotiate_flags);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerAuthenticate3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr->depth++;
+ ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "negotiate_flags", *r->out.negotiate_flags);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "rid", r->out.rid);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "rid", *r->out.rid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DsRGetDCNameEx(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
+ if (r->in.domain_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
+ if (r->in.domain_guid) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
+ if (r->in.site_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsRGetDCNameEx(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_domain_name;
+ uint32_t _ptr_domain_guid;
+ uint32_t _ptr_site_name;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_domain_name_0;
+ TALLOC_CTX *_mem_save_domain_guid_0;
+ TALLOC_CTX *_mem_save_site_name_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
+ if (_ptr_domain_name) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_name);
+ } else {
+ r->in.domain_name = NULL;
+ }
+ if (r->in.domain_name) {
+ _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
+ if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
+ if (_ptr_domain_guid) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_guid);
+ } else {
+ r->in.domain_guid = NULL;
+ }
+ if (r->in.domain_guid) {
+ _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
+ if (_ptr_site_name) {
+ NDR_PULL_ALLOC(ndr, r->in.site_name);
+ } else {
+ r->in.site_name = NULL;
+ }
+ if (r->in.site_name) {
+ _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
+ if (ndr_get_array_length(ndr, &r->in.site_name) > ndr_get_array_size(ndr, &r->in.site_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.site_name), ndr_get_array_length(ndr, &r->in.site_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r)
+{
+ ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
+ ndr->depth++;
+ if (r->in.domain_name) {
+ ndr_print_string(ndr, "domain_name", r->in.domain_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
+ ndr->depth++;
+ if (r->in.domain_guid) {
+ ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "site_name", r->in.site_name);
+ ndr->depth++;
+ if (r->in.site_name) {
+ ndr_print_string(ndr, "site_name", r->in.site_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DsRGetSiteName(struct ndr_push *ndr, int flags, const struct netr_DsRGetSiteName *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.site == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ if (*r->out.site == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.site, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.site, ndr_charset_length(*r->out.site, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsRGetSiteName(struct ndr_pull *ndr, int flags, struct netr_DsRGetSiteName *r)
+{
+ uint32_t _ptr_computer_name;
+ uint32_t _ptr_site;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_site_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.site);
+ ZERO_STRUCTP(r->out.site);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.site);
+ }
+ _mem_save_site_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.site, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_site));
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.site));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.site));
+ if (ndr_get_array_length(ndr, r->out.site) > ndr_get_array_size(ndr, r->out.site)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.site), ndr_get_array_length(ndr, r->out.site));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.site, ndr_get_array_length(ndr, r->out.site), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r)
+{
+ ndr_print_struct(ndr, name, "netr_DsRGetSiteName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DsRGetSiteName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DsRGetSiteName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "site", r->out.site);
+ ndr->depth++;
+ ndr_print_ptr(ndr, "site", *r->out.site);
+ ndr->depth++;
+ ndr_print_string(ndr, "site", *r->out.site);
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonGetDomainInfo(struct ndr_push *ndr, int flags, const struct netr_LogonGetDomainInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.credential == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ if (r->in.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.query, r->in.level));
+ NDR_CHECK(ndr_push_netr_DomainQuery(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.query));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonGetDomainInfo(struct ndr_pull *ndr, int flags, struct netr_LogonGetDomainInfo *r)
+{
+ uint32_t _ptr_computer_name;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.query, r->in.level));
+ NDR_CHECK(ndr_pull_netr_DomainQuery(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.query));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_netr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonGetDomainInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonGetDomainInfo");
+ ndr->depth++;
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "level", r->in.level);
+ ndr_print_set_switch_value(ndr, &r->in.query, r->in.level);
+ ndr_print_netr_DomainQuery(ndr, "query", &r->in.query);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonGetDomainInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_netr_DomainInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_ServerPasswordSet2(struct ndr_push *ndr, int flags, const struct netr_ServerPasswordSet2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.account_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.account_name, ndr_charset_length(r->in.account_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->in.secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ NDR_CHECK(ndr_push_netr_CryptPassword(ndr, NDR_SCALARS, &r->in.new_password));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.return_authenticator == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_ServerPasswordSet2(struct ndr_pull *ndr, int flags, struct netr_ServerPasswordSet2 *r)
+{
+ uint32_t _ptr_server_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.account_name));
+ if (ndr_get_array_length(ndr, &r->in.account_name) > ndr_get_array_size(ndr, &r->in.account_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.account_name), ndr_get_array_length(ndr, &r->in.account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.account_name, ndr_get_array_length(ndr, &r->in.account_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->in.secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ NDR_CHECK(ndr_pull_netr_CryptPassword(ndr, NDR_SCALARS, &r->in.new_password));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ ZERO_STRUCTP(r->out.return_authenticator);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_ServerPasswordSet2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_ServerPasswordSet2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_string(ndr, "account_name", r->in.account_name);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_netr_CryptPassword(ndr, "new_password", &r->in.new_password);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_ServerPasswordSet2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRSERVERPASSWORDGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERPASSWORDGET *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRSERVERPASSWORDGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERPASSWORDGET *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRSERVERPASSWORDGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERPASSWORDGET *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRSERVERPASSWORDGET");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRSERVERPASSWORDGET");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRSERVERPASSWORDGET");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONSENDTOSAM(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONSENDTOSAM *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONSENDTOSAM(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONSENDTOSAM *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONSENDTOSAM");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONSENDTOSAM");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONSENDTOSAM");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r)
+{
+ ndr_print_struct(ndr, name, "netr_DSRADDRESSTOSITENAMESW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DSRADDRESSTOSITENAMESW");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DSRADDRESSTOSITENAMESW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DsRGetDCNameEx2(struct ndr_push *ndr, int flags, const struct netr_DsRGetDCNameEx2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
+ if (r->in.server_unc) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client_account));
+ if (r->in.client_account) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client_account, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client_account, ndr_charset_length(r->in.client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.mask));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_name));
+ if (r->in.domain_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.domain_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.domain_name, ndr_charset_length(r->in.domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.domain_guid));
+ if (r->in.domain_guid) {
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.site_name));
+ if (r->in.site_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.site_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.site_name, ndr_charset_length(r->in.site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsRGetDCNameEx2(struct ndr_pull *ndr, int flags, struct netr_DsRGetDCNameEx2 *r)
+{
+ uint32_t _ptr_server_unc;
+ uint32_t _ptr_client_account;
+ uint32_t _ptr_domain_name;
+ uint32_t _ptr_domain_guid;
+ uint32_t _ptr_site_name;
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_client_account_0;
+ TALLOC_CTX *_mem_save_domain_name_0;
+ TALLOC_CTX *_mem_save_domain_guid_0;
+ TALLOC_CTX *_mem_save_site_name_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
+ if (_ptr_server_unc) {
+ NDR_PULL_ALLOC(ndr, r->in.server_unc);
+ } else {
+ r->in.server_unc = NULL;
+ }
+ if (r->in.server_unc) {
+ _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
+ if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
+ if (_ptr_client_account) {
+ NDR_PULL_ALLOC(ndr, r->in.client_account);
+ } else {
+ r->in.client_account = NULL;
+ }
+ if (r->in.client_account) {
+ _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.client_account, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client_account));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client_account));
+ if (ndr_get_array_length(ndr, &r->in.client_account) > ndr_get_array_size(ndr, &r->in.client_account)) {
+ 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.client_account), ndr_get_array_length(ndr, &r->in.client_account));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client_account), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client_account, ndr_get_array_length(ndr, &r->in.client_account), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.mask));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
+ if (_ptr_domain_name) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_name);
+ } else {
+ r->in.domain_name = NULL;
+ }
+ if (r->in.domain_name) {
+ _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.domain_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.domain_name));
+ if (ndr_get_array_length(ndr, &r->in.domain_name) > ndr_get_array_size(ndr, &r->in.domain_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.domain_name), ndr_get_array_length(ndr, &r->in.domain_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.domain_name, ndr_get_array_length(ndr, &r->in.domain_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_guid));
+ if (_ptr_domain_guid) {
+ NDR_PULL_ALLOC(ndr, r->in.domain_guid);
+ } else {
+ r->in.domain_guid = NULL;
+ }
+ if (r->in.domain_guid) {
+ _mem_save_domain_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_guid, 0);
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain_guid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_guid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
+ if (_ptr_site_name) {
+ NDR_PULL_ALLOC(ndr, r->in.site_name);
+ } else {
+ r->in.site_name = NULL;
+ }
+ if (r->in.site_name) {
+ _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.site_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.site_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.site_name));
+ if (ndr_get_array_length(ndr, &r->in.site_name) > ndr_get_array_size(ndr, &r->in.site_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.site_name), ndr_get_array_length(ndr, &r->in.site_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.site_name, ndr_get_array_length(ndr, &r->in.site_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r)
+{
+ ndr_print_struct(ndr, name, "netr_DsRGetDCNameEx2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DsRGetDCNameEx2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
+ ndr->depth++;
+ if (r->in.server_unc) {
+ ndr_print_string(ndr, "server_unc", r->in.server_unc);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "client_account", r->in.client_account);
+ ndr->depth++;
+ if (r->in.client_account) {
+ ndr_print_string(ndr, "client_account", r->in.client_account);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "mask", r->in.mask);
+ ndr_print_ptr(ndr, "domain_name", r->in.domain_name);
+ ndr->depth++;
+ if (r->in.domain_name) {
+ ndr_print_string(ndr, "domain_name", r->in.domain_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "domain_guid", r->in.domain_guid);
+ ndr->depth++;
+ if (r->in.domain_guid) {
+ ndr_print_GUID(ndr, "domain_guid", r->in.domain_guid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "site_name", r->in.site_name);
+ ndr->depth++;
+ if (r->in.site_name) {
+ ndr_print_string(ndr, "site_name", r->in.site_name);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DsRGetDCNameEx2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_push *ndr, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_pull *ndr, int flags, struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRENUMERATETRUSTEDDOMAINSEX");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRENUMERATETRUSTEDDOMAINSEX");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRENUMERATETRUSTEDDOMAINSEX");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_push *ndr, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_pull *ndr, int flags, struct netr_DSRADDRESSTOSITENAMESEXW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r)
+{
+ ndr_print_struct(ndr, name, "netr_DSRADDRESSTOSITENAMESEXW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DSRADDRESSTOSITENAMESEXW");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DSRADDRESSTOSITENAMESEXW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DSRGETDCSITECOVERAGEW(struct ndr_push *ndr, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DSRGETDCSITECOVERAGEW(struct ndr_pull *ndr, int flags, struct netr_DSRGETDCSITECOVERAGEW *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DSRGETDCSITECOVERAGEW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r)
+{
+ ndr_print_struct(ndr, name, "netr_DSRGETDCSITECOVERAGEW");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DSRGETDCSITECOVERAGEW");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DSRGETDCSITECOVERAGEW");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonEx *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
+ if (r->in.flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.validation == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ if (r->out.authoritative == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
+ if (r->out.flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.flags));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonEx *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_computer_name;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_validation_0;
+ TALLOC_CTX *_mem_save_authoritative_0;
+ TALLOC_CTX *_mem_save_flags_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ 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);
+ }
+ _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ ZERO_STRUCTP(r->out.validation);
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ ZERO_STRUCTP(r->out.authoritative);
+ NDR_PULL_ALLOC(ndr, r->out.flags);
+ *r->out.flags = *r->in.flags;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ }
+ _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ }
+ _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.flags);
+ }
+ _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonSamLogonEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonSamLogonEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
+ ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
+ ndr_print_ptr(ndr, "flags", r->in.flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", *r->in.flags);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonSamLogonEx");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "validation", r->out.validation);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
+ ndr_print_netr_Validation(ndr, "validation", r->out.validation);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
+ ndr->depth++;
+ ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "flags", r->out.flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", *r->out.flags);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DsrEnumerateDomainTrusts(struct ndr_push *ndr, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
+{
+ uint32_t cntr_trusts_1;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->in.trust_flags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ if (r->out.trusts == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count));
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) {
+ if (r->out.trusts[cntr_trusts_1] == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_ref_ptr(ndr));
+ }
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) {
+ NDR_CHECK(ndr_push_netr_DomainTrust(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts[cntr_trusts_1]));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DsrEnumerateDomainTrusts(struct ndr_pull *ndr, int flags, struct netr_DsrEnumerateDomainTrusts *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_trusts;
+ uint32_t cntr_trusts_1;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_count_0;
+ TALLOC_CTX *_mem_save_trusts_1;
+ TALLOC_CTX *_mem_save_trusts_2;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->in.trust_flags));
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ ZERO_STRUCTP(r->out.count);
+ NDR_PULL_ALLOC_N(ndr, r->out.trusts, count);
+ memset(r->out.trusts, 0, count * sizeof(*r->out.trusts));
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.trusts));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.trusts, ndr_get_array_size(ndr, &r->out.trusts));
+ }
+ _mem_save_trusts_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts, 0);
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) {
+ NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_trusts));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.trusts[cntr_trusts_1]);
+ }
+ }
+ for (cntr_trusts_1 = 0; cntr_trusts_1 < r->out.count; cntr_trusts_1++) {
+ _mem_save_trusts_2 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.trusts[cntr_trusts_1], LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_DomainTrust(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trusts[cntr_trusts_1]));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_2, LIBNDR_FLAG_REF_ALLOC);
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, 0);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.trusts) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.trusts, r->out.count));
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r)
+{
+ uint32_t cntr_trusts_1;
+ ndr_print_struct(ndr, name, "netr_DsrEnumerateDomainTrusts");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DsrEnumerateDomainTrusts");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_netr_TrustFlags(ndr, "trust_flags", r->in.trust_flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DsrEnumerateDomainTrusts");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "trusts", r->out.trusts);
+ ndr->depth++;
+ ndr->print(ndr, "%s: ARRAY(%d)", "trusts", r->out.count);
+ ndr->depth++;
+ for (cntr_trusts_1=0;cntr_trusts_1<r->out.count;cntr_trusts_1++) {
+ char *idx_1=NULL;
+ asprintf(&idx_1, "[%d]", cntr_trusts_1);
+ if (idx_1) {
+ ndr_print_ptr(ndr, "trusts", r->out.trusts[cntr_trusts_1]);
+ ndr->depth++;
+ ndr_print_netr_DomainTrust(ndr, "trusts", r->out.trusts[cntr_trusts_1]);
+ ndr->depth--;
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_push *ndr, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_pull *ndr, int flags, struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
+{
+ ndr_print_struct(ndr, name, "netr_DSRDEREGISTERDNSHOSTRECORDS");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DSRDEREGISTERDNSHOSTRECORDS");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DSRDEREGISTERDNSHOSTRECORDS");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRSERVERTRUSTPASSWORDSGET");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRSERVERTRUSTPASSWORDSGET");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRSERVERTRUSTPASSWORDSGET");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_DSRGETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r)
+{
+ ndr_print_struct(ndr, name, "netr_DSRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_DSRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_DSRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct netr_NETRGETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRGETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *ndr, int flags, const struct netr_LogonSamLogonWithFlags *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
+ if (r->in.server_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.credential));
+ if (r->in.credential) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.return_authenticator));
+ if (r->in.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
+ if (r->in.flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
+ if (r->out.return_authenticator) {
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ }
+ if (r->out.validation == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_push_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ if (r->out.authoritative == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.authoritative));
+ if (r->out.flags == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.flags));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *ndr, int flags, struct netr_LogonSamLogonWithFlags *r)
+{
+ uint32_t _ptr_server_name;
+ uint32_t _ptr_computer_name;
+ uint32_t _ptr_credential;
+ uint32_t _ptr_return_authenticator;
+ TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_validation_0;
+ TALLOC_CTX *_mem_save_authoritative_0;
+ TALLOC_CTX *_mem_save_flags_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
+ if (_ptr_server_name) {
+ NDR_PULL_ALLOC(ndr, r->in.server_name);
+ } else {
+ r->in.server_name = NULL;
+ }
+ if (r->in.server_name) {
+ _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_credential));
+ if (_ptr_credential) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ } else {
+ r->in.credential = NULL;
+ }
+ if (r->in.credential) {
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ } else {
+ r->in.return_authenticator = NULL;
+ }
+ if (r->in.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, 0);
+ 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_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ 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);
+ }
+ _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ ZERO_STRUCTP(r->out.validation);
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ ZERO_STRUCTP(r->out.authoritative);
+ NDR_PULL_ALLOC(ndr, r->out.flags);
+ *r->out.flags = *r->in.flags;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
+ if (_ptr_return_authenticator) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ } else {
+ r->out.return_authenticator = NULL;
+ }
+ if (r->out.return_authenticator) {
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, 0);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.validation);
+ }
+ _mem_save_validation_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.validation, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.validation, r->in.validation_level));
+ NDR_CHECK(ndr_pull_netr_Validation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.validation));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_validation_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.authoritative);
+ }
+ _mem_save_authoritative_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.authoritative, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.authoritative));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authoritative_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.flags);
+ }
+ _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r)
+{
+ ndr_print_struct(ndr, name, "netr_LogonSamLogonWithFlags");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_LogonSamLogonWithFlags");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "server_name", r->in.server_name);
+ ndr->depth++;
+ if (r->in.server_name) {
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ if (r->in.credential) {
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ if (r->in.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
+ ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
+ ndr_print_ptr(ndr, "flags", r->in.flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", *r->in.flags);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_LogonSamLogonWithFlags");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ if (r->out.return_authenticator) {
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "validation", r->out.validation);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.validation, r->in.validation_level);
+ ndr_print_netr_Validation(ndr, "validation", r->out.validation);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "authoritative", r->out.authoritative);
+ ndr->depth++;
+ ndr_print_uint8(ndr, "authoritative", *r->out.authoritative);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "flags", r->out.flags);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "flags", *r->out.flags);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_netr_NETRSERVERGETTRUSTINFO(struct ndr_push *ndr, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_netr_NETRSERVERGETTRUSTINFO(struct ndr_pull *ndr, int flags, struct netr_NETRSERVERGETTRUSTINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r)
+{
+ ndr_print_struct(ndr, name, "netr_NETRSERVERGETTRUSTINFO");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "netr_NETRSERVERGETTRUSTINFO");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "netr_NETRSERVERGETTRUSTINFO");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+const struct dcerpc_interface_call netlogon_calls[] = {
+ {
+ "netr_LogonUasLogon",
+ sizeof(struct netr_LogonUasLogon),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogon,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogon,
+ (ndr_print_function_t) ndr_print_netr_LogonUasLogon,
+ False,
+ },
+ {
+ "netr_LogonUasLogoff",
+ sizeof(struct netr_LogonUasLogoff),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonUasLogoff,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonUasLogoff,
+ (ndr_print_function_t) ndr_print_netr_LogonUasLogoff,
+ False,
+ },
+ {
+ "netr_LogonSamLogon",
+ sizeof(struct netr_LogonSamLogon),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogon,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogon,
+ (ndr_print_function_t) ndr_print_netr_LogonSamLogon,
+ False,
+ },
+ {
+ "netr_LogonSamLogoff",
+ sizeof(struct netr_LogonSamLogoff),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogoff,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogoff,
+ (ndr_print_function_t) ndr_print_netr_LogonSamLogoff,
+ False,
+ },
+ {
+ "netr_ServerReqChallenge",
+ sizeof(struct netr_ServerReqChallenge),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerReqChallenge,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerReqChallenge,
+ (ndr_print_function_t) ndr_print_netr_ServerReqChallenge,
+ False,
+ },
+ {
+ "netr_ServerAuthenticate",
+ sizeof(struct netr_ServerAuthenticate),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate,
+ (ndr_print_function_t) ndr_print_netr_ServerAuthenticate,
+ False,
+ },
+ {
+ "netr_ServerPasswordSet",
+ sizeof(struct netr_ServerPasswordSet),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet,
+ (ndr_print_function_t) ndr_print_netr_ServerPasswordSet,
+ False,
+ },
+ {
+ "netr_DatabaseDeltas",
+ sizeof(struct netr_DatabaseDeltas),
+ (ndr_push_flags_fn_t) ndr_push_netr_DatabaseDeltas,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseDeltas,
+ (ndr_print_function_t) ndr_print_netr_DatabaseDeltas,
+ False,
+ },
+ {
+ "netr_DatabaseSync",
+ sizeof(struct netr_DatabaseSync),
+ (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync,
+ (ndr_print_function_t) ndr_print_netr_DatabaseSync,
+ False,
+ },
+ {
+ "netr_AccountDeltas",
+ sizeof(struct netr_AccountDeltas),
+ (ndr_push_flags_fn_t) ndr_push_netr_AccountDeltas,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_AccountDeltas,
+ (ndr_print_function_t) ndr_print_netr_AccountDeltas,
+ False,
+ },
+ {
+ "netr_AccountSync",
+ sizeof(struct netr_AccountSync),
+ (ndr_push_flags_fn_t) ndr_push_netr_AccountSync,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_AccountSync,
+ (ndr_print_function_t) ndr_print_netr_AccountSync,
+ False,
+ },
+ {
+ "netr_GetDcName",
+ sizeof(struct netr_GetDcName),
+ (ndr_push_flags_fn_t) ndr_push_netr_GetDcName,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_GetDcName,
+ (ndr_print_function_t) ndr_print_netr_GetDcName,
+ False,
+ },
+ {
+ "netr_LogonControl",
+ sizeof(struct netr_LogonControl),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonControl,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl,
+ (ndr_print_function_t) ndr_print_netr_LogonControl,
+ False,
+ },
+ {
+ "netr_GetAnyDCName",
+ sizeof(struct netr_GetAnyDCName),
+ (ndr_push_flags_fn_t) ndr_push_netr_GetAnyDCName,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_GetAnyDCName,
+ (ndr_print_function_t) ndr_print_netr_GetAnyDCName,
+ False,
+ },
+ {
+ "netr_LogonControl2",
+ sizeof(struct netr_LogonControl2),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2,
+ (ndr_print_function_t) ndr_print_netr_LogonControl2,
+ False,
+ },
+ {
+ "netr_ServerAuthenticate2",
+ sizeof(struct netr_ServerAuthenticate2),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate2,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate2,
+ (ndr_print_function_t) ndr_print_netr_ServerAuthenticate2,
+ False,
+ },
+ {
+ "netr_DatabaseSync2",
+ sizeof(struct netr_DatabaseSync2),
+ (ndr_push_flags_fn_t) ndr_push_netr_DatabaseSync2,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseSync2,
+ (ndr_print_function_t) ndr_print_netr_DatabaseSync2,
+ False,
+ },
+ {
+ "netr_DatabaseRedo",
+ sizeof(struct netr_DatabaseRedo),
+ (ndr_push_flags_fn_t) ndr_push_netr_DatabaseRedo,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DatabaseRedo,
+ (ndr_print_function_t) ndr_print_netr_DatabaseRedo,
+ False,
+ },
+ {
+ "netr_LogonControl2Ex",
+ sizeof(struct netr_LogonControl2Ex),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonControl2Ex,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonControl2Ex,
+ (ndr_print_function_t) ndr_print_netr_LogonControl2Ex,
+ False,
+ },
+ {
+ "netr_NETRENUMERATETRUSTEDDOMAINS",
+ sizeof(struct netr_NETRENUMERATETRUSTEDDOMAINS),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS,
+ (ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS,
+ False,
+ },
+ {
+ "netr_DsRGetDCName",
+ sizeof(struct netr_DsRGetDCName),
+ (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCName,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCName,
+ (ndr_print_function_t) ndr_print_netr_DsRGetDCName,
+ False,
+ },
+ {
+ "netr_NETRLOGONDUMMYROUTINE1",
+ sizeof(struct netr_NETRLOGONDUMMYROUTINE1),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONDUMMYROUTINE1,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONDUMMYROUTINE1,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONDUMMYROUTINE1,
+ False,
+ },
+ {
+ "netr_NETRLOGONSETSERVICEBITS",
+ sizeof(struct netr_NETRLOGONSETSERVICEBITS),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSETSERVICEBITS,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSETSERVICEBITS,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONSETSERVICEBITS,
+ False,
+ },
+ {
+ "netr_NETRLOGONGETTRUSTRID",
+ sizeof(struct netr_NETRLOGONGETTRUSTRID),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTRUSTRID,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTRUSTRID,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTRUSTRID,
+ False,
+ },
+ {
+ "netr_NETRLOGONCOMPUTESERVERDIGEST",
+ sizeof(struct netr_NETRLOGONCOMPUTESERVERDIGEST),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST,
+ False,
+ },
+ {
+ "netr_NETRLOGONCOMPUTECLIENTDIGEST",
+ sizeof(struct netr_NETRLOGONCOMPUTECLIENTDIGEST),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST,
+ False,
+ },
+ {
+ "netr_ServerAuthenticate3",
+ sizeof(struct netr_ServerAuthenticate3),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerAuthenticate3,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerAuthenticate3,
+ (ndr_print_function_t) ndr_print_netr_ServerAuthenticate3,
+ False,
+ },
+ {
+ "netr_DsRGetDCNameEx",
+ sizeof(struct netr_DsRGetDCNameEx),
+ (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx,
+ (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx,
+ False,
+ },
+ {
+ "netr_DsRGetSiteName",
+ sizeof(struct netr_DsRGetSiteName),
+ (ndr_push_flags_fn_t) ndr_push_netr_DsRGetSiteName,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetSiteName,
+ (ndr_print_function_t) ndr_print_netr_DsRGetSiteName,
+ False,
+ },
+ {
+ "netr_LogonGetDomainInfo",
+ sizeof(struct netr_LogonGetDomainInfo),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonGetDomainInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetDomainInfo,
+ (ndr_print_function_t) ndr_print_netr_LogonGetDomainInfo,
+ False,
+ },
+ {
+ "netr_ServerPasswordSet2",
+ sizeof(struct netr_ServerPasswordSet2),
+ (ndr_push_flags_fn_t) ndr_push_netr_ServerPasswordSet2,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_ServerPasswordSet2,
+ (ndr_print_function_t) ndr_print_netr_ServerPasswordSet2,
+ False,
+ },
+ {
+ "netr_NETRSERVERPASSWORDGET",
+ sizeof(struct netr_NETRSERVERPASSWORDGET),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERPASSWORDGET,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERPASSWORDGET,
+ (ndr_print_function_t) ndr_print_netr_NETRSERVERPASSWORDGET,
+ False,
+ },
+ {
+ "netr_NETRLOGONSENDTOSAM",
+ sizeof(struct netr_NETRLOGONSENDTOSAM),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONSENDTOSAM,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONSENDTOSAM,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONSENDTOSAM,
+ False,
+ },
+ {
+ "netr_DSRADDRESSTOSITENAMESW",
+ sizeof(struct netr_DSRADDRESSTOSITENAMESW),
+ (ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESW,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESW,
+ (ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESW,
+ False,
+ },
+ {
+ "netr_DsRGetDCNameEx2",
+ sizeof(struct netr_DsRGetDCNameEx2),
+ (ndr_push_flags_fn_t) ndr_push_netr_DsRGetDCNameEx2,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DsRGetDCNameEx2,
+ (ndr_print_function_t) ndr_print_netr_DsRGetDCNameEx2,
+ False,
+ },
+ {
+ "netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN",
+ sizeof(struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
+ (ndr_print_function_t) ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
+ False,
+ },
+ {
+ "netr_NETRENUMERATETRUSTEDDOMAINSEX",
+ sizeof(struct netr_NETRENUMERATETRUSTEDDOMAINSEX),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX,
+ (ndr_print_function_t) ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX,
+ False,
+ },
+ {
+ "netr_DSRADDRESSTOSITENAMESEXW",
+ sizeof(struct netr_DSRADDRESSTOSITENAMESEXW),
+ (ndr_push_flags_fn_t) ndr_push_netr_DSRADDRESSTOSITENAMESEXW,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DSRADDRESSTOSITENAMESEXW,
+ (ndr_print_function_t) ndr_print_netr_DSRADDRESSTOSITENAMESEXW,
+ False,
+ },
+ {
+ "netr_DSRGETDCSITECOVERAGEW",
+ sizeof(struct netr_DSRGETDCSITECOVERAGEW),
+ (ndr_push_flags_fn_t) ndr_push_netr_DSRGETDCSITECOVERAGEW,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETDCSITECOVERAGEW,
+ (ndr_print_function_t) ndr_print_netr_DSRGETDCSITECOVERAGEW,
+ False,
+ },
+ {
+ "netr_LogonSamLogonEx",
+ sizeof(struct netr_LogonSamLogonEx),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonEx,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonEx,
+ (ndr_print_function_t) ndr_print_netr_LogonSamLogonEx,
+ False,
+ },
+ {
+ "netr_DsrEnumerateDomainTrusts",
+ sizeof(struct netr_DsrEnumerateDomainTrusts),
+ (ndr_push_flags_fn_t) ndr_push_netr_DsrEnumerateDomainTrusts,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DsrEnumerateDomainTrusts,
+ (ndr_print_function_t) ndr_print_netr_DsrEnumerateDomainTrusts,
+ False,
+ },
+ {
+ "netr_DSRDEREGISTERDNSHOSTRECORDS",
+ sizeof(struct netr_DSRDEREGISTERDNSHOSTRECORDS),
+ (ndr_push_flags_fn_t) ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS,
+ (ndr_print_function_t) ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS,
+ False,
+ },
+ {
+ "netr_NETRSERVERTRUSTPASSWORDSGET",
+ sizeof(struct netr_NETRSERVERTRUSTPASSWORDSGET),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET,
+ (ndr_print_function_t) ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET,
+ False,
+ },
+ {
+ "netr_DSRGETFORESTTRUSTINFORMATION",
+ sizeof(struct netr_DSRGETFORESTTRUSTINFORMATION),
+ (ndr_push_flags_fn_t) ndr_push_netr_DSRGETFORESTTRUSTINFORMATION,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION,
+ (ndr_print_function_t) ndr_print_netr_DSRGETFORESTTRUSTINFORMATION,
+ False,
+ },
+ {
+ "netr_NETRGETFORESTTRUSTINFORMATION",
+ sizeof(struct netr_NETRGETFORESTTRUSTINFORMATION),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRGETFORESTTRUSTINFORMATION,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION,
+ (ndr_print_function_t) ndr_print_netr_NETRGETFORESTTRUSTINFORMATION,
+ False,
+ },
+ {
+ "netr_LogonSamLogonWithFlags",
+ sizeof(struct netr_LogonSamLogonWithFlags),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonSamLogonWithFlags,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonSamLogonWithFlags,
+ (ndr_print_function_t) ndr_print_netr_LogonSamLogonWithFlags,
+ False,
+ },
+ {
+ "netr_NETRSERVERGETTRUSTINFO",
+ sizeof(struct netr_NETRSERVERGETTRUSTINFO),
+ (ndr_push_flags_fn_t) ndr_push_netr_NETRSERVERGETTRUSTINFO,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_NETRSERVERGETTRUSTINFO,
+ (ndr_print_function_t) ndr_print_netr_NETRSERVERGETTRUSTINFO,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const netlogon_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\netlogon]",
+ "ncacn_ip_tcp:",
+ "ncalrpc:",
+};
+
+const struct dcerpc_endpoint_list netlogon_endpoints = {
+ .count = 3,
+ .names = netlogon_endpoint_strings
+};
+
+const char * const netlogon_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list netlogon_authservices = {
+ .count = 3,
+ .names = netlogon_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_netlogon = {
+ .name = "netlogon",
+ .syntax_id = {
+ {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0xcf,0xfb}},
+ DCERPC_NETLOGON_VERSION
+ },
+ .helpstring = DCERPC_NETLOGON_HELPSTRING,
+ .num_calls = 47,
+ .calls = netlogon_calls,
+ .endpoints = &netlogon_endpoints,
+ .authservices = &netlogon_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h
new file mode 100644
index 0000000000..f00a3cbdbf
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_netlogon.h
@@ -0,0 +1,247 @@
+/* header auto-generated by pidl */
+
+#include "librpc/gen_ndr/netlogon.h"
+
+#ifndef _HEADER_NDR_netlogon
+#define _HEADER_NDR_netlogon
+
+#include "librpc/ndr/libndr.h"
+#define DCERPC_NETLOGON_UUID "12345678-1234-abcd-ef00-01234567cffb"
+#define DCERPC_NETLOGON_VERSION 1.0
+#define DCERPC_NETLOGON_NAME "netlogon"
+#define DCERPC_NETLOGON_HELPSTRING NULL
+extern const struct dcerpc_interface_table dcerpc_table_netlogon;
+NTSTATUS dcerpc_server_netlogon_init(void);
+#define DCERPC_NETR_LOGONUASLOGON (0x00)
+
+#define DCERPC_NETR_LOGONUASLOGOFF (0x01)
+
+#define DCERPC_NETR_LOGONSAMLOGON (0x02)
+
+#define DCERPC_NETR_LOGONSAMLOGOFF (0x03)
+
+#define DCERPC_NETR_SERVERREQCHALLENGE (0x04)
+
+#define DCERPC_NETR_SERVERAUTHENTICATE (0x05)
+
+#define DCERPC_NETR_SERVERPASSWORDSET (0x06)
+
+#define DCERPC_NETR_DATABASEDELTAS (0x07)
+
+#define DCERPC_NETR_DATABASESYNC (0x08)
+
+#define DCERPC_NETR_ACCOUNTDELTAS (0x09)
+
+#define DCERPC_NETR_ACCOUNTSYNC (0x0a)
+
+#define DCERPC_NETR_GETDCNAME (0x0b)
+
+#define DCERPC_NETR_LOGONCONTROL (0x0c)
+
+#define DCERPC_NETR_GETANYDCNAME (0x0d)
+
+#define DCERPC_NETR_LOGONCONTROL2 (0x0e)
+
+#define DCERPC_NETR_SERVERAUTHENTICATE2 (0x0f)
+
+#define DCERPC_NETR_DATABASESYNC2 (0x10)
+
+#define DCERPC_NETR_DATABASEREDO (0x11)
+
+#define DCERPC_NETR_LOGONCONTROL2EX (0x12)
+
+#define DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINS (0x13)
+
+#define DCERPC_NETR_DSRGETDCNAME (0x14)
+
+#define DCERPC_NETR_NETRLOGONDUMMYROUTINE1 (0x15)
+
+#define DCERPC_NETR_NETRLOGONSETSERVICEBITS (0x16)
+
+#define DCERPC_NETR_NETRLOGONGETTRUSTRID (0x17)
+
+#define DCERPC_NETR_NETRLOGONCOMPUTESERVERDIGEST (0x18)
+
+#define DCERPC_NETR_NETRLOGONCOMPUTECLIENTDIGEST (0x19)
+
+#define DCERPC_NETR_SERVERAUTHENTICATE3 (0x1a)
+
+#define DCERPC_NETR_DSRGETDCNAMEEX (0x1b)
+
+#define DCERPC_NETR_DSRGETSITENAME (0x1c)
+
+#define DCERPC_NETR_LOGONGETDOMAININFO (0x1d)
+
+#define DCERPC_NETR_SERVERPASSWORDSET2 (0x1e)
+
+#define DCERPC_NETR_NETRSERVERPASSWORDGET (0x1f)
+
+#define DCERPC_NETR_NETRLOGONSENDTOSAM (0x20)
+
+#define DCERPC_NETR_DSRADDRESSTOSITENAMESW (0x21)
+
+#define DCERPC_NETR_DSRGETDCNAMEEX2 (0x22)
+
+#define DCERPC_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN (0x23)
+
+#define DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINSEX (0x24)
+
+#define DCERPC_NETR_DSRADDRESSTOSITENAMESEXW (0x25)
+
+#define DCERPC_NETR_DSRGETDCSITECOVERAGEW (0x26)
+
+#define DCERPC_NETR_LOGONSAMLOGONEX (0x27)
+
+#define DCERPC_NETR_DSRENUMERATEDOMAINTRUSTS (0x28)
+
+#define DCERPC_NETR_DSRDEREGISTERDNSHOSTRECORDS (0x29)
+
+#define DCERPC_NETR_NETRSERVERTRUSTPASSWORDSGET (0x2a)
+
+#define DCERPC_NETR_DSRGETFORESTTRUSTINFORMATION (0x2b)
+
+#define DCERPC_NETR_NETRGETFORESTTRUSTINFORMATION (0x2c)
+
+#define DCERPC_NETR_LOGONSAMLOGONWITHFLAGS (0x2d)
+
+#define DCERPC_NETR_NETRSERVERGETTRUSTINFO (0x2e)
+
+#define DCERPC_NETLOGON_CALL_COUNT (47)
+void ndr_print_netr_UasInfo(struct ndr_print *ndr, const char *name, const struct netr_UasInfo *r);
+void ndr_print_netr_UasLogoffInfo(struct ndr_print *ndr, const char *name, const struct netr_UasLogoffInfo *r);
+void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name, const struct netr_AcctLockStr *r);
+void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const struct netr_IdentityInfo *r);
+void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
+void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
+void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
+NTSTATUS ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r);
+NTSTATUS 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);
+NTSTATUS ndr_push_netr_GroupMembership(struct ndr_push *ndr, int ndr_flags, const struct netr_GroupMembership *r);
+NTSTATUS ndr_pull_netr_GroupMembership(struct ndr_pull *ndr, int ndr_flags, struct netr_GroupMembership *r);
+void ndr_print_netr_GroupMembership(struct ndr_print *ndr, const char *name, const struct netr_GroupMembership *r);
+NTSTATUS ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
+NTSTATUS 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);
+NTSTATUS ndr_push_netr_LMSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_LMSessionKey *r);
+NTSTATUS ndr_pull_netr_LMSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_LMSessionKey *r);
+void ndr_print_netr_LMSessionKey(struct ndr_print *ndr, const char *name, const struct netr_LMSessionKey *r);
+NTSTATUS ndr_push_netr_UserFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+NTSTATUS ndr_pull_netr_UserFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_netr_UserFlags(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name, const struct netr_SamBaseInfo *r);
+void ndr_print_netr_SamInfo2(struct ndr_print *ndr, const char *name, const struct netr_SamInfo2 *r);
+void ndr_print_netr_SidAttr(struct ndr_print *ndr, const char *name, const struct netr_SidAttr *r);
+NTSTATUS ndr_push_netr_SamInfo3(struct ndr_push *ndr, int ndr_flags, const struct netr_SamInfo3 *r);
+NTSTATUS ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, struct netr_SamInfo3 *r);
+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);
+NTSTATUS ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
+NTSTATUS 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);
+NTSTATUS ndr_push_netr_Credential(struct ndr_push *ndr, int ndr_flags, const struct netr_Credential *r);
+NTSTATUS ndr_pull_netr_Credential(struct ndr_pull *ndr, int ndr_flags, struct netr_Credential *r);
+void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const struct netr_Credential *r);
+NTSTATUS ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
+NTSTATUS 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_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);
+void ndr_print_netr_USER_KEYS2(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS2 *r);
+void ndr_print_netr_USER_KEY_UNION(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY_UNION *r);
+NTSTATUS ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr_flags, const struct netr_USER_KEYS *r);
+NTSTATUS ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr_flags, struct netr_USER_KEYS *r);
+void ndr_print_netr_USER_KEYS(struct ndr_print *ndr, const char *name, const struct netr_USER_KEYS *r);
+void ndr_print_netr_USER_PRIVATE_INFO(struct ndr_print *ndr, const char *name, const struct netr_USER_PRIVATE_INFO *r);
+void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_USER *r);
+void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DOMAIN *r);
+void ndr_print_netr_DELTA_GROUP(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP *r);
+void ndr_print_netr_DELTA_RENAME(struct ndr_print *ndr, const char *name, const struct netr_DELTA_RENAME *r);
+void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_GROUP_MEMBER *r);
+void ndr_print_netr_DELTA_ALIAS(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS *r);
+void ndr_print_netr_DELTA_ALIAS_MEMBER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ALIAS_MEMBER *r);
+void ndr_print_netr_QUOTA_LIMITS(struct ndr_print *ndr, const char *name, const struct netr_QUOTA_LIMITS *r);
+void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_POLICY *r);
+void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const char *name, const struct netr_DELTA_TRUSTED_DOMAIN *r);
+void ndr_print_netr_DELTA_DELETE_TRUST(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_TRUST *r);
+void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ACCOUNT *r);
+void ndr_print_netr_DELTA_DELETE_ACCOUNT(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_ACCOUNT *r);
+void ndr_print_netr_DELTA_DELETE_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_SECRET *r);
+void ndr_print_netr_CIPHER_VALUE(struct ndr_print *ndr, const char *name, const struct netr_CIPHER_VALUE *r);
+void ndr_print_netr_DELTA_SECRET(struct ndr_print *ndr, const char *name, const struct netr_DELTA_SECRET *r);
+void ndr_print_netr_DeltaEnum(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum r);
+void ndr_print_netr_DELTA_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_UNION *r);
+void ndr_print_netr_DELTA_ID_UNION(struct ndr_print *ndr, const char *name, const union netr_DELTA_ID_UNION *r);
+void ndr_print_netr_DELTA_ENUM(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM *r);
+void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char *name, const struct netr_DELTA_ENUM_ARRAY *r);
+void ndr_print_netr_UAS_INFO_0(struct ndr_print *ndr, const char *name, const struct netr_UAS_INFO_0 *r);
+void ndr_print_netr_AccountBuffer(struct ndr_print *ndr, const char *name, const struct netr_AccountBuffer *r);
+void ndr_print_netr_NETLOGON_INFO_1(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_1 *r);
+void ndr_print_netr_NETLOGON_INFO_2(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_2 *r);
+void ndr_print_netr_NETLOGON_INFO_3(struct ndr_print *ndr, const char *name, const struct netr_NETLOGON_INFO_3 *r);
+void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_QUERY_INFORMATION *r);
+void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r);
+void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r);
+void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
+void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
+void ndr_print_netr_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_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *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_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
+void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
+void ndr_print_netr_LogonUasLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogon *r);
+void ndr_print_netr_LogonUasLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonUasLogoff *r);
+void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogon *r);
+void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogoff *r);
+void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerReqChallenge *r);
+void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate *r);
+void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet *r);
+void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseDeltas *r);
+void ndr_print_netr_DatabaseSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync *r);
+void ndr_print_netr_AccountDeltas(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountDeltas *r);
+void ndr_print_netr_AccountSync(struct ndr_print *ndr, const char *name, int flags, const struct netr_AccountSync *r);
+void ndr_print_netr_GetDcName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetDcName *r);
+void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl *r);
+void ndr_print_netr_GetAnyDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_GetAnyDCName *r);
+void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2 *r);
+void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate2 *r);
+void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseSync2 *r);
+void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int flags, const struct netr_DatabaseRedo *r);
+void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r);
+void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINS *r);
+void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r);
+void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r);
+void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
+void ndr_print_netr_NETRLOGONGETTRUSTRID(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTRUSTRID *r);
+void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
+void ndr_print_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r);
+void ndr_print_netr_ServerAuthenticate3(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerAuthenticate3 *r);
+void ndr_print_netr_DsRGetDCNameEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx *r);
+void ndr_print_netr_DsRGetSiteName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetSiteName *r);
+void ndr_print_netr_LogonGetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetDomainInfo *r);
+void ndr_print_netr_ServerPasswordSet2(struct ndr_print *ndr, const char *name, int flags, const struct netr_ServerPasswordSet2 *r);
+void ndr_print_netr_NETRSERVERPASSWORDGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERPASSWORDGET *r);
+void ndr_print_netr_NETRLOGONSENDTOSAM(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSENDTOSAM *r);
+void ndr_print_netr_DSRADDRESSTOSITENAMESW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESW *r);
+void ndr_print_netr_DsRGetDCNameEx2(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCNameEx2 *r);
+void ndr_print_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r);
+void ndr_print_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r);
+void ndr_print_netr_DSRADDRESSTOSITENAMESEXW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRADDRESSTOSITENAMESEXW *r);
+void ndr_print_netr_DSRGETDCSITECOVERAGEW(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETDCSITECOVERAGEW *r);
+void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonEx *r);
+void ndr_print_netr_DsrEnumerateDomainTrusts(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsrEnumerateDomainTrusts *r);
+void ndr_print_netr_DSRDEREGISTERDNSHOSTRECORDS(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRDEREGISTERDNSHOSTRECORDS *r);
+void ndr_print_netr_NETRSERVERTRUSTPASSWORDSGET(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERTRUSTPASSWORDSGET *r);
+void ndr_print_netr_DSRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_DSRGETFORESTTRUSTINFORMATION *r);
+void ndr_print_netr_NETRGETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRGETFORESTTRUSTINFORMATION *r);
+void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonSamLogonWithFlags *r);
+void ndr_print_netr_NETRSERVERGETTRUSTINFO(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRSERVERGETTRUSTINFO *r);
+#endif /* _HEADER_NDR_netlogon */
diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h
new file mode 100644
index 0000000000..cfb2df3c8d
--- /dev/null
+++ b/source3/librpc/gen_ndr/netlogon.h
@@ -0,0 +1,1352 @@
+/* header auto-generated by pidl */
+
+#ifndef _HEADER_netlogon
+#define _HEADER_netlogon
+
+#include "librpc/gen_ndr/lsa.h"
+#include "librpc/gen_ndr/samr.h"
+#include "librpc/gen_ndr/security.h"
+#define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED ( 0x002 )
+#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT ( 0x020 )
+#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x800 )
+#define NETLOGON_NEG_ARCFOUR ( 0x00000004 )
+#define NETLOGON_NEG_128BIT ( 0x00004000 )
+#define NETLOGON_NEG_SCHANNEL ( 0x40000000 )
+struct netr_UasInfo {
+ const char *account_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t priv;/* [keepref] */
+ uint32_t auth_flags;/* [keepref] */
+ uint32_t logon_count;/* [keepref] */
+ uint32_t bad_pw_count;/* [keepref] */
+ time_t last_logon;/* [keepref] */
+ time_t last_logoff;/* [keepref] */
+ time_t logoff_time;/* [keepref] */
+ time_t kickoff_time;/* [keepref] */
+ uint32_t password_age;/* [keepref] */
+ time_t pw_can_change;/* [keepref] */
+ time_t pw_must_change;/* [keepref] */
+ const char *computer;/* [unique,keepref,charset(UTF16)] */
+ const char *domain;/* [unique,keepref,charset(UTF16)] */
+ const char *script_path;/* [unique,keepref,charset(UTF16)] */
+ uint32_t unknown;/* [keepref] */
+};
+
+struct netr_UasLogoffInfo {
+ uint32_t duration;/* [keepref] */
+ uint16_t logon_count;/* [keepref] */
+};
+
+struct netr_AcctLockStr {
+ uint16_t size;/* [keepref] */
+ uint16_t length;/* [keepref] */
+ uint16_t *bindata;/* [unique,keepref,length_is(length/2),size_is(size/2)] */
+};
+
+struct netr_IdentityInfo {
+ struct lsa_String domain_name;/* [keepref] */
+ uint32_t parameter_control;/* [keepref] */
+ uint32_t logon_id_low;/* [keepref] */
+ uint32_t logon_id_high;/* [keepref] */
+ struct lsa_String account_name;/* [keepref] */
+ struct lsa_String workstation;/* [keepref] */
+};
+
+struct netr_PasswordInfo {
+ struct netr_IdentityInfo identity_info;/* [keepref] */
+ struct samr_Password lmpassword;/* [keepref] */
+ struct samr_Password ntpassword;/* [keepref] */
+};
+
+struct netr_ChallengeResponse {
+ uint16_t length;/* [keepref] */
+ uint16_t size;/* [keepref,value(length)] */
+ uint8_t *data;/* [unique,keepref,length_is(length),size_is(length)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct netr_NetworkInfo {
+ struct netr_IdentityInfo identity_info;/* [keepref] */
+ uint8_t challenge[8];/* [keepref] */
+ struct netr_ChallengeResponse nt;/* [keepref] */
+ struct netr_ChallengeResponse lm;/* [keepref] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+union netr_LogonLevel {
+ struct netr_PasswordInfo *password;/* [unique,keepref,case] */
+ struct netr_NetworkInfo *network;/* [unique,keepref,case(2)] */
+}/* [public,switch_type(uint16)] */;
+
+struct netr_GroupMembership {
+ uint32_t rid;/* [keepref] */
+ uint32_t attributes;/* [keepref] */
+}/* [public] */;
+
+struct netr_UserSessionKey {
+ uint8_t key[16];/* [keepref] */
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct netr_LMSessionKey {
+ uint8_t key[8];/* [keepref] */
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+/* bitmap netr_UserFlags */
+#define NETLOGON_GUEST ( 0x0001 )
+#define NETLOGON_NOENCRYPTION ( 0x0002 )
+#define NETLOGON_CACHED_ACCOUNT ( 0x0004 )
+#define NETLOGON_USED_LM_PASSWORD ( 0x0008 )
+#define NETLOGON_EXTRA_SIDS ( 0x0020 )
+#define NETLOGON_SUBAUTH_SESSION_KEY ( 0x0040 )
+#define NETLOGON_SERVER_TRUST_ACCOUNT ( 0x0080 )
+#define NETLOGON_NTLMV2_ENABLED ( 0x0100 )
+#define NETLOGON_RESOURCE_GROUPS ( 0x0200 )
+#define NETLOGON_PROFILE_PATH_RETURNED ( 0x0400 )
+
+struct netr_SamBaseInfo {
+ NTTIME last_logon;/* [keepref] */
+ NTTIME last_logoff;/* [keepref] */
+ NTTIME acct_expiry;/* [keepref] */
+ NTTIME last_password_change;/* [keepref] */
+ NTTIME allow_password_change;/* [keepref] */
+ NTTIME force_password_change;/* [keepref] */
+ struct lsa_String account_name;/* [keepref] */
+ struct lsa_String full_name;/* [keepref] */
+ struct lsa_String logon_script;/* [keepref] */
+ struct lsa_String profile_path;/* [keepref] */
+ struct lsa_String home_directory;/* [keepref] */
+ struct lsa_String home_drive;/* [keepref] */
+ uint16_t logon_count;/* [keepref] */
+ uint16_t bad_password_count;/* [keepref] */
+ uint32_t rid;/* [keepref] */
+ uint32_t primary_gid;/* [keepref] */
+ struct samr_RidWithAttributeArray groups;/* [keepref] */
+ uint32_t user_flags;/* [keepref] */
+ struct netr_UserSessionKey key;/* [keepref] */
+ struct lsa_StringLarge logon_server;/* [keepref] */
+ struct lsa_StringLarge domain;/* [keepref] */
+ struct dom_sid2 *domain_sid;/* [unique,keepref] */
+ struct netr_LMSessionKey LMSessKey;/* [keepref] */
+ uint32_t acct_flags;/* [keepref] */
+ uint32_t unknown[7];/* [keepref] */
+};
+
+struct netr_SamInfo2 {
+ struct netr_SamBaseInfo base;/* [keepref] */
+};
+
+struct netr_SidAttr {
+ struct dom_sid2 *sid;/* [unique,keepref] */
+ uint32_t attribute;/* [keepref] */
+};
+
+struct netr_SamInfo3 {
+ struct netr_SamBaseInfo base;/* [keepref] */
+ uint32_t sidcount;/* [keepref] */
+ struct netr_SidAttr *sids;/* [unique,keepref,size_is(sidcount)] */
+}/* [public] */;
+
+struct netr_SamInfo6 {
+ struct netr_SamBaseInfo base;/* [keepref] */
+ uint32_t sidcount;/* [keepref] */
+ struct netr_SidAttr *sids;/* [unique,keepref,size_is(sidcount)] */
+ struct lsa_String forest;/* [keepref] */
+ struct lsa_String principle;/* [keepref] */
+ uint32_t unknown4[20];/* [keepref] */
+};
+
+struct netr_PacInfo {
+ uint32_t pac_size;/* [keepref] */
+ uint8_t *pac;/* [unique,keepref,size_is(pac_size)] */
+ struct lsa_String logon_domain;/* [keepref] */
+ struct lsa_String logon_server;/* [keepref] */
+ struct lsa_String principal_name;/* [keepref] */
+ uint32_t auth_size;/* [keepref] */
+ uint8_t *auth;/* [unique,keepref,size_is(auth_size)] */
+ struct netr_UserSessionKey user_session_key;/* [keepref] */
+ uint32_t expansionroom[10];/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+};
+
+union netr_Validation {
+ struct netr_SamInfo2 *sam2;/* [unique,keepref,case(2)] */
+ struct netr_SamInfo3 *sam3;/* [unique,keepref,case(3)] */
+ struct netr_PacInfo *pac;/* [unique,keepref,case(4)] */
+ struct netr_SamInfo6 *sam6;/* [unique,keepref,case(6)] */
+}/* [public,switch_type(uint16)] */;
+
+struct netr_Credential {
+ uint8_t data[8];/* [keepref] */
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct netr_Authenticator {
+ struct netr_Credential cred;/* [keepref] */
+ time_t timestamp;/* [keepref] */
+}/* [public] */;
+
+struct netr_DELTA_DELETE_USER {
+ const char *account_name;/* [unique,keepref,charset(UTF16)] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_USER_KEY16 {
+ uint16_t length;/* [keepref] */
+ uint16_t size;/* [keepref,value(length)] */
+ uint32_t flags;/* [keepref] */
+ struct samr_Password pwd;/* [keepref] */
+};
+
+struct netr_PasswordHistory {
+ uint16_t nt_length;/* [keepref] */
+ uint16_t nt_size;/* [keepref] */
+ uint32_t nt_flags;/* [keepref] */
+ uint16_t lm_length;/* [keepref] */
+ uint16_t lm_size;/* [keepref] */
+ uint32_t lm_flags;/* [keepref] */
+ uint8_t *nt_history;/* [keepref] */
+ uint8_t *lm_history;/* [keepref] */
+};
+
+struct netr_USER_KEYS2 {
+ struct netr_USER_KEY16 lmpassword;/* [keepref] */
+ struct netr_USER_KEY16 ntpassword;/* [keepref] */
+ struct netr_PasswordHistory lmhistory;/* [keepref] */
+};
+
+struct netr_USER_KEY_UNION {
+ struct netr_USER_KEYS2 keys2;/* [keepref] */
+};
+
+struct netr_USER_KEYS {
+ uint32_t version;/* [keepref] */
+ struct netr_USER_KEY_UNION keys;/* [keepref] */
+}/* [public] */;
+
+struct netr_USER_PRIVATE_INFO {
+ uint8_t SensitiveDataFlag;/* [keepref] */
+ uint32_t DataLength;/* [keepref] */
+ uint8_t *SensitiveData;/* [unique,keepref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(DataLength)] */
+};
+
+struct netr_DELTA_USER {
+ struct lsa_String account_name;/* [keepref] */
+ struct lsa_String full_name;/* [keepref] */
+ uint32_t rid;/* [keepref] */
+ uint32_t primary_gid;/* [keepref] */
+ struct lsa_String home_directory;/* [keepref] */
+ struct lsa_String home_drive;/* [keepref] */
+ struct lsa_String logon_script;/* [keepref] */
+ struct lsa_String description;/* [keepref] */
+ struct lsa_String workstations;/* [keepref] */
+ NTTIME last_logon;/* [keepref] */
+ NTTIME last_logoff;/* [keepref] */
+ struct samr_LogonHours logon_hours;/* [keepref] */
+ uint16_t bad_password_count;/* [keepref] */
+ uint16_t logon_count;/* [keepref] */
+ NTTIME last_password_change;/* [keepref] */
+ NTTIME acct_expiry;/* [keepref] */
+ uint32_t acct_flags;/* [keepref] */
+ struct samr_Password lmpassword;/* [keepref] */
+ struct samr_Password ntpassword;/* [keepref] */
+ uint8_t nt_password_present;/* [keepref] */
+ uint8_t lm_password_present;/* [keepref] */
+ uint8_t password_expired;/* [keepref] */
+ struct lsa_String comment;/* [keepref] */
+ struct lsa_String parameters;/* [keepref] */
+ uint16_t country_code;/* [keepref] */
+ uint16_t code_page;/* [keepref] */
+ struct netr_USER_PRIVATE_INFO user_private_info;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String profile_path;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_DOMAIN {
+ struct lsa_String domain_name;/* [keepref] */
+ struct lsa_String comment;/* [keepref] */
+ int64_t force_logoff_time;/* [keepref] */
+ uint16_t min_password_length;/* [keepref] */
+ uint16_t password_history_length;/* [keepref] */
+ int64_t max_password_age;/* [keepref] */
+ int64_t min_password_age;/* [keepref] */
+ uint64_t sequence_num;/* [keepref] */
+ NTTIME domain_create_time;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct netr_AcctLockStr account_lockout;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t logon_to_chgpass;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_GROUP {
+ struct lsa_String group_name;/* [keepref] */
+ uint32_t rid;/* [keepref] */
+ uint32_t attributes;/* [keepref] */
+ struct lsa_String description;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_RENAME {
+ struct lsa_String OldName;/* [keepref] */
+ struct lsa_String NewName;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_GROUP_MEMBER {
+ uint32_t *rids;/* [unique,keepref,size_is(num_rids)] */
+ uint32_t *attribs;/* [unique,keepref,size_is(num_rids)] */
+ uint32_t num_rids;/* [keepref] */
+ uint32_t unknown1;/* [keepref] */
+ uint32_t unknown2;/* [keepref] */
+ uint32_t unknown3;/* [keepref] */
+ uint32_t unknown4;/* [keepref] */
+};
+
+struct netr_DELTA_ALIAS {
+ struct lsa_String alias_name;/* [keepref] */
+ uint32_t rid;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String description;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_ALIAS_MEMBER {
+ struct lsa_SidArray sids;/* [keepref] */
+ uint32_t unknown1;/* [keepref] */
+ uint32_t unknown2;/* [keepref] */
+ uint32_t unknown3;/* [keepref] */
+ uint32_t unknown4;/* [keepref] */
+};
+
+struct netr_QUOTA_LIMITS {
+ uint32_t pagedpoollimit;/* [keepref] */
+ uint32_t nonpagedpoollimit;/* [keepref] */
+ uint32_t minimumworkingsetsize;/* [keepref] */
+ uint32_t maximumworkingsetsize;/* [keepref] */
+ uint32_t pagefilelimit;/* [keepref] */
+ NTTIME timelimit;/* [keepref] */
+};
+
+struct netr_DELTA_POLICY {
+ uint32_t maxlogsize;/* [keepref] */
+ NTTIME auditretentionperiod;/* [keepref] */
+ uint8_t auditingmode;/* [keepref] */
+ uint32_t maxauditeventcount;/* [keepref] */
+ uint32_t *eventauditoptions;/* [unique,keepref,size_is(maxauditeventcount+1)] */
+ struct lsa_String primary_domain_name;/* [keepref] */
+ struct dom_sid2 *sid;/* [unique,keepref] */
+ struct netr_QUOTA_LIMITS quota_limits;/* [keepref] */
+ uint64_t sequence_num;/* [keepref] */
+ NTTIME db_create_time;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_TRUSTED_DOMAIN {
+ struct lsa_String domain_name;/* [keepref] */
+ uint32_t num_controllers;/* [keepref] */
+ struct lsa_String *controller_names;/* [unique,keepref,size_is(num_controllers)] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t posix_offset;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_DELETE_TRUST {
+ uint16_t unknown;/* [keepref] */
+};
+
+struct netr_DELTA_ACCOUNT {
+ uint32_t privilege_entries;/* [keepref] */
+ uint32_t privilege_control;/* [keepref] */
+ uint32_t *privilege_attrib;/* [unique,keepref,size_is(privilege_entries)] */
+ struct lsa_String *privilege_name;/* [unique,keepref,size_is(privilege_entries)] */
+ struct netr_QUOTA_LIMITS quotalimits;/* [keepref] */
+ uint32_t system_flags;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+struct netr_DELTA_DELETE_ACCOUNT {
+ uint16_t unknown;/* [keepref] */
+};
+
+struct netr_DELTA_DELETE_SECRET {
+ uint16_t unknown;/* [keepref] */
+};
+
+struct netr_CIPHER_VALUE {
+ uint32_t len;/* [keepref] */
+ uint32_t maxlen;/* [keepref] */
+ uint8_t *cipher_data;/* [unique,keepref,length_is(len),size_is(maxlen)] */
+};
+
+struct netr_DELTA_SECRET {
+ struct netr_CIPHER_VALUE current_cipher;/* [keepref] */
+ NTTIME current_cipher_set_time;/* [keepref] */
+ struct netr_CIPHER_VALUE old_cipher;/* [keepref] */
+ NTTIME old_cipher_set_time;/* [keepref] */
+ uint32_t SecurityInformation;/* [keepref] */
+ struct sec_desc_buf sdbuf;/* [keepref] */
+ struct lsa_String unknown1;/* [keepref] */
+ struct lsa_String unknown2;/* [keepref] */
+ struct lsa_String unknown3;/* [keepref] */
+ struct lsa_String unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+ uint32_t unknown6;/* [keepref] */
+ uint32_t unknown7;/* [keepref] */
+ uint32_t unknown8;/* [keepref] */
+};
+
+enum netr_DeltaEnum {
+ NETR_DELTA_DOMAIN=1,
+ NETR_DELTA_GROUP=2,
+ NETR_DELTA_DELETE_GROUP=3,
+ NETR_DELTA_RENAME_GROUP=4,
+ NETR_DELTA_USER=5,
+ NETR_DELTA_DELETE_USER=6,
+ NETR_DELTA_RENAME_USER=7,
+ NETR_DELTA_GROUP_MEMBER=8,
+ NETR_DELTA_ALIAS=9,
+ NETR_DELTA_DELETE_ALIAS=10,
+ NETR_DELTA_RENAME_ALIAS=11,
+ NETR_DELTA_ALIAS_MEMBER=12,
+ NETR_DELTA_POLICY=13,
+ NETR_DELTA_TRUSTED_DOMAIN=14,
+ NETR_DELTA_DELETE_TRUST=15,
+ NETR_DELTA_ACCOUNT=16,
+ NETR_DELTA_DELETE_ACCOUNT=17,
+ NETR_DELTA_SECRET=18,
+ NETR_DELTA_DELETE_SECRET=19,
+ NETR_DELTA_DELETE_GROUP2=20,
+ NETR_DELTA_DELETE_USER2=21,
+ NETR_DELTA_MODIFY_COUNT=22
+};
+
+union netr_DELTA_UNION {
+ struct netr_DELTA_DOMAIN *domain;/* [unique,keepref,case(NETR_DELTA_DOMAIN)] */
+ struct netr_DELTA_GROUP *group;/* [unique,keepref,case(NETR_DELTA_GROUP)] */
+ struct netr_DELTA_RENAME *rename_group;/* [unique,keepref,case(NETR_DELTA_RENAME_GROUP)] */
+ struct netr_DELTA_USER *user;/* [unique,keepref,case(NETR_DELTA_USER)] */
+ struct netr_DELTA_RENAME *rename_user;/* [unique,keepref,case(NETR_DELTA_RENAME_USER)] */
+ struct netr_DELTA_GROUP_MEMBER *group_member;/* [unique,keepref,case(NETR_DELTA_GROUP_MEMBER)] */
+ struct netr_DELTA_ALIAS *alias;/* [unique,keepref,case(NETR_DELTA_ALIAS)] */
+ struct netr_DELTA_RENAME *rename_alias;/* [unique,keepref,case(NETR_DELTA_RENAME_ALIAS)] */
+ struct netr_DELTA_ALIAS_MEMBER *alias_member;/* [unique,keepref,case(NETR_DELTA_ALIAS_MEMBER)] */
+ struct netr_DELTA_POLICY *policy;/* [unique,keepref,case(NETR_DELTA_POLICY)] */
+ struct netr_DELTA_TRUSTED_DOMAIN *trusted_domain;/* [unique,keepref,case(NETR_DELTA_TRUSTED_DOMAIN)] */
+ struct netr_DELTA_DELETE_TRUST delete_trust;/* [keepref,case(NETR_DELTA_DELETE_TRUST)] */
+ struct netr_DELTA_ACCOUNT *account;/* [unique,keepref,case(NETR_DELTA_ACCOUNT)] */
+ struct netr_DELTA_DELETE_ACCOUNT delete_account;/* [keepref,case(NETR_DELTA_DELETE_ACCOUNT)] */
+ struct netr_DELTA_SECRET *secret;/* [unique,keepref,case(NETR_DELTA_SECRET)] */
+ struct netr_DELTA_DELETE_SECRET delete_secret;/* [keepref,case(NETR_DELTA_DELETE_SECRET)] */
+ struct netr_DELTA_DELETE_USER *delete_group;/* [unique,keepref,case(NETR_DELTA_DELETE_GROUP2)] */
+ struct netr_DELTA_DELETE_USER *delete_user;/* [unique,keepref,case(NETR_DELTA_DELETE_USER2)] */
+ uint64_t *modified_count;/* [unique,keepref,case(NETR_DELTA_MODIFY_COUNT)] */
+}/* [switch_type(netr_DeltaEnum)] */;
+
+union netr_DELTA_ID_UNION {
+ uint32_t rid;/* [keepref,case(NETR_DELTA_DOMAIN)] */
+ struct dom_sid2 *sid;/* [unique,keepref,case(NETR_DELTA_POLICY)] */
+ const char *name;/* [unique,keepref,charset(UTF16),case(NETR_DELTA_SECRET)] */
+}/* [switch_type(netr_DeltaEnum)] */;
+
+struct netr_DELTA_ENUM {
+ enum netr_DeltaEnum delta_type;/* [keepref] */
+ union netr_DELTA_ID_UNION delta_id_union;/* [keepref,switch_is(delta_type)] */
+ union netr_DELTA_UNION delta_union;/* [keepref,switch_is(delta_type)] */
+};
+
+struct netr_DELTA_ENUM_ARRAY {
+ uint32_t num_deltas;/* [keepref] */
+ struct netr_DELTA_ENUM *delta_enum;/* [unique,keepref,size_is(num_deltas)] */
+};
+
+struct netr_UAS_INFO_0 {
+ uint8_t computer_name[16];/* [keepref] */
+ uint32_t timecreated;/* [keepref] */
+ uint32_t serial_number;/* [keepref] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct netr_AccountBuffer {
+ DATA_BLOB blob;/* [keepref,flag(LIBNDR_FLAG_REMAINING)] */
+};
+
+struct netr_NETLOGON_INFO_1 {
+ uint32_t flags;/* [keepref] */
+ uint32_t pdc_connection_status;/* [keepref] */
+};
+
+struct netr_NETLOGON_INFO_2 {
+ uint32_t flags;/* [keepref] */
+ uint32_t pdc_connection_status;/* [keepref] */
+ const char *trusted_dc_name;/* [keepref,charset(UTF16)] */
+ uint32_t tc_connection_status;/* [keepref] */
+};
+
+struct netr_NETLOGON_INFO_3 {
+ uint32_t flags;/* [keepref] */
+ uint32_t logon_attempts;/* [keepref] */
+ uint32_t unknown1;/* [keepref] */
+ uint32_t unknown2;/* [keepref] */
+ uint32_t unknown3;/* [keepref] */
+ uint32_t unknown4;/* [keepref] */
+ uint32_t unknown5;/* [keepref] */
+};
+
+union netr_CONTROL_QUERY_INFORMATION {
+ struct netr_NETLOGON_INFO_1 *info1;/* [unique,keepref,case] */
+ struct netr_NETLOGON_INFO_2 *info2;/* [unique,keepref,case(2)] */
+ struct netr_NETLOGON_INFO_3 *info3;/* [unique,keepref,case(3)] */
+};
+
+enum netr_LogonControlCode {
+ NETLOGON_CONTROL_REDISCOVER=5,
+ NETLOGON_CONTROL_TC_QUERY=6,
+ NETLOGON_CONTROL_TRANSPORT_NOTIFY=7,
+ NETLOGON_CONTROL_SET_DBFLAG=65534
+};
+
+union netr_CONTROL_DATA_INFORMATION {
+ const char *domain;/* [unique,keepref,charset(UTF16),case(NETLOGON_CONTROL_REDISCOVER)] */
+ uint32_t debug_level;/* [keepref,case(NETLOGON_CONTROL_SET_DBFLAG)] */
+};
+
+struct netr_DsRGetDCNameInfo {
+ const char *dc_unc;/* [unique,keepref,charset(UTF16)] */
+ const char *dc_address;/* [unique,keepref,charset(UTF16)] */
+ int32_t dc_address_type;/* [keepref] */
+ struct GUID domain_guid;/* [keepref] */
+ const char *domain_name;/* [unique,keepref,charset(UTF16)] */
+ const char *forest_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t dc_flags;/* [keepref] */
+ const char *dc_site_name;/* [unique,keepref,charset(UTF16)] */
+ const char *client_site_name;/* [unique,keepref,charset(UTF16)] */
+};
+
+struct netr_Blob {
+ uint32_t length;/* [keepref] */
+ uint8_t *data;/* [unique,keepref,size_is(length)] */
+};
+
+struct netr_BinaryString {
+ uint16_t length;/* [keepref] */
+ uint16_t size;/* [keepref] */
+ uint16_t *data;/* [unique,keepref,length_is(length/2),size_is(size/2)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct netr_DomainQuery1 {
+ struct netr_Blob blob;/* [keepref] */
+ const char *workstation_domain;/* [unique,keepref,charset(UTF16)] */
+ const char *workstation_site;/* [unique,keepref,charset(UTF16)] */
+ const char *unknown1;/* [unique,keepref,charset(UTF16)] */
+ const char *unknown2;/* [unique,keepref,charset(UTF16)] */
+ const char *unknown3;/* [unique,keepref,charset(UTF16)] */
+ const char *unknown4;/* [unique,keepref,charset(UTF16)] */
+ struct netr_BinaryString blob2;/* [keepref] */
+ struct lsa_String product;/* [keepref] */
+ struct lsa_String unknown5;/* [keepref] */
+ struct lsa_String unknown6;/* [keepref] */
+ uint32_t unknown7[4];/* [keepref] */
+};
+
+union netr_DomainQuery {
+ struct netr_DomainQuery1 *query1;/* [unique,keepref,case] */
+};
+
+struct netr_DomainTrustInfo {
+ struct lsa_String domainname;/* [keepref] */
+ struct lsa_String fulldomainname;/* [keepref] */
+ struct lsa_String forest;/* [keepref] */
+ struct GUID guid;/* [keepref] */
+ struct dom_sid2 *sid;/* [unique,keepref] */
+ struct netr_BinaryString unknown1[4];/* [keepref] */
+ uint32_t unknown[4];/* [keepref] */
+};
+
+struct netr_DomainInfo1 {
+ struct netr_DomainTrustInfo domaininfo;/* [keepref] */
+ uint32_t num_trusts;/* [keepref] */
+ struct netr_DomainTrustInfo *trusts;/* [unique,keepref,size_is(num_trusts)] */
+ uint32_t unknown[14];/* [keepref] */
+};
+
+union netr_DomainInfo {
+ struct netr_DomainInfo1 *info1;/* [unique,keepref,case] */
+};
+
+struct netr_CryptPassword {
+ uint8_t data[512];/* [keepref] */
+ uint32_t length;/* [keepref] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+/* 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 {
+ NETR_TRUST_TYPE_DOWNLEVEL=1,
+ NETR_TRUST_TYPE_UPLEVEL=2,
+ NETR_TRUST_TYPE_MIT=3,
+ NETR_TRUST_TYPE_DCE=4
+};
+
+/* bitmap netr_TrustAttributes */
+#define NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE ( 0x00000001 )
+#define NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY ( 0x00000002 )
+#define NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN ( 0x00000004 )
+#define NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE ( 0x00000008 )
+#define NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION ( 0x00000010 )
+#define NETR_TRUST_ATTRIBUTE_WITHIN_FOREST ( 0x00000020 )
+#define NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL ( 0x00000040 )
+
+struct netr_DomainTrust {
+ const char *netbios_name;/* [unique,keepref,charset(UTF16)] */
+ const char *dns_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t trust_flags;/* [keepref] */
+ uint32_t parent_index;/* [keepref] */
+ enum netr_TrustType trust_type;/* [keepref] */
+ uint32_t trust_attributes;/* [keepref] */
+ struct dom_sid2 *sid;/* [unique,keepref] */
+ struct GUID guid;/* [keepref] */
+};
+
+
+struct netr_LogonUasLogon {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ const char *workstation;/* [keepref,charset(UTF16)] */
+ } in;
+
+ struct {
+ struct netr_UasInfo *info;/* [unique,keepref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonUasLogoff {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ const char *workstation;/* [keepref,charset(UTF16)] */
+ } in;
+
+ struct {
+ struct netr_UasLogoffInfo *info;/* [keepref,ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonSamLogon {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ struct netr_Authenticator *credential;/* [unique,keepref] */
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ uint16_t logon_level;/* [keepref] */
+ union netr_LogonLevel logon;/* [keepref,switch_is(logon_level)] */
+ uint16_t validation_level;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ union netr_Validation *validation;/* [keepref,ref,switch_is(validation_level)] */
+ uint8_t *authoritative;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_LogonSamLogoff {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ struct netr_Authenticator *credential;/* [unique,keepref] */
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ uint16_t logon_level;/* [keepref] */
+ union netr_LogonLevel logon;/* [keepref,switch_is(logon_level)] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_ServerReqChallenge {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_ServerAuthenticate {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ enum netr_SchannelType secure_channel_type;/* [keepref] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_ServerPasswordSet {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ enum netr_SchannelType secure_channel_type;/* [keepref] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct samr_Password new_password;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DatabaseDeltas {
+ struct {
+ const char *logon_server;/* [keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ enum netr_SamDatabaseID database_id;/* [keepref] */
+ uint64_t *sequence_num;/* [keepref,ref] */
+ uint32_t preferredmaximumlength;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint64_t *sequence_num;/* [keepref,ref] */
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique,keepref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DatabaseSync {
+ struct {
+ const char *logon_server;/* [keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ enum netr_SamDatabaseID database_id;/* [keepref] */
+ uint32_t *sync_context;/* [keepref,ref] */
+ uint32_t preferredmaximumlength;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint32_t *sync_context;/* [keepref,ref] */
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique,keepref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_AccountDeltas {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ struct netr_UAS_INFO_0 uas;/* [keepref] */
+ uint32_t count;/* [keepref] */
+ uint32_t level;/* [keepref] */
+ uint32_t buffersize;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ struct netr_AccountBuffer *buffer;/* [keepref,ref,subcontext(4)] */
+ uint32_t *count_returned;/* [keepref,ref] */
+ uint32_t *total_entries;/* [keepref,ref] */
+ struct netr_UAS_INFO_0 *recordid;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_AccountSync {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint32_t reference;/* [keepref] */
+ uint32_t level;/* [keepref] */
+ uint32_t buffersize;/* [keepref] */
+ struct netr_UAS_INFO_0 *recordid;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ struct netr_AccountBuffer *buffer;/* [keepref,ref,subcontext(4)] */
+ uint32_t *count_returned;/* [keepref,ref] */
+ uint32_t *total_entries;/* [keepref,ref] */
+ uint32_t *next_reference;/* [keepref,ref] */
+ struct netr_UAS_INFO_0 *recordid;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_GetDcName {
+ struct {
+ const char *logon_server;/* [keepref,charset(UTF16)] */
+ const char *domainname;/* [unique,keepref,charset(UTF16)] */
+ } in;
+
+ struct {
+ const char **dcname;/* [keepref,ref,charset(UTF16)] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_LogonControl {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ enum netr_LogonControlCode function_code;/* [keepref] */
+ uint32_t level;/* [keepref] */
+ } in;
+
+ struct {
+ union netr_CONTROL_QUERY_INFORMATION *info;/* [keepref,ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_GetAnyDCName {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ const char *domainname;/* [unique,keepref,charset(UTF16)] */
+ } in;
+
+ struct {
+ const char **dcname;/* [keepref,ref,charset(UTF16)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonControl2 {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ uint32_t function_code;/* [keepref] */
+ uint32_t level;/* [keepref] */
+ union netr_CONTROL_DATA_INFORMATION data;/* [keepref,switch_is(function_code)] */
+ } in;
+
+ struct {
+ union netr_CONTROL_QUERY_INFORMATION *query;/* [keepref,ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_ServerAuthenticate2 {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ enum netr_SchannelType secure_channel_type;/* [keepref] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ uint32_t *negotiate_flags;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ uint32_t *negotiate_flags;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DatabaseSync2 {
+ struct {
+ const char *logon_server;/* [keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ enum netr_SamDatabaseID database_id;/* [keepref] */
+ uint16_t restart_state;/* [keepref] */
+ uint32_t *sync_context;/* [keepref,ref] */
+ uint32_t preferredmaximumlength;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint32_t *sync_context;/* [keepref,ref] */
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique,keepref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DatabaseRedo {
+ struct {
+ const char *logon_server;/* [keepref,charset(UTF16)] */
+ const char *computername;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint8_t *change_log_entry;/* [unique,keepref,size_is(change_log_entry_size)] */
+ uint32_t change_log_entry_size;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [unique,keepref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_LogonControl2Ex {
+ struct {
+ const char *logon_server;/* [unique,keepref,charset(UTF16)] */
+ uint32_t function_code;/* [keepref] */
+ uint32_t level;/* [keepref] */
+ union netr_CONTROL_DATA_INFORMATION data;/* [keepref,switch_is(function_code)] */
+ } in;
+
+ struct {
+ union netr_CONTROL_QUERY_INFORMATION *query;/* [keepref,ref,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRENUMERATETRUSTEDDOMAINS {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DsRGetDCName {
+ struct {
+ const char *server_unc;/* [unique,keepref,charset(UTF16)] */
+ const char *domain_name;/* [unique,keepref,charset(UTF16)] */
+ struct GUID *domain_guid;/* [unique,keepref] */
+ struct GUID *site_guid;/* [unique,keepref] */
+ uint32_t flags;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_DsRGetDCNameInfo *info;/* [unique,keepref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONDUMMYROUTINE1 {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONSETSERVICEBITS {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONGETTRUSTRID {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONCOMPUTESERVERDIGEST {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONCOMPUTECLIENTDIGEST {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_ServerAuthenticate3 {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ enum netr_SchannelType secure_channel_type;/* [keepref] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ uint32_t *negotiate_flags;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Credential *credentials;/* [keepref,ref] */
+ uint32_t *negotiate_flags;/* [keepref,ref] */
+ uint32_t *rid;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DsRGetDCNameEx {
+ struct {
+ const char *server_unc;/* [unique,keepref,charset(UTF16)] */
+ const char *domain_name;/* [unique,keepref,charset(UTF16)] */
+ struct GUID *domain_guid;/* [unique,keepref] */
+ const char *site_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t flags;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_DsRGetDCNameInfo *info;/* [unique,keepref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DsRGetSiteName {
+ struct {
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ } in;
+
+ struct {
+ const char **site;/* [keepref,ref,charset(UTF16)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonGetDomainInfo {
+ struct {
+ const char *server_name;/* [keepref,charset(UTF16)] */
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ struct netr_Authenticator *credential;/* [keepref,ref] */
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ uint32_t level;/* [keepref] */
+ union netr_DomainQuery query;/* [keepref,switch_is(level)] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ union netr_DomainInfo *info;/* [keepref,ref,switch_is(level)] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_ServerPasswordSet2 {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *account_name;/* [keepref,charset(UTF16)] */
+ enum netr_SchannelType secure_channel_type;/* [keepref] */
+ const char *computer_name;/* [keepref,charset(UTF16)] */
+ struct netr_Authenticator credential;/* [keepref] */
+ struct netr_CryptPassword new_password;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_NETRSERVERPASSWORDGET {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONSENDTOSAM {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DSRADDRESSTOSITENAMESW {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DsRGetDCNameEx2 {
+ struct {
+ const char *server_unc;/* [unique,keepref,charset(UTF16)] */
+ const char *client_account;/* [unique,keepref,charset(UTF16)] */
+ uint32_t mask;/* [keepref] */
+ const char *domain_name;/* [unique,keepref,charset(UTF16)] */
+ struct GUID *domain_guid;/* [unique,keepref] */
+ const char *site_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t flags;/* [keepref] */
+ } in;
+
+ struct {
+ struct netr_DsRGetDCNameInfo *info;/* [unique,keepref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRENUMERATETRUSTEDDOMAINSEX {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DSRADDRESSTOSITENAMESEXW {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DSRGETDCSITECOVERAGEW {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonSamLogonEx {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ uint16_t logon_level;/* [keepref] */
+ union netr_LogonLevel logon;/* [keepref,switch_is(logon_level)] */
+ uint16_t validation_level;/* [keepref] */
+ uint32_t *flags;/* [keepref,ref] */
+ } in;
+
+ struct {
+ union netr_Validation *validation;/* [keepref,ref,switch_is(validation_level)] */
+ uint8_t *authoritative;/* [keepref,ref] */
+ uint32_t *flags;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_DsrEnumerateDomainTrusts {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ uint32_t trust_flags;/* [keepref] */
+ } in;
+
+ struct {
+ uint32_t *count;/* [keepref,ref] */
+ struct netr_DomainTrust **trusts;/* [keepref,ref,size_is(count)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DSRDEREGISTERDNSHOSTRECORDS {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRSERVERTRUSTPASSWORDSGET {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_DSRGETFORESTTRUSTINFORMATION {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_NETRGETFORESTTRUSTINFORMATION {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct netr_LogonSamLogonWithFlags {
+ struct {
+ const char *server_name;/* [unique,keepref,charset(UTF16)] */
+ const char *computer_name;/* [unique,keepref,charset(UTF16)] */
+ struct netr_Authenticator *credential;/* [unique,keepref] */
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ uint16_t logon_level;/* [keepref] */
+ union netr_LogonLevel logon;/* [keepref,switch_is(logon_level)] */
+ uint16_t validation_level;/* [keepref] */
+ uint32_t *flags;/* [keepref,ref] */
+ } in;
+
+ struct {
+ struct netr_Authenticator *return_authenticator;/* [unique,keepref] */
+ union netr_Validation *validation;/* [keepref,ref,switch_is(validation_level)] */
+ uint8_t *authoritative;/* [keepref,ref] */
+ uint32_t *flags;/* [keepref,ref] */
+ NTSTATUS result;
+ } out;
+
+};
+
+
+struct netr_NETRSERVERGETTRUSTINFO {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+#endif /* _HEADER_netlogon */
diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c
new file mode 100644
index 0000000000..a8dfe6429d
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_netlogon.c
@@ -0,0 +1,2653 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_netlogon.h"
+
+static BOOL api_netr_LogonUasLogon(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonUasLogon r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonUasLogon");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonUasLogon(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonUasLogon(p, r.in.server_name, r.in.account_name, r.in.workstation, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonUasLogon(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonUasLogoff(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonUasLogoff r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonUasLogoff");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonUasLogoff(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonUasLogoff(p, r.in.server_name, r.in.account_name, r.in.workstation, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonUasLogoff(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonSamLogon(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonSamLogon r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonSamLogon");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonSamLogon(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation));
+ if (r.out.validation == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative));
+ if (r.out.authoritative == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonSamLogon(p, r.in.server_name, r.in.computer_name, r.in.credential, r.in.return_authenticator, r.in.logon_level, r.in.logon, r.in.validation_level, r.out.validation, r.out.authoritative);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonSamLogon(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonSamLogoff(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonSamLogoff r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonSamLogoff");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonSamLogoff(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.result = _netr_LogonSamLogoff(p, r.in.server_name, r.in.computer_name, r.in.credential, r.in.return_authenticator, r.in.logon_level, r.in.logon);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonSamLogoff(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerReqChallenge(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerReqChallenge r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerReqChallenge");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerReqChallenge(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.credentials = r.in.credentials;
+ r.out.result = _netr_ServerReqChallenge(p, r.in.server_name, r.in.computer_name, r.in.credentials);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerReqChallenge(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerAuthenticate(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerAuthenticate r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerAuthenticate");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerAuthenticate(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.credentials = r.in.credentials;
+ r.out.result = _netr_ServerAuthenticate(p, r.in.server_name, r.in.account_name, r.in.secure_channel_type, r.in.computer_name, r.in.credentials);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerAuthenticate(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerPasswordSet(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerPasswordSet r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerPasswordSet");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerPasswordSet(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = talloc_size(mem_ctx, sizeof(*r.out.return_authenticator));
+ if (r.out.return_authenticator == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_ServerPasswordSet(p, r.in.server_name, r.in.account_name, r.in.secure_channel_type, r.in.computer_name, r.in.credential, r.in.new_password, r.out.return_authenticator);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerPasswordSet(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DatabaseDeltas(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DatabaseDeltas r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DatabaseDeltas");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DatabaseDeltas(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.sequence_num = r.in.sequence_num;
+ r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array));
+ if (r.out.delta_enum_array == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DatabaseDeltas(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.database_id, r.in.sequence_num, r.in.preferredmaximumlength, r.out.delta_enum_array);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DatabaseDeltas(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DatabaseSync(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DatabaseSync r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DatabaseSync");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DatabaseSync(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.sync_context = r.in.sync_context;
+ r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array));
+ if (r.out.delta_enum_array == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DatabaseSync(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.database_id, r.in.sync_context, r.in.preferredmaximumlength, r.out.delta_enum_array);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DatabaseSync(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_AccountDeltas(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_AccountDeltas r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_AccountDeltas");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_AccountDeltas(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.buffer = talloc_size(mem_ctx, sizeof(*r.out.buffer));
+ if (r.out.buffer == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.count_returned = talloc_size(mem_ctx, sizeof(*r.out.count_returned));
+ if (r.out.count_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.total_entries = talloc_size(mem_ctx, sizeof(*r.out.total_entries));
+ if (r.out.total_entries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.recordid = talloc_size(mem_ctx, sizeof(*r.out.recordid));
+ if (r.out.recordid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_AccountDeltas(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.uas, r.in.count, r.in.level, r.in.buffersize, r.out.buffer, r.out.count_returned, r.out.total_entries, r.out.recordid);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_AccountDeltas(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_AccountSync(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_AccountSync r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_AccountSync");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_AccountSync(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.buffer = talloc_size(mem_ctx, sizeof(*r.out.buffer));
+ if (r.out.buffer == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.count_returned = talloc_size(mem_ctx, sizeof(*r.out.count_returned));
+ if (r.out.count_returned == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.total_entries = talloc_size(mem_ctx, sizeof(*r.out.total_entries));
+ if (r.out.total_entries == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.next_reference = talloc_size(mem_ctx, sizeof(*r.out.next_reference));
+ if (r.out.next_reference == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.recordid = r.in.recordid;
+ r.out.result = _netr_AccountSync(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.reference, r.in.level, r.in.buffersize, r.out.buffer, r.out.count_returned, r.out.total_entries, r.out.next_reference, r.in.recordid);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_AccountSync(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_GetDcName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_GetDcName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_GetDcName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_GetDcName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.dcname = talloc_size(mem_ctx, sizeof(*r.out.dcname));
+ if (r.out.dcname == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_GetDcName(p, r.in.logon_server, r.in.domainname, r.out.dcname);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_GetDcName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonControl(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonControl r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonControl");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonControl(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonControl(p, r.in.logon_server, r.in.function_code, r.in.level, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonControl(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_GetAnyDCName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_GetAnyDCName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_GetAnyDCName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_GetAnyDCName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.dcname = talloc_size(mem_ctx, sizeof(*r.out.dcname));
+ if (r.out.dcname == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_GetAnyDCName(p, r.in.logon_server, r.in.domainname, r.out.dcname);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_GetAnyDCName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonControl2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonControl2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonControl2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonControl2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.query = talloc_size(mem_ctx, sizeof(*r.out.query));
+ if (r.out.query == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonControl2(p, r.in.logon_server, r.in.function_code, r.in.level, r.in.data, r.out.query);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonControl2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerAuthenticate2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerAuthenticate2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerAuthenticate2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerAuthenticate2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.credentials = r.in.credentials;
+ r.out.negotiate_flags = r.in.negotiate_flags;
+ r.out.result = _netr_ServerAuthenticate2(p, r.in.server_name, r.in.account_name, r.in.secure_channel_type, r.in.computer_name, r.in.credentials, r.in.negotiate_flags);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerAuthenticate2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DatabaseSync2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DatabaseSync2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DatabaseSync2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DatabaseSync2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.sync_context = r.in.sync_context;
+ r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array));
+ if (r.out.delta_enum_array == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DatabaseSync2(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.database_id, r.in.restart_state, r.in.sync_context, r.in.preferredmaximumlength, r.out.delta_enum_array);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DatabaseSync2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DatabaseRedo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DatabaseRedo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DatabaseRedo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DatabaseRedo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.delta_enum_array = talloc_size(mem_ctx, sizeof(*r.out.delta_enum_array));
+ if (r.out.delta_enum_array == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DatabaseRedo(p, r.in.logon_server, r.in.computername, r.in.credential, r.in.return_authenticator, r.in.change_log_entry, r.in.change_log_entry_size, r.out.delta_enum_array);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DatabaseRedo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonControl2Ex(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonControl2Ex r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonControl2Ex");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonControl2Ex(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.query = talloc_size(mem_ctx, sizeof(*r.out.query));
+ if (r.out.query == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonControl2Ex(p, r.in.logon_server, r.in.function_code, r.in.level, r.in.data, r.out.query);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonControl2Ex(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRENUMERATETRUSTEDDOMAINS r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRENUMERATETRUSTEDDOMAINS");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRENUMERATETRUSTEDDOMAINS(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DsRGetDCName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DsRGetDCName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DsRGetDCName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DsRGetDCName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DsRGetDCName(p, r.in.server_unc, r.in.domain_name, r.in.domain_guid, r.in.site_guid, r.in.flags, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DsRGetDCName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONDUMMYROUTINE1 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONDUMMYROUTINE1");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONDUMMYROUTINE1(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONDUMMYROUTINE1(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONDUMMYROUTINE1(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONSETSERVICEBITS r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONSETSERVICEBITS");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONSETSERVICEBITS(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONSETSERVICEBITS(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONSETSERVICEBITS(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONGETTRUSTRID r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONGETTRUSTRID");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONGETTRUSTRID(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONGETTRUSTRID(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONGETTRUSTRID(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONCOMPUTESERVERDIGEST");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONCOMPUTESERVERDIGEST(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONCOMPUTECLIENTDIGEST");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONCOMPUTECLIENTDIGEST(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerAuthenticate3(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerAuthenticate3 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerAuthenticate3");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerAuthenticate3(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.credentials = r.in.credentials;
+ r.out.negotiate_flags = r.in.negotiate_flags;
+ r.out.rid = talloc_size(mem_ctx, sizeof(*r.out.rid));
+ if (r.out.rid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_ServerAuthenticate3(p, r.in.server_name, r.in.account_name, r.in.secure_channel_type, r.in.computer_name, r.in.credentials, r.in.negotiate_flags, r.out.rid);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerAuthenticate3(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DsRGetDCNameEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DsRGetDCNameEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DsRGetDCNameEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DsRGetDCNameEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DsRGetDCNameEx(p, r.in.server_unc, r.in.domain_name, r.in.domain_guid, r.in.site_name, r.in.flags, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DsRGetDCNameEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DsRGetSiteName(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DsRGetSiteName r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DsRGetSiteName");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DsRGetSiteName(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.site = talloc_size(mem_ctx, sizeof(*r.out.site));
+ if (r.out.site == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DsRGetSiteName(p, r.in.computer_name, r.out.site);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DsRGetSiteName(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonGetDomainInfo(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonGetDomainInfo r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonGetDomainInfo");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonGetDomainInfo(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_LogonGetDomainInfo(p, r.in.server_name, r.in.computer_name, r.in.credential, r.in.return_authenticator, r.in.level, r.in.query, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonGetDomainInfo(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_ServerPasswordSet2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_ServerPasswordSet2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_ServerPasswordSet2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_ServerPasswordSet2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = talloc_size(mem_ctx, sizeof(*r.out.return_authenticator));
+ if (r.out.return_authenticator == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_ServerPasswordSet2(p, r.in.server_name, r.in.account_name, r.in.secure_channel_type, r.in.computer_name, r.in.credential, r.in.new_password, r.out.return_authenticator);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_ServerPasswordSet2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRSERVERPASSWORDGET(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRSERVERPASSWORDGET r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRSERVERPASSWORDGET");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRSERVERPASSWORDGET(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRSERVERPASSWORDGET(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRSERVERPASSWORDGET(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONSENDTOSAM r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONSENDTOSAM");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONSENDTOSAM(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONSENDTOSAM(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONSENDTOSAM(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DSRADDRESSTOSITENAMESW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DSRADDRESSTOSITENAMESW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DSRADDRESSTOSITENAMESW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DSRADDRESSTOSITENAMESW(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DSRADDRESSTOSITENAMESW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DsRGetDCNameEx2(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DsRGetDCNameEx2 r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DsRGetDCNameEx2");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DsRGetDCNameEx2(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DsRGetDCNameEx2(p, r.in.server_unc, r.in.client_account, r.in.mask, r.in.domain_name, r.in.domain_guid, r.in.site_name, r.in.flags, r.out.info);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DsRGetDCNameEx2(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRENUMERATETRUSTEDDOMAINSEX r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRENUMERATETRUSTEDDOMAINSEX");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRENUMERATETRUSTEDDOMAINSEX(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DSRADDRESSTOSITENAMESEXW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DSRADDRESSTOSITENAMESEXW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DSRADDRESSTOSITENAMESEXW(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DSRADDRESSTOSITENAMESEXW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DSRGETDCSITECOVERAGEW r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DSRGETDCSITECOVERAGEW");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DSRGETDCSITECOVERAGEW(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DSRGETDCSITECOVERAGEW(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DSRGETDCSITECOVERAGEW(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonSamLogonEx(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonSamLogonEx r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonSamLogonEx");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonSamLogonEx(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation));
+ if (r.out.validation == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative));
+ if (r.out.authoritative == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.flags = r.in.flags;
+ r.out.result = _netr_LogonSamLogonEx(p, r.in.server_name, r.in.computer_name, r.in.logon_level, r.in.logon, r.in.validation_level, r.out.validation, r.out.authoritative, r.in.flags);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonSamLogonEx(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DsrEnumerateDomainTrusts r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DsrEnumerateDomainTrusts");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DsrEnumerateDomainTrusts(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.count = talloc_size(mem_ctx, sizeof(*r.out.count));
+ if (r.out.count == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.trusts = talloc_array_size(mem_ctx, sizeof(*r.out.trusts), count);
+ if (r.out.trusts == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DsrEnumerateDomainTrusts(p, r.in.server_name, r.in.trust_flags, r.out.count, r.out.trusts);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DsrEnumerateDomainTrusts(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DSRDEREGISTERDNSHOSTRECORDS r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DSRDEREGISTERDNSHOSTRECORDS");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DSRDEREGISTERDNSHOSTRECORDS(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRSERVERTRUSTPASSWORDSGET r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRSERVERTRUSTPASSWORDSGET");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRSERVERTRUSTPASSWORDSGET(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_DSRGETFORESTTRUSTINFORMATION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_DSRGETFORESTTRUSTINFORMATION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_DSRGETFORESTTRUSTINFORMATION(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRGETFORESTTRUSTINFORMATION r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRGETFORESTTRUSTINFORMATION");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRGETFORESTTRUSTINFORMATION(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_LogonSamLogonWithFlags(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_LogonSamLogonWithFlags r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_LogonSamLogonWithFlags");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_LogonSamLogonWithFlags(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.return_authenticator = r.in.return_authenticator;
+ r.out.validation = talloc_size(mem_ctx, sizeof(*r.out.validation));
+ if (r.out.validation == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.authoritative = talloc_size(mem_ctx, sizeof(*r.out.authoritative));
+ if (r.out.authoritative == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.flags = r.in.flags;
+ r.out.result = _netr_LogonSamLogonWithFlags(p, r.in.server_name, r.in.computer_name, r.in.credential, r.in.return_authenticator, r.in.logon_level, r.in.logon, r.in.validation_level, r.out.validation, r.out.authoritative, r.in.flags);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_LogonSamLogonWithFlags(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+static BOOL api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
+{
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ NTSTATUS status;
+ DATA_BLOB blob;
+ struct netr_NETRSERVERGETTRUSTINFO r;
+ TALLOC_CTX *mem_ctx = talloc_init("api_netr_NETRSERVERGETTRUSTINFO");
+
+ if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (pull == NULL)
+ return False;
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ status = ndr_pull_netr_NETRSERVERGETTRUSTINFO(pull, NDR_IN, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ r.out.result = _netr_NETRSERVERGETTRUSTINFO(p);
+
+ push = ndr_push_init_ctx(mem_ctx);
+ if (push == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ status = ndr_push_netr_NETRSERVERGETTRUSTINFO(push, NDR_OUT, &r);
+ if (NT_STATUS_IS_ERR(status)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
+ talloc_free(mem_ctx);
+
+ return True;
+}
+
+
+/* Tables */
+static struct api_struct api_netlogon_cmds[] =
+{
+ {"NETR_LOGONUASLOGON", DCERPC_NETR_LOGONUASLOGON, api_netr_LogonUasLogon},
+ {"NETR_LOGONUASLOGOFF", DCERPC_NETR_LOGONUASLOGOFF, api_netr_LogonUasLogoff},
+ {"NETR_LOGONSAMLOGON", DCERPC_NETR_LOGONSAMLOGON, api_netr_LogonSamLogon},
+ {"NETR_LOGONSAMLOGOFF", DCERPC_NETR_LOGONSAMLOGOFF, api_netr_LogonSamLogoff},
+ {"NETR_SERVERREQCHALLENGE", DCERPC_NETR_SERVERREQCHALLENGE, api_netr_ServerReqChallenge},
+ {"NETR_SERVERAUTHENTICATE", DCERPC_NETR_SERVERAUTHENTICATE, api_netr_ServerAuthenticate},
+ {"NETR_SERVERPASSWORDSET", DCERPC_NETR_SERVERPASSWORDSET, api_netr_ServerPasswordSet},
+ {"NETR_DATABASEDELTAS", DCERPC_NETR_DATABASEDELTAS, api_netr_DatabaseDeltas},
+ {"NETR_DATABASESYNC", DCERPC_NETR_DATABASESYNC, api_netr_DatabaseSync},
+ {"NETR_ACCOUNTDELTAS", DCERPC_NETR_ACCOUNTDELTAS, api_netr_AccountDeltas},
+ {"NETR_ACCOUNTSYNC", DCERPC_NETR_ACCOUNTSYNC, api_netr_AccountSync},
+ {"NETR_GETDCNAME", DCERPC_NETR_GETDCNAME, api_netr_GetDcName},
+ {"NETR_LOGONCONTROL", DCERPC_NETR_LOGONCONTROL, api_netr_LogonControl},
+ {"NETR_GETANYDCNAME", DCERPC_NETR_GETANYDCNAME, api_netr_GetAnyDCName},
+ {"NETR_LOGONCONTROL2", DCERPC_NETR_LOGONCONTROL2, api_netr_LogonControl2},
+ {"NETR_SERVERAUTHENTICATE2", DCERPC_NETR_SERVERAUTHENTICATE2, api_netr_ServerAuthenticate2},
+ {"NETR_DATABASESYNC2", DCERPC_NETR_DATABASESYNC2, api_netr_DatabaseSync2},
+ {"NETR_DATABASEREDO", DCERPC_NETR_DATABASEREDO, api_netr_DatabaseRedo},
+ {"NETR_LOGONCONTROL2EX", DCERPC_NETR_LOGONCONTROL2EX, api_netr_LogonControl2Ex},
+ {"NETR_NETRENUMERATETRUSTEDDOMAINS", DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NETRENUMERATETRUSTEDDOMAINS},
+ {"NETR_DSRGETDCNAME", DCERPC_NETR_DSRGETDCNAME, api_netr_DsRGetDCName},
+ {"NETR_NETRLOGONDUMMYROUTINE1", DCERPC_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1},
+ {"NETR_NETRLOGONSETSERVICEBITS", DCERPC_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS},
+ {"NETR_NETRLOGONGETTRUSTRID", DCERPC_NETR_NETRLOGONGETTRUSTRID, api_netr_NETRLOGONGETTRUSTRID},
+ {"NETR_NETRLOGONCOMPUTESERVERDIGEST", DCERPC_NETR_NETRLOGONCOMPUTESERVERDIGEST, api_netr_NETRLOGONCOMPUTESERVERDIGEST},
+ {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", DCERPC_NETR_NETRLOGONCOMPUTECLIENTDIGEST, api_netr_NETRLOGONCOMPUTECLIENTDIGEST},
+ {"NETR_SERVERAUTHENTICATE3", DCERPC_NETR_SERVERAUTHENTICATE3, api_netr_ServerAuthenticate3},
+ {"NETR_DSRGETDCNAMEEX", DCERPC_NETR_DSRGETDCNAMEEX, api_netr_DsRGetDCNameEx},
+ {"NETR_DSRGETSITENAME", DCERPC_NETR_DSRGETSITENAME, api_netr_DsRGetSiteName},
+ {"NETR_LOGONGETDOMAININFO", DCERPC_NETR_LOGONGETDOMAININFO, api_netr_LogonGetDomainInfo},
+ {"NETR_SERVERPASSWORDSET2", DCERPC_NETR_SERVERPASSWORDSET2, api_netr_ServerPasswordSet2},
+ {"NETR_NETRSERVERPASSWORDGET", DCERPC_NETR_NETRSERVERPASSWORDGET, api_netr_NETRSERVERPASSWORDGET},
+ {"NETR_NETRLOGONSENDTOSAM", DCERPC_NETR_NETRLOGONSENDTOSAM, api_netr_NETRLOGONSENDTOSAM},
+ {"NETR_DSRADDRESSTOSITENAMESW", DCERPC_NETR_DSRADDRESSTOSITENAMESW, api_netr_DSRADDRESSTOSITENAMESW},
+ {"NETR_DSRGETDCNAMEEX2", DCERPC_NETR_DSRGETDCNAMEEX2, api_netr_DsRGetDCNameEx2},
+ {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", DCERPC_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN},
+ {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINSEX, api_netr_NETRENUMERATETRUSTEDDOMAINSEX},
+ {"NETR_DSRADDRESSTOSITENAMESEXW", DCERPC_NETR_DSRADDRESSTOSITENAMESEXW, api_netr_DSRADDRESSTOSITENAMESEXW},
+ {"NETR_DSRGETDCSITECOVERAGEW", DCERPC_NETR_DSRGETDCSITECOVERAGEW, api_netr_DSRGETDCSITECOVERAGEW},
+ {"NETR_LOGONSAMLOGONEX", DCERPC_NETR_LOGONSAMLOGONEX, api_netr_LogonSamLogonEx},
+ {"NETR_DSRENUMERATEDOMAINTRUSTS", DCERPC_NETR_DSRENUMERATEDOMAINTRUSTS, api_netr_DsrEnumerateDomainTrusts},
+ {"NETR_DSRDEREGISTERDNSHOSTRECORDS", DCERPC_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DSRDEREGISTERDNSHOSTRECORDS},
+ {"NETR_NETRSERVERTRUSTPASSWORDSGET", DCERPC_NETR_NETRSERVERTRUSTPASSWORDSGET, api_netr_NETRSERVERTRUSTPASSWORDSGET},
+ {"NETR_DSRGETFORESTTRUSTINFORMATION", DCERPC_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DSRGETFORESTTRUSTINFORMATION},
+ {"NETR_NETRGETFORESTTRUSTINFORMATION", DCERPC_NETR_NETRGETFORESTTRUSTINFORMATION, api_netr_NETRGETFORESTTRUSTINFORMATION},
+ {"NETR_LOGONSAMLOGONWITHFLAGS", DCERPC_NETR_LOGONSAMLOGONWITHFLAGS, api_netr_LogonSamLogonWithFlags},
+ {"NETR_NETRSERVERGETTRUSTINFO", DCERPC_NETR_NETRSERVERGETTRUSTINFO, api_netr_NETRSERVERGETTRUSTINFO},
+};
+
+void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_netlogon_cmds;
+ *n_fns = sizeof(api_netlogon_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_netlogon_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_netlogon.h b/source3/librpc/gen_ndr/srv_netlogon.h
new file mode 100644
index 0000000000..efcd8f2a08
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_netlogon.h
@@ -0,0 +1,53 @@
+#include "librpc/gen_ndr/ndr_netlogon.h"
+#ifndef __SRV_NETLOGON__
+#define __SRV_NETLOGON__
+WERROR _netr_LogonUasLogon(pipes_struct *p, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info);
+WERROR _netr_LogonUasLogoff(pipes_struct *p, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info);
+NTSTATUS _netr_LogonSamLogon(pipes_struct *p, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative);
+NTSTATUS _netr_LogonSamLogoff(pipes_struct *p, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon);
+NTSTATUS _netr_ServerReqChallenge(pipes_struct *p, const char *server_name, const char *computer_name, struct netr_Credential *credentials);
+NTSTATUS _netr_ServerAuthenticate(pipes_struct *p, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials);
+NTSTATUS _netr_ServerPasswordSet(pipes_struct *p, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct samr_Password new_password, struct netr_Authenticator *return_authenticator);
+NTSTATUS _netr_DatabaseDeltas(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS _netr_DatabaseSync(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS _netr_AccountDeltas(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, struct netr_UAS_INFO_0 uas, uint32_t count, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, struct netr_UAS_INFO_0 *recordid);
+NTSTATUS _netr_AccountSync(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint32_t reference, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, uint32_t *next_reference, struct netr_UAS_INFO_0 *recordid);
+NTSTATUS _netr_GetDcName(pipes_struct *p, const char *logon_server, const char *domainname, const char **dcname);
+WERROR _netr_LogonControl(pipes_struct *p, const char *logon_server, enum netr_LogonControlCode function_code, uint32_t level, union netr_CONTROL_QUERY_INFORMATION *info);
+WERROR _netr_GetAnyDCName(pipes_struct *p, const char *logon_server, const char *domainname, const char **dcname);
+WERROR _netr_LogonControl2(pipes_struct *p, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
+NTSTATUS _netr_ServerAuthenticate2(pipes_struct *p, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags);
+NTSTATUS _netr_DatabaseSync2(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+NTSTATUS _netr_DatabaseRedo(pipes_struct *p, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+WERROR _netr_LogonControl2Ex(pipes_struct *p, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
+WERROR _netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p);
+WERROR _netr_DsRGetDCName(pipes_struct *p, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p);
+WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p);
+WERROR _netr_NETRLOGONGETTRUSTRID(pipes_struct *p);
+WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p);
+WERROR _netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p);
+NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags, uint32_t *rid);
+WERROR _netr_DsRGetDCNameEx(pipes_struct *p, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+WERROR _netr_DsRGetSiteName(pipes_struct *p, const char *computer_name, const char **site);
+NTSTATUS _netr_LogonGetDomainInfo(pipes_struct *p, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint32_t level, union netr_DomainQuery query, union netr_DomainInfo *info);
+NTSTATUS _netr_ServerPasswordSet2(pipes_struct *p, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct netr_CryptPassword new_password, struct netr_Authenticator *return_authenticator);
+WERROR _netr_NETRSERVERPASSWORDGET(pipes_struct *p);
+WERROR _netr_NETRLOGONSENDTOSAM(pipes_struct *p);
+WERROR _netr_DSRADDRESSTOSITENAMESW(pipes_struct *p);
+WERROR _netr_DsRGetDCNameEx2(pipes_struct *p, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
+WERROR _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p);
+WERROR _netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p);
+WERROR _netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p);
+WERROR _netr_DSRGETDCSITECOVERAGEW(pipes_struct *p);
+NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p, const char *server_name, const char *computer_name, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
+WERROR _netr_DsrEnumerateDomainTrusts(pipes_struct *p, const char *server_name, uint32_t trust_flags, uint32_t *count, struct netr_DomainTrust **trusts);
+WERROR _netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p);
+WERROR _netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p);
+WERROR _netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p);
+WERROR _netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p);
+NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
+WERROR _netr_NETRSERVERGETTRUSTINFO(pipes_struct *p);
+void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_netlogon_init(void);
+#endif /* __SRV_NETLOGON__ */