summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c56
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h22
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.c37
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.h31
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.c2783
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.h218
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.c10
-rw-r--r--source3/librpc/gen_ndr/cli_srvsvc.h6
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.c18
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.h9
-rw-r--r--source3/librpc/gen_ndr/cli_unixinfo.c216
-rw-r--r--source3/librpc/gen_ndr/cli_unixinfo.h25
-rw-r--r--source3/librpc/gen_ndr/krb5pac.h137
-rw-r--r--source3/librpc/gen_ndr/libnet_join.h5
-rw-r--r--source3/librpc/gen_ndr/lsa.h46
-rw-r--r--source3/librpc/gen_ndr/ndr_dfs.c33
-rw-r--r--source3/librpc/gen_ndr/ndr_echo.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_epmapper.c15
-rw-r--r--source3/librpc/gen_ndr/ndr_eventlog.c5
-rw-r--r--source3/librpc/gen_ndr/ndr_krb5pac.c949
-rw-r--r--source3/librpc/gen_ndr/ndr_krb5pac.h56
-rw-r--r--source3/librpc/gen_ndr/ndr_libnet_join.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_libnet_join.h6
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c558
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.h6
-rw-r--r--source3/librpc/gen_ndr/ndr_messaging.c3
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c353
-rw-r--r--source3/librpc/gen_ndr/ndr_notify.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_ntsvcs.c3616
-rw-r--r--source3/librpc/gen_ndr/ndr_ntsvcs.h211
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c46
-rw-r--r--source3/librpc/gen_ndr/ndr_security.c6
-rw-r--r--source3/librpc/gen_ndr/ndr_srvsvc.c173
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.c106
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c538
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.h31
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.c8
-rw-r--r--source3/librpc/gen_ndr/ndr_wkssvc.c27
-rw-r--r--source3/librpc/gen_ndr/ndr_xattr.c3
-rw-r--r--source3/librpc/gen_ndr/netlogon.h26
-rw-r--r--source3/librpc/gen_ndr/ntsvcs.h568
-rw-r--r--source3/librpc/gen_ndr/samr.h6
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c16
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.c25
-rw-r--r--source3/librpc/gen_ndr/srv_ntsvcs.c4859
-rw-r--r--source3/librpc/gen_ndr/srv_ntsvcs.h71
-rw-r--r--source3/librpc/gen_ndr/srv_srvsvc.c2
-rw-r--r--source3/librpc/gen_ndr/srv_svcctl.c13
-rw-r--r--source3/librpc/gen_ndr/srv_unixinfo.c430
-rw-r--r--source3/librpc/gen_ndr/srv_unixinfo.h11
-rw-r--r--source3/librpc/gen_ndr/srvsvc.h6
-rw-r--r--source3/librpc/gen_ndr/svcctl.h15
-rw-r--r--source3/librpc/gen_ndr/unixinfo.h82
-rw-r--r--source3/librpc/idl/krb5pac.idl119
-rw-r--r--source3/librpc/idl/libnet_join.idl10
-rw-r--r--source3/librpc/idl/lsa.idl112
-rw-r--r--source3/librpc/idl/netlogon.idl34
-rw-r--r--source3/librpc/idl/ntsvcs.idl419
-rw-r--r--source3/librpc/idl/samr.idl10
-rw-r--r--source3/librpc/idl/spoolss.idl473
-rw-r--r--source3/librpc/idl/srvsvc.idl6
-rw-r--r--source3/librpc/idl/svcctl.idl9
-rw-r--r--source3/librpc/idl/unixinfo.idl56
-rw-r--r--source3/librpc/ndr/ndr.c22
-rw-r--r--source3/librpc/ndr/ndr_basic.c3
-rw-r--r--source3/librpc/ndr/ndr_krb5pac.c141
-rw-r--r--source3/librpc/ndr/ndr_string.c3
67 files changed, 15626 insertions, 2301 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 27ed572a19..b1609ea97b 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -471,8 +471,8 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
uint32_t *resume_handle,
- uint32_t num_entries,
- struct lsa_SidArray *sids)
+ struct lsa_SidArray *sids,
+ uint32_t num_entries)
{
struct lsa_EnumAccounts r;
NTSTATUS status;
@@ -609,7 +609,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count)
@@ -649,9 +649,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -663,7 +661,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray *names,
uint16_t level,
uint32_t *count)
@@ -702,9 +700,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -805,7 +801,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_PrivilegeSet *privs)
+ struct lsa_PrivilegeSet **privs)
{
struct lsa_EnumPrivsAccount r;
NTSTATUS status;
@@ -837,9 +833,7 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (privs && r.out.privs) {
- *privs = *r.out.privs;
- }
+ *privs = *r.out.privs;
/* Return result */
return r.out.result;
@@ -1669,7 +1663,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct dom_sid2 *sid,
- uint32_t unknown,
+ uint8_t remove_all,
struct lsa_RightSet *rights)
{
struct lsa_RemoveAccountRights r;
@@ -1678,7 +1672,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
r.in.sid = sid;
- r.in.unknown = unknown;
+ r.in.remove_all = remove_all;
r.in.rights = rights;
if (DEBUGLEVEL >= 10) {
@@ -2474,7 +2468,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -2517,9 +2511,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -2532,7 +2524,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray2 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -2576,9 +2568,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -2924,7 +2914,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray3 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -2968,9 +2958,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
@@ -3248,7 +3236,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -3290,9 +3278,7 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*names = *r.out.names;
*count = *r.out.count;
@@ -3304,7 +3290,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray3 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -3347,9 +3333,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (domains && r.out.domains) {
- *domains = *r.out.domains;
- }
+ *domains = *r.out.domains;
*sids = *r.out.sids;
*count = *r.out.count;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index ddcd161413..7d69926484 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -53,8 +53,8 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
uint32_t *resume_handle,
- uint32_t num_entries,
- struct lsa_SidArray *sids);
+ struct lsa_SidArray *sids,
+ uint32_t num_entries);
NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
@@ -72,7 +72,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count);
@@ -80,7 +80,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray *names,
uint16_t level,
uint32_t *count);
@@ -99,7 +99,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_PrivilegeSet *privs);
+ struct lsa_PrivilegeSet **privs);
NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
@@ -192,7 +192,7 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct dom_sid2 *sid,
- uint32_t unknown,
+ uint8_t remove_all,
struct lsa_RightSet *rights);
NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -276,7 +276,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -287,7 +287,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray2 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -316,7 +316,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
struct policy_handle *handle,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray3 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
@@ -343,7 +343,7 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct lsa_SidArray *sids,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransNameArray2 *names,
uint16_t level,
uint32_t *count,
@@ -353,7 +353,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t num_names,
struct lsa_String *names,
- struct lsa_RefDomainList *domains,
+ struct lsa_RefDomainList **domains,
struct lsa_TransSidArray3 *sids,
enum lsa_LookupNamesLevel level,
uint32_t *count,
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c
index de04c21dc5..2937cc09b9 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.c
+++ b/source3/librpc/gen_ndr/cli_netlogon.c
@@ -113,7 +113,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
uint16_t logon_level,
- union netr_LogonLevel logon,
+ union netr_LogonLevel *logon,
uint16_t validation_level,
union netr_Validation *validation,
uint8_t *authoritative)
@@ -220,7 +220,8 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_name,
const char *computer_name,
- struct netr_Credential *credentials)
+ struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials)
{
struct netr_ServerReqChallenge r;
NTSTATUS status;
@@ -254,7 +255,7 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
}
/* Return variables */
- *credentials = *r.out.credentials;
+ *return_credentials = *r.out.return_credentials;
/* Return result */
return r.out.result;
@@ -266,7 +267,8 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
const char *account_name,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
- struct netr_Credential *credentials)
+ struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials)
{
struct netr_ServerAuthenticate r;
NTSTATUS status;
@@ -302,7 +304,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
}
/* Return variables */
- *credentials = *r.out.credentials;
+ *return_credentials = *r.out.return_credentials;
/* Return result */
return r.out.result;
@@ -314,9 +316,9 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
const char *account_name,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
- struct netr_Authenticator credential,
- struct samr_Password new_password,
- struct netr_Authenticator *return_authenticator)
+ struct netr_Authenticator *credential,
+ struct netr_Authenticator *return_authenticator,
+ struct samr_Password *new_password)
{
struct netr_ServerPasswordSet r;
NTSTATUS status;
@@ -363,12 +365,12 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
const char *computername,
- struct netr_Authenticator credential,
+ struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
enum netr_SamDatabaseID database_id,
uint64_t *sequence_num,
- uint32_t preferredmaximumlength,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ uint32_t preferredmaximumlength)
{
struct netr_DatabaseDeltas r;
NTSTATUS status;
@@ -745,7 +747,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
const char *logon_server,
uint32_t function_code,
uint32_t level,
- union netr_CONTROL_DATA_INFORMATION data,
+ union netr_CONTROL_DATA_INFORMATION *data,
union netr_CONTROL_QUERY_INFORMATION *query,
WERROR *werror)
{
@@ -799,6 +801,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials,
uint32_t *negotiate_flags)
{
struct netr_ServerAuthenticate2 r;
@@ -836,7 +839,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
}
/* Return variables */
- *credentials = *r.out.credentials;
+ *return_credentials = *r.out.return_credentials;
*negotiate_flags = *r.out.negotiate_flags;
/* Return result */
@@ -847,13 +850,13 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
const char *computername,
- struct netr_Authenticator credential,
+ struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
enum netr_SamDatabaseID database_id,
uint16_t restart_state,
uint32_t *sync_context,
- uint32_t preferredmaximumlength,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ uint32_t preferredmaximumlength)
{
struct netr_DatabaseSync2 r;
NTSTATUS status;
@@ -1971,7 +1974,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
const char *server_name,
const char *computer_name,
uint16_t logon_level,
- union netr_LogonLevel logon,
+ union netr_LogonLevel *logon,
uint16_t validation_level,
union netr_Validation *validation,
uint8_t *authoritative,
diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h
index 4aa0f9fa73..1fdc1f6c46 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.h
+++ b/source3/librpc/gen_ndr/cli_netlogon.h
@@ -22,7 +22,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
uint16_t logon_level,
- union netr_LogonLevel logon,
+ union netr_LogonLevel *logon,
uint16_t validation_level,
union netr_Validation *validation,
uint8_t *authoritative);
@@ -38,33 +38,35 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_name,
const char *computer_name,
- struct netr_Credential *credentials);
+ struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials);
NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_name,
const char *account_name,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
- struct netr_Credential *credentials);
+ struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials);
NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_name,
const char *account_name,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
- struct netr_Authenticator credential,
- struct samr_Password new_password,
- struct netr_Authenticator *return_authenticator);
+ struct netr_Authenticator *credential,
+ struct netr_Authenticator *return_authenticator,
+ struct samr_Password *new_password);
NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
const char *computername,
- struct netr_Authenticator credential,
+ struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
enum netr_SamDatabaseID database_id,
uint64_t *sequence_num,
- uint32_t preferredmaximumlength,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ uint32_t preferredmaximumlength);
NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
@@ -127,7 +129,7 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
const char *logon_server,
uint32_t function_code,
uint32_t level,
- union netr_CONTROL_DATA_INFORMATION data,
+ union netr_CONTROL_DATA_INFORMATION *data,
union netr_CONTROL_QUERY_INFORMATION *query,
WERROR *werror);
NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
@@ -137,18 +139,19 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
enum netr_SchannelType secure_channel_type,
const char *computer_name,
struct netr_Credential *credentials,
+ struct netr_Credential *return_credentials,
uint32_t *negotiate_flags);
NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
const char *computername,
- struct netr_Authenticator credential,
+ struct netr_Authenticator *credential,
struct netr_Authenticator *return_authenticator,
enum netr_SamDatabaseID database_id,
uint16_t restart_state,
uint32_t *sync_context,
- uint32_t preferredmaximumlength,
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ uint32_t preferredmaximumlength);
NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *logon_server,
@@ -295,7 +298,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
const char *server_name,
const char *computer_name,
uint16_t logon_level,
- union netr_LogonLevel logon,
+ union netr_LogonLevel *logon,
uint16_t validation_level,
union netr_Validation *validation,
uint8_t *authoritative,
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c
new file mode 100644
index 0000000000..5597fccdb5
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.c
@@ -0,0 +1,2783 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_ntsvcs.h"
+
+NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_Disconnect r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_Disconnect, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DISCONNECT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_Connect r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_Connect, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_CONNECT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_Connect, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t *version,
+ WERROR *werror)
+{
+ struct PNP_GetVersion r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetVersion, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETVERSION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *version = *r.out.version;
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetGlobalState r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETGLOBALSTATE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_InitDetection r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_InitDetection, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_INITDETECTION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_ReportLogOn r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REPORTLOGON,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *devicepath,
+ uint32_t flags,
+ WERROR *werror)
+{
+ struct PNP_ValidateDeviceInstance r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.devicepath = devicepath;
+ r.in.flags = flags;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_VALIDATEDEVICEINSTANCE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetRootDeviceInstance r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETROOTDEVICEINSTANCE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetRelatedDeviceInstance r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETRELATEDDEVICEINSTANCE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_EnumerateSubKeys r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_ENUMERATESUBKEYS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetDeviceList r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETDEVICELIST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *devicename,
+ uint32_t *size,
+ uint32_t flags,
+ WERROR *werror)
+{
+ struct PNP_GetDeviceListSize r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.devicename = devicename;
+ r.in.flags = flags;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETDEVICELISTSIZE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *size = *r.out.size;
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetDepth r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDepth, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETDEPTH,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetDeviceRegProp r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETDEVICEREGPROP,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_SetDeviceRegProp r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_SETDEVICEREGPROP,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetClassInstance r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETCLASSINSTANCE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_CreateKey r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_CreateKey, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_CREATEKEY,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_DeleteRegistryKey r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DELETEREGISTRYKEY,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetClassCount r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETCLASSCOUNT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetClassName r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassName, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETCLASSNAME,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_DeleteClassKey r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DELETECLASSKEY,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetInterfaceDeviceAlias r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETINTERFACEDEVICEALIAS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetInterfaceDeviceList r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETINTERFACEDEVICELIST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetInterfaceDeviceListSize r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETINTERFACEDEVICELISTSIZE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RegisterDeviceClassAssociation r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REGISTERDEVICECLASSASSOCIATION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_UnregisterDeviceClassAssociation r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetClassRegProp r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETCLASSREGPROP,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_SetClassRegProp r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_SETCLASSREGPROP,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_CreateDevInst r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_CREATEDEVINST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_DeviceInstanceAction r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DEVICEINSTANCEACTION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetDeviceStatus r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETDEVICESTATUS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_SetDeviceProblem r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_SETDEVICEPROBLEM,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_DisableDevInst r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DISABLEDEVINST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_UninstallDevInst r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_UNINSTALLDEVINST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_AddID r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddID, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_ADDID,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddID, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RegisterDriver r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REGISTERDRIVER,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_QueryRemove r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_QUERYREMOVE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RequestDeviceEject r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REQUESTDEVICEEJECT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_IsDockStationPresent r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_ISDOCKSTATIONPRESENT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RequestEjectPC r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REQUESTEJECTPC,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32_t unknown1,
+ const char *devicepath,
+ uint32_t unknown2,
+ uint32_t *unknown3,
+ uint16_t *unknown4,
+ const char *unknown5,
+ const char **unknown5a,
+ uint32_t unknown6,
+ uint32_t unknown7,
+ WERROR *werror)
+{
+ struct PNP_HwProfFlags r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.unknown1 = unknown1;
+ r.in.devicepath = devicepath;
+ r.in.unknown2 = unknown2;
+ r.in.unknown3 = unknown3;
+ r.in.unknown4 = unknown4;
+ r.in.unknown5 = unknown5;
+ r.in.unknown6 = unknown6;
+ r.in.unknown7 = unknown7;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_HWPROFFLAGS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *unknown3 = *r.out.unknown3;
+ if (unknown4 && r.out.unknown4) {
+ *unknown4 = *r.out.unknown4;
+ }
+ if (unknown5a && r.out.unknown5a) {
+ *unknown5a = *r.out.unknown5a;
+ }
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32_t idx,
+ struct PNP_HwProfInfo *info,
+ uint32_t unknown1,
+ uint32_t unknown2,
+ WERROR *werror)
+{
+ struct PNP_GetHwProfInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.idx = idx;
+ r.in.info = info;
+ r.in.unknown1 = unknown1;
+ r.in.unknown2 = unknown2;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETHWPROFINFO,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ *info = *r.out.info;
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_AddEmptyLogConf r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_ADDEMPTYLOGCONF,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_FreeLogConf r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_FREELOGCONF,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetFirstLogConf r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETFIRSTLOGCONF,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetNextLogConf r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETNEXTLOGCONF,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetLogConfPriority r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETLOGCONFPRIORITY,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_AddResDes r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddResDes, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_ADDRESDES,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_FreeResDes r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_FREERESDES,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetNextResDes r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETNEXTRESDES,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetResDesData r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETRESDESDATA,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetResDesDataSize r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETRESDESDATASIZE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_ModifyResDes r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_MODIFYRESDES,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_DetectResourceLimit r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_DETECTRESOURCELIMIT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_QueryResConfList r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_QUERYRESCONFLIST,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_SetHwProf r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_SETHWPROF,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_QueryArbitratorFreeData r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_QUERYARBITRATORFREEDATA,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_QueryArbitratorFreeSize r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_QUERYARBITRATORFREESIZE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RunDetection r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RunDetection, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_RUNDETECTION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_RegisterNotification r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_REGISTERNOTIFICATION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_UnregisterNotification r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_UNREGISTERNOTIFICATION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetCustomDevProp r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETCUSTOMDEVPROP,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetVersionInternal r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETVERSIONINTERNAL,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetBlockedDriverInfo r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETBLOCKEDDRIVERINFO,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct PNP_GetServerSideDeviceInstallFlags r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_NTSVCS,
+ &ndr_table_ntsvcs,
+ NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h
new file mode 100644
index 0000000000..33df63ee5d
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.h
@@ -0,0 +1,218 @@
+#include "librpc/gen_ndr/ndr_ntsvcs.h"
+#ifndef __CLI_NTSVCS__
+#define __CLI_NTSVCS__
+NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint16_t *version,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *devicepath,
+ uint32_t flags,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *devicename,
+ uint32_t *size,
+ uint32_t flags,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32_t unknown1,
+ const char *devicepath,
+ uint32_t unknown2,
+ uint32_t *unknown3,
+ uint16_t *unknown4,
+ const char *unknown5,
+ const char **unknown5a,
+ uint32_t unknown6,
+ uint32_t unknown7,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32_t idx,
+ struct PNP_HwProfInfo *info,
+ uint32_t unknown1,
+ uint32_t unknown2,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+#endif /* __CLI_NTSVCS__ */
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c
index 2b1d050a14..3624fb0dd4 100644
--- a/source3/librpc/gen_ndr/cli_srvsvc.c
+++ b/source3/librpc/gen_ndr/cli_srvsvc.c
@@ -923,7 +923,7 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli,
const char *server_unc,
const char *share_name,
uint32_t level,
- union srvsvc_NetShareInfo info,
+ union srvsvc_NetShareInfo *info,
uint32_t *parm_error,
WERROR *werror)
{
@@ -1169,7 +1169,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_unc,
uint32_t level,
- union srvsvc_NetSrvInfo info,
+ union srvsvc_NetSrvInfo *info,
uint32_t *parm_error,
WERROR *werror)
{
@@ -1486,7 +1486,7 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli,
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_unc,
- struct srvsvc_NetRemoteTODInfo *info,
+ struct srvsvc_NetRemoteTODInfo **info,
WERROR *werror)
{
struct srvsvc_NetRemoteTOD r;
@@ -1519,9 +1519,7 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (info && r.out.info) {
- *info = *r.out.info;
- }
+ *info = *r.out.info;
/* Return result */
if (werror) {
diff --git a/source3/librpc/gen_ndr/cli_srvsvc.h b/source3/librpc/gen_ndr/cli_srvsvc.h
index eb19db37bd..4f52600a99 100644
--- a/source3/librpc/gen_ndr/cli_srvsvc.h
+++ b/source3/librpc/gen_ndr/cli_srvsvc.h
@@ -138,7 +138,7 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli,
const char *server_unc,
const char *share_name,
uint32_t level,
- union srvsvc_NetShareInfo info,
+ union srvsvc_NetShareInfo *info,
uint32_t *parm_error,
WERROR *werror);
NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli,
@@ -169,7 +169,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_unc,
uint32_t level,
- union srvsvc_NetSrvInfo info,
+ union srvsvc_NetSrvInfo *info,
uint32_t *parm_error,
WERROR *werror);
NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli,
@@ -213,7 +213,7 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli,
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *server_unc,
- struct srvsvc_NetRemoteTODInfo *info,
+ struct srvsvc_NetRemoteTODInfo **info,
WERROR *werror);
NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c
index 2a5d6badc6..b8f18afe1c 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.c
+++ b/source3/librpc/gen_ndr/cli_svcctl.c
@@ -191,12 +191,20 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
+ uint32_t *needed,
WERROR *werror)
{
struct svcctl_QueryServiceObjectSecurity r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.security_flags = security_flags;
+ r.in.buffer_size = buffer_size;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
@@ -222,6 +230,8 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
}
/* Return variables */
+ memcpy(buffer, r.out.buffer, r.in.buffer_size);
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -233,12 +243,20 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
WERROR *werror)
{
struct svcctl_SetServiceObjectSecurity r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.security_flags = security_flags;
+ r.in.buffer = buffer;
+ r.in.buffer_size = buffer_size;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h
index e9eeb2d9e2..7c62519187 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.h
+++ b/source3/librpc/gen_ndr/cli_svcctl.h
@@ -22,9 +22,18 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
+ uint32_t *needed,
WERROR *werror);
NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t security_flags,
+ uint8_t *buffer,
+ uint32_t buffer_size,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/cli_unixinfo.c b/source3/librpc/gen_ndr/cli_unixinfo.c
deleted file mode 100644
index c8a6c926ef..0000000000
--- a/source3/librpc/gen_ndr/cli_unixinfo.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * client auto-generated by pidl. DO NOT MODIFY!
- */
-
-#include "includes.h"
-#include "librpc/gen_ndr/cli_unixinfo.h"
-
-NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- struct dom_sid sid,
- uint64_t *uid)
-{
- struct unixinfo_SidToUid r;
- NTSTATUS status;
-
- /* In parameters */
- r.in.sid = sid;
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, &r);
- }
-
- status = cli_do_rpc_ndr(cli,
- mem_ctx,
- PI_UNIXINFO,
- &ndr_table_unixinfo,
- NDR_UNIXINFO_SIDTOUID,
- &r);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, &r);
- }
-
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
-
- /* Return variables */
- *uid = *r.out.uid;
-
- /* Return result */
- return r.out.result;
-}
-
-NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint64_t uid,
- struct dom_sid *sid)
-{
- struct unixinfo_UidToSid r;
- NTSTATUS status;
-
- /* In parameters */
- r.in.uid = uid;
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, &r);
- }
-
- status = cli_do_rpc_ndr(cli,
- mem_ctx,
- PI_UNIXINFO,
- &ndr_table_unixinfo,
- NDR_UNIXINFO_UIDTOSID,
- &r);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, &r);
- }
-
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
-
- /* Return variables */
- *sid = *r.out.sid;
-
- /* Return result */
- return r.out.result;
-}
-
-NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- struct dom_sid sid,
- uint64_t *gid)
-{
- struct unixinfo_SidToGid r;
- NTSTATUS status;
-
- /* In parameters */
- r.in.sid = sid;
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, &r);
- }
-
- status = cli_do_rpc_ndr(cli,
- mem_ctx,
- PI_UNIXINFO,
- &ndr_table_unixinfo,
- NDR_UNIXINFO_SIDTOGID,
- &r);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, &r);
- }
-
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
-
- /* Return variables */
- *gid = *r.out.gid;
-
- /* Return result */
- return r.out.result;
-}
-
-NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint64_t gid,
- struct dom_sid *sid)
-{
- struct unixinfo_GidToSid r;
- NTSTATUS status;
-
- /* In parameters */
- r.in.gid = gid;
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, &r);
- }
-
- status = cli_do_rpc_ndr(cli,
- mem_ctx,
- PI_UNIXINFO,
- &ndr_table_unixinfo,
- NDR_UNIXINFO_GIDTOSID,
- &r);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, &r);
- }
-
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
-
- /* Return variables */
- *sid = *r.out.sid;
-
- /* Return result */
- return r.out.result;
-}
-
-NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32_t *count,
- uint64_t *uids,
- struct unixinfo_GetPWUidInfo *infos)
-{
- struct unixinfo_GetPWUid r;
- NTSTATUS status;
-
- /* In parameters */
- r.in.count = count;
- r.in.uids = uids;
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, &r);
- }
-
- status = cli_do_rpc_ndr(cli,
- mem_ctx,
- PI_UNIXINFO,
- &ndr_table_unixinfo,
- NDR_UNIXINFO_GETPWUID,
- &r);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, &r);
- }
-
- if (NT_STATUS_IS_ERR(status)) {
- return status;
- }
-
- /* Return variables */
- *count = *r.out.count;
- memcpy(infos, r.out.infos, *r.in.count);
-
- /* Return result */
- return r.out.result;
-}
-
diff --git a/source3/librpc/gen_ndr/cli_unixinfo.h b/source3/librpc/gen_ndr/cli_unixinfo.h
deleted file mode 100644
index fa084cc75d..0000000000
--- a/source3/librpc/gen_ndr/cli_unixinfo.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "librpc/gen_ndr/ndr_unixinfo.h"
-#ifndef __CLI_UNIXINFO__
-#define __CLI_UNIXINFO__
-NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- struct dom_sid sid,
- uint64_t *uid);
-NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint64_t uid,
- struct dom_sid *sid);
-NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- struct dom_sid sid,
- uint64_t *gid);
-NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint64_t gid,
- struct dom_sid *sid);
-NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- uint32_t *count,
- uint64_t *uids,
- struct unixinfo_GetPWUidInfo *infos);
-#endif /* __CLI_UNIXINFO__ */
diff --git a/source3/librpc/gen_ndr/krb5pac.h b/source3/librpc/gen_ndr/krb5pac.h
new file mode 100644
index 0000000000..8a148253ae
--- /dev/null
+++ b/source3/librpc/gen_ndr/krb5pac.h
@@ -0,0 +1,137 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#include "librpc/gen_ndr/security.h"
+#include "librpc/gen_ndr/netlogon.h"
+#include "librpc/gen_ndr/samr.h"
+#ifndef _HEADER_krb5pac
+#define _HEADER_krb5pac
+
+struct PAC_LOGON_NAME {
+ NTTIME logon_time;
+ uint16_t size;/* [value(2*strlen_m(account_name))] */
+ const char *account_name;/* [charset(UTF16)] */
+};
+
+struct PAC_SIGNATURE_DATA {
+ uint32_t type;
+ DATA_BLOB signature;/* [flag(LIBNDR_FLAG_REMAINING)] */
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct PAC_LOGON_INFO {
+ struct netr_SamInfo3 info3;
+ struct dom_sid2 *res_group_dom_sid;/* [unique] */
+ struct samr_RidWithAttributeArray res_groups;
+}/* [gensize] */;
+
+struct PAC_UNKNOWN_12 {
+ uint16_t upn_size;/* [value(2*strlen_m(upn_name))] */
+ uint16_t unknown1;
+ uint16_t domain_size;/* [value(2*strlen_m(domain_name))] */
+ uint16_t unknown2;
+ uint16_t unknown3;
+ uint16_t unknown4;
+ uint32_t unknown5;
+ const char *upn_name;/* [charset(UTF16)] */
+ const char *domain_name;/* [charset(UTF16)] */
+ uint32_t unknown6;
+};
+
+struct PAC_LOGON_INFO_CTR {
+ uint32_t unknown1;/* [value(0x00081001)] */
+ uint32_t unknown2;/* [value(0xCCCCCCCC)] */
+ uint32_t _ndr_size;/* [value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info,ndr->flags)+4,8))] */
+ uint32_t unknown3;/* [value(0x00000000)] */
+ struct PAC_LOGON_INFO *info;/* [unique] */
+}/* [public] */;
+
+enum PAC_TYPE
+#ifndef USE_UINT_ENUMS
+ {
+ PAC_TYPE_LOGON_INFO=1,
+ PAC_TYPE_SRV_CHECKSUM=6,
+ PAC_TYPE_KDC_CHECKSUM=7,
+ PAC_TYPE_LOGON_NAME=10,
+ PAC_TYPE_CONSTRAINED_DELEGATION=11,
+ PAC_TYPE_UNKNOWN_12=12
+}
+#else
+ { __donnot_use_enum_PAC_TYPE=0x7FFFFFFF}
+#define PAC_TYPE_LOGON_INFO ( 1 )
+#define PAC_TYPE_SRV_CHECKSUM ( 6 )
+#define PAC_TYPE_KDC_CHECKSUM ( 7 )
+#define PAC_TYPE_LOGON_NAME ( 10 )
+#define PAC_TYPE_CONSTRAINED_DELEGATION ( 11 )
+#define PAC_TYPE_UNKNOWN_12 ( 12 )
+#endif
+;
+
+union PAC_INFO {
+ struct PAC_LOGON_INFO_CTR logon_info;/* [case(PAC_TYPE_LOGON_INFO)] */
+ struct PAC_SIGNATURE_DATA srv_cksum;/* [case(PAC_TYPE_SRV_CHECKSUM)] */
+ struct PAC_SIGNATURE_DATA kdc_cksum;/* [case(PAC_TYPE_KDC_CHECKSUM)] */
+ struct PAC_LOGON_NAME logon_name;/* [case(PAC_TYPE_LOGON_NAME)] */
+ struct PAC_UNKNOWN_12 unknown;/* [case(PAC_TYPE_UNKNOWN_12)] */
+}/* [gensize,nodiscriminant,public] */;
+
+struct PAC_BUFFER {
+ enum PAC_TYPE type;
+ uint32_t _ndr_size;/* [value(_ndr_size_PAC_INFO(info,type,0))] */
+ union PAC_INFO *info;/* [relative,subcontext_size(_subcontext_size_PAC_INFO(r,ndr->flags)),subcontext(0),switch_is(type),flag(LIBNDR_FLAG_ALIGN8)] */
+ uint32_t _pad;/* [value(0)] */
+}/* [noprint,nopull,public,nopush] */;
+
+struct PAC_DATA {
+ uint32_t num_buffers;
+ uint32_t version;
+ struct PAC_BUFFER *buffers;
+}/* [public] */;
+
+struct DATA_BLOB_REM {
+ DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
+};
+
+struct PAC_BUFFER_RAW {
+ enum PAC_TYPE type;
+ uint32_t ndr_size;
+ struct DATA_BLOB_REM *info;/* [relative,subcontext_size(NDR_ROUND(ndr_size,8)),subcontext(0),flag(LIBNDR_FLAG_ALIGN8)] */
+ uint32_t _pad;/* [value(0)] */
+}/* [public] */;
+
+struct PAC_DATA_RAW {
+ uint32_t num_buffers;
+ uint32_t version;
+ struct PAC_BUFFER_RAW *buffers;
+}/* [public] */;
+
+struct netsamlogoncache_entry {
+ time_t timestamp;
+ struct netr_SamInfo3 info3;
+}/* [public] */;
+
+
+struct decode_pac {
+ struct {
+ struct PAC_DATA pac;
+ } in;
+
+};
+
+
+struct decode_pac_raw {
+ struct {
+ struct PAC_DATA_RAW pac;
+ } in;
+
+};
+
+
+struct decode_login_info {
+ struct {
+ struct PAC_LOGON_INFO logon_info;
+ } in;
+
+};
+
+#endif /* _HEADER_krb5pac */
diff --git a/source3/librpc/gen_ndr/libnet_join.h b/source3/librpc/gen_ndr/libnet_join.h
index 40759cb489..0415f030b4 100644
--- a/source3/librpc/gen_ndr/libnet_join.h
+++ b/source3/librpc/gen_ndr/libnet_join.h
@@ -7,7 +7,7 @@
#ifndef _HEADER_libnetjoin
#define _HEADER_libnetjoin
-;
+enum netr_SchannelType;
struct libnet_JoinCtx {
@@ -27,6 +27,7 @@ struct libnet_JoinCtx {
uint8_t modify_config;
struct ads_struct *ads;/* [ref] */
uint8_t debug;
+ enum netr_SchannelType secure_channel_type;
} in;
struct {
@@ -65,6 +66,8 @@ struct libnet_UnjoinCtx {
const char * dns_domain_name;
uint8_t modified_config;
const char * error_string;
+ uint8_t disabled_machine_account;
+ uint8_t deleted_machine_account;
WERROR result;
} out;
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 14d46a6542..4fea08e99d 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -8,6 +8,8 @@
#define LSA_ENUM_TRUST_DOMAIN_MULTIPLIER ( 60 )
#define LSA_REF_DOMAIN_LIST_MULTIPLIER ( 32 )
+#define MAX_REF_DOMAINS ( LSA_REF_DOMAIN_LIST_MULTIPLIER )
+#define MAX_LOOKUP_SIDS ( 0x5000 )
#define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER ( 82 )
struct lsa_String {
uint16_t length;/* [value(2*strlen_m(string))] */
@@ -17,7 +19,7 @@ struct lsa_String {
struct lsa_StringLarge {
uint16_t length;/* [value(2*strlen_m(string))] */
- uint16_t size;/* [value(2*(strlen_m(string)+1))] */
+ uint16_t size;/* [value(2*strlen_m_term(string))] */
const char *string;/* [unique,charset(UTF16),length_is(length/2),size_is(size/2)] */
}/* [public] */;
@@ -29,7 +31,13 @@ struct lsa_Strings {
struct lsa_AsciiString {
uint16_t length;/* [value(strlen_m(string))] */
uint16_t size;/* [value(strlen_m(string))] */
- const char * string;/* [unique,flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4)] */
+ const char *string;/* [unique,charset(DOS),length_is(length),size_is(size)] */
+}/* [public] */;
+
+struct lsa_AsciiStringLarge {
+ uint16_t length;/* [value(strlen_m(string))] */
+ uint16_t size;/* [value(strlen_m_term(string))] */
+ const char *string;/* [unique,charset(DOS),length_is(length),size_is(size)] */
}/* [public] */;
struct lsa_LUID {
@@ -63,6 +71,20 @@ struct lsa_ObjectAttribute {
struct lsa_QosInfo *sec_qos;/* [unique] */
};
+/* bitmap lsa_PolicyAccessMask */
+#define LSA_POLICY_VIEW_LOCAL_INFORMATION ( 0x00000001 )
+#define LSA_POLICY_VIEW_AUDIT_INFORMATION ( 0x00000002 )
+#define LSA_POLICY_GET_PRIVATE_INFORMATION ( 0x00000004 )
+#define LSA_POLICY_TRUST_ADMIN ( 0x00000008 )
+#define LSA_POLICY_CREATE_ACCOUNT ( 0x00000010 )
+#define LSA_POLICY_CREATE_SECRET ( 0x00000020 )
+#define LSA_POLICY_CREATE_PRIVILEGE ( 0x00000040 )
+#define LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS ( 0x00000080 )
+#define LSA_POLICY_SET_AUDIT_REQUIREMENTS ( 0x00000100 )
+#define LSA_POLICY_AUDIT_LOG_ADMIN ( 0x00000200 )
+#define LSA_POLICY_SERVER_ADMIN ( 0x00000400 )
+#define LSA_POLICY_LOOKUP_NAMES ( 0x00000800 )
+
struct lsa_AuditLogInfo {
uint32_t percent_full;
uint32_t log_size;
@@ -448,7 +470,7 @@ struct lsa_RightAttribute {
};
struct lsa_RightSet {
- uint32_t count;
+ uint32_t count;/* [range(0,256)] */
struct lsa_StringLarge *names;/* [unique,size_is(count)] */
};
@@ -774,7 +796,7 @@ struct lsa_LookupNames {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -793,7 +815,7 @@ struct lsa_LookupSids {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -838,7 +860,7 @@ struct lsa_EnumPrivsAccount {
} in;
struct {
- struct lsa_PrivilegeSet *privs;/* [unique] */
+ struct lsa_PrivilegeSet **privs;/* [ref] */
NTSTATUS result;
} out;
@@ -1104,7 +1126,7 @@ struct lsa_RemoveAccountRights {
struct {
struct policy_handle *handle;/* [ref] */
struct dom_sid2 *sid;/* [ref] */
- uint32_t unknown;
+ uint8_t remove_all;
struct lsa_RightSet *rights;/* [ref] */
} in;
@@ -1356,7 +1378,7 @@ struct lsa_LookupSids2 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray2 *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1378,7 +1400,7 @@ struct lsa_LookupNames2 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray2 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1472,7 +1494,7 @@ struct lsa_LookupNames3 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray3 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1555,7 +1577,7 @@ struct lsa_LookupSids3 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransNameArray2 *names;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
@@ -1576,7 +1598,7 @@ struct lsa_LookupNames4 {
} in;
struct {
- struct lsa_RefDomainList *domains;/* [unique] */
+ struct lsa_RefDomainList **domains;/* [ref] */
struct lsa_TransSidArray3 *sids;/* [ref] */
uint32_t *count;/* [ref] */
NTSTATUS result;
diff --git a/source3/librpc/gen_ndr/ndr_dfs.c b/source3/librpc/gen_ndr/ndr_dfs.c
index f5ce913bd2..2e9873e929 100644
--- a/source3/librpc/gen_ndr/ndr_dfs.c
+++ b/source3/librpc/gen_ndr/ndr_dfs.c
@@ -506,8 +506,7 @@ _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_stores_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
free(idx_1);
}
@@ -670,8 +669,7 @@ _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_stores_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
free(idx_1);
}
@@ -1079,8 +1077,7 @@ _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_stores_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
free(idx_1);
}
@@ -2271,8 +2268,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2358,8 +2354,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2445,8 +2440,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2532,8 +2526,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2619,8 +2612,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2706,8 +2698,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2793,8 +2784,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
@@ -2880,8 +2870,7 @@ _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_s_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
free(idx_1);
}
diff --git a/source3/librpc/gen_ndr/ndr_echo.c b/source3/librpc/gen_ndr/ndr_echo.c
index 67ff0f2df4..340167cf73 100644
--- a/source3/librpc/gen_ndr/ndr_echo.c
+++ b/source3/librpc/gen_ndr/ndr_echo.c
@@ -627,8 +627,7 @@ _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_surrounding_0=0;cntr_surrounding_0<r->x;cntr_surrounding_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_surrounding_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_surrounding_0) != -1) {
ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_epmapper.c b/source3/librpc/gen_ndr/ndr_epmapper.c
index 4f9422ea57..2e709e11e0 100644
--- a/source3/librpc/gen_ndr/ndr_epmapper.c
+++ b/source3/librpc/gen_ndr/ndr_epmapper.c
@@ -1566,8 +1566,7 @@ _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_floors_0=0;cntr_floors_0<r->num_floors;cntr_floors_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_floors_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_floors_0) != -1) {
ndr_print_epm_floor(ndr, "floors", &r->floors[cntr_floors_0]);
free(idx_0);
}
@@ -1849,8 +1848,7 @@ _PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_entries_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
free(idx_0);
}
@@ -1930,8 +1928,7 @@ _PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_entries_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
free(idx_0);
}
@@ -2131,8 +2128,7 @@ _PUBLIC_ void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<*r->out.num_ents;cntr_entries_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_entries_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_epm_entry_t(ndr, "entries", &r->out.entries[cntr_entries_0]);
free(idx_0);
}
@@ -2321,8 +2317,7 @@ _PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int fla
ndr->depth++;
for (cntr_towers_0=0;cntr_towers_0<*r->out.num_towers;cntr_towers_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_towers_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_towers_0) != -1) {
ndr_print_epm_twr_p_t(ndr, "towers", &r->out.towers[cntr_towers_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c
index c6a77c54e5..c5461d99ab 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.c
+++ b/source3/librpc/gen_ndr/ndr_eventlog.c
@@ -176,8 +176,7 @@ _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_strings_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
free(idx_0);
}
@@ -878,7 +877,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
- memset(r->out.data, 0, r->in.number_of_bytes * sizeof(*r->out.data));
+ memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
NDR_PULL_ALLOC(ndr, r->out.sent_size);
ZERO_STRUCTP(r->out.sent_size);
NDR_PULL_ALLOC(ndr, r->out.real_size);
diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c b/source3/librpc/gen_ndr/ndr_krb5pac.c
new file mode 100644
index 0000000000..be9e2e1e4e
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_krb5pac.c
@@ -0,0 +1,949 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_krb5pac.h"
+
+#include "librpc/gen_ndr/ndr_security.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+static enum ndr_err_code ndr_push_PAC_LOGON_NAME(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_NAME *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->logon_time));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->account_name)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, 2 * strlen_m(r->account_name), sizeof(uint8_t), CH_UTF16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PAC_LOGON_NAME(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_NAME *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->logon_time));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, r->size, sizeof(uint8_t), CH_UTF16));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r)
+{
+ ndr_print_struct(ndr, name, "PAC_LOGON_NAME");
+ ndr->depth++;
+ ndr_print_NTTIME(ndr, "logon_time", r->logon_time);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->account_name):r->size);
+ ndr_print_string(ndr, "account_name", r->account_name);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->signature));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->signature));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r)
+{
+ ndr_print_struct(ndr, name, "PAC_SIGNATURE_DATA");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "type", r->type);
+ ndr_print_DATA_BLOB(ndr, "signature", r->signature);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
+static enum ndr_err_code ndr_push_PAC_LOGON_INFO(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->res_group_dom_sid));
+ NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
+ if (r->res_group_dom_sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
+ }
+ NDR_CHECK(ndr_push_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r)
+{
+ uint32_t _ptr_res_group_dom_sid;
+ TALLOC_CTX *_mem_save_res_group_dom_sid_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid));
+ if (_ptr_res_group_dom_sid) {
+ NDR_PULL_ALLOC(ndr, r->res_group_dom_sid);
+ } else {
+ r->res_group_dom_sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
+ if (r->res_group_dom_sid) {
+ _mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0);
+ }
+ NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r)
+{
+ ndr_print_struct(ndr, name, "PAC_LOGON_INFO");
+ ndr->depth++;
+ ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
+ ndr_print_ptr(ndr, "res_group_dom_sid", r->res_group_dom_sid);
+ ndr->depth++;
+ if (r->res_group_dom_sid) {
+ ndr_print_dom_sid2(ndr, "res_group_dom_sid", r->res_group_dom_sid);
+ }
+ ndr->depth--;
+ ndr_print_samr_RidWithAttributeArray(ndr, "res_groups", &r->res_groups);
+ ndr->depth--;
+}
+
+static size_t ndr_size_PAC_LOGON_INFO(const struct PAC_LOGON_INFO *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_PAC_LOGON_INFO);
+}
+
+static enum ndr_err_code ndr_push_PAC_UNKNOWN_12(struct ndr_push *ndr, int ndr_flags, const struct PAC_UNKNOWN_12 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->upn_name)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->domain_name)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown3));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->upn_name, 2 * strlen_m(r->upn_name) + 2, sizeof(uint8_t), CH_UTF16));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, 2 * strlen_m(r->domain_name) + 2, sizeof(uint8_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PAC_UNKNOWN_12(struct ndr_pull *ndr, int ndr_flags, struct PAC_UNKNOWN_12 *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->upn_size));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->domain_size));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->upn_name, r->upn_size + 2, sizeof(uint8_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, r->domain_size + 2, sizeof(uint8_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_UNKNOWN_12(struct ndr_print *ndr, const char *name, const struct PAC_UNKNOWN_12 *r)
+{
+ ndr_print_struct(ndr, name, "PAC_UNKNOWN_12");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "upn_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->upn_name):r->upn_size);
+ ndr_print_uint16(ndr, "unknown1", r->unknown1);
+ ndr_print_uint16(ndr, "domain_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->domain_name):r->domain_size);
+ ndr_print_uint16(ndr, "unknown2", r->unknown2);
+ ndr_print_uint16(ndr, "unknown3", r->unknown3);
+ ndr_print_uint16(ndr, "unknown4", r->unknown4);
+ ndr_print_uint32(ndr, "unknown5", r->unknown5);
+ ndr_print_string(ndr, "upn_name", r->upn_name);
+ ndr_print_string(ndr, "domain_name", r->domain_name);
+ ndr_print_uint32(ndr, "unknown6", r->unknown6);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00081001));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0xCCCCCCCC));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NDR_ROUND(ndr_size_PAC_LOGON_INFO(r->info, ndr->flags) + 4, 8)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000000));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->info) {
+ NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_info_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->info);
+ } else {
+ r->info = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+ NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r)
+{
+ ndr_print_struct(ndr, name, "PAC_LOGON_INFO_CTR");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00081001:r->unknown1);
+ ndr_print_uint32(ndr, "unknown2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0xCCCCCCCC:r->unknown2);
+ ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NDR_ROUND(ndr_size_PAC_LOGON_INFO(r->info, ndr->flags) + 4, 8):r->_ndr_size);
+ ndr_print_uint32(ndr, "unknown3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000000:r->unknown3);
+ ndr_print_ptr(ndr, "info", r->info);
+ ndr->depth++;
+ if (r->info) {
+ ndr_print_PAC_LOGON_INFO(ndr, "info", r->info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case PAC_TYPE_LOGON_INFO: val = "PAC_TYPE_LOGON_INFO"; break;
+ case PAC_TYPE_SRV_CHECKSUM: val = "PAC_TYPE_SRV_CHECKSUM"; break;
+ case PAC_TYPE_KDC_CHECKSUM: val = "PAC_TYPE_KDC_CHECKSUM"; break;
+ case PAC_TYPE_LOGON_NAME: val = "PAC_TYPE_LOGON_NAME"; break;
+ case PAC_TYPE_CONSTRAINED_DELEGATION: val = "PAC_TYPE_CONSTRAINED_DELEGATION"; break;
+ case PAC_TYPE_UNKNOWN_12: val = "PAC_TYPE_UNKNOWN_12"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO: {
+ NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(ndr, NDR_SCALARS, &r->logon_info));
+ break; }
+
+ case PAC_TYPE_SRV_CHECKSUM: {
+ NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
+ break; }
+
+ case PAC_TYPE_KDC_CHECKSUM: {
+ NDR_CHECK(ndr_push_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
+ break; }
+
+ case PAC_TYPE_LOGON_NAME: {
+ NDR_CHECK(ndr_push_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
+ break; }
+
+ case PAC_TYPE_UNKNOWN_12: {
+ NDR_CHECK(ndr_push_PAC_UNKNOWN_12(ndr, NDR_SCALARS, &r->unknown));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO:
+ NDR_CHECK(ndr_push_PAC_LOGON_INFO_CTR(ndr, NDR_BUFFERS, &r->logon_info));
+ break;
+
+ case PAC_TYPE_SRV_CHECKSUM:
+ break;
+
+ case PAC_TYPE_KDC_CHECKSUM:
+ break;
+
+ case PAC_TYPE_LOGON_NAME:
+ break;
+
+ case PAC_TYPE_UNKNOWN_12:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO: {
+ NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_SCALARS, &r->logon_info));
+ break; }
+
+ case PAC_TYPE_SRV_CHECKSUM: {
+ NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
+ break; }
+
+ case PAC_TYPE_KDC_CHECKSUM: {
+ NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
+ break; }
+
+ case PAC_TYPE_LOGON_NAME: {
+ NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
+ break; }
+
+ case PAC_TYPE_UNKNOWN_12: {
+ NDR_CHECK(ndr_pull_PAC_UNKNOWN_12(ndr, NDR_SCALARS, &r->unknown));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO:
+ NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_BUFFERS, &r->logon_info));
+ break;
+
+ case PAC_TYPE_SRV_CHECKSUM:
+ break;
+
+ case PAC_TYPE_KDC_CHECKSUM:
+ break;
+
+ case PAC_TYPE_LOGON_NAME:
+ break;
+
+ case PAC_TYPE_UNKNOWN_12:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "PAC_INFO");
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO:
+ ndr_print_PAC_LOGON_INFO_CTR(ndr, "logon_info", &r->logon_info);
+ break;
+
+ case PAC_TYPE_SRV_CHECKSUM:
+ ndr_print_PAC_SIGNATURE_DATA(ndr, "srv_cksum", &r->srv_cksum);
+ break;
+
+ case PAC_TYPE_KDC_CHECKSUM:
+ ndr_print_PAC_SIGNATURE_DATA(ndr, "kdc_cksum", &r->kdc_cksum);
+ break;
+
+ case PAC_TYPE_LOGON_NAME:
+ ndr_print_PAC_LOGON_NAME(ndr, "logon_name", &r->logon_name);
+ break;
+
+ case PAC_TYPE_UNKNOWN_12:
+ ndr_print_PAC_UNKNOWN_12(ndr, "unknown", &r->unknown);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+{
+ return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_PAC_INFO);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r)
+{
+ uint32_t cntr_buffers_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_push_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r)
+{
+ uint32_t cntr_buffers_0;
+ TALLOC_CTX *_mem_save_buffers_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+ NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers);
+ _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_pull_PAC_BUFFER(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r)
+{
+ uint32_t cntr_buffers_0;
+ ndr_print_struct(ndr, name, "PAC_DATA");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
+ ndr_print_uint32(ndr, "version", r->version);
+ ndr->print(ndr, "%s: ARRAY(%d)", "buffers", r->num_buffers);
+ ndr->depth++;
+ for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
+ ndr_print_PAC_BUFFER(ndr, "buffers", &r->buffers[cntr_buffers_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_DATA_BLOB_REM(struct ndr_push *ndr, int ndr_flags, const struct DATA_BLOB_REM *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_DATA_BLOB_REM(struct ndr_pull *ndr, int ndr_flags, struct DATA_BLOB_REM *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
+ ndr->flags = _flags_save_DATA_BLOB;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r)
+{
+ ndr_print_struct(ndr, name, "DATA_BLOB_REM");
+ ndr->depth++;
+ ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ndr_size));
+ {
+ uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
+ ndr->flags = _flags_save_DATA_BLOB_REM;
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ if (r->info) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info));
+ {
+ struct ndr_push *_ndr_info;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
+ NDR_CHECK(ndr_push_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
+ }
+ }
+ ndr->flags = _flags_save_DATA_BLOB_REM;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_info_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ndr_size));
+ {
+ uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->info);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
+ } else {
+ r->info = NULL;
+ }
+ ndr->flags = _flags_save_DATA_BLOB_REM;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_DATA_BLOB_REM = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ if (r->info) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+ {
+ struct ndr_pull *_ndr_info;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
+ NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_info, NDR_SCALARS, r->info));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->ndr_size, 8)));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ ndr->offset = _relative_save_offset;
+ }
+ ndr->flags = _flags_save_DATA_BLOB_REM;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r)
+{
+ ndr_print_struct(ndr, name, "PAC_BUFFER_RAW");
+ ndr->depth++;
+ ndr_print_PAC_TYPE(ndr, "type", r->type);
+ ndr_print_uint32(ndr, "ndr_size", r->ndr_size);
+ ndr_print_ptr(ndr, "info", r->info);
+ ndr->depth++;
+ if (r->info) {
+ ndr_print_DATA_BLOB_REM(ndr, "info", r->info);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r)
+{
+ uint32_t cntr_buffers_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_buffers));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_push_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r)
+{
+ uint32_t cntr_buffers_0;
+ TALLOC_CTX *_mem_save_buffers_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_buffers));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+ NDR_PULL_ALLOC_N(ndr, r->buffers, r->num_buffers);
+ _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
+ for (cntr_buffers_0 = 0; cntr_buffers_0 < r->num_buffers; cntr_buffers_0++) {
+ NDR_CHECK(ndr_pull_PAC_BUFFER_RAW(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r)
+{
+ uint32_t cntr_buffers_0;
+ ndr_print_struct(ndr, name, "PAC_DATA_RAW");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_buffers", r->num_buffers);
+ ndr_print_uint32(ndr, "version", r->version);
+ ndr->print(ndr, "%s: ARRAY(%d)", "buffers", r->num_buffers);
+ ndr->depth++;
+ for (cntr_buffers_0=0;cntr_buffers_0<r->num_buffers;cntr_buffers_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_buffers_0) != -1) {
+ ndr_print_PAC_BUFFER_RAW(ndr, "buffers", &r->buffers[cntr_buffers_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r)
+{
+ ndr_print_struct(ndr, name, "netsamlogoncache_entry");
+ ndr->depth++;
+ ndr_print_time_t(ndr, "timestamp", r->timestamp);
+ ndr_print_netr_SamInfo3(ndr, "info3", &r->info3);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_pac(struct ndr_pull *ndr, int flags, struct decode_pac *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r)
+{
+ ndr_print_struct(ndr, name, "decode_pac");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "decode_pac");
+ ndr->depth++;
+ ndr_print_PAC_DATA(ndr, "pac", &r->in.pac);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "decode_pac");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_pac_raw(struct ndr_push *ndr, int flags, const struct decode_pac_raw *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_pac_raw(struct ndr_pull *ndr, int flags, struct decode_pac_raw *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r)
+{
+ ndr_print_struct(ndr, name, "decode_pac_raw");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "decode_pac_raw");
+ ndr->depth++;
+ ndr_print_PAC_DATA_RAW(ndr, "pac", &r->in.pac);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "decode_pac_raw");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_login_info(struct ndr_push *ndr, int flags, const struct decode_login_info *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_login_info(struct ndr_pull *ndr, int flags, struct decode_login_info *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon_info));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r)
+{
+ ndr_print_struct(ndr, name, "decode_login_info");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "decode_login_info");
+ ndr->depth++;
+ ndr_print_PAC_LOGON_INFO(ndr, "logon_info", &r->in.logon_info);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "decode_login_info");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static const struct ndr_interface_call krb5pac_calls[] = {
+ {
+ "decode_pac",
+ sizeof(struct decode_pac),
+ (ndr_push_flags_fn_t) ndr_push_decode_pac,
+ (ndr_pull_flags_fn_t) ndr_pull_decode_pac,
+ (ndr_print_function_t) ndr_print_decode_pac,
+ false,
+ },
+ {
+ "decode_pac_raw",
+ sizeof(struct decode_pac_raw),
+ (ndr_push_flags_fn_t) ndr_push_decode_pac_raw,
+ (ndr_pull_flags_fn_t) ndr_pull_decode_pac_raw,
+ (ndr_print_function_t) ndr_print_decode_pac_raw,
+ false,
+ },
+ {
+ "decode_login_info",
+ sizeof(struct decode_login_info),
+ (ndr_push_flags_fn_t) ndr_push_decode_login_info,
+ (ndr_pull_flags_fn_t) ndr_pull_decode_login_info,
+ (ndr_print_function_t) ndr_print_decode_login_info,
+ false,
+ },
+ { NULL, 0, NULL, NULL, NULL, false }
+};
+
+static const char * const krb5pac_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\krb5pac]",
+};
+
+static const struct ndr_interface_string_array krb5pac_endpoints = {
+ .count = 1,
+ .names = krb5pac_endpoint_strings
+};
+
+static const char * const krb5pac_authservice_strings[] = {
+ "host",
+};
+
+static const struct ndr_interface_string_array krb5pac_authservices = {
+ .count = 1,
+ .names = krb5pac_authservice_strings
+};
+
+
+const struct ndr_interface_table ndr_table_krb5pac = {
+ .name = "krb5pac",
+ .syntax_id = {
+ {0x12345778,0x1234,0xabcd,{0x00,0x00},{0x00,0x00,0x00,0x00}},
+ NDR_KRB5PAC_VERSION
+ },
+ .helpstring = NDR_KRB5PAC_HELPSTRING,
+ .num_calls = 3,
+ .calls = krb5pac_calls,
+ .endpoints = &krb5pac_endpoints,
+ .authservices = &krb5pac_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.h b/source3/librpc/gen_ndr/ndr_krb5pac.h
new file mode 100644
index 0000000000..1d60382dc3
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_krb5pac.h
@@ -0,0 +1,56 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/krb5pac.h"
+
+#ifndef _HEADER_NDR_krb5pac
+#define _HEADER_NDR_krb5pac
+
+#define NDR_KRB5PAC_UUID "12345778-1234-abcd-0000-00000000"
+#define NDR_KRB5PAC_VERSION 0.0
+#define NDR_KRB5PAC_NAME "krb5pac"
+#define NDR_KRB5PAC_HELPSTRING "Active Directory KRB5 PAC"
+extern const struct ndr_interface_table ndr_table_krb5pac;
+#define NDR_DECODE_PAC (0x00)
+
+#define NDR_DECODE_PAC_RAW (0x01)
+
+#define NDR_DECODE_LOGIN_INFO (0x02)
+
+#define NDR_KRB5PAC_CALL_COUNT (3)
+void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
+enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r);
+enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
+void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
+void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
+void ndr_print_PAC_UNKNOWN_12(struct ndr_print *ndr, const char *name, const struct PAC_UNKNOWN_12 *r);
+enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r);
+enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
+void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
+enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r);
+enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r);
+void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r);
+enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
+enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
+void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
+size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
+enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
+enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
+void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
+enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r);
+enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r);
+void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r);
+void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r);
+enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r);
+enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r);
+void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r);
+enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r);
+enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r);
+void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r);
+enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r);
+enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r);
+void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r);
+void ndr_print_decode_pac(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac *r);
+void ndr_print_decode_pac_raw(struct ndr_print *ndr, const char *name, int flags, const struct decode_pac_raw *r);
+void ndr_print_decode_login_info(struct ndr_print *ndr, const char *name, int flags, const struct decode_login_info *r);
+#endif /* _HEADER_NDR_krb5pac */
diff --git a/source3/librpc/gen_ndr/ndr_libnet_join.c b/source3/librpc/gen_ndr/ndr_libnet_join.c
index 5345bc0ad4..ac8f7ee71d 100644
--- a/source3/librpc/gen_ndr/ndr_libnet_join.c
+++ b/source3/librpc/gen_ndr/ndr_libnet_join.c
@@ -36,6 +36,7 @@ _PUBLIC_ void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name,
ndr_print_ads_struct(ndr, "ads", r->in.ads);
ndr->depth--;
ndr_print_uint8(ndr, "debug", r->in.debug);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -95,6 +96,8 @@ _PUBLIC_ void ndr_print_libnet_UnjoinCtx(struct ndr_print *ndr, const char *name
ndr_print_string(ndr, "dns_domain_name", r->out.dns_domain_name);
ndr_print_uint8(ndr, "modified_config", r->out.modified_config);
ndr_print_string(ndr, "error_string", r->out.error_string);
+ ndr_print_uint8(ndr, "disabled_machine_account", r->out.disabled_machine_account);
+ ndr_print_uint8(ndr, "deleted_machine_account", r->out.deleted_machine_account);
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/ndr_libnet_join.h b/source3/librpc/gen_ndr/ndr_libnet_join.h
index 4a5fdf0d50..14c8a863aa 100644
--- a/source3/librpc/gen_ndr/ndr_libnet_join.h
+++ b/source3/librpc/gen_ndr/ndr_libnet_join.h
@@ -6,11 +6,7 @@
#ifndef _HEADER_NDR_libnetjoin
#define _HEADER_NDR_libnetjoin
-#define NDR_LIBNET_JOINCTX (0x00)
-
-#define NDR_LIBNET_UNJOINCTX (0x01)
-
-#define NDR_LIBNETJOIN_CALL_COUNT (2)
+#define NDR_LIBNETJOIN_CALL_COUNT (0)
enum ndr_err_code ndr_push_libnet_JoinCtx(struct ndr_push *ndr, int flags, const struct libnet_JoinCtx *r);
enum ndr_err_code ndr_pull_libnet_JoinCtx(struct ndr_pull *ndr, int flags, struct libnet_JoinCtx *r);
void ndr_print_libnet_JoinCtx(struct ndr_print *ndr, const char *name, int flags, const struct libnet_JoinCtx *r);
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 84f99749fe..03e1c21e55 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -80,12 +80,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_StringLarge(struct ndr_push *ndr, int nd
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string)));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->string) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1) / 2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->string) / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
@@ -136,7 +136,7 @@ _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name,
ndr_print_struct(ndr, name, "lsa_StringLarge");
ndr->depth++;
ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
- ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * (strlen_m(r->string) + 1):r->size);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->string):r->size);
ndr_print_ptr(ndr, "string", r->string);
ndr->depth++;
if (r->string) {
@@ -221,8 +221,7 @@ _PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, con
ndr->depth++;
for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
free(idx_1);
}
@@ -239,21 +238,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int nd
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
- ndr->flags = _flags_save_string;
- }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
- if (r->string) {
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string));
- }
- ndr->flags = _flags_save_string;
+ if (r->string) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
}
}
return NDR_ERR_SUCCESS;
@@ -267,29 +259,30 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int nd
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
- if (_ptr_string) {
- NDR_PULL_ALLOC(ndr, r->string);
- } else {
- r->string = NULL;
- }
- ndr->flags = _flags_save_string;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+ if (_ptr_string) {
+ NDR_PULL_ALLOC(ndr, r->string);
+ } else {
+ r->string = NULL;
}
}
if (ndr_flags & NDR_BUFFERS) {
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
- if (r->string) {
- _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+ if (r->string) {
+ _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
+ if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
}
- ndr->flags = _flags_save_string;
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+ }
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
+ }
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
}
}
return NDR_ERR_SUCCESS;
@@ -310,6 +303,77 @@ _PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->string)));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->string) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->string)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->string)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, strlen_m(r->string), sizeof(uint8_t), CH_DOS));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r)
+{
+ uint32_t _ptr_string;
+ TALLOC_CTX *_mem_save_string_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+ if (_ptr_string) {
+ NDR_PULL_ALLOC(ndr, r->string);
+ } else {
+ r->string = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->string) {
+ _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
+ if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
+ }
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+ }
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size));
+ }
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r)
+{
+ ndr_print_struct(ndr, name, "lsa_AsciiStringLarge");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->string):r->size);
+ ndr_print_ptr(ndr, "string", r->string);
+ ndr->depth++;
+ if (r->string) {
+ ndr_print_string(ndr, "string", r->string);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -453,8 +517,7 @@ _PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, c
ndr->depth++;
for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_privs_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_privs_1) != -1) {
ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
free(idx_1);
}
@@ -642,6 +705,39 @@ _PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *n
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_LOCAL_INFORMATION", LSA_POLICY_VIEW_LOCAL_INFORMATION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_VIEW_AUDIT_INFORMATION", LSA_POLICY_VIEW_AUDIT_INFORMATION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_GET_PRIVATE_INFORMATION", LSA_POLICY_GET_PRIVATE_INFORMATION, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_TRUST_ADMIN", LSA_POLICY_TRUST_ADMIN, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_ACCOUNT", LSA_POLICY_CREATE_ACCOUNT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_SECRET", LSA_POLICY_CREATE_SECRET, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_CREATE_PRIVILEGE", LSA_POLICY_CREATE_PRIVILEGE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS", LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SET_AUDIT_REQUIREMENTS", LSA_POLICY_SET_AUDIT_REQUIREMENTS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_AUDIT_LOG_ADMIN", LSA_POLICY_AUDIT_LOG_ADMIN, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_SERVER_ADMIN", LSA_POLICY_SERVER_ADMIN, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_POLICY_LOOKUP_NAMES", LSA_POLICY_LOOKUP_NAMES, r);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -789,8 +885,7 @@ _PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_settings_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_settings_1) != -1) {
ndr_print_lsa_PolicyAuditPolicy(ndr, "settings", r->settings[cntr_settings_1]);
free(idx_1);
}
@@ -1622,8 +1717,7 @@ _PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -1709,8 +1803,7 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_domains_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
free(idx_1);
}
@@ -1862,8 +1955,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -1954,8 +2046,7 @@ _PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_domains_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
free(idx_1);
}
@@ -2112,8 +2203,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
free(idx_1);
}
@@ -2213,8 +2303,7 @@ _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_set_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_set_0) != -1) {
ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
free(idx_0);
}
@@ -3288,6 +3377,9 @@ static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_fla
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ if (r->count < 0 || r->count > 256) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
if (_ptr_names) {
NDR_PULL_ALLOC(ndr, r->names);
@@ -3332,8 +3424,7 @@ _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
free(idx_1);
}
@@ -3419,8 +3510,7 @@ _PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_domains_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_domains_1) != -1) {
ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
free(idx_1);
}
@@ -3748,8 +3838,7 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_names_1) != -1) {
ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
free(idx_1);
}
@@ -3871,8 +3960,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -4021,8 +4109,7 @@ _PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -4444,8 +4531,7 @@ _PUBLIC_ void ndr_print_lsa_ForestTrustInformation(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_ptr(ndr, "entries", r->entries[cntr_entries_1]);
ndr->depth++;
if (r->entries[cntr_entries_1]) {
@@ -4936,7 +5022,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int fla
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
if (r->out.handle == NULL) {
@@ -4976,7 +5062,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, int fla
NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
NDR_PULL_ALLOC(ndr, r->out.handle);
ZERO_STRUCTP(r->out.handle);
}
@@ -5013,7 +5099,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
ndr->depth--;
- ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -5701,9 +5787,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5725,6 +5814,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -5767,6 +5857,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -5776,18 +5868,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -5827,8 +5925,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_names_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
free(idx_0);
}
@@ -5850,10 +5947,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
@@ -5890,9 +5990,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids(struct ndr_push *ndr, int fla
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5913,6 +6016,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -5947,24 +6051,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int fla
NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -6018,10 +6130,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
@@ -6224,9 +6339,12 @@ static enum ndr_err_code ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.privs));
- if (r->out.privs) {
- NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
+ if (r->out.privs == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.privs));
+ if (*r->out.privs) {
+ NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
}
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
@@ -6238,6 +6356,7 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int
uint32_t _ptr_privs;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_privs_0;
+ TALLOC_CTX *_mem_save_privs_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6248,20 +6367,28 @@ static enum ndr_err_code ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.privs);
+ ZERO_STRUCTP(r->out.privs);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.privs);
+ }
+ _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
if (_ptr_privs) {
- NDR_PULL_ALLOC(ndr, r->out.privs);
+ NDR_PULL_ALLOC(ndr, *r->out.privs);
} else {
- r->out.privs = NULL;
+ *r->out.privs = NULL;
}
- if (r->out.privs) {
- _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, 0);
- NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
+ if (*r->out.privs) {
+ _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.privs, 0);
+ NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, *r->out.privs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6288,10 +6415,13 @@ _PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_ptr(ndr, "privs", r->out.privs);
ndr->depth++;
- if (r->out.privs) {
- ndr_print_lsa_PrivilegeSet(ndr, "privs", r->out.privs);
+ ndr_print_ptr(ndr, "privs", *r->out.privs);
+ ndr->depth++;
+ if (*r->out.privs) {
+ ndr_print_lsa_PrivilegeSet(ndr, "privs", *r->out.privs);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -8031,7 +8161,7 @@ static enum ndr_err_code ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr,
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.remove_all));
if (r->in.rights == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -8063,7 +8193,7 @@ static enum ndr_err_code ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr,
NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.rights);
}
@@ -8096,7 +8226,7 @@ _PUBLIC_ void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const cha
ndr->depth++;
ndr_print_dom_sid2(ndr, "sid", r->in.sid);
ndr->depth--;
- ndr_print_uint32(ndr, "unknown", r->in.unknown);
+ ndr_print_uint8(ndr, "remove_all", r->in.remove_all);
ndr_print_ptr(ndr, "rights", r->in.rights);
ndr->depth++;
ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
@@ -8427,7 +8557,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int fl
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ NDR_CHECK(ndr_push_lsa_PolicyAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
if (r->out.handle == NULL) {
@@ -8473,7 +8603,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_CHECK(ndr_pull_lsa_PolicyAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
NDR_PULL_ALLOC(ndr, r->out.handle);
ZERO_STRUCTP(r->out.handle);
}
@@ -8510,7 +8640,7 @@ _PUBLIC_ void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
ndr->depth--;
- ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr_print_lsa_PolicyAccessMask(ndr, "access_mask", r->in.access_mask);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -9686,9 +9816,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -9709,6 +9842,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -9745,24 +9879,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -9818,10 +9960,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
@@ -9865,9 +10010,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -9889,6 +10037,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -9933,6 +10082,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -9942,18 +10093,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -9993,8 +10150,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_names_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
free(idx_0);
}
@@ -10018,10 +10174,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
@@ -10434,9 +10593,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -10458,6 +10620,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -10502,6 +10665,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -10511,18 +10676,24 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -10562,8 +10733,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_names_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
free(idx_0);
}
@@ -10587,10 +10757,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
@@ -10988,9 +11161,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.names == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -11010,6 +11186,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -11039,24 +11216,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.names);
*r->out.names = *r->in.names;
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.names);
}
@@ -11108,10 +11293,13 @@ _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "names", r->out.names);
ndr->depth++;
ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
@@ -11151,9 +11339,12 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
- if (r->out.domains) {
- NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ if (r->out.domains == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.domains));
+ if (*r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
}
if (r->out.sids == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -11174,6 +11365,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
uint32_t _ptr_domains;
TALLOC_CTX *_mem_save_names_0;
TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_domains_1;
TALLOC_CTX *_mem_save_sids_0;
TALLOC_CTX *_mem_save_count_0;
if (flags & NDR_IN) {
@@ -11211,6 +11403,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
NDR_PULL_ALLOC(ndr, r->out.sids);
*r->out.sids = *r->in.sids;
NDR_PULL_ALLOC(ndr, r->out.count);
@@ -11220,18 +11414,24 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
}
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
if (_ptr_domains) {
- NDR_PULL_ALLOC(ndr, r->out.domains);
+ NDR_PULL_ALLOC(ndr, *r->out.domains);
} else {
- r->out.domains = NULL;
+ *r->out.domains = NULL;
}
- if (r->out.domains) {
- _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
- NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ if (*r->out.domains) {
+ _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sids);
}
@@ -11267,8 +11467,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_names_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
free(idx_0);
}
@@ -11292,10 +11491,13 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "domains", r->out.domains);
ndr->depth++;
- if (r->out.domains) {
- ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ ndr_print_ptr(ndr, "domains", *r->out.domains);
+ ndr->depth++;
+ if (*r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", *r->out.domains);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_ptr(ndr, "sids", r->out.sids);
ndr->depth++;
ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h
index 76add459c2..a96f2d41b9 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.h
+++ b/source3/librpc/gen_ndr/ndr_lsa.h
@@ -188,11 +188,17 @@ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct
enum ndr_err_code ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r);
enum ndr_err_code ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r);
void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r);
+enum ndr_err_code ndr_push_lsa_AsciiStringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiStringLarge *r);
+enum ndr_err_code ndr_pull_lsa_AsciiStringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiStringLarge *r);
+void ndr_print_lsa_AsciiStringLarge(struct ndr_print *ndr, const char *name, const struct lsa_AsciiStringLarge *r);
void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r);
void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r);
void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r);
void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r);
void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r);
+enum ndr_err_code ndr_push_lsa_PolicyAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_lsa_PolicyAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r);
void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, enum lsa_PolicyAuditPolicy r);
void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r);
diff --git a/source3/librpc/gen_ndr/ndr_messaging.c b/source3/librpc/gen_ndr/ndr_messaging.c
index 413421f770..db886316f1 100644
--- a/source3/librpc/gen_ndr/ndr_messaging.c
+++ b/source3/librpc/gen_ndr/ndr_messaging.c
@@ -103,8 +103,7 @@ _PUBLIC_ void ndr_print_messaging_array(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_messages_0=0;cntr_messages_0<r->num_messages;cntr_messages_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_messages_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_messages_0) != -1) {
ndr_print_messaging_rec(ndr, "messages", &r->messages[cntr_messages_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
index b12a347ded..4c46fb0735 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.c
+++ b/source3/librpc/gen_ndr/ndr_netlogon.c
@@ -315,8 +315,7 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_bindata_1=0;cntr_bindata_1<r->length / 2;cntr_bindata_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_bindata_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_bindata_1) != -1) {
ndr_print_uint16(ndr, "bindata", r->bindata[cntr_bindata_1]);
free(idx_1);
}
@@ -1111,8 +1110,7 @@ _PUBLIC_ void ndr_print_netr_SamBaseInfo(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_unknown_0=0;cntr_unknown_0<7;cntr_unknown_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
free(idx_0);
}
@@ -1287,8 +1285,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, c
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -1396,8 +1393,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
ndr->depth++;
for (cntr_sids_1=0;cntr_sids_1<r->sidcount;cntr_sids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sids_1) != -1) {
ndr_print_netr_SidAttr(ndr, "sids", &r->sids[cntr_sids_1]);
free(idx_1);
}
@@ -1411,8 +1407,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
ndr->depth++;
for (cntr_unknown4_0=0;cntr_unknown4_0<20;cntr_unknown4_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown4_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown4_0) != -1) {
ndr_print_uint32(ndr, "unknown4", r->unknown4[cntr_unknown4_0]);
free(idx_0);
}
@@ -1558,8 +1553,7 @@ _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_expansionroom_0=0;cntr_expansionroom_0<10;cntr_expansionroom_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_expansionroom_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_expansionroom_0) != -1) {
ndr_print_uint32(ndr, "expansionroom", r->expansionroom[cntr_expansionroom_0]);
free(idx_0);
}
@@ -2810,8 +2804,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_rids_1=0;cntr_rids_1<r->num_rids;cntr_rids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_rids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
free(idx_1);
}
@@ -2826,8 +2819,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_GROUP_MEMBER(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_attribs_1=0;cntr_attribs_1<r->num_rids;cntr_attribs_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_attribs_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_attribs_1) != -1) {
ndr_print_uint32(ndr, "attribs", r->attribs[cntr_attribs_1]);
free(idx_1);
}
@@ -3143,8 +3135,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1<r->maxauditeventcount + 1;cntr_eventauditoptions_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1) != -1) {
ndr_print_uint32(ndr, "eventauditoptions", r->eventauditoptions[cntr_eventauditoptions_1]);
free(idx_1);
}
@@ -3285,8 +3276,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_TRUSTED_DOMAIN(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_controller_names_1=0;cntr_controller_names_1<r->num_controllers;cntr_controller_names_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_controller_names_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_controller_names_1) != -1) {
ndr_print_lsa_String(ndr, "controller_names", &r->controller_names[cntr_controller_names_1]);
free(idx_1);
}
@@ -3484,8 +3474,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_privilege_attrib_1=0;cntr_privilege_attrib_1<r->privilege_entries;cntr_privilege_attrib_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_privilege_attrib_1) != -1) {
ndr_print_uint32(ndr, "privilege_attrib", r->privilege_attrib[cntr_privilege_attrib_1]);
free(idx_1);
}
@@ -3500,8 +3489,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ACCOUNT(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_privilege_name_1=0;cntr_privilege_name_1<r->privilege_entries;cntr_privilege_name_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_privilege_name_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_privilege_name_1) != -1) {
ndr_print_lsa_String(ndr, "privilege_name", &r->privilege_name[cntr_privilege_name_1]);
free(idx_1);
}
@@ -5291,8 +5279,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_ENUM_ARRAY(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_delta_enum_1=0;cntr_delta_enum_1<r->num_deltas;cntr_delta_enum_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_delta_enum_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_delta_enum_1) != -1) {
ndr_print_netr_DELTA_ENUM(ndr, "delta_enum", &r->delta_enum[cntr_delta_enum_1]);
free(idx_1);
}
@@ -5714,6 +5701,7 @@ _PUBLIC_ void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char
const char *val = NULL;
switch (r) {
+ case NETLOGON_CONTROL_SYNC: val = "NETLOGON_CONTROL_SYNC"; break;
case NETLOGON_CONTROL_REDISCOVER: val = "NETLOGON_CONTROL_REDISCOVER"; break;
case NETLOGON_CONTROL_TC_QUERY: val = "NETLOGON_CONTROL_TC_QUERY"; break;
case NETLOGON_CONTROL_TRANSPORT_NOTIFY: val = "NETLOGON_CONTROL_TRANSPORT_NOTIFY"; break;
@@ -6428,8 +6416,7 @@ _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_data_1=0;cntr_data_1<r->length / 2;cntr_data_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_data_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_data_1) != -1) {
ndr_print_uint16(ndr, "data", r->data[cntr_data_1]);
free(idx_1);
}
@@ -6702,8 +6689,7 @@ _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_unknown7_0=0;cntr_unknown7_0<4;cntr_unknown7_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown7_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown7_0) != -1) {
ndr_print_uint32(ndr, "unknown7", r->unknown7[cntr_unknown7_0]);
free(idx_0);
}
@@ -6940,8 +6926,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown1_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown1_0) != -1) {
ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]);
free(idx_0);
}
@@ -6951,8 +6936,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_unknown_0=0;cntr_unknown_0<4;cntr_unknown_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
free(idx_0);
}
@@ -7050,8 +7034,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_trusts_1=0;cntr_trusts_1<r->num_trusts;cntr_trusts_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_trusts_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_trusts_1) != -1) {
ndr_print_netr_DomainTrustInfo(ndr, "trusts", &r->trusts[cntr_trusts_1]);
free(idx_1);
}
@@ -7063,8 +7046,7 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_unknown_0=0;cntr_unknown_0<14;cntr_unknown_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_unknown_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
free(idx_0);
}
@@ -7328,8 +7310,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, co
ndr->depth++;
for (cntr_sitename_1=0;cntr_sitename_1<r->count;cntr_sitename_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sitename_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) {
ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
free(idx_1);
}
@@ -7691,8 +7672,7 @@ _PUBLIC_ void ndr_print_netr_DomainTrustList(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_netr_DomainTrust(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -7819,8 +7799,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr,
ndr->depth++;
for (cntr_sitename_1=0;cntr_sitename_1<r->count;cntr_sitename_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sitename_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sitename_1) != -1) {
ndr_print_lsa_String(ndr, "sitename", &r->sitename[cntr_sitename_1]);
free(idx_1);
}
@@ -7835,8 +7814,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExWCtr(struct ndr_print *ndr,
ndr->depth++;
for (cntr_subnetname_1=0;cntr_subnetname_1<r->count;cntr_subnetname_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_subnetname_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_subnetname_1) != -1) {
ndr_print_lsa_String(ndr, "subnetname", &r->subnetname[cntr_subnetname_1]);
free(idx_1);
}
@@ -7922,8 +7900,7 @@ _PUBLIC_ void ndr_print_DcSitesCtr(struct ndr_print *ndr, const char *name, cons
ndr->depth++;
for (cntr_sites_1=0;cntr_sites_1<r->num_sites;cntr_sites_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_sites_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_sites_1) != -1) {
ndr_print_lsa_String(ndr, "sites", &r->sites[cntr_sites_1]);
free(idx_1);
}
@@ -8196,8 +8173,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
}
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
- NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ if (r->in.logon == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
}
if (flags & NDR_OUT) {
@@ -8229,6 +8209,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f
TALLOC_CTX *_mem_save_computer_name_0;
TALLOC_CTX *_mem_save_credential_0;
TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_logon_0;
TALLOC_CTX *_mem_save_validation_0;
TALLOC_CTX *_mem_save_authoritative_0;
if (flags & NDR_IN) {
@@ -8295,8 +8276,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
}
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
- NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.logon);
+ }
+ _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
NDR_PULL_ALLOC(ndr, r->out.validation);
ZERO_STRUCTP(r->out.validation);
@@ -8371,8 +8358,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na
}
ndr->depth--;
ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
- ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
- ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr_print_ptr(ndr, "logon", r->in.logon);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
+ ndr->depth--;
ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
ndr->depth--;
}
@@ -8608,10 +8598,10 @@ static enum ndr_err_code ndr_push_netr_ServerReqChallenge(struct ndr_push *ndr,
NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
}
if (flags & NDR_OUT) {
- if (r->out.credentials == NULL) {
+ if (r->out.return_credentials == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -8622,6 +8612,7 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
TALLOC_CTX *_mem_save_credentials_0;
+ TALLOC_CTX *_mem_save_return_credentials_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -8657,17 +8648,17 @@ static enum ndr_err_code ndr_pull_netr_ServerReqChallenge(struct ndr_pull *ndr,
NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_PULL_ALLOC(ndr, r->out.credentials);
- *r->out.credentials = *r->in.credentials;
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+ ZERO_STRUCTP(r->out.return_credentials);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.credentials);
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
}
- _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -8699,9 +8690,9 @@ _PUBLIC_ void ndr_print_netr_ServerReqChallenge(struct ndr_print *ndr, const cha
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "netr_ServerReqChallenge");
ndr->depth++;
- ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
ndr->depth++;
- ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -8734,10 +8725,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate(struct ndr_push *ndr,
NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
}
if (flags & NDR_OUT) {
- if (r->out.credentials == NULL) {
+ if (r->out.return_credentials == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -8748,6 +8739,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
TALLOC_CTX *_mem_save_credentials_0;
+ TALLOC_CTX *_mem_save_return_credentials_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -8791,17 +8783,17 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate(struct ndr_pull *ndr,
NDR_PULL_SET_MEM_CTX(ndr, r->in.credentials, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->in.credentials));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_PULL_ALLOC(ndr, r->out.credentials);
- *r->out.credentials = *r->in.credentials;
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+ ZERO_STRUCTP(r->out.return_credentials);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.credentials);
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
}
- _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -8835,9 +8827,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate(struct ndr_print *ndr, const cha
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "netr_ServerAuthenticate");
ndr->depth++;
- ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
ndr->depth++;
- ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -8864,8 +8856,14 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, i
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password));
+ if (r->in.credential == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ if (r->in.new_password == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password));
}
if (flags & NDR_OUT) {
if (r->out.return_authenticator == NULL) {
@@ -8881,7 +8879,9 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i
{
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_new_password_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -8918,8 +8918,20 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i
}
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.new_password));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.new_password);
+ }
+ _mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
ZERO_STRUCTP(r->out.return_authenticator);
}
@@ -8955,8 +8967,14 @@ _PUBLIC_ void ndr_print_netr_ServerPasswordSet(struct ndr_print *ndr, const char
ndr_print_string(ndr, "account_name", r->in.account_name);
ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->in.secure_channel_type);
ndr_print_string(ndr, "computer_name", r->in.computer_name);
- ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
- ndr_print_samr_Password(ndr, "new_password", &r->in.new_password);
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "new_password", r->in.new_password);
+ ndr->depth++;
+ ndr_print_samr_Password(ndr, "new_password", r->in.new_password);
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -8983,7 +9001,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.credential == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
if (r->in.return_authenticator == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -9007,7 +9028,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int
if (r->out.delta_enum_array == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
+ if (*r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -9015,9 +9039,12 @@ static enum ndr_err_code ndr_push_netr_DatabaseDeltas(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int flags, struct netr_DatabaseDeltas *r)
{
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_credential_0;
TALLOC_CTX *_mem_save_return_authenticator_0;
TALLOC_CTX *_mem_save_sequence_num_0;
TALLOC_CTX *_mem_save_delta_enum_array_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -9035,7 +9062,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int
}
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
}
@@ -9079,7 +9112,18 @@ static enum ndr_err_code ndr_pull_netr_DatabaseDeltas(struct ndr_pull *ndr, int
}
_mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
+ } else {
+ *r->out.delta_enum_array = NULL;
+ }
+ if (*r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -9098,7 +9142,10 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n
ndr->depth++;
ndr_print_string(ndr, "logon_server", r->in.logon_server);
ndr_print_string(ndr, "computername", r->in.computername);
- ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
ndr->depth++;
ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
@@ -9124,7 +9171,12 @@ _PUBLIC_ void ndr_print_netr_DatabaseDeltas(struct ndr_print *ndr, const char *n
ndr->depth--;
ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
ndr->depth++;
- ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ ndr->depth++;
+ if (*r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -10166,8 +10218,11 @@ static enum ndr_err_code ndr_push_netr_LogonControl2(struct ndr_push *ndr, int f
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.function_code));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.data, r->in.function_code));
- NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ if (r->in.data == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_push_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
}
if (flags & NDR_OUT) {
if (r->out.query == NULL) {
@@ -10184,6 +10239,7 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f
{
uint32_t _ptr_logon_server;
TALLOC_CTX *_mem_save_logon_server_0;
+ TALLOC_CTX *_mem_save_data_0;
TALLOC_CTX *_mem_save_query_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -10208,8 +10264,14 @@ static enum ndr_err_code ndr_pull_netr_LogonControl2(struct ndr_pull *ndr, int f
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.function_code));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.data, r->in.function_code));
- NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.data);
+ }
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.data, r->in.function_code));
+ NDR_CHECK(ndr_pull_netr_CONTROL_DATA_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.data));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_ALLOC(ndr, r->out.query);
ZERO_STRUCTP(r->out.query);
}
@@ -10245,8 +10307,11 @@ _PUBLIC_ void ndr_print_netr_LogonControl2(struct ndr_print *ndr, const char *na
ndr->depth--;
ndr_print_uint32(ndr, "function_code", r->in.function_code);
ndr_print_uint32(ndr, "level", r->in.level);
- ndr_print_set_switch_value(ndr, &r->in.data, r->in.function_code);
- ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", &r->in.data);
+ ndr_print_ptr(ndr, "data", r->in.data);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->in.data, r->in.function_code);
+ ndr_print_netr_CONTROL_DATA_INFORMATION(ndr, "data", r->in.data);
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -10292,10 +10357,10 @@ static enum ndr_err_code ndr_push_netr_ServerAuthenticate2(struct ndr_push *ndr,
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.negotiate_flags));
}
if (flags & NDR_OUT) {
- if (r->out.credentials == NULL) {
+ if (r->out.return_credentials == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
if (r->out.negotiate_flags == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -10310,6 +10375,7 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
uint32_t _ptr_server_name;
TALLOC_CTX *_mem_save_server_name_0;
TALLOC_CTX *_mem_save_credentials_0;
+ TALLOC_CTX *_mem_save_return_credentials_0;
TALLOC_CTX *_mem_save_negotiate_flags_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -10361,19 +10427,19 @@ static enum ndr_err_code ndr_pull_netr_ServerAuthenticate2(struct ndr_pull *ndr,
NDR_PULL_SET_MEM_CTX(ndr, r->in.negotiate_flags, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.negotiate_flags));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_negotiate_flags_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_PULL_ALLOC(ndr, r->out.credentials);
- *r->out.credentials = *r->in.credentials;
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
+ ZERO_STRUCTP(r->out.return_credentials);
NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
*r->out.negotiate_flags = *r->in.negotiate_flags;
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.credentials);
+ NDR_PULL_ALLOC(ndr, r->out.return_credentials);
}
- _mem_save_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.credentials, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.credentials));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credentials_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_return_credentials_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_credentials, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, r->out.return_credentials));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_credentials_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.negotiate_flags);
}
@@ -10418,9 +10484,9 @@ _PUBLIC_ void ndr_print_netr_ServerAuthenticate2(struct ndr_print *ndr, const ch
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "netr_ServerAuthenticate2");
ndr->depth++;
- ndr_print_ptr(ndr, "credentials", r->out.credentials);
+ ndr_print_ptr(ndr, "return_credentials", r->out.return_credentials);
ndr->depth++;
- ndr_print_netr_Credential(ndr, "credentials", r->out.credentials);
+ ndr_print_netr_Credential(ndr, "return_credentials", r->out.return_credentials);
ndr->depth--;
ndr_print_ptr(ndr, "negotiate_flags", r->out.negotiate_flags);
ndr->depth++;
@@ -10443,7 +10509,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computername, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computername, ndr_charset_length(r->in.computername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (r->in.credential == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
if (r->in.return_authenticator == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -10468,7 +10537,10 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f
if (r->out.delta_enum_array == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.delta_enum_array));
+ if (*r->out.delta_enum_array) {
+ NDR_CHECK(ndr_push_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -10476,9 +10548,12 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f
static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int flags, struct netr_DatabaseSync2 *r)
{
+ uint32_t _ptr_delta_enum_array;
+ TALLOC_CTX *_mem_save_credential_0;
TALLOC_CTX *_mem_save_return_authenticator_0;
TALLOC_CTX *_mem_save_sync_context_0;
TALLOC_CTX *_mem_save_delta_enum_array_0;
+ TALLOC_CTX *_mem_save_delta_enum_array_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -10496,7 +10571,13 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f
}
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computername, ndr_get_array_length(ndr, &r->in.computername), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, &r->in.credential));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
}
@@ -10541,7 +10622,18 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f
}
_mem_save_delta_enum_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.delta_enum_array, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.delta_enum_array));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_delta_enum_array));
+ if (_ptr_delta_enum_array) {
+ NDR_PULL_ALLOC(ndr, *r->out.delta_enum_array);
+ } else {
+ *r->out.delta_enum_array = NULL;
+ }
+ if (*r->out.delta_enum_array) {
+ _mem_save_delta_enum_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.delta_enum_array, 0);
+ NDR_CHECK(ndr_pull_netr_DELTA_ENUM_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.delta_enum_array));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_delta_enum_array_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -10560,7 +10652,10 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na
ndr->depth++;
ndr_print_string(ndr, "logon_server", r->in.logon_server);
ndr_print_string(ndr, "computername", r->in.computername);
- ndr_print_netr_Authenticator(ndr, "credential", &r->in.credential);
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
ndr->depth++;
ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
@@ -10587,7 +10682,12 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na
ndr->depth--;
ndr_print_ptr(ndr, "delta_enum_array", r->out.delta_enum_array);
ndr->depth++;
- ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", r->out.delta_enum_array);
+ ndr_print_ptr(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ ndr->depth++;
+ if (*r->out.delta_enum_array) {
+ ndr_print_netr_DELTA_ENUM_ARRAY(ndr, "delta_enum_array", *r->out.delta_enum_array);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -12588,8 +12688,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesW(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_addresses_1=0;cntr_addresses_1<r->in.count;cntr_addresses_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_addresses_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) {
ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
free(idx_1);
}
@@ -13132,8 +13231,7 @@ _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesExW(struct ndr_print *ndr, con
ndr->depth++;
for (cntr_addresses_1=0;cntr_addresses_1<r->in.count;cntr_addresses_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_addresses_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_addresses_1) != -1) {
ndr_print_netr_DsRAddress(ndr, "addresses", &r->in.addresses[cntr_addresses_1]);
free(idx_1);
}
@@ -13272,8 +13370,11 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
}
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.logon_level));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
- NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ if (r->in.logon == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
if (r->in.flags == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -13305,6 +13406,7 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int
uint32_t _ptr_computer_name;
TALLOC_CTX *_mem_save_server_name_0;
TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_logon_0;
TALLOC_CTX *_mem_save_validation_0;
TALLOC_CTX *_mem_save_authoritative_0;
TALLOC_CTX *_mem_save_flags_0;
@@ -13348,8 +13450,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
}
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.logon_level));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
- NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.logon);
+ }
+ _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
+ NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.flags);
@@ -13416,8 +13524,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *
}
ndr->depth--;
ndr_print_uint16(ndr, "logon_level", r->in.logon_level);
- ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
- ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
+ ndr_print_ptr(ndr, "logon", r->in.logon);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
+ ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
+ ndr->depth--;
ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
ndr_print_ptr(ndr, "flags", r->in.flags);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c
index 8abfdfdf92..195d421408 100644
--- a/source3/librpc/gen_ndr/ndr_notify.c
+++ b/source3/librpc/gen_ndr/ndr_notify.c
@@ -120,8 +120,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_entries_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
free(idx_0);
}
@@ -184,8 +183,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_depth_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c
new file mode 100644
index 0000000000..9a0e2bcf4f
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c
@@ -0,0 +1,3616 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_ntsvcs.h"
+
+static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_flags, const struct PNP_HwProfInfo *r)
+{
+ uint32_t cntr_unknown2_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
+ for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown2[cntr_unknown2_0]));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_HwProfInfo(struct ndr_pull *ndr, int ndr_flags, struct PNP_HwProfInfo *r)
+{
+ uint32_t cntr_unknown2_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
+ for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown2[cntr_unknown2_0]));
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r)
+{
+ uint32_t cntr_unknown2_0;
+ ndr_print_struct(ndr, name, "PNP_HwProfInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "unknown1", r->unknown1);
+ ndr->print(ndr, "%s: ARRAY(%d)", "unknown2", 160);
+ ndr->depth++;
+ for (cntr_unknown2_0=0;cntr_unknown2_0<160;cntr_unknown2_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_unknown2_0) != -1) {
+ ndr_print_uint16(ndr, "unknown2", r->unknown2[cntr_unknown2_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown3", r->unknown3);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_Disconnect(struct ndr_push *ndr, int flags, const struct PNP_Disconnect *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_Disconnect(struct ndr_pull *ndr, int flags, struct PNP_Disconnect *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r)
+{
+ ndr_print_struct(ndr, name, "PNP_Disconnect");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_Disconnect");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_Disconnect");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_Connect(struct ndr_push *ndr, int flags, const struct PNP_Connect *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_Connect(struct ndr_pull *ndr, int flags, struct PNP_Connect *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r)
+{
+ ndr_print_struct(ndr, name, "PNP_Connect");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_Connect");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_Connect");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetVersion(struct ndr_push *ndr, int flags, const struct PNP_GetVersion *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.version == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.version));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetVersion(struct ndr_pull *ndr, int flags, struct PNP_GetVersion *r)
+{
+ TALLOC_CTX *_mem_save_version_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_PULL_ALLOC(ndr, r->out.version);
+ ZERO_STRUCTP(r->out.version);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.version);
+ }
+ _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.version));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetVersion");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetVersion");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetVersion");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "version", r->out.version);
+ ndr->depth++;
+ ndr_print_uint16(ndr, "version", *r->out.version);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetGlobalState(struct ndr_push *ndr, int flags, const struct PNP_GetGlobalState *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetGlobalState(struct ndr_pull *ndr, int flags, struct PNP_GetGlobalState *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetGlobalState");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetGlobalState");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetGlobalState");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_InitDetection(struct ndr_push *ndr, int flags, const struct PNP_InitDetection *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_InitDetection(struct ndr_pull *ndr, int flags, struct PNP_InitDetection *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r)
+{
+ ndr_print_struct(ndr, name, "PNP_InitDetection");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_InitDetection");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_InitDetection");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_ReportLogOn(struct ndr_push *ndr, int flags, const struct PNP_ReportLogOn *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_ReportLogOn(struct ndr_pull *ndr, int flags, struct PNP_ReportLogOn *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r)
+{
+ ndr_print_struct(ndr, name, "PNP_ReportLogOn");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_ReportLogOn");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_ReportLogOn");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_ValidateDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_ValidateDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.devicepath == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_ValidateDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_ValidateDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath));
+ if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicepath), ndr_get_array_length(ndr, &r->in.devicepath));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r)
+{
+ ndr_print_struct(ndr, name, "PNP_ValidateDeviceInstance");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_ValidateDeviceInstance");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "devicepath", r->in.devicepath);
+ ndr->depth++;
+ ndr_print_string(ndr, "devicepath", r->in.devicepath);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_ValidateDeviceInstance");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetRootDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_GetRootDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetRootDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_GetRootDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetRootDeviceInstance");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetRootDeviceInstance");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetRootDeviceInstance");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetRelatedDeviceInstance(struct ndr_push *ndr, int flags, const struct PNP_GetRelatedDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetRelatedDeviceInstance(struct ndr_pull *ndr, int flags, struct PNP_GetRelatedDeviceInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetRelatedDeviceInstance");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetRelatedDeviceInstance");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetRelatedDeviceInstance");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_EnumerateSubKeys(struct ndr_push *ndr, int flags, const struct PNP_EnumerateSubKeys *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_EnumerateSubKeys(struct ndr_pull *ndr, int flags, struct PNP_EnumerateSubKeys *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r)
+{
+ ndr_print_struct(ndr, name, "PNP_EnumerateSubKeys");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_EnumerateSubKeys");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_EnumerateSubKeys");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetDeviceList");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetDeviceList");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetDeviceList");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceListSize *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.devicename));
+ if (r->in.devicename) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicename, ndr_charset_length(r->in.devicename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.size == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceListSize *r)
+{
+ uint32_t _ptr_devicename;
+ TALLOC_CTX *_mem_save_devicename_0;
+ TALLOC_CTX *_mem_save_size_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devicename));
+ if (_ptr_devicename) {
+ NDR_PULL_ALLOC(ndr, r->in.devicename);
+ } else {
+ r->in.devicename = NULL;
+ }
+ if (r->in.devicename) {
+ _mem_save_devicename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.devicename, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicename));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicename));
+ if (ndr_get_array_length(ndr, &r->in.devicename) > ndr_get_array_size(ndr, &r->in.devicename)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicename), ndr_get_array_length(ndr, &r->in.devicename));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicename, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devicename_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_PULL_ALLOC(ndr, r->out.size);
+ ZERO_STRUCTP(r->out.size);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.size);
+ }
+ _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.size, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetDeviceListSize");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetDeviceListSize");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "devicename", r->in.devicename);
+ ndr->depth++;
+ if (r->in.devicename) {
+ ndr_print_string(ndr, "devicename", r->in.devicename);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetDeviceListSize");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "size", r->out.size);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", *r->out.size);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetDepth(struct ndr_push *ndr, int flags, const struct PNP_GetDepth *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetDepth(struct ndr_pull *ndr, int flags, struct PNP_GetDepth *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetDepth");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetDepth");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetDepth");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetDeviceRegProp");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetDeviceRegProp");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_SetDeviceRegProp(struct ndr_push *ndr, int flags, const struct PNP_SetDeviceRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_SetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_SetDeviceRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r)
+{
+ ndr_print_struct(ndr, name, "PNP_SetDeviceRegProp");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_SetDeviceRegProp");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_SetDeviceRegProp");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetClassInstance(struct ndr_push *ndr, int flags, const struct PNP_GetClassInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetClassInstance(struct ndr_pull *ndr, int flags, struct PNP_GetClassInstance *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetClassInstance");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetClassInstance");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetClassInstance");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_CreateKey(struct ndr_push *ndr, int flags, const struct PNP_CreateKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_CreateKey(struct ndr_pull *ndr, int flags, struct PNP_CreateKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r)
+{
+ ndr_print_struct(ndr, name, "PNP_CreateKey");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_CreateKey");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_CreateKey");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_DeleteRegistryKey(struct ndr_push *ndr, int flags, const struct PNP_DeleteRegistryKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_DeleteRegistryKey(struct ndr_pull *ndr, int flags, struct PNP_DeleteRegistryKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r)
+{
+ ndr_print_struct(ndr, name, "PNP_DeleteRegistryKey");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_DeleteRegistryKey");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_DeleteRegistryKey");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetClassCount(struct ndr_push *ndr, int flags, const struct PNP_GetClassCount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetClassCount(struct ndr_pull *ndr, int flags, struct PNP_GetClassCount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetClassCount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetClassCount");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetClassCount");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetClassName(struct ndr_push *ndr, int flags, const struct PNP_GetClassName *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetClassName(struct ndr_pull *ndr, int flags, struct PNP_GetClassName *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetClassName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetClassName");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetClassName");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_DeleteClassKey(struct ndr_push *ndr, int flags, const struct PNP_DeleteClassKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_DeleteClassKey(struct ndr_pull *ndr, int flags, struct PNP_DeleteClassKey *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r)
+{
+ ndr_print_struct(ndr, name, "PNP_DeleteClassKey");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_DeleteClassKey");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_DeleteClassKey");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceAlias(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceAlias *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceAlias(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceAlias *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceAlias");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceAlias");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceAlias");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceList");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceList");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceList");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetInterfaceDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetInterfaceDeviceListSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetInterfaceDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetInterfaceDeviceListSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetInterfaceDeviceListSize");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetInterfaceDeviceListSize");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetInterfaceDeviceListSize");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RegisterDeviceClassAssociation(struct ndr_push *ndr, int flags, const struct PNP_RegisterDeviceClassAssociation *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RegisterDeviceClassAssociation(struct ndr_pull *ndr, int flags, struct PNP_RegisterDeviceClassAssociation *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RegisterDeviceClassAssociation");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RegisterDeviceClassAssociation");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RegisterDeviceClassAssociation");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_UnregisterDeviceClassAssociation(struct ndr_push *ndr, int flags, const struct PNP_UnregisterDeviceClassAssociation *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_UnregisterDeviceClassAssociation(struct ndr_pull *ndr, int flags, struct PNP_UnregisterDeviceClassAssociation *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r)
+{
+ ndr_print_struct(ndr, name, "PNP_UnregisterDeviceClassAssociation");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_UnregisterDeviceClassAssociation");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_UnregisterDeviceClassAssociation");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetClassRegProp(struct ndr_push *ndr, int flags, const struct PNP_GetClassRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetClassRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetClassRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetClassRegProp");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetClassRegProp");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetClassRegProp");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_SetClassRegProp(struct ndr_push *ndr, int flags, const struct PNP_SetClassRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_SetClassRegProp(struct ndr_pull *ndr, int flags, struct PNP_SetClassRegProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r)
+{
+ ndr_print_struct(ndr, name, "PNP_SetClassRegProp");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_SetClassRegProp");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_SetClassRegProp");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_CreateDevInst(struct ndr_push *ndr, int flags, const struct PNP_CreateDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_CreateDevInst(struct ndr_pull *ndr, int flags, struct PNP_CreateDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r)
+{
+ ndr_print_struct(ndr, name, "PNP_CreateDevInst");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_CreateDevInst");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_CreateDevInst");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_DeviceInstanceAction(struct ndr_push *ndr, int flags, const struct PNP_DeviceInstanceAction *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_DeviceInstanceAction(struct ndr_pull *ndr, int flags, struct PNP_DeviceInstanceAction *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r)
+{
+ ndr_print_struct(ndr, name, "PNP_DeviceInstanceAction");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_DeviceInstanceAction");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_DeviceInstanceAction");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetDeviceStatus(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetDeviceStatus(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceStatus *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetDeviceStatus");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetDeviceStatus");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetDeviceStatus");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_SetDeviceProblem(struct ndr_push *ndr, int flags, const struct PNP_SetDeviceProblem *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_SetDeviceProblem(struct ndr_pull *ndr, int flags, struct PNP_SetDeviceProblem *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r)
+{
+ ndr_print_struct(ndr, name, "PNP_SetDeviceProblem");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_SetDeviceProblem");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_SetDeviceProblem");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_DisableDevInst(struct ndr_push *ndr, int flags, const struct PNP_DisableDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_DisableDevInst(struct ndr_pull *ndr, int flags, struct PNP_DisableDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r)
+{
+ ndr_print_struct(ndr, name, "PNP_DisableDevInst");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_DisableDevInst");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_DisableDevInst");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_UninstallDevInst(struct ndr_push *ndr, int flags, const struct PNP_UninstallDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_UninstallDevInst(struct ndr_pull *ndr, int flags, struct PNP_UninstallDevInst *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r)
+{
+ ndr_print_struct(ndr, name, "PNP_UninstallDevInst");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_UninstallDevInst");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_UninstallDevInst");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_AddID(struct ndr_push *ndr, int flags, const struct PNP_AddID *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_AddID(struct ndr_pull *ndr, int flags, struct PNP_AddID *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r)
+{
+ ndr_print_struct(ndr, name, "PNP_AddID");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_AddID");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_AddID");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RegisterDriver(struct ndr_push *ndr, int flags, const struct PNP_RegisterDriver *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RegisterDriver(struct ndr_pull *ndr, int flags, struct PNP_RegisterDriver *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RegisterDriver");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RegisterDriver");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RegisterDriver");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_QueryRemove(struct ndr_push *ndr, int flags, const struct PNP_QueryRemove *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_QueryRemove(struct ndr_pull *ndr, int flags, struct PNP_QueryRemove *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r)
+{
+ ndr_print_struct(ndr, name, "PNP_QueryRemove");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_QueryRemove");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_QueryRemove");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RequestDeviceEject(struct ndr_push *ndr, int flags, const struct PNP_RequestDeviceEject *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RequestDeviceEject(struct ndr_pull *ndr, int flags, struct PNP_RequestDeviceEject *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RequestDeviceEject");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RequestDeviceEject");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RequestDeviceEject");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_IsDockStationPresent(struct ndr_push *ndr, int flags, const struct PNP_IsDockStationPresent *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_IsDockStationPresent(struct ndr_pull *ndr, int flags, struct PNP_IsDockStationPresent *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r)
+{
+ ndr_print_struct(ndr, name, "PNP_IsDockStationPresent");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_IsDockStationPresent");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_IsDockStationPresent");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RequestEjectPC(struct ndr_push *ndr, int flags, const struct PNP_RequestEjectPC *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RequestEjectPC(struct ndr_pull *ndr, int flags, struct PNP_RequestEjectPC *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RequestEjectPC");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RequestEjectPC");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RequestEjectPC");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flags, const struct PNP_HwProfFlags *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ if (r->in.devicepath == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ if (r->in.unknown3 == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown3));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown4));
+ if (r->in.unknown4) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.unknown4));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown5));
+ if (r->in.unknown5) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown5, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown5, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown5, ndr_charset_length(r->in.unknown5, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown6));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown7));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.unknown3 == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown3));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown4));
+ if (r->out.unknown4) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.unknown4));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown5a));
+ if (r->out.unknown5a) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown5a));
+ if (*r->out.unknown5a) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.unknown5a, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.unknown5a, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.unknown5a, ndr_charset_length(*r->out.unknown5a, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flags, struct PNP_HwProfFlags *r)
+{
+ uint32_t _ptr_unknown4;
+ uint32_t _ptr_unknown5;
+ uint32_t _ptr_unknown5a;
+ TALLOC_CTX *_mem_save_unknown3_0;
+ TALLOC_CTX *_mem_save_unknown4_0;
+ TALLOC_CTX *_mem_save_unknown5_0;
+ TALLOC_CTX *_mem_save_unknown5a_0;
+ TALLOC_CTX *_mem_save_unknown5a_1;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath));
+ if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicepath), ndr_get_array_length(ndr, &r->in.devicepath));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.unknown3);
+ }
+ _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown3, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4));
+ if (_ptr_unknown4) {
+ NDR_PULL_ALLOC(ndr, r->in.unknown4);
+ } else {
+ r->in.unknown4 = NULL;
+ }
+ if (r->in.unknown4) {
+ _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown4, 0);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.unknown4));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5));
+ if (_ptr_unknown5) {
+ NDR_PULL_ALLOC(ndr, r->in.unknown5);
+ } else {
+ r->in.unknown5 = NULL;
+ }
+ if (r->in.unknown5) {
+ _mem_save_unknown5_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown5, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.unknown5));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.unknown5));
+ if (ndr_get_array_length(ndr, &r->in.unknown5) > ndr_get_array_size(ndr, &r->in.unknown5)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.unknown5), ndr_get_array_length(ndr, &r->in.unknown5));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.unknown5), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown5, ndr_get_array_length(ndr, &r->in.unknown5), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5_0, 0);
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown6));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown7));
+ NDR_PULL_ALLOC(ndr, r->out.unknown3);
+ *r->out.unknown3 = *r->in.unknown3;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.unknown3);
+ }
+ _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown3, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown3));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4));
+ if (_ptr_unknown4) {
+ NDR_PULL_ALLOC(ndr, r->out.unknown4);
+ } else {
+ r->out.unknown4 = NULL;
+ }
+ if (r->out.unknown4) {
+ _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown4, 0);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.unknown4));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5a));
+ if (_ptr_unknown5a) {
+ NDR_PULL_ALLOC(ndr, r->out.unknown5a);
+ } else {
+ r->out.unknown5a = NULL;
+ }
+ if (r->out.unknown5a) {
+ _mem_save_unknown5a_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown5a, 0);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5a));
+ if (_ptr_unknown5a) {
+ NDR_PULL_ALLOC(ndr, *r->out.unknown5a);
+ } else {
+ *r->out.unknown5a = NULL;
+ }
+ if (*r->out.unknown5a) {
+ _mem_save_unknown5a_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown5a, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, r->out.unknown5a));
+ NDR_CHECK(ndr_pull_array_length(ndr, r->out.unknown5a));
+ if (ndr_get_array_length(ndr, r->out.unknown5a) > ndr_get_array_size(ndr, r->out.unknown5a)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.unknown5a), ndr_get_array_length(ndr, r->out.unknown5a));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.unknown5a), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.unknown5a, ndr_get_array_length(ndr, r->out.unknown5a), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5a_1, 0);
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5a_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r)
+{
+ ndr_print_struct(ndr, name, "PNP_HwProfFlags");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_HwProfFlags");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_ptr(ndr, "devicepath", r->in.devicepath);
+ ndr->depth++;
+ ndr_print_string(ndr, "devicepath", r->in.devicepath);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr_print_ptr(ndr, "unknown3", r->in.unknown3);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "unknown3", *r->in.unknown3);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown4", r->in.unknown4);
+ ndr->depth++;
+ if (r->in.unknown4) {
+ ndr_print_uint16(ndr, "unknown4", *r->in.unknown4);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown5", r->in.unknown5);
+ ndr->depth++;
+ if (r->in.unknown5) {
+ ndr_print_string(ndr, "unknown5", r->in.unknown5);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown6", r->in.unknown6);
+ ndr_print_uint32(ndr, "unknown7", r->in.unknown7);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_HwProfFlags");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "unknown3", r->out.unknown3);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "unknown3", *r->out.unknown3);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown4", r->out.unknown4);
+ ndr->depth++;
+ if (r->out.unknown4) {
+ ndr_print_uint16(ndr, "unknown4", *r->out.unknown4);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "unknown5a", r->out.unknown5a);
+ ndr->depth++;
+ if (r->out.unknown5a) {
+ ndr_print_ptr(ndr, "unknown5a", *r->out.unknown5a);
+ ndr->depth++;
+ if (*r->out.unknown5a) {
+ ndr_print_string(ndr, "unknown5a", *r->out.unknown5a);
+ }
+ ndr->depth--;
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int flags, const struct PNP_GetHwProfInfo *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.idx));
+ if (r->in.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_PNP_HwProfInfo(ndr, NDR_SCALARS, r->out.info));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetHwProfInfo(struct ndr_pull *ndr, int flags, struct PNP_GetHwProfInfo *r)
+{
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.idx));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ *r->out.info = *r->in.info;
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_PNP_HwProfInfo(ndr, NDR_SCALARS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetHwProfInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetHwProfInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "idx", r->in.idx);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ ndr_print_PNP_HwProfInfo(ndr, "info", r->in.info);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetHwProfInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ ndr_print_PNP_HwProfInfo(ndr, "info", r->out.info);
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_AddEmptyLogConf(struct ndr_push *ndr, int flags, const struct PNP_AddEmptyLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_AddEmptyLogConf(struct ndr_pull *ndr, int flags, struct PNP_AddEmptyLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r)
+{
+ ndr_print_struct(ndr, name, "PNP_AddEmptyLogConf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_AddEmptyLogConf");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_AddEmptyLogConf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_FreeLogConf(struct ndr_push *ndr, int flags, const struct PNP_FreeLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_FreeLogConf(struct ndr_pull *ndr, int flags, struct PNP_FreeLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r)
+{
+ ndr_print_struct(ndr, name, "PNP_FreeLogConf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_FreeLogConf");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_FreeLogConf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetFirstLogConf(struct ndr_push *ndr, int flags, const struct PNP_GetFirstLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetFirstLogConf(struct ndr_pull *ndr, int flags, struct PNP_GetFirstLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetFirstLogConf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetFirstLogConf");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetFirstLogConf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetNextLogConf(struct ndr_push *ndr, int flags, const struct PNP_GetNextLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetNextLogConf(struct ndr_pull *ndr, int flags, struct PNP_GetNextLogConf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetNextLogConf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetNextLogConf");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetNextLogConf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetLogConfPriority(struct ndr_push *ndr, int flags, const struct PNP_GetLogConfPriority *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetLogConfPriority(struct ndr_pull *ndr, int flags, struct PNP_GetLogConfPriority *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetLogConfPriority");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetLogConfPriority");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetLogConfPriority");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_AddResDes(struct ndr_push *ndr, int flags, const struct PNP_AddResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_AddResDes(struct ndr_pull *ndr, int flags, struct PNP_AddResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r)
+{
+ ndr_print_struct(ndr, name, "PNP_AddResDes");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_AddResDes");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_AddResDes");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_FreeResDes(struct ndr_push *ndr, int flags, const struct PNP_FreeResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_FreeResDes(struct ndr_pull *ndr, int flags, struct PNP_FreeResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r)
+{
+ ndr_print_struct(ndr, name, "PNP_FreeResDes");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_FreeResDes");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_FreeResDes");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetNextResDes(struct ndr_push *ndr, int flags, const struct PNP_GetNextResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetNextResDes(struct ndr_pull *ndr, int flags, struct PNP_GetNextResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetNextResDes");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetNextResDes");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetNextResDes");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetResDesData(struct ndr_push *ndr, int flags, const struct PNP_GetResDesData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetResDesData(struct ndr_pull *ndr, int flags, struct PNP_GetResDesData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetResDesData");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetResDesData");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetResDesData");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetResDesDataSize(struct ndr_push *ndr, int flags, const struct PNP_GetResDesDataSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetResDesDataSize(struct ndr_pull *ndr, int flags, struct PNP_GetResDesDataSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetResDesDataSize");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetResDesDataSize");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetResDesDataSize");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_ModifyResDes(struct ndr_push *ndr, int flags, const struct PNP_ModifyResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_ModifyResDes(struct ndr_pull *ndr, int flags, struct PNP_ModifyResDes *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r)
+{
+ ndr_print_struct(ndr, name, "PNP_ModifyResDes");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_ModifyResDes");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_ModifyResDes");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_DetectResourceLimit(struct ndr_push *ndr, int flags, const struct PNP_DetectResourceLimit *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_DetectResourceLimit(struct ndr_pull *ndr, int flags, struct PNP_DetectResourceLimit *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r)
+{
+ ndr_print_struct(ndr, name, "PNP_DetectResourceLimit");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_DetectResourceLimit");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_DetectResourceLimit");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_QueryResConfList(struct ndr_push *ndr, int flags, const struct PNP_QueryResConfList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_QueryResConfList(struct ndr_pull *ndr, int flags, struct PNP_QueryResConfList *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r)
+{
+ ndr_print_struct(ndr, name, "PNP_QueryResConfList");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_QueryResConfList");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_QueryResConfList");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_SetHwProf(struct ndr_push *ndr, int flags, const struct PNP_SetHwProf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_SetHwProf(struct ndr_pull *ndr, int flags, struct PNP_SetHwProf *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r)
+{
+ ndr_print_struct(ndr, name, "PNP_SetHwProf");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_SetHwProf");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_SetHwProf");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeData(struct ndr_push *ndr, int flags, const struct PNP_QueryArbitratorFreeData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeData(struct ndr_pull *ndr, int flags, struct PNP_QueryArbitratorFreeData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r)
+{
+ ndr_print_struct(ndr, name, "PNP_QueryArbitratorFreeData");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_QueryArbitratorFreeData");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeData");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_QueryArbitratorFreeSize(struct ndr_push *ndr, int flags, const struct PNP_QueryArbitratorFreeSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_QueryArbitratorFreeSize(struct ndr_pull *ndr, int flags, struct PNP_QueryArbitratorFreeSize *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r)
+{
+ ndr_print_struct(ndr, name, "PNP_QueryArbitratorFreeSize");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_QueryArbitratorFreeSize");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_QueryArbitratorFreeSize");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RunDetection(struct ndr_push *ndr, int flags, const struct PNP_RunDetection *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RunDetection(struct ndr_pull *ndr, int flags, struct PNP_RunDetection *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RunDetection");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RunDetection");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RunDetection");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_RegisterNotification(struct ndr_push *ndr, int flags, const struct PNP_RegisterNotification *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_RegisterNotification(struct ndr_pull *ndr, int flags, struct PNP_RegisterNotification *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r)
+{
+ ndr_print_struct(ndr, name, "PNP_RegisterNotification");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_RegisterNotification");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_RegisterNotification");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_UnregisterNotification(struct ndr_push *ndr, int flags, const struct PNP_UnregisterNotification *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_UnregisterNotification(struct ndr_pull *ndr, int flags, struct PNP_UnregisterNotification *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r)
+{
+ ndr_print_struct(ndr, name, "PNP_UnregisterNotification");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_UnregisterNotification");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_UnregisterNotification");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetCustomDevProp(struct ndr_push *ndr, int flags, const struct PNP_GetCustomDevProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetCustomDevProp(struct ndr_pull *ndr, int flags, struct PNP_GetCustomDevProp *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetCustomDevProp");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetCustomDevProp");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetCustomDevProp");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetVersionInternal(struct ndr_push *ndr, int flags, const struct PNP_GetVersionInternal *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetVersionInternal(struct ndr_pull *ndr, int flags, struct PNP_GetVersionInternal *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetVersionInternal");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetVersionInternal");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetVersionInternal");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetBlockedDriverInfo(struct ndr_push *ndr, int flags, const struct PNP_GetBlockedDriverInfo *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetBlockedDriverInfo(struct ndr_pull *ndr, int flags, struct PNP_GetBlockedDriverInfo *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetBlockedDriverInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetBlockedDriverInfo");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetBlockedDriverInfo");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_PNP_GetServerSideDeviceInstallFlags(struct ndr_push *ndr, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_PNP_GetServerSideDeviceInstallFlags(struct ndr_pull *ndr, int flags, struct PNP_GetServerSideDeviceInstallFlags *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r)
+{
+ ndr_print_struct(ndr, name, "PNP_GetServerSideDeviceInstallFlags");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "PNP_GetServerSideDeviceInstallFlags");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "PNP_GetServerSideDeviceInstallFlags");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static const struct ndr_interface_call ntsvcs_calls[] = {
+ {
+ "PNP_Disconnect",
+ sizeof(struct PNP_Disconnect),
+ (ndr_push_flags_fn_t) ndr_push_PNP_Disconnect,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_Disconnect,
+ (ndr_print_function_t) ndr_print_PNP_Disconnect,
+ false,
+ },
+ {
+ "PNP_Connect",
+ sizeof(struct PNP_Connect),
+ (ndr_push_flags_fn_t) ndr_push_PNP_Connect,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_Connect,
+ (ndr_print_function_t) ndr_print_PNP_Connect,
+ false,
+ },
+ {
+ "PNP_GetVersion",
+ sizeof(struct PNP_GetVersion),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetVersion,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetVersion,
+ (ndr_print_function_t) ndr_print_PNP_GetVersion,
+ false,
+ },
+ {
+ "PNP_GetGlobalState",
+ sizeof(struct PNP_GetGlobalState),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetGlobalState,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetGlobalState,
+ (ndr_print_function_t) ndr_print_PNP_GetGlobalState,
+ false,
+ },
+ {
+ "PNP_InitDetection",
+ sizeof(struct PNP_InitDetection),
+ (ndr_push_flags_fn_t) ndr_push_PNP_InitDetection,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_InitDetection,
+ (ndr_print_function_t) ndr_print_PNP_InitDetection,
+ false,
+ },
+ {
+ "PNP_ReportLogOn",
+ sizeof(struct PNP_ReportLogOn),
+ (ndr_push_flags_fn_t) ndr_push_PNP_ReportLogOn,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_ReportLogOn,
+ (ndr_print_function_t) ndr_print_PNP_ReportLogOn,
+ false,
+ },
+ {
+ "PNP_ValidateDeviceInstance",
+ sizeof(struct PNP_ValidateDeviceInstance),
+ (ndr_push_flags_fn_t) ndr_push_PNP_ValidateDeviceInstance,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_ValidateDeviceInstance,
+ (ndr_print_function_t) ndr_print_PNP_ValidateDeviceInstance,
+ false,
+ },
+ {
+ "PNP_GetRootDeviceInstance",
+ sizeof(struct PNP_GetRootDeviceInstance),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetRootDeviceInstance,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetRootDeviceInstance,
+ (ndr_print_function_t) ndr_print_PNP_GetRootDeviceInstance,
+ false,
+ },
+ {
+ "PNP_GetRelatedDeviceInstance",
+ sizeof(struct PNP_GetRelatedDeviceInstance),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetRelatedDeviceInstance,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetRelatedDeviceInstance,
+ (ndr_print_function_t) ndr_print_PNP_GetRelatedDeviceInstance,
+ false,
+ },
+ {
+ "PNP_EnumerateSubKeys",
+ sizeof(struct PNP_EnumerateSubKeys),
+ (ndr_push_flags_fn_t) ndr_push_PNP_EnumerateSubKeys,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_EnumerateSubKeys,
+ (ndr_print_function_t) ndr_print_PNP_EnumerateSubKeys,
+ false,
+ },
+ {
+ "PNP_GetDeviceList",
+ sizeof(struct PNP_GetDeviceList),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceList,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceList,
+ (ndr_print_function_t) ndr_print_PNP_GetDeviceList,
+ false,
+ },
+ {
+ "PNP_GetDeviceListSize",
+ sizeof(struct PNP_GetDeviceListSize),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceListSize,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceListSize,
+ (ndr_print_function_t) ndr_print_PNP_GetDeviceListSize,
+ false,
+ },
+ {
+ "PNP_GetDepth",
+ sizeof(struct PNP_GetDepth),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetDepth,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDepth,
+ (ndr_print_function_t) ndr_print_PNP_GetDepth,
+ false,
+ },
+ {
+ "PNP_GetDeviceRegProp",
+ sizeof(struct PNP_GetDeviceRegProp),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceRegProp,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceRegProp,
+ (ndr_print_function_t) ndr_print_PNP_GetDeviceRegProp,
+ false,
+ },
+ {
+ "PNP_SetDeviceRegProp",
+ sizeof(struct PNP_SetDeviceRegProp),
+ (ndr_push_flags_fn_t) ndr_push_PNP_SetDeviceRegProp,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_SetDeviceRegProp,
+ (ndr_print_function_t) ndr_print_PNP_SetDeviceRegProp,
+ false,
+ },
+ {
+ "PNP_GetClassInstance",
+ sizeof(struct PNP_GetClassInstance),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetClassInstance,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassInstance,
+ (ndr_print_function_t) ndr_print_PNP_GetClassInstance,
+ false,
+ },
+ {
+ "PNP_CreateKey",
+ sizeof(struct PNP_CreateKey),
+ (ndr_push_flags_fn_t) ndr_push_PNP_CreateKey,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_CreateKey,
+ (ndr_print_function_t) ndr_print_PNP_CreateKey,
+ false,
+ },
+ {
+ "PNP_DeleteRegistryKey",
+ sizeof(struct PNP_DeleteRegistryKey),
+ (ndr_push_flags_fn_t) ndr_push_PNP_DeleteRegistryKey,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_DeleteRegistryKey,
+ (ndr_print_function_t) ndr_print_PNP_DeleteRegistryKey,
+ false,
+ },
+ {
+ "PNP_GetClassCount",
+ sizeof(struct PNP_GetClassCount),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetClassCount,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassCount,
+ (ndr_print_function_t) ndr_print_PNP_GetClassCount,
+ false,
+ },
+ {
+ "PNP_GetClassName",
+ sizeof(struct PNP_GetClassName),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetClassName,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassName,
+ (ndr_print_function_t) ndr_print_PNP_GetClassName,
+ false,
+ },
+ {
+ "PNP_DeleteClassKey",
+ sizeof(struct PNP_DeleteClassKey),
+ (ndr_push_flags_fn_t) ndr_push_PNP_DeleteClassKey,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_DeleteClassKey,
+ (ndr_print_function_t) ndr_print_PNP_DeleteClassKey,
+ false,
+ },
+ {
+ "PNP_GetInterfaceDeviceAlias",
+ sizeof(struct PNP_GetInterfaceDeviceAlias),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceAlias,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceAlias,
+ (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceAlias,
+ false,
+ },
+ {
+ "PNP_GetInterfaceDeviceList",
+ sizeof(struct PNP_GetInterfaceDeviceList),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceList,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceList,
+ (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceList,
+ false,
+ },
+ {
+ "PNP_GetInterfaceDeviceListSize",
+ sizeof(struct PNP_GetInterfaceDeviceListSize),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetInterfaceDeviceListSize,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetInterfaceDeviceListSize,
+ (ndr_print_function_t) ndr_print_PNP_GetInterfaceDeviceListSize,
+ false,
+ },
+ {
+ "PNP_RegisterDeviceClassAssociation",
+ sizeof(struct PNP_RegisterDeviceClassAssociation),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RegisterDeviceClassAssociation,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterDeviceClassAssociation,
+ (ndr_print_function_t) ndr_print_PNP_RegisterDeviceClassAssociation,
+ false,
+ },
+ {
+ "PNP_UnregisterDeviceClassAssociation",
+ sizeof(struct PNP_UnregisterDeviceClassAssociation),
+ (ndr_push_flags_fn_t) ndr_push_PNP_UnregisterDeviceClassAssociation,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_UnregisterDeviceClassAssociation,
+ (ndr_print_function_t) ndr_print_PNP_UnregisterDeviceClassAssociation,
+ false,
+ },
+ {
+ "PNP_GetClassRegProp",
+ sizeof(struct PNP_GetClassRegProp),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetClassRegProp,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetClassRegProp,
+ (ndr_print_function_t) ndr_print_PNP_GetClassRegProp,
+ false,
+ },
+ {
+ "PNP_SetClassRegProp",
+ sizeof(struct PNP_SetClassRegProp),
+ (ndr_push_flags_fn_t) ndr_push_PNP_SetClassRegProp,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_SetClassRegProp,
+ (ndr_print_function_t) ndr_print_PNP_SetClassRegProp,
+ false,
+ },
+ {
+ "PNP_CreateDevInst",
+ sizeof(struct PNP_CreateDevInst),
+ (ndr_push_flags_fn_t) ndr_push_PNP_CreateDevInst,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_CreateDevInst,
+ (ndr_print_function_t) ndr_print_PNP_CreateDevInst,
+ false,
+ },
+ {
+ "PNP_DeviceInstanceAction",
+ sizeof(struct PNP_DeviceInstanceAction),
+ (ndr_push_flags_fn_t) ndr_push_PNP_DeviceInstanceAction,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_DeviceInstanceAction,
+ (ndr_print_function_t) ndr_print_PNP_DeviceInstanceAction,
+ false,
+ },
+ {
+ "PNP_GetDeviceStatus",
+ sizeof(struct PNP_GetDeviceStatus),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetDeviceStatus,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetDeviceStatus,
+ (ndr_print_function_t) ndr_print_PNP_GetDeviceStatus,
+ false,
+ },
+ {
+ "PNP_SetDeviceProblem",
+ sizeof(struct PNP_SetDeviceProblem),
+ (ndr_push_flags_fn_t) ndr_push_PNP_SetDeviceProblem,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_SetDeviceProblem,
+ (ndr_print_function_t) ndr_print_PNP_SetDeviceProblem,
+ false,
+ },
+ {
+ "PNP_DisableDevInst",
+ sizeof(struct PNP_DisableDevInst),
+ (ndr_push_flags_fn_t) ndr_push_PNP_DisableDevInst,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_DisableDevInst,
+ (ndr_print_function_t) ndr_print_PNP_DisableDevInst,
+ false,
+ },
+ {
+ "PNP_UninstallDevInst",
+ sizeof(struct PNP_UninstallDevInst),
+ (ndr_push_flags_fn_t) ndr_push_PNP_UninstallDevInst,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_UninstallDevInst,
+ (ndr_print_function_t) ndr_print_PNP_UninstallDevInst,
+ false,
+ },
+ {
+ "PNP_AddID",
+ sizeof(struct PNP_AddID),
+ (ndr_push_flags_fn_t) ndr_push_PNP_AddID,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_AddID,
+ (ndr_print_function_t) ndr_print_PNP_AddID,
+ false,
+ },
+ {
+ "PNP_RegisterDriver",
+ sizeof(struct PNP_RegisterDriver),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RegisterDriver,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterDriver,
+ (ndr_print_function_t) ndr_print_PNP_RegisterDriver,
+ false,
+ },
+ {
+ "PNP_QueryRemove",
+ sizeof(struct PNP_QueryRemove),
+ (ndr_push_flags_fn_t) ndr_push_PNP_QueryRemove,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryRemove,
+ (ndr_print_function_t) ndr_print_PNP_QueryRemove,
+ false,
+ },
+ {
+ "PNP_RequestDeviceEject",
+ sizeof(struct PNP_RequestDeviceEject),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RequestDeviceEject,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RequestDeviceEject,
+ (ndr_print_function_t) ndr_print_PNP_RequestDeviceEject,
+ false,
+ },
+ {
+ "PNP_IsDockStationPresent",
+ sizeof(struct PNP_IsDockStationPresent),
+ (ndr_push_flags_fn_t) ndr_push_PNP_IsDockStationPresent,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_IsDockStationPresent,
+ (ndr_print_function_t) ndr_print_PNP_IsDockStationPresent,
+ false,
+ },
+ {
+ "PNP_RequestEjectPC",
+ sizeof(struct PNP_RequestEjectPC),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RequestEjectPC,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RequestEjectPC,
+ (ndr_print_function_t) ndr_print_PNP_RequestEjectPC,
+ false,
+ },
+ {
+ "PNP_HwProfFlags",
+ sizeof(struct PNP_HwProfFlags),
+ (ndr_push_flags_fn_t) ndr_push_PNP_HwProfFlags,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_HwProfFlags,
+ (ndr_print_function_t) ndr_print_PNP_HwProfFlags,
+ false,
+ },
+ {
+ "PNP_GetHwProfInfo",
+ sizeof(struct PNP_GetHwProfInfo),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetHwProfInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetHwProfInfo,
+ (ndr_print_function_t) ndr_print_PNP_GetHwProfInfo,
+ false,
+ },
+ {
+ "PNP_AddEmptyLogConf",
+ sizeof(struct PNP_AddEmptyLogConf),
+ (ndr_push_flags_fn_t) ndr_push_PNP_AddEmptyLogConf,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_AddEmptyLogConf,
+ (ndr_print_function_t) ndr_print_PNP_AddEmptyLogConf,
+ false,
+ },
+ {
+ "PNP_FreeLogConf",
+ sizeof(struct PNP_FreeLogConf),
+ (ndr_push_flags_fn_t) ndr_push_PNP_FreeLogConf,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_FreeLogConf,
+ (ndr_print_function_t) ndr_print_PNP_FreeLogConf,
+ false,
+ },
+ {
+ "PNP_GetFirstLogConf",
+ sizeof(struct PNP_GetFirstLogConf),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetFirstLogConf,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetFirstLogConf,
+ (ndr_print_function_t) ndr_print_PNP_GetFirstLogConf,
+ false,
+ },
+ {
+ "PNP_GetNextLogConf",
+ sizeof(struct PNP_GetNextLogConf),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetNextLogConf,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetNextLogConf,
+ (ndr_print_function_t) ndr_print_PNP_GetNextLogConf,
+ false,
+ },
+ {
+ "PNP_GetLogConfPriority",
+ sizeof(struct PNP_GetLogConfPriority),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetLogConfPriority,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetLogConfPriority,
+ (ndr_print_function_t) ndr_print_PNP_GetLogConfPriority,
+ false,
+ },
+ {
+ "PNP_AddResDes",
+ sizeof(struct PNP_AddResDes),
+ (ndr_push_flags_fn_t) ndr_push_PNP_AddResDes,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_AddResDes,
+ (ndr_print_function_t) ndr_print_PNP_AddResDes,
+ false,
+ },
+ {
+ "PNP_FreeResDes",
+ sizeof(struct PNP_FreeResDes),
+ (ndr_push_flags_fn_t) ndr_push_PNP_FreeResDes,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_FreeResDes,
+ (ndr_print_function_t) ndr_print_PNP_FreeResDes,
+ false,
+ },
+ {
+ "PNP_GetNextResDes",
+ sizeof(struct PNP_GetNextResDes),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetNextResDes,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetNextResDes,
+ (ndr_print_function_t) ndr_print_PNP_GetNextResDes,
+ false,
+ },
+ {
+ "PNP_GetResDesData",
+ sizeof(struct PNP_GetResDesData),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetResDesData,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetResDesData,
+ (ndr_print_function_t) ndr_print_PNP_GetResDesData,
+ false,
+ },
+ {
+ "PNP_GetResDesDataSize",
+ sizeof(struct PNP_GetResDesDataSize),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetResDesDataSize,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetResDesDataSize,
+ (ndr_print_function_t) ndr_print_PNP_GetResDesDataSize,
+ false,
+ },
+ {
+ "PNP_ModifyResDes",
+ sizeof(struct PNP_ModifyResDes),
+ (ndr_push_flags_fn_t) ndr_push_PNP_ModifyResDes,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_ModifyResDes,
+ (ndr_print_function_t) ndr_print_PNP_ModifyResDes,
+ false,
+ },
+ {
+ "PNP_DetectResourceLimit",
+ sizeof(struct PNP_DetectResourceLimit),
+ (ndr_push_flags_fn_t) ndr_push_PNP_DetectResourceLimit,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_DetectResourceLimit,
+ (ndr_print_function_t) ndr_print_PNP_DetectResourceLimit,
+ false,
+ },
+ {
+ "PNP_QueryResConfList",
+ sizeof(struct PNP_QueryResConfList),
+ (ndr_push_flags_fn_t) ndr_push_PNP_QueryResConfList,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryResConfList,
+ (ndr_print_function_t) ndr_print_PNP_QueryResConfList,
+ false,
+ },
+ {
+ "PNP_SetHwProf",
+ sizeof(struct PNP_SetHwProf),
+ (ndr_push_flags_fn_t) ndr_push_PNP_SetHwProf,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_SetHwProf,
+ (ndr_print_function_t) ndr_print_PNP_SetHwProf,
+ false,
+ },
+ {
+ "PNP_QueryArbitratorFreeData",
+ sizeof(struct PNP_QueryArbitratorFreeData),
+ (ndr_push_flags_fn_t) ndr_push_PNP_QueryArbitratorFreeData,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryArbitratorFreeData,
+ (ndr_print_function_t) ndr_print_PNP_QueryArbitratorFreeData,
+ false,
+ },
+ {
+ "PNP_QueryArbitratorFreeSize",
+ sizeof(struct PNP_QueryArbitratorFreeSize),
+ (ndr_push_flags_fn_t) ndr_push_PNP_QueryArbitratorFreeSize,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_QueryArbitratorFreeSize,
+ (ndr_print_function_t) ndr_print_PNP_QueryArbitratorFreeSize,
+ false,
+ },
+ {
+ "PNP_RunDetection",
+ sizeof(struct PNP_RunDetection),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RunDetection,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RunDetection,
+ (ndr_print_function_t) ndr_print_PNP_RunDetection,
+ false,
+ },
+ {
+ "PNP_RegisterNotification",
+ sizeof(struct PNP_RegisterNotification),
+ (ndr_push_flags_fn_t) ndr_push_PNP_RegisterNotification,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_RegisterNotification,
+ (ndr_print_function_t) ndr_print_PNP_RegisterNotification,
+ false,
+ },
+ {
+ "PNP_UnregisterNotification",
+ sizeof(struct PNP_UnregisterNotification),
+ (ndr_push_flags_fn_t) ndr_push_PNP_UnregisterNotification,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_UnregisterNotification,
+ (ndr_print_function_t) ndr_print_PNP_UnregisterNotification,
+ false,
+ },
+ {
+ "PNP_GetCustomDevProp",
+ sizeof(struct PNP_GetCustomDevProp),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetCustomDevProp,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetCustomDevProp,
+ (ndr_print_function_t) ndr_print_PNP_GetCustomDevProp,
+ false,
+ },
+ {
+ "PNP_GetVersionInternal",
+ sizeof(struct PNP_GetVersionInternal),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetVersionInternal,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetVersionInternal,
+ (ndr_print_function_t) ndr_print_PNP_GetVersionInternal,
+ false,
+ },
+ {
+ "PNP_GetBlockedDriverInfo",
+ sizeof(struct PNP_GetBlockedDriverInfo),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetBlockedDriverInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetBlockedDriverInfo,
+ (ndr_print_function_t) ndr_print_PNP_GetBlockedDriverInfo,
+ false,
+ },
+ {
+ "PNP_GetServerSideDeviceInstallFlags",
+ sizeof(struct PNP_GetServerSideDeviceInstallFlags),
+ (ndr_push_flags_fn_t) ndr_push_PNP_GetServerSideDeviceInstallFlags,
+ (ndr_pull_flags_fn_t) ndr_pull_PNP_GetServerSideDeviceInstallFlags,
+ (ndr_print_function_t) ndr_print_PNP_GetServerSideDeviceInstallFlags,
+ false,
+ },
+ { NULL, 0, NULL, NULL, NULL, false }
+};
+
+static const char * const ntsvcs_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\ntsvcs]",
+};
+
+static const struct ndr_interface_string_array ntsvcs_endpoints = {
+ .count = 1,
+ .names = ntsvcs_endpoint_strings
+};
+
+static const char * const ntsvcs_authservice_strings[] = {
+ "host",
+};
+
+static const struct ndr_interface_string_array ntsvcs_authservices = {
+ .count = 1,
+ .names = ntsvcs_authservice_strings
+};
+
+
+const struct ndr_interface_table ndr_table_ntsvcs = {
+ .name = "ntsvcs",
+ .syntax_id = {
+ {0x8d9f4e40,0xa03d,0x11ce,{0x8f,0x69},{0x08,0x00,0x3e,0x30,0x05,0x1b}},
+ NDR_NTSVCS_VERSION
+ },
+ .helpstring = NDR_NTSVCS_HELPSTRING,
+ .num_calls = 65,
+ .calls = ntsvcs_calls,
+ .endpoints = &ntsvcs_endpoints,
+ .authservices = &ntsvcs_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.h b/source3/librpc/gen_ndr/ndr_ntsvcs.h
new file mode 100644
index 0000000000..0e3b6b91c4
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_ntsvcs.h
@@ -0,0 +1,211 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/ntsvcs.h"
+
+#ifndef _HEADER_NDR_ntsvcs
+#define _HEADER_NDR_ntsvcs
+
+#define NDR_NTSVCS_UUID "8d9f4e40-a03d-11ce-8f69-08003e30051b"
+#define NDR_NTSVCS_VERSION 1.0
+#define NDR_NTSVCS_NAME "ntsvcs"
+#define NDR_NTSVCS_HELPSTRING "Plug and Play services"
+extern const struct ndr_interface_table ndr_table_ntsvcs;
+#define NDR_PNP_DISCONNECT (0x00)
+
+#define NDR_PNP_CONNECT (0x01)
+
+#define NDR_PNP_GETVERSION (0x02)
+
+#define NDR_PNP_GETGLOBALSTATE (0x03)
+
+#define NDR_PNP_INITDETECTION (0x04)
+
+#define NDR_PNP_REPORTLOGON (0x05)
+
+#define NDR_PNP_VALIDATEDEVICEINSTANCE (0x06)
+
+#define NDR_PNP_GETROOTDEVICEINSTANCE (0x07)
+
+#define NDR_PNP_GETRELATEDDEVICEINSTANCE (0x08)
+
+#define NDR_PNP_ENUMERATESUBKEYS (0x09)
+
+#define NDR_PNP_GETDEVICELIST (0x0a)
+
+#define NDR_PNP_GETDEVICELISTSIZE (0x0b)
+
+#define NDR_PNP_GETDEPTH (0x0c)
+
+#define NDR_PNP_GETDEVICEREGPROP (0x0d)
+
+#define NDR_PNP_SETDEVICEREGPROP (0x0e)
+
+#define NDR_PNP_GETCLASSINSTANCE (0x0f)
+
+#define NDR_PNP_CREATEKEY (0x10)
+
+#define NDR_PNP_DELETEREGISTRYKEY (0x11)
+
+#define NDR_PNP_GETCLASSCOUNT (0x12)
+
+#define NDR_PNP_GETCLASSNAME (0x13)
+
+#define NDR_PNP_DELETECLASSKEY (0x14)
+
+#define NDR_PNP_GETINTERFACEDEVICEALIAS (0x15)
+
+#define NDR_PNP_GETINTERFACEDEVICELIST (0x16)
+
+#define NDR_PNP_GETINTERFACEDEVICELISTSIZE (0x17)
+
+#define NDR_PNP_REGISTERDEVICECLASSASSOCIATION (0x18)
+
+#define NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION (0x19)
+
+#define NDR_PNP_GETCLASSREGPROP (0x1a)
+
+#define NDR_PNP_SETCLASSREGPROP (0x1b)
+
+#define NDR_PNP_CREATEDEVINST (0x1c)
+
+#define NDR_PNP_DEVICEINSTANCEACTION (0x1d)
+
+#define NDR_PNP_GETDEVICESTATUS (0x1e)
+
+#define NDR_PNP_SETDEVICEPROBLEM (0x1f)
+
+#define NDR_PNP_DISABLEDEVINST (0x20)
+
+#define NDR_PNP_UNINSTALLDEVINST (0x21)
+
+#define NDR_PNP_ADDID (0x22)
+
+#define NDR_PNP_REGISTERDRIVER (0x23)
+
+#define NDR_PNP_QUERYREMOVE (0x24)
+
+#define NDR_PNP_REQUESTDEVICEEJECT (0x25)
+
+#define NDR_PNP_ISDOCKSTATIONPRESENT (0x26)
+
+#define NDR_PNP_REQUESTEJECTPC (0x27)
+
+#define NDR_PNP_HWPROFFLAGS (0x28)
+
+#define NDR_PNP_GETHWPROFINFO (0x29)
+
+#define NDR_PNP_ADDEMPTYLOGCONF (0x2a)
+
+#define NDR_PNP_FREELOGCONF (0x2b)
+
+#define NDR_PNP_GETFIRSTLOGCONF (0x2c)
+
+#define NDR_PNP_GETNEXTLOGCONF (0x2d)
+
+#define NDR_PNP_GETLOGCONFPRIORITY (0x2e)
+
+#define NDR_PNP_ADDRESDES (0x2f)
+
+#define NDR_PNP_FREERESDES (0x30)
+
+#define NDR_PNP_GETNEXTRESDES (0x31)
+
+#define NDR_PNP_GETRESDESDATA (0x32)
+
+#define NDR_PNP_GETRESDESDATASIZE (0x33)
+
+#define NDR_PNP_MODIFYRESDES (0x34)
+
+#define NDR_PNP_DETECTRESOURCELIMIT (0x35)
+
+#define NDR_PNP_QUERYRESCONFLIST (0x36)
+
+#define NDR_PNP_SETHWPROF (0x37)
+
+#define NDR_PNP_QUERYARBITRATORFREEDATA (0x38)
+
+#define NDR_PNP_QUERYARBITRATORFREESIZE (0x39)
+
+#define NDR_PNP_RUNDETECTION (0x3a)
+
+#define NDR_PNP_REGISTERNOTIFICATION (0x3b)
+
+#define NDR_PNP_UNREGISTERNOTIFICATION (0x3c)
+
+#define NDR_PNP_GETCUSTOMDEVPROP (0x3d)
+
+#define NDR_PNP_GETVERSIONINTERNAL (0x3e)
+
+#define NDR_PNP_GETBLOCKEDDRIVERINFO (0x3f)
+
+#define NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS (0x40)
+
+#define NDR_NTSVCS_CALL_COUNT (65)
+void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r);
+void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r);
+void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r);
+void ndr_print_PNP_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersion *r);
+void ndr_print_PNP_GetGlobalState(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetGlobalState *r);
+void ndr_print_PNP_InitDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_InitDetection *r);
+void ndr_print_PNP_ReportLogOn(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ReportLogOn *r);
+void ndr_print_PNP_ValidateDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ValidateDeviceInstance *r);
+void ndr_print_PNP_GetRootDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRootDeviceInstance *r);
+void ndr_print_PNP_GetRelatedDeviceInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetRelatedDeviceInstance *r);
+void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *name, int flags, const struct PNP_EnumerateSubKeys *r);
+void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r);
+void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceListSize *r);
+void ndr_print_PNP_GetDepth(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDepth *r);
+void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceRegProp *r);
+void ndr_print_PNP_SetDeviceRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceRegProp *r);
+void ndr_print_PNP_GetClassInstance(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassInstance *r);
+void ndr_print_PNP_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateKey *r);
+void ndr_print_PNP_DeleteRegistryKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteRegistryKey *r);
+void ndr_print_PNP_GetClassCount(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassCount *r);
+void ndr_print_PNP_GetClassName(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassName *r);
+void ndr_print_PNP_DeleteClassKey(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeleteClassKey *r);
+void ndr_print_PNP_GetInterfaceDeviceAlias(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceAlias *r);
+void ndr_print_PNP_GetInterfaceDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceList *r);
+void ndr_print_PNP_GetInterfaceDeviceListSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetInterfaceDeviceListSize *r);
+void ndr_print_PNP_RegisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDeviceClassAssociation *r);
+void ndr_print_PNP_UnregisterDeviceClassAssociation(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterDeviceClassAssociation *r);
+void ndr_print_PNP_GetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetClassRegProp *r);
+void ndr_print_PNP_SetClassRegProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetClassRegProp *r);
+void ndr_print_PNP_CreateDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_CreateDevInst *r);
+void ndr_print_PNP_DeviceInstanceAction(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DeviceInstanceAction *r);
+void ndr_print_PNP_GetDeviceStatus(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceStatus *r);
+void ndr_print_PNP_SetDeviceProblem(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetDeviceProblem *r);
+void ndr_print_PNP_DisableDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DisableDevInst *r);
+void ndr_print_PNP_UninstallDevInst(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UninstallDevInst *r);
+void ndr_print_PNP_AddID(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddID *r);
+void ndr_print_PNP_RegisterDriver(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterDriver *r);
+void ndr_print_PNP_QueryRemove(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryRemove *r);
+void ndr_print_PNP_RequestDeviceEject(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestDeviceEject *r);
+void ndr_print_PNP_IsDockStationPresent(struct ndr_print *ndr, const char *name, int flags, const struct PNP_IsDockStationPresent *r);
+void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RequestEjectPC *r);
+void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_HwProfFlags *r);
+void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetHwProfInfo *r);
+void ndr_print_PNP_AddEmptyLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddEmptyLogConf *r);
+void ndr_print_PNP_FreeLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeLogConf *r);
+void ndr_print_PNP_GetFirstLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetFirstLogConf *r);
+void ndr_print_PNP_GetNextLogConf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextLogConf *r);
+void ndr_print_PNP_GetLogConfPriority(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetLogConfPriority *r);
+void ndr_print_PNP_AddResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_AddResDes *r);
+void ndr_print_PNP_FreeResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_FreeResDes *r);
+void ndr_print_PNP_GetNextResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetNextResDes *r);
+void ndr_print_PNP_GetResDesData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesData *r);
+void ndr_print_PNP_GetResDesDataSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetResDesDataSize *r);
+void ndr_print_PNP_ModifyResDes(struct ndr_print *ndr, const char *name, int flags, const struct PNP_ModifyResDes *r);
+void ndr_print_PNP_DetectResourceLimit(struct ndr_print *ndr, const char *name, int flags, const struct PNP_DetectResourceLimit *r);
+void ndr_print_PNP_QueryResConfList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryResConfList *r);
+void ndr_print_PNP_SetHwProf(struct ndr_print *ndr, const char *name, int flags, const struct PNP_SetHwProf *r);
+void ndr_print_PNP_QueryArbitratorFreeData(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeData *r);
+void ndr_print_PNP_QueryArbitratorFreeSize(struct ndr_print *ndr, const char *name, int flags, const struct PNP_QueryArbitratorFreeSize *r);
+void ndr_print_PNP_RunDetection(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RunDetection *r);
+void ndr_print_PNP_RegisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_RegisterNotification *r);
+void ndr_print_PNP_UnregisterNotification(struct ndr_print *ndr, const char *name, int flags, const struct PNP_UnregisterNotification *r);
+void ndr_print_PNP_GetCustomDevProp(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetCustomDevProp *r);
+void ndr_print_PNP_GetVersionInternal(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetVersionInternal *r);
+void ndr_print_PNP_GetBlockedDriverInfo(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetBlockedDriverInfo *r);
+void ndr_print_PNP_GetServerSideDeviceInstallFlags(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetServerSideDeviceInstallFlags *r);
+#endif /* _HEADER_NDR_ntsvcs */
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index eaa38e3a1f..3af589f393 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -299,8 +299,7 @@ _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, c
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_samr_SamEntry(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -1161,8 +1160,7 @@ _PUBLIC_ void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const
ndr->depth++;
for (cntr_ids_1=0;cntr_ids_1<r->count;cntr_ids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_ids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_ids_1) != -1) {
ndr_print_uint32(ndr, "ids", r->ids[cntr_ids_1]);
free(idx_1);
}
@@ -1559,8 +1557,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_rids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
ndr_print_uint32(ndr, "rids", r->rids[cntr_rids_1]);
free(idx_1);
}
@@ -1575,8 +1572,7 @@ _PUBLIC_ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_types_1=0;cntr_types_1<r->count;cntr_types_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_types_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) {
ndr_print_uint32(ndr, "types", r->types[cntr_types_1]);
free(idx_1);
}
@@ -3711,8 +3707,7 @@ _PUBLIC_ void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_rids_1=0;cntr_rids_1<r->count;cntr_rids_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_rids_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_rids_1) != -1) {
ndr_print_samr_RidWithAttribute(ndr, "rids", &r->rids[cntr_rids_1]);
free(idx_1);
}
@@ -3849,8 +3844,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_samr_DispEntryGeneral(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -3982,8 +3976,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *nam
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_samr_DispEntryFull(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4115,8 +4108,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_samr_DispEntryFullGroup(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4132,10 +4124,10 @@ static enum ndr_err_code ndr_push_samr_DispEntryAscii(struct ndr_push *ndr, int
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idx));
- NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_push_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
}
return NDR_ERR_SUCCESS;
}
@@ -4145,10 +4137,10 @@ static enum ndr_err_code ndr_pull_samr_DispEntryAscii(struct ndr_pull *ndr, int
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idx));
- NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_SCALARS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_SCALARS, &r->account_name));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_lsa_AsciiString(ndr, NDR_BUFFERS, &r->account_name));
+ NDR_CHECK(ndr_pull_lsa_AsciiStringLarge(ndr, NDR_BUFFERS, &r->account_name));
}
return NDR_ERR_SUCCESS;
}
@@ -4158,7 +4150,7 @@ _PUBLIC_ void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *n
ndr_print_struct(ndr, name, "samr_DispEntryAscii");
ndr->depth++;
ndr_print_uint32(ndr, "idx", r->idx);
- ndr_print_lsa_AsciiString(ndr, "account_name", &r->account_name);
+ ndr_print_lsa_AsciiStringLarge(ndr, "account_name", &r->account_name);
ndr->depth--;
}
@@ -4237,8 +4229,7 @@ _PUBLIC_ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_entries_1=0;cntr_entries_1<r->count;cntr_entries_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_entries_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_entries_1) != -1) {
ndr_print_samr_DispEntryAscii(ndr, "entries", &r->entries[cntr_entries_1]);
free(idx_1);
}
@@ -4840,8 +4831,7 @@ _PUBLIC_ void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_pwd_history_1=0;cntr_pwd_history_1<r->pwd_history_len;cntr_pwd_history_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_pwd_history_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_pwd_history_1) != -1) {
ndr_print_samr_ValidationBlob(ndr, "pwd_history", &r->pwd_history[cntr_pwd_history_1]);
free(idx_1);
}
@@ -7212,8 +7202,7 @@ _PUBLIC_ void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name
ndr->depth++;
for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_names_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_names_0) != -1) {
ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
free(idx_0);
}
@@ -7352,8 +7341,7 @@ _PUBLIC_ void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_rids_0=0;cntr_rids_0<r->in.num_rids;cntr_rids_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_rids_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_rids_0) != -1) {
ndr_print_uint32(ndr, "rids", r->in.rids[cntr_rids_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c
index 8ab56dd914..cbeabf48e5 100644
--- a/source3/librpc/gen_ndr/ndr_security.c
+++ b/source3/librpc/gen_ndr/ndr_security.c
@@ -552,8 +552,7 @@ _PUBLIC_ void ndr_print_security_acl(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (cntr_aces_0=0;cntr_aces_0<r->num_aces;cntr_aces_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_aces_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_aces_0) != -1) {
ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]);
free(idx_0);
}
@@ -981,8 +980,7 @@ _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (cntr_sids_0=0;cntr_sids_0<r->num_sids;cntr_sids_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_sids_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_sids_0) != -1) {
ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_0]);
ndr->depth++;
if (r->sids[cntr_sids_0]) {
diff --git a/source3/librpc/gen_ndr/ndr_srvsvc.c b/source3/librpc/gen_ndr/ndr_srvsvc.c
index 86d47a856c..22a04f86f8 100644
--- a/source3/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source3/librpc/gen_ndr/ndr_srvsvc.c
@@ -140,8 +140,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -326,8 +325,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -749,8 +747,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -938,8 +935,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1325,8 +1321,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1520,8 +1515,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1769,8 +1763,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -1958,8 +1951,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2381,8 +2373,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2573,8 +2564,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2798,8 +2788,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -2984,8 +2973,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3242,8 +3230,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3694,8 +3681,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -3877,8 +3863,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4135,8 +4120,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *n
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4321,8 +4305,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4616,8 +4599,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4763,8 +4745,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4897,8 +4878,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5008,8 +4988,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5158,8 +5137,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5245,8 +5223,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -11487,8 +11464,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *na
ndr->depth++;
for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_disks_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
free(idx_1);
}
@@ -11781,8 +11757,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12030,8 +12005,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12282,8 +12256,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -12540,8 +12513,7 @@ _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -15684,8 +15656,11 @@ static enum ndr_err_code ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, i
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
- NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ if (r->in.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
if (r->in.parm_error) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
@@ -15706,6 +15681,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, i
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
TALLOC_CTX *_mem_save_parm_error_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -15736,8 +15712,14 @@ static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, i
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
- NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
if (_ptr_parm_error) {
NDR_PULL_ALLOC(ndr, r->in.parm_error);
@@ -15787,8 +15769,11 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char
ndr->depth--;
ndr_print_string(ndr, "share_name", r->in.share_name);
ndr_print_uint32(ndr, "level", r->in.level);
- ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
- ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+ ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
+ ndr->depth--;
ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
ndr->depth++;
if (r->in.parm_error) {
@@ -16207,8 +16192,11 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int
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_uint32(ndr, NDR_SCALARS, r->in.level));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
- NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ if (r->in.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
if (r->in.parm_error) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
@@ -16229,6 +16217,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int
uint32_t _ptr_server_unc;
uint32_t _ptr_parm_error;
TALLOC_CTX *_mem_save_server_unc_0;
+ TALLOC_CTX *_mem_save_info_0;
TALLOC_CTX *_mem_save_parm_error_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -16252,8 +16241,14 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
- NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
if (_ptr_parm_error) {
NDR_PULL_ALLOC(ndr, r->in.parm_error);
@@ -16302,8 +16297,11 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *
}
ndr->depth--;
ndr_print_uint32(ndr, "level", r->in.level);
- ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
- ndr_print_srvsvc_NetSrvInfo(ndr, "info", &r->in.info);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+ ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
+ ndr->depth--;
ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
ndr->depth++;
if (r->in.parm_error) {
@@ -17029,9 +17027,12 @@ static enum ndr_err_code ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int
}
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
- if (r->out.info) {
- NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
+ if (*r->out.info) {
+ NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
}
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
@@ -17044,6 +17045,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int
uint32_t _ptr_info;
TALLOC_CTX *_mem_save_server_unc_0;
TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_info_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -17065,20 +17067,28 @@ static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int
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_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
if (_ptr_info) {
- NDR_PULL_ALLOC(ndr, r->out.info);
+ NDR_PULL_ALLOC(ndr, *r->out.info);
} else {
- r->out.info = NULL;
+ *r->out.info = NULL;
}
- if (r->out.info) {
- _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
- NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ if (*r->out.info) {
+ _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
+ NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -17107,10 +17117,13 @@ _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *n
ndr->depth++;
ndr_print_ptr(ndr, "info", r->out.info);
ndr->depth++;
- if (r->out.info) {
- ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", r->out.info);
+ ndr_print_ptr(ndr, "info", *r->out.info);
+ ndr->depth++;
+ if (*r->out.info) {
+ ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
}
ndr->depth--;
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c
index b2dfd0eef4..16e0416288 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.c
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -588,8 +588,23 @@ _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const
static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.security_flags));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
}
if (flags & NDR_OUT) {
+ if (r->out.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buffer_size));
+ if (r->out.needed == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -597,10 +612,48 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_p
static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size));
+ if (r->in.buffer_size < 0 || r->in.buffer_size > 0x40000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buffer_size);
+ memset(r->out.buffer, 0, (r->in.buffer_size) * sizeof(*r->out.buffer));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ }
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.needed < 0 || *r->out.needed > 0x40000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buffer_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -615,11 +668,25 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr,
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "security_flags", r->in.security_flags);
+ ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
ndr->depth++;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buffer_size);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "needed", r->out.needed);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -629,6 +696,17 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr,
static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
{
if (flags & NDR_IN) {
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.security_flags));
+ if (r->in.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.buffer_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
@@ -638,7 +716,25 @@ static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_pus
static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size));
+ if (r->in.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.buffer_size));
+ }
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
@@ -656,6 +752,16 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, c
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "security_flags", r->in.security_flags);
+ ndr_print_ptr(ndr, "buffer", r->in.buffer);
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.buffer_size);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size);
ndr->depth--;
}
if (flags & NDR_OUT) {
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
deleted file mode 100644
index 03a8d30f03..0000000000
--- a/source3/librpc/gen_ndr/ndr_unixinfo.c
+++ /dev/null
@@ -1,538 +0,0 @@
-/* parser auto-generated by pidl */
-
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_unixinfo.h"
-
-#include "librpc/gen_ndr/ndr_security.h"
-static enum ndr_err_code ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->homedir));
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->shell));
- ndr->flags = _flags_save_string;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, struct unixinfo_GetPWUidInfo *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->homedir));
- ndr->flags = _flags_save_string;
- }
- {
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->shell));
- ndr->flags = _flags_save_string;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
-{
- ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
- ndr->depth++;
- ndr_print_NTSTATUS(ndr, "status", r->status);
- ndr_print_string(ndr, "homedir", r->homedir);
- ndr_print_string(ndr, "shell", r->shell);
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_unixinfo_SidToUid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToUid *r)
-{
- if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
- }
- if (flags & NDR_OUT) {
- if (r->out.uid == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.uid));
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToUid *r)
-{
- TALLOC_CTX *_mem_save_uid_0;
- if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
- NDR_PULL_ALLOC(ndr, r->out.uid);
- ZERO_STRUCTP(r->out.uid);
- }
- if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.uid);
- }
- _mem_save_uid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.uid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.uid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uid_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r)
-{
- ndr_print_struct(ndr, name, "unixinfo_SidToUid");
- ndr->depth++;
- if (flags & NDR_SET_VALUES) {
- ndr->flags |= LIBNDR_PRINT_SET_VALUES;
- }
- if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "unixinfo_SidToUid");
- ndr->depth++;
- ndr_print_dom_sid(ndr, "sid", &r->in.sid);
- ndr->depth--;
- }
- if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "unixinfo_SidToUid");
- ndr->depth++;
- ndr_print_ptr(ndr, "uid", r->out.uid);
- ndr->depth++;
- ndr_print_hyper(ndr, "uid", *r->out.uid);
- ndr->depth--;
- ndr_print_NTSTATUS(ndr, "result", r->out.result);
- ndr->depth--;
- }
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_unixinfo_UidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_UidToSid *r)
-{
- if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
- }
- if (flags & NDR_OUT) {
- if (r->out.sid == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
-{
- TALLOC_CTX *_mem_save_sid_0;
- if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
- NDR_PULL_ALLOC(ndr, r->out.sid);
- ZERO_STRUCTP(r->out.sid);
- }
- if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.sid);
- }
- _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r)
-{
- ndr_print_struct(ndr, name, "unixinfo_UidToSid");
- ndr->depth++;
- if (flags & NDR_SET_VALUES) {
- ndr->flags |= LIBNDR_PRINT_SET_VALUES;
- }
- if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "unixinfo_UidToSid");
- ndr->depth++;
- ndr_print_hyper(ndr, "uid", r->in.uid);
- ndr->depth--;
- }
- if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "unixinfo_UidToSid");
- ndr->depth++;
- ndr_print_ptr(ndr, "sid", r->out.sid);
- ndr->depth++;
- ndr_print_dom_sid(ndr, "sid", r->out.sid);
- ndr->depth--;
- ndr_print_NTSTATUS(ndr, "result", r->out.result);
- ndr->depth--;
- }
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_unixinfo_SidToGid(struct ndr_push *ndr, int flags, const struct unixinfo_SidToGid *r)
-{
- if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
- }
- if (flags & NDR_OUT) {
- if (r->out.gid == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->out.gid));
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unixinfo_SidToGid *r)
-{
- TALLOC_CTX *_mem_save_gid_0;
- if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sid));
- NDR_PULL_ALLOC(ndr, r->out.gid);
- ZERO_STRUCTP(r->out.gid);
- }
- if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.gid);
- }
- _mem_save_gid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.gid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->out.gid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gid_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r)
-{
- ndr_print_struct(ndr, name, "unixinfo_SidToGid");
- ndr->depth++;
- if (flags & NDR_SET_VALUES) {
- ndr->flags |= LIBNDR_PRINT_SET_VALUES;
- }
- if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "unixinfo_SidToGid");
- ndr->depth++;
- ndr_print_dom_sid(ndr, "sid", &r->in.sid);
- ndr->depth--;
- }
- if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "unixinfo_SidToGid");
- ndr->depth++;
- ndr_print_ptr(ndr, "gid", r->out.gid);
- ndr->depth++;
- ndr_print_hyper(ndr, "gid", *r->out.gid);
- ndr->depth--;
- ndr_print_NTSTATUS(ndr, "result", r->out.result);
- ndr->depth--;
- }
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_unixinfo_GidToSid(struct ndr_push *ndr, int flags, const struct unixinfo_GidToSid *r)
-{
- if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
- }
- if (flags & NDR_OUT) {
- if (r->out.sid == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
-{
- TALLOC_CTX *_mem_save_sid_0;
- if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
- NDR_PULL_ALLOC(ndr, r->out.sid);
- ZERO_STRUCTP(r->out.sid);
- }
- if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.sid);
- }
- _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r)
-{
- ndr_print_struct(ndr, name, "unixinfo_GidToSid");
- ndr->depth++;
- if (flags & NDR_SET_VALUES) {
- ndr->flags |= LIBNDR_PRINT_SET_VALUES;
- }
- if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "unixinfo_GidToSid");
- ndr->depth++;
- ndr_print_hyper(ndr, "gid", r->in.gid);
- ndr->depth--;
- }
- if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "unixinfo_GidToSid");
- ndr->depth++;
- ndr_print_ptr(ndr, "sid", r->out.sid);
- ndr->depth++;
- ndr_print_dom_sid(ndr, "sid", r->out.sid);
- ndr->depth--;
- ndr_print_NTSTATUS(ndr, "result", r->out.result);
- ndr->depth--;
- }
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
-{
- uint32_t cntr_uids_0;
- uint32_t cntr_infos_0;
- if (flags & NDR_IN) {
- if (r->in.count == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
- for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uids[cntr_uids_0]));
- }
- }
- if (flags & NDR_OUT) {
- if (r->out.count == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
- for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) {
- NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
- }
- NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
-{
- uint32_t cntr_uids_0;
- uint32_t cntr_infos_0;
- TALLOC_CTX *_mem_save_count_0;
- TALLOC_CTX *_mem_save_uids_0;
- TALLOC_CTX *_mem_save_infos_0;
- if (flags & NDR_IN) {
- ZERO_STRUCT(r->out);
-
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->in.count);
- }
- _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
- if (*r->in.count < 0 || *r->in.count > 1023) {
- return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->in.uids));
- NDR_PULL_ALLOC_N(ndr, r->in.uids, ndr_get_array_size(ndr, &r->in.uids));
- _mem_save_uids_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.uids, 0);
- for (cntr_uids_0 = 0; cntr_uids_0 < *r->in.count; cntr_uids_0++) {
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uids[cntr_uids_0]));
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0);
- NDR_PULL_ALLOC(ndr, r->out.count);
- *r->out.count = *r->in.count;
- if (r->in.uids) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
- }
- }
- if (flags & NDR_OUT) {
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.count);
- }
- _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
- if (*r->out.count < 0 || *r->out.count > 1023) {
- return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
- NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos));
- _mem_save_infos_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
- for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) {
- NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0);
- NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
- if (r->out.infos) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
-{
- uint32_t cntr_uids_0;
- uint32_t cntr_infos_0;
- ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
- ndr->depth++;
- if (flags & NDR_SET_VALUES) {
- ndr->flags |= LIBNDR_PRINT_SET_VALUES;
- }
- if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "unixinfo_GetPWUid");
- ndr->depth++;
- ndr_print_ptr(ndr, "count", r->in.count);
- ndr->depth++;
- ndr_print_uint32(ndr, "count", *r->in.count);
- ndr->depth--;
- ndr->print(ndr, "%s: ARRAY(%d)", "uids", *r->in.count);
- ndr->depth++;
- for (cntr_uids_0=0;cntr_uids_0<*r->in.count;cntr_uids_0++) {
- char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_uids_0);
- if (idx_0) {
- ndr_print_hyper(ndr, "uids", r->in.uids[cntr_uids_0]);
- free(idx_0);
- }
- }
- ndr->depth--;
- ndr->depth--;
- }
- if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "unixinfo_GetPWUid");
- ndr->depth++;
- ndr_print_ptr(ndr, "count", r->out.count);
- ndr->depth++;
- ndr_print_uint32(ndr, "count", *r->out.count);
- ndr->depth--;
- ndr->print(ndr, "%s: ARRAY(%d)", "infos", *r->out.count);
- ndr->depth++;
- for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) {
- char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_infos_0);
- if (idx_0) {
- ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]);
- free(idx_0);
- }
- }
- ndr->depth--;
- ndr_print_NTSTATUS(ndr, "result", r->out.result);
- ndr->depth--;
- }
- ndr->depth--;
-}
-
-static const struct ndr_interface_call unixinfo_calls[] = {
- {
- "unixinfo_SidToUid",
- sizeof(struct unixinfo_SidToUid),
- (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid,
- (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid,
- (ndr_print_function_t) ndr_print_unixinfo_SidToUid,
- false,
- },
- {
- "unixinfo_UidToSid",
- sizeof(struct unixinfo_UidToSid),
- (ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid,
- (ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid,
- (ndr_print_function_t) ndr_print_unixinfo_UidToSid,
- false,
- },
- {
- "unixinfo_SidToGid",
- sizeof(struct unixinfo_SidToGid),
- (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid,
- (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid,
- (ndr_print_function_t) ndr_print_unixinfo_SidToGid,
- false,
- },
- {
- "unixinfo_GidToSid",
- sizeof(struct unixinfo_GidToSid),
- (ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid,
- (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid,
- (ndr_print_function_t) ndr_print_unixinfo_GidToSid,
- false,
- },
- {
- "unixinfo_GetPWUid",
- sizeof(struct unixinfo_GetPWUid),
- (ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid,
- (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid,
- (ndr_print_function_t) ndr_print_unixinfo_GetPWUid,
- false,
- },
- { NULL, 0, NULL, NULL, NULL, false }
-};
-
-static const char * const unixinfo_endpoint_strings[] = {
- "ncacn_np:[\\pipe\\unixinfo]",
- "ncacn_ip_tcp:",
- "ncalrpc:",
-};
-
-static const struct ndr_interface_string_array unixinfo_endpoints = {
- .count = 3,
- .names = unixinfo_endpoint_strings
-};
-
-static const char * const unixinfo_authservice_strings[] = {
- "host",
-};
-
-static const struct ndr_interface_string_array unixinfo_authservices = {
- .count = 3,
- .names = unixinfo_authservice_strings
-};
-
-
-const struct ndr_interface_table ndr_table_unixinfo = {
- .name = "unixinfo",
- .syntax_id = {
- {0x9c54e310,0xa955,0x4885,{0xbd,0x31},{0x78,0x78,0x71,0x47,0xdf,0xa6}},
- NDR_UNIXINFO_VERSION
- },
- .helpstring = NDR_UNIXINFO_HELPSTRING,
- .num_calls = 5,
- .calls = unixinfo_calls,
- .endpoints = &unixinfo_endpoints,
- .authservices = &unixinfo_authservices
-};
-
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.h b/source3/librpc/gen_ndr/ndr_unixinfo.h
deleted file mode 100644
index 17f8b811db..0000000000
--- a/source3/librpc/gen_ndr/ndr_unixinfo.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* header auto-generated by pidl */
-
-#include "librpc/ndr/libndr.h"
-#include "librpc/gen_ndr/unixinfo.h"
-
-#ifndef _HEADER_NDR_unixinfo
-#define _HEADER_NDR_unixinfo
-
-#define NDR_UNIXINFO_UUID "9c54e310-a955-4885-bd31-78787147dfa6"
-#define NDR_UNIXINFO_VERSION 0.0
-#define NDR_UNIXINFO_NAME "unixinfo"
-#define NDR_UNIXINFO_HELPSTRING "Unixinfo specific stuff"
-extern const struct ndr_interface_table ndr_table_unixinfo;
-#define NDR_UNIXINFO_SIDTOUID (0x00)
-
-#define NDR_UNIXINFO_UIDTOSID (0x01)
-
-#define NDR_UNIXINFO_SIDTOGID (0x02)
-
-#define NDR_UNIXINFO_GIDTOSID (0x03)
-
-#define NDR_UNIXINFO_GETPWUID (0x04)
-
-#define NDR_UNIXINFO_CALL_COUNT (5)
-void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r);
-void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r);
-void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r);
-void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r);
-void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r);
-void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r);
-#endif /* _HEADER_NDR_unixinfo */
diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index b63d410587..cd16a141b0 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -3700,7 +3700,7 @@ static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *nd
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_ALLOC_N(ndr, r->out.values, r->in.num_values);
- memcpy(r->out.values, r->in.values, r->in.num_values * sizeof(*r->in.values));
+ memcpy(r->out.values, r->in.values, (r->in.num_values) * sizeof(*r->in.values));
NDR_PULL_ALLOC(ndr, r->out.buffer_size);
*r->out.buffer_size = *r->in.buffer_size;
if (r->in.values) {
@@ -3798,8 +3798,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->in.values[cntr_values_1]);
free(idx_1);
}
@@ -3828,8 +3827,7 @@ _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_values_1=0;cntr_values_1<r->in.num_values;cntr_values_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_values_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_values_1) != -1) {
ndr_print_QueryMultipleValue(ndr, "values", &r->out.values[cntr_values_1]);
free(idx_1);
}
diff --git a/source3/librpc/gen_ndr/ndr_wkssvc.c b/source3/librpc/gen_ndr/ndr_wkssvc.c
index 096c0b2c72..80ea67526e 100644
--- a/source3/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source3/librpc/gen_ndr/ndr_wkssvc.c
@@ -3071,8 +3071,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr0(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_user0_1=0;cntr_user0_1<r->entries_read;cntr_user0_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_user0_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_user0_1) != -1) {
ndr_print_wkssvc_NetrWkstaUserInfo0(ndr, "user0", &r->user0[cntr_user0_1]);
free(idx_1);
}
@@ -3317,8 +3316,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaEnumUsersCtr1(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_user1_1=0;cntr_user1_1<r->entries_read;cntr_user1_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_user1_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_user1_1) != -1) {
ndr_print_wkssvc_NetrWkstaUserInfo1(ndr, "user1", &r->user1[cntr_user1_1]);
free(idx_1);
}
@@ -3909,8 +3907,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetWkstaTransportCtr0(struct ndr_print *ndr, cons
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetWkstaTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4867,8 +4864,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr2(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo2(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -4954,8 +4950,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr1(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo1(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5041,8 +5036,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrUseEnumCtr0(struct ndr_print *ndr, const char
ndr->depth++;
for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_array_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
ndr_print_wkssvc_NetrUseInfo0(ndr, "array", &r->array[cntr_array_1]);
free(idx_1);
}
@@ -5666,8 +5660,7 @@ _PUBLIC_ void ndr_print_wkssvc_ComputerNamesCtr(struct ndr_print *ndr, const cha
ndr->depth++;
for (cntr_computer_name_1=0;cntr_computer_name_1<r->count;cntr_computer_name_1++) {
char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_computer_name_1);
- if (idx_1) {
+ if (asprintf(&idx_1, "[%d]", cntr_computer_name_1) != -1) {
ndr_print_lsa_String(ndr, "computer_name", &r->computer_name[cntr_computer_name_1]);
free(idx_1);
}
@@ -8836,8 +8829,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus(struct ndr_print *ndr, const c
ndr->depth++;
for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) {
char *idx_2=NULL;
- asprintf(&idx_2, "[%d]", cntr_ous_2);
- if (idx_2) {
+ if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) {
ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
ndr->depth++;
if ((*r->out.ous)[cntr_ous_2]) {
@@ -9757,8 +9749,7 @@ _PUBLIC_ void ndr_print_wkssvc_NetrGetJoinableOus2(struct ndr_print *ndr, const
ndr->depth++;
for (cntr_ous_2=0;cntr_ous_2<*r->out.num_ous;cntr_ous_2++) {
char *idx_2=NULL;
- asprintf(&idx_2, "[%d]", cntr_ous_2);
- if (idx_2) {
+ if (asprintf(&idx_2, "[%d]", cntr_ous_2) != -1) {
ndr_print_ptr(ndr, "ous", (*r->out.ous)[cntr_ous_2]);
ndr->depth++;
if ((*r->out.ous)[cntr_ous_2]) {
diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c
index 425ad814bf..46c4249d21 100644
--- a/source3/librpc/gen_ndr/ndr_xattr.c
+++ b/source3/librpc/gen_ndr/ndr_xattr.c
@@ -91,8 +91,7 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons
ndr->depth++;
for (cntr_xattrs_0=0;cntr_xattrs_0<r->num_xattrs;cntr_xattrs_0++) {
char *idx_0=NULL;
- asprintf(&idx_0, "[%d]", cntr_xattrs_0);
- if (idx_0) {
+ if (asprintf(&idx_0, "[%d]", cntr_xattrs_0) != -1) {
ndr_print_tdb_xattr(ndr, "xattrs", &r->xattrs[cntr_xattrs_0]);
free(idx_0);
}
diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h
index ef2218c0f2..058e5e7fb0 100644
--- a/source3/librpc/gen_ndr/netlogon.h
+++ b/source3/librpc/gen_ndr/netlogon.h
@@ -603,6 +603,7 @@ union netr_CONTROL_QUERY_INFORMATION {
enum netr_LogonControlCode
#ifndef USE_UINT_ENUMS
{
+ NETLOGON_CONTROL_SYNC=2,
NETLOGON_CONTROL_REDISCOVER=5,
NETLOGON_CONTROL_TC_QUERY=6,
NETLOGON_CONTROL_TRANSPORT_NOTIFY=7,
@@ -610,6 +611,7 @@ enum netr_LogonControlCode
}
#else
{ __donnot_use_enum_netr_LogonControlCode=0x7FFFFFFF}
+#define NETLOGON_CONTROL_SYNC ( 2 )
#define NETLOGON_CONTROL_REDISCOVER ( 5 )
#define NETLOGON_CONTROL_TC_QUERY ( 6 )
#define NETLOGON_CONTROL_TRANSPORT_NOTIFY ( 7 )
@@ -849,7 +851,7 @@ struct netr_LogonSamLogon {
const char *computer_name;/* [unique,charset(UTF16)] */
struct netr_Authenticator *credential;/* [unique] */
uint16_t logon_level;
- union netr_LogonLevel logon;/* [switch_is(logon_level)] */
+ union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
uint16_t validation_level;
struct netr_Authenticator *return_authenticator;/* [unique] */
} in;
@@ -890,7 +892,7 @@ struct netr_ServerReqChallenge {
} in;
struct {
- struct netr_Credential *credentials;/* [ref] */
+ struct netr_Credential *return_credentials;/* [ref] */
NTSTATUS result;
} out;
@@ -907,7 +909,7 @@ struct netr_ServerAuthenticate {
} in;
struct {
- struct netr_Credential *credentials;/* [ref] */
+ struct netr_Credential *return_credentials;/* [ref] */
NTSTATUS result;
} out;
@@ -920,8 +922,8 @@ struct netr_ServerPasswordSet {
const char *account_name;/* [charset(UTF16)] */
enum netr_SchannelType secure_channel_type;
const char *computer_name;/* [charset(UTF16)] */
- struct netr_Authenticator credential;
- struct samr_Password new_password;
+ struct netr_Authenticator *credential;/* [ref] */
+ struct samr_Password *new_password;/* [ref] */
} in;
struct {
@@ -936,7 +938,7 @@ struct netr_DatabaseDeltas {
struct {
const char *logon_server;/* [charset(UTF16)] */
const char *computername;/* [charset(UTF16)] */
- struct netr_Authenticator credential;
+ struct netr_Authenticator *credential;/* [ref] */
enum netr_SamDatabaseID database_id;
uint32_t preferredmaximumlength;
struct netr_Authenticator *return_authenticator;/* [ref] */
@@ -944,7 +946,7 @@ struct netr_DatabaseDeltas {
} in;
struct {
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
struct netr_Authenticator *return_authenticator;/* [ref] */
uint64_t *sequence_num;/* [ref] */
NTSTATUS result;
@@ -1071,7 +1073,7 @@ struct netr_LogonControl2 {
const char *logon_server;/* [unique,charset(UTF16)] */
uint32_t function_code;
uint32_t level;
- union netr_CONTROL_DATA_INFORMATION data;/* [switch_is(function_code)] */
+ union netr_CONTROL_DATA_INFORMATION *data;/* [ref,switch_is(function_code)] */
} in;
struct {
@@ -1093,7 +1095,7 @@ struct netr_ServerAuthenticate2 {
} in;
struct {
- struct netr_Credential *credentials;/* [ref] */
+ struct netr_Credential *return_credentials;/* [ref] */
uint32_t *negotiate_flags;/* [ref] */
NTSTATUS result;
} out;
@@ -1105,7 +1107,7 @@ struct netr_DatabaseSync2 {
struct {
const char *logon_server;/* [charset(UTF16)] */
const char *computername;/* [charset(UTF16)] */
- struct netr_Authenticator credential;
+ struct netr_Authenticator *credential;/* [ref] */
enum netr_SamDatabaseID database_id;
uint16_t restart_state;
uint32_t preferredmaximumlength;
@@ -1114,7 +1116,7 @@ struct netr_DatabaseSync2 {
} in;
struct {
- struct netr_DELTA_ENUM_ARRAY *delta_enum_array;/* [ref] */
+ struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
struct netr_Authenticator *return_authenticator;/* [ref] */
uint32_t *sync_context;/* [ref] */
NTSTATUS result;
@@ -1435,7 +1437,7 @@ struct netr_LogonSamLogonEx {
const char *server_name;/* [unique,charset(UTF16)] */
const char *computer_name;/* [unique,charset(UTF16)] */
uint16_t logon_level;
- union netr_LogonLevel logon;/* [switch_is(logon_level)] */
+ union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
uint16_t validation_level;
uint32_t *flags;/* [ref] */
} in;
diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h
new file mode 100644
index 0000000000..9cdfa656b4
--- /dev/null
+++ b/source3/librpc/gen_ndr/ntsvcs.h
@@ -0,0 +1,568 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#ifndef _HEADER_ntsvcs
+#define _HEADER_ntsvcs
+
+struct PNP_HwProfInfo {
+ uint32_t unknown1;
+ uint16_t unknown2[160];
+ uint32_t unknown3;
+};
+
+
+struct PNP_Disconnect {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_Connect {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetVersion {
+ struct {
+ uint16_t *version;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetGlobalState {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_InitDetection {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_ReportLogOn {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_ValidateDeviceInstance {
+ struct {
+ const char *devicepath;/* [ref,charset(UTF16)] */
+ uint32_t flags;
+ } in;
+
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetRootDeviceInstance {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetRelatedDeviceInstance {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_EnumerateSubKeys {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetDeviceList {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetDeviceListSize {
+ struct {
+ const char *devicename;/* [unique,charset(UTF16)] */
+ uint32_t flags;
+ } in;
+
+ struct {
+ uint32_t *size;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetDepth {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetDeviceRegProp {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_SetDeviceRegProp {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetClassInstance {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_CreateKey {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_DeleteRegistryKey {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetClassCount {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetClassName {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_DeleteClassKey {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetInterfaceDeviceAlias {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetInterfaceDeviceList {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetInterfaceDeviceListSize {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RegisterDeviceClassAssociation {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_UnregisterDeviceClassAssociation {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetClassRegProp {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_SetClassRegProp {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_CreateDevInst {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_DeviceInstanceAction {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetDeviceStatus {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_SetDeviceProblem {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_DisableDevInst {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_UninstallDevInst {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_AddID {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RegisterDriver {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_QueryRemove {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RequestDeviceEject {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_IsDockStationPresent {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RequestEjectPC {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_HwProfFlags {
+ struct {
+ uint32_t unknown1;
+ const char *devicepath;/* [ref,charset(UTF16)] */
+ uint32_t unknown2;
+ const char *unknown5;/* [unique,charset(UTF16)] */
+ uint32_t unknown6;
+ uint32_t unknown7;
+ uint32_t *unknown3;/* [ref] */
+ uint16_t *unknown4;/* [unique] */
+ } in;
+
+ struct {
+ const char **unknown5a;/* [unique,charset(UTF16)] */
+ uint32_t *unknown3;/* [ref] */
+ uint16_t *unknown4;/* [unique] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetHwProfInfo {
+ struct {
+ uint32_t idx;
+ uint32_t unknown1;
+ uint32_t unknown2;
+ struct PNP_HwProfInfo *info;/* [ref] */
+ } in;
+
+ struct {
+ struct PNP_HwProfInfo *info;/* [ref] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_AddEmptyLogConf {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_FreeLogConf {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetFirstLogConf {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetNextLogConf {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetLogConfPriority {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_AddResDes {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_FreeResDes {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetNextResDes {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetResDesData {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetResDesDataSize {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_ModifyResDes {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_DetectResourceLimit {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_QueryResConfList {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_SetHwProf {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_QueryArbitratorFreeData {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_QueryArbitratorFreeSize {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RunDetection {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_RegisterNotification {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_UnregisterNotification {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetCustomDevProp {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetVersionInternal {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetBlockedDriverInfo {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct PNP_GetServerSideDeviceInstallFlags {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+#endif /* _HEADER_ntsvcs */
diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h
index dff4bf80f0..c0e2d9d9a9 100644
--- a/source3/librpc/gen_ndr/samr.h
+++ b/source3/librpc/gen_ndr/samr.h
@@ -8,7 +8,11 @@
#ifndef _HEADER_samr
#define _HEADER_samr
+#define MAX_SAM_ENTRIES_W2K ( 0x400 )
+#define MAX_SAM_ENTRIES_W95 ( 50 )
#define SAMR_ENUM_USERS_MULTIPLIER ( 54 )
+#define PASS_MUST_CHANGE_AT_NEXT_LOGON ( 0x01 )
+#define PASS_DONT_CHANGE_AT_NEXT_LOGON ( 0x00 )
/* bitmap samr_AcctFlags */
#define ACB_DISABLED ( 0x00000001 )
#define ACB_HOMDIRREQ ( 0x00000002 )
@@ -590,7 +594,7 @@ struct samr_DispInfoFullGroups {
struct samr_DispEntryAscii {
uint32_t idx;
- struct lsa_AsciiString account_name;
+ struct lsa_AsciiStringLarge account_name;
};
struct samr_DispInfoAscii {
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index b4600017bc..1ce0448469 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -1128,7 +1128,7 @@ static bool api_lsa_LookupNames(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -1210,7 +1210,7 @@ static bool api_lsa_LookupSids(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -1452,7 +1452,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet);
+ r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet *);
if (r->out.privs == NULL) {
talloc_free(r);
return false;
@@ -4437,7 +4437,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -4519,7 +4519,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -5258,7 +5258,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -5858,7 +5858,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
@@ -5940,7 +5940,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.domains = talloc_zero(r, struct lsa_RefDomainList);
+ r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c
index 808493463a..67876f11ef 100644
--- a/source3/librpc/gen_ndr/srv_netlogon.c
+++ b/source3/librpc/gen_ndr/srv_netlogon.c
@@ -367,7 +367,12 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.credentials = r->in.credentials;
+ r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+ if (r->out.return_credentials == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _netr_ServerReqChallenge(p, r);
if (p->rng_fault_state) {
@@ -442,7 +447,12 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.credentials = r->in.credentials;
+ r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+ if (r->out.return_credentials == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _netr_ServerAuthenticate(p, r);
if (p->rng_fault_state) {
@@ -599,7 +609,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.return_authenticator = r->in.return_authenticator;
r->out.sequence_num = r->in.sequence_num;
- r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
+ r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *);
if (r->out.delta_enum_array == NULL) {
talloc_free(r);
return false;
@@ -1280,7 +1290,12 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.credentials = r->in.credentials;
+ r->out.return_credentials = talloc_zero(r, struct netr_Credential);
+ if (r->out.return_credentials == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.negotiate_flags = r->in.negotiate_flags;
r->out.result = _netr_ServerAuthenticate2(p, r);
@@ -1358,7 +1373,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.return_authenticator = r->in.return_authenticator;
r->out.sync_context = r->in.sync_context;
- r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
+ r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *);
if (r->out.delta_enum_array == NULL) {
talloc_free(r);
return false;
diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c
new file mode 100644
index 0000000000..339de6c747
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_ntsvcs.c
@@ -0,0 +1,4859 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_ntsvcs.h"
+
+static bool api_PNP_Disconnect(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_Disconnect *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DISCONNECT];
+
+ r = talloc(talloc_tos(), struct PNP_Disconnect);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_Disconnect, r);
+ }
+
+ r->out.result = _PNP_Disconnect(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_Connect(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_Connect *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_CONNECT];
+
+ r = talloc(talloc_tos(), struct PNP_Connect);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_Connect, r);
+ }
+
+ r->out.result = _PNP_Connect(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_Connect, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetVersion(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetVersion *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSION];
+
+ r = talloc(talloc_tos(), struct PNP_GetVersion);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetVersion, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.version = talloc_zero(r, uint16_t);
+ if (r->out.version == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.result = _PNP_GetVersion(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetGlobalState(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetGlobalState *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETGLOBALSTATE];
+
+ r = talloc(talloc_tos(), struct PNP_GetGlobalState);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, r);
+ }
+
+ r->out.result = _PNP_GetGlobalState(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_InitDetection(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_InitDetection *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_INITDETECTION];
+
+ r = talloc(talloc_tos(), struct PNP_InitDetection);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_InitDetection, r);
+ }
+
+ r->out.result = _PNP_InitDetection(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_ReportLogOn(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_ReportLogOn *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REPORTLOGON];
+
+ r = talloc(talloc_tos(), struct PNP_ReportLogOn);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, r);
+ }
+
+ r->out.result = _PNP_ReportLogOn(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_ValidateDeviceInstance(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_ValidateDeviceInstance *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_VALIDATEDEVICEINSTANCE];
+
+ r = talloc(talloc_tos(), struct PNP_ValidateDeviceInstance);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, r);
+ }
+
+ r->out.result = _PNP_ValidateDeviceInstance(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetRootDeviceInstance(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetRootDeviceInstance *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETROOTDEVICEINSTANCE];
+
+ r = talloc(talloc_tos(), struct PNP_GetRootDeviceInstance);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, r);
+ }
+
+ r->out.result = _PNP_GetRootDeviceInstance(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetRelatedDeviceInstance *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRELATEDDEVICEINSTANCE];
+
+ r = talloc(talloc_tos(), struct PNP_GetRelatedDeviceInstance);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, r);
+ }
+
+ r->out.result = _PNP_GetRelatedDeviceInstance(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_EnumerateSubKeys(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_EnumerateSubKeys *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_ENUMERATESUBKEYS];
+
+ r = talloc(talloc_tos(), struct PNP_EnumerateSubKeys);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, r);
+ }
+
+ r->out.result = _PNP_EnumerateSubKeys(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetDeviceList(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetDeviceList *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELIST];
+
+ r = talloc(talloc_tos(), struct PNP_GetDeviceList);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
+ }
+
+ r->out.result = _PNP_GetDeviceList(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetDeviceListSize(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetDeviceListSize *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELISTSIZE];
+
+ r = talloc(talloc_tos(), struct PNP_GetDeviceListSize);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.size = talloc_zero(r, uint32_t);
+ if (r->out.size == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.result = _PNP_GetDeviceListSize(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetDepth(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetDepth *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEPTH];
+
+ r = talloc(talloc_tos(), struct PNP_GetDepth);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDepth, r);
+ }
+
+ r->out.result = _PNP_GetDepth(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetDeviceRegProp *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICEREGPROP];
+
+ r = talloc(talloc_tos(), struct PNP_GetDeviceRegProp);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r);
+ }
+
+ r->out.result = _PNP_GetDeviceRegProp(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_SetDeviceRegProp(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_SetDeviceRegProp *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEREGPROP];
+
+ r = talloc(talloc_tos(), struct PNP_SetDeviceRegProp);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r);
+ }
+
+ r->out.result = _PNP_SetDeviceRegProp(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetClassInstance(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetClassInstance *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSINSTANCE];
+
+ r = talloc(talloc_tos(), struct PNP_GetClassInstance);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r);
+ }
+
+ r->out.result = _PNP_GetClassInstance(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_CreateKey(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_CreateKey *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEKEY];
+
+ r = talloc(talloc_tos(), struct PNP_CreateKey);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_CreateKey, r);
+ }
+
+ r->out.result = _PNP_CreateKey(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_DeleteRegistryKey(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_DeleteRegistryKey *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETEREGISTRYKEY];
+
+ r = talloc(talloc_tos(), struct PNP_DeleteRegistryKey);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r);
+ }
+
+ r->out.result = _PNP_DeleteRegistryKey(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetClassCount(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetClassCount *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSCOUNT];
+
+ r = talloc(talloc_tos(), struct PNP_GetClassCount);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r);
+ }
+
+ r->out.result = _PNP_GetClassCount(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetClassName(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetClassName *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSNAME];
+
+ r = talloc(talloc_tos(), struct PNP_GetClassName);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassName, r);
+ }
+
+ r->out.result = _PNP_GetClassName(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_DeleteClassKey(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_DeleteClassKey *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETECLASSKEY];
+
+ r = talloc(talloc_tos(), struct PNP_DeleteClassKey);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r);
+ }
+
+ r->out.result = _PNP_DeleteClassKey(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetInterfaceDeviceAlias *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICEALIAS];
+
+ r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceAlias);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r);
+ }
+
+ r->out.result = _PNP_GetInterfaceDeviceAlias(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetInterfaceDeviceList *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELIST];
+
+ r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceList);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r);
+ }
+
+ r->out.result = _PNP_GetInterfaceDeviceList(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetInterfaceDeviceListSize *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELISTSIZE];
+
+ r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceListSize);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r);
+ }
+
+ r->out.result = _PNP_GetInterfaceDeviceListSize(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RegisterDeviceClassAssociation *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDEVICECLASSASSOCIATION];
+
+ r = talloc(talloc_tos(), struct PNP_RegisterDeviceClassAssociation);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r);
+ }
+
+ r->out.result = _PNP_RegisterDeviceClassAssociation(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_UnregisterDeviceClassAssociation *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION];
+
+ r = talloc(talloc_tos(), struct PNP_UnregisterDeviceClassAssociation);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
+ }
+
+ r->out.result = _PNP_UnregisterDeviceClassAssociation(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetClassRegProp(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetClassRegProp *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSREGPROP];
+
+ r = talloc(talloc_tos(), struct PNP_GetClassRegProp);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r);
+ }
+
+ r->out.result = _PNP_GetClassRegProp(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_SetClassRegProp(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_SetClassRegProp *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_SETCLASSREGPROP];
+
+ r = talloc(talloc_tos(), struct PNP_SetClassRegProp);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r);
+ }
+
+ r->out.result = _PNP_SetClassRegProp(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_CreateDevInst(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_CreateDevInst *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEDEVINST];
+
+ r = talloc(talloc_tos(), struct PNP_CreateDevInst);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r);
+ }
+
+ r->out.result = _PNP_CreateDevInst(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_DeviceInstanceAction(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_DeviceInstanceAction *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DEVICEINSTANCEACTION];
+
+ r = talloc(talloc_tos(), struct PNP_DeviceInstanceAction);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r);
+ }
+
+ r->out.result = _PNP_DeviceInstanceAction(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetDeviceStatus(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetDeviceStatus *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICESTATUS];
+
+ r = talloc(talloc_tos(), struct PNP_GetDeviceStatus);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r);
+ }
+
+ r->out.result = _PNP_GetDeviceStatus(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_SetDeviceProblem(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_SetDeviceProblem *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEPROBLEM];
+
+ r = talloc(talloc_tos(), struct PNP_SetDeviceProblem);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r);
+ }
+
+ r->out.result = _PNP_SetDeviceProblem(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_DisableDevInst(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_DisableDevInst *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DISABLEDEVINST];
+
+ r = talloc(talloc_tos(), struct PNP_DisableDevInst);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r);
+ }
+
+ r->out.result = _PNP_DisableDevInst(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_UninstallDevInst(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_UninstallDevInst *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_UNINSTALLDEVINST];
+
+ r = talloc(talloc_tos(), struct PNP_UninstallDevInst);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r);
+ }
+
+ r->out.result = _PNP_UninstallDevInst(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_AddID(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_AddID *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDID];
+
+ r = talloc(talloc_tos(), struct PNP_AddID);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddID, r);
+ }
+
+ r->out.result = _PNP_AddID(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddID, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RegisterDriver(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RegisterDriver *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDRIVER];
+
+ r = talloc(talloc_tos(), struct PNP_RegisterDriver);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r);
+ }
+
+ r->out.result = _PNP_RegisterDriver(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_QueryRemove(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_QueryRemove *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYREMOVE];
+
+ r = talloc(talloc_tos(), struct PNP_QueryRemove);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r);
+ }
+
+ r->out.result = _PNP_QueryRemove(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RequestDeviceEject(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RequestDeviceEject *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTDEVICEEJECT];
+
+ r = talloc(talloc_tos(), struct PNP_RequestDeviceEject);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r);
+ }
+
+ r->out.result = _PNP_RequestDeviceEject(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_IsDockStationPresent(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_IsDockStationPresent *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_ISDOCKSTATIONPRESENT];
+
+ r = talloc(talloc_tos(), struct PNP_IsDockStationPresent);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r);
+ }
+
+ r->out.result = _PNP_IsDockStationPresent(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RequestEjectPC(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RequestEjectPC *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTEJECTPC];
+
+ r = talloc(talloc_tos(), struct PNP_RequestEjectPC);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r);
+ }
+
+ r->out.result = _PNP_RequestEjectPC(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_HwProfFlags(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_HwProfFlags *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_HWPROFFLAGS];
+
+ r = talloc(talloc_tos(), struct PNP_HwProfFlags);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.unknown3 = r->in.unknown3;
+ r->out.unknown4 = r->in.unknown4;
+ r->out.unknown5a = talloc_zero(r, const char *);
+ if (r->out.unknown5a == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.result = _PNP_HwProfFlags(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetHwProfInfo(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetHwProfInfo *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETHWPROFINFO];
+
+ r = talloc(talloc_tos(), struct PNP_GetHwProfInfo);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.info = r->in.info;
+ r->out.result = _PNP_GetHwProfInfo(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_AddEmptyLogConf(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_AddEmptyLogConf *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDEMPTYLOGCONF];
+
+ r = talloc(talloc_tos(), struct PNP_AddEmptyLogConf);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r);
+ }
+
+ r->out.result = _PNP_AddEmptyLogConf(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_FreeLogConf(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_FreeLogConf *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_FREELOGCONF];
+
+ r = talloc(talloc_tos(), struct PNP_FreeLogConf);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r);
+ }
+
+ r->out.result = _PNP_FreeLogConf(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetFirstLogConf(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetFirstLogConf *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETFIRSTLOGCONF];
+
+ r = talloc(talloc_tos(), struct PNP_GetFirstLogConf);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r);
+ }
+
+ r->out.result = _PNP_GetFirstLogConf(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetNextLogConf(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetNextLogConf *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTLOGCONF];
+
+ r = talloc(talloc_tos(), struct PNP_GetNextLogConf);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r);
+ }
+
+ r->out.result = _PNP_GetNextLogConf(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetLogConfPriority(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetLogConfPriority *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETLOGCONFPRIORITY];
+
+ r = talloc(talloc_tos(), struct PNP_GetLogConfPriority);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r);
+ }
+
+ r->out.result = _PNP_GetLogConfPriority(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_AddResDes(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_AddResDes *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDRESDES];
+
+ r = talloc(talloc_tos(), struct PNP_AddResDes);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_AddResDes, r);
+ }
+
+ r->out.result = _PNP_AddResDes(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_FreeResDes(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_FreeResDes *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_FREERESDES];
+
+ r = talloc(talloc_tos(), struct PNP_FreeResDes);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r);
+ }
+
+ r->out.result = _PNP_FreeResDes(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetNextResDes(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetNextResDes *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTRESDES];
+
+ r = talloc(talloc_tos(), struct PNP_GetNextResDes);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r);
+ }
+
+ r->out.result = _PNP_GetNextResDes(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetResDesData(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetResDesData *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATA];
+
+ r = talloc(talloc_tos(), struct PNP_GetResDesData);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r);
+ }
+
+ r->out.result = _PNP_GetResDesData(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetResDesDataSize(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetResDesDataSize *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATASIZE];
+
+ r = talloc(talloc_tos(), struct PNP_GetResDesDataSize);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r);
+ }
+
+ r->out.result = _PNP_GetResDesDataSize(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_ModifyResDes(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_ModifyResDes *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_MODIFYRESDES];
+
+ r = talloc(talloc_tos(), struct PNP_ModifyResDes);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r);
+ }
+
+ r->out.result = _PNP_ModifyResDes(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_DetectResourceLimit(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_DetectResourceLimit *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_DETECTRESOURCELIMIT];
+
+ r = talloc(talloc_tos(), struct PNP_DetectResourceLimit);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r);
+ }
+
+ r->out.result = _PNP_DetectResourceLimit(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_QueryResConfList(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_QueryResConfList *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYRESCONFLIST];
+
+ r = talloc(talloc_tos(), struct PNP_QueryResConfList);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r);
+ }
+
+ r->out.result = _PNP_QueryResConfList(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_SetHwProf(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_SetHwProf *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_SETHWPROF];
+
+ r = talloc(talloc_tos(), struct PNP_SetHwProf);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r);
+ }
+
+ r->out.result = _PNP_SetHwProf(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_QueryArbitratorFreeData *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREEDATA];
+
+ r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeData);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r);
+ }
+
+ r->out.result = _PNP_QueryArbitratorFreeData(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_QueryArbitratorFreeSize *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREESIZE];
+
+ r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeSize);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r);
+ }
+
+ r->out.result = _PNP_QueryArbitratorFreeSize(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RunDetection(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RunDetection *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_RUNDETECTION];
+
+ r = talloc(talloc_tos(), struct PNP_RunDetection);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RunDetection, r);
+ }
+
+ r->out.result = _PNP_RunDetection(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_RegisterNotification(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_RegisterNotification *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERNOTIFICATION];
+
+ r = talloc(talloc_tos(), struct PNP_RegisterNotification);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r);
+ }
+
+ r->out.result = _PNP_RegisterNotification(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_UnregisterNotification(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_UnregisterNotification *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERNOTIFICATION];
+
+ r = talloc(talloc_tos(), struct PNP_UnregisterNotification);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r);
+ }
+
+ r->out.result = _PNP_UnregisterNotification(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetCustomDevProp(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetCustomDevProp *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCUSTOMDEVPROP];
+
+ r = talloc(talloc_tos(), struct PNP_GetCustomDevProp);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r);
+ }
+
+ r->out.result = _PNP_GetCustomDevProp(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetVersionInternal(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetVersionInternal *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSIONINTERNAL];
+
+ r = talloc(talloc_tos(), struct PNP_GetVersionInternal);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r);
+ }
+
+ r->out.result = _PNP_GetVersionInternal(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetBlockedDriverInfo *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETBLOCKEDDRIVERINFO];
+
+ r = talloc(talloc_tos(), struct PNP_GetBlockedDriverInfo);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r);
+ }
+
+ r->out.result = _PNP_GetBlockedDriverInfo(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct PNP_GetServerSideDeviceInstallFlags *r;
+
+ call = &ndr_table_ntsvcs.calls[NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS];
+
+ r = talloc(talloc_tos(), struct PNP_GetServerSideDeviceInstallFlags);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
+ }
+
+ r->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+
+/* Tables */
+static struct api_struct api_ntsvcs_cmds[] =
+{
+ {"PNP_DISCONNECT", NDR_PNP_DISCONNECT, api_PNP_Disconnect},
+ {"PNP_CONNECT", NDR_PNP_CONNECT, api_PNP_Connect},
+ {"PNP_GETVERSION", NDR_PNP_GETVERSION, api_PNP_GetVersion},
+ {"PNP_GETGLOBALSTATE", NDR_PNP_GETGLOBALSTATE, api_PNP_GetGlobalState},
+ {"PNP_INITDETECTION", NDR_PNP_INITDETECTION, api_PNP_InitDetection},
+ {"PNP_REPORTLOGON", NDR_PNP_REPORTLOGON, api_PNP_ReportLogOn},
+ {"PNP_VALIDATEDEVICEINSTANCE", NDR_PNP_VALIDATEDEVICEINSTANCE, api_PNP_ValidateDeviceInstance},
+ {"PNP_GETROOTDEVICEINSTANCE", NDR_PNP_GETROOTDEVICEINSTANCE, api_PNP_GetRootDeviceInstance},
+ {"PNP_GETRELATEDDEVICEINSTANCE", NDR_PNP_GETRELATEDDEVICEINSTANCE, api_PNP_GetRelatedDeviceInstance},
+ {"PNP_ENUMERATESUBKEYS", NDR_PNP_ENUMERATESUBKEYS, api_PNP_EnumerateSubKeys},
+ {"PNP_GETDEVICELIST", NDR_PNP_GETDEVICELIST, api_PNP_GetDeviceList},
+ {"PNP_GETDEVICELISTSIZE", NDR_PNP_GETDEVICELISTSIZE, api_PNP_GetDeviceListSize},
+ {"PNP_GETDEPTH", NDR_PNP_GETDEPTH, api_PNP_GetDepth},
+ {"PNP_GETDEVICEREGPROP", NDR_PNP_GETDEVICEREGPROP, api_PNP_GetDeviceRegProp},
+ {"PNP_SETDEVICEREGPROP", NDR_PNP_SETDEVICEREGPROP, api_PNP_SetDeviceRegProp},
+ {"PNP_GETCLASSINSTANCE", NDR_PNP_GETCLASSINSTANCE, api_PNP_GetClassInstance},
+ {"PNP_CREATEKEY", NDR_PNP_CREATEKEY, api_PNP_CreateKey},
+ {"PNP_DELETEREGISTRYKEY", NDR_PNP_DELETEREGISTRYKEY, api_PNP_DeleteRegistryKey},
+ {"PNP_GETCLASSCOUNT", NDR_PNP_GETCLASSCOUNT, api_PNP_GetClassCount},
+ {"PNP_GETCLASSNAME", NDR_PNP_GETCLASSNAME, api_PNP_GetClassName},
+ {"PNP_DELETECLASSKEY", NDR_PNP_DELETECLASSKEY, api_PNP_DeleteClassKey},
+ {"PNP_GETINTERFACEDEVICEALIAS", NDR_PNP_GETINTERFACEDEVICEALIAS, api_PNP_GetInterfaceDeviceAlias},
+ {"PNP_GETINTERFACEDEVICELIST", NDR_PNP_GETINTERFACEDEVICELIST, api_PNP_GetInterfaceDeviceList},
+ {"PNP_GETINTERFACEDEVICELISTSIZE", NDR_PNP_GETINTERFACEDEVICELISTSIZE, api_PNP_GetInterfaceDeviceListSize},
+ {"PNP_REGISTERDEVICECLASSASSOCIATION", NDR_PNP_REGISTERDEVICECLASSASSOCIATION, api_PNP_RegisterDeviceClassAssociation},
+ {"PNP_UNREGISTERDEVICECLASSASSOCIATION", NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, api_PNP_UnregisterDeviceClassAssociation},
+ {"PNP_GETCLASSREGPROP", NDR_PNP_GETCLASSREGPROP, api_PNP_GetClassRegProp},
+ {"PNP_SETCLASSREGPROP", NDR_PNP_SETCLASSREGPROP, api_PNP_SetClassRegProp},
+ {"PNP_CREATEDEVINST", NDR_PNP_CREATEDEVINST, api_PNP_CreateDevInst},
+ {"PNP_DEVICEINSTANCEACTION", NDR_PNP_DEVICEINSTANCEACTION, api_PNP_DeviceInstanceAction},
+ {"PNP_GETDEVICESTATUS", NDR_PNP_GETDEVICESTATUS, api_PNP_GetDeviceStatus},
+ {"PNP_SETDEVICEPROBLEM", NDR_PNP_SETDEVICEPROBLEM, api_PNP_SetDeviceProblem},
+ {"PNP_DISABLEDEVINST", NDR_PNP_DISABLEDEVINST, api_PNP_DisableDevInst},
+ {"PNP_UNINSTALLDEVINST", NDR_PNP_UNINSTALLDEVINST, api_PNP_UninstallDevInst},
+ {"PNP_ADDID", NDR_PNP_ADDID, api_PNP_AddID},
+ {"PNP_REGISTERDRIVER", NDR_PNP_REGISTERDRIVER, api_PNP_RegisterDriver},
+ {"PNP_QUERYREMOVE", NDR_PNP_QUERYREMOVE, api_PNP_QueryRemove},
+ {"PNP_REQUESTDEVICEEJECT", NDR_PNP_REQUESTDEVICEEJECT, api_PNP_RequestDeviceEject},
+ {"PNP_ISDOCKSTATIONPRESENT", NDR_PNP_ISDOCKSTATIONPRESENT, api_PNP_IsDockStationPresent},
+ {"PNP_REQUESTEJECTPC", NDR_PNP_REQUESTEJECTPC, api_PNP_RequestEjectPC},
+ {"PNP_HWPROFFLAGS", NDR_PNP_HWPROFFLAGS, api_PNP_HwProfFlags},
+ {"PNP_GETHWPROFINFO", NDR_PNP_GETHWPROFINFO, api_PNP_GetHwProfInfo},
+ {"PNP_ADDEMPTYLOGCONF", NDR_PNP_ADDEMPTYLOGCONF, api_PNP_AddEmptyLogConf},
+ {"PNP_FREELOGCONF", NDR_PNP_FREELOGCONF, api_PNP_FreeLogConf},
+ {"PNP_GETFIRSTLOGCONF", NDR_PNP_GETFIRSTLOGCONF, api_PNP_GetFirstLogConf},
+ {"PNP_GETNEXTLOGCONF", NDR_PNP_GETNEXTLOGCONF, api_PNP_GetNextLogConf},
+ {"PNP_GETLOGCONFPRIORITY", NDR_PNP_GETLOGCONFPRIORITY, api_PNP_GetLogConfPriority},
+ {"PNP_ADDRESDES", NDR_PNP_ADDRESDES, api_PNP_AddResDes},
+ {"PNP_FREERESDES", NDR_PNP_FREERESDES, api_PNP_FreeResDes},
+ {"PNP_GETNEXTRESDES", NDR_PNP_GETNEXTRESDES, api_PNP_GetNextResDes},
+ {"PNP_GETRESDESDATA", NDR_PNP_GETRESDESDATA, api_PNP_GetResDesData},
+ {"PNP_GETRESDESDATASIZE", NDR_PNP_GETRESDESDATASIZE, api_PNP_GetResDesDataSize},
+ {"PNP_MODIFYRESDES", NDR_PNP_MODIFYRESDES, api_PNP_ModifyResDes},
+ {"PNP_DETECTRESOURCELIMIT", NDR_PNP_DETECTRESOURCELIMIT, api_PNP_DetectResourceLimit},
+ {"PNP_QUERYRESCONFLIST", NDR_PNP_QUERYRESCONFLIST, api_PNP_QueryResConfList},
+ {"PNP_SETHWPROF", NDR_PNP_SETHWPROF, api_PNP_SetHwProf},
+ {"PNP_QUERYARBITRATORFREEDATA", NDR_PNP_QUERYARBITRATORFREEDATA, api_PNP_QueryArbitratorFreeData},
+ {"PNP_QUERYARBITRATORFREESIZE", NDR_PNP_QUERYARBITRATORFREESIZE, api_PNP_QueryArbitratorFreeSize},
+ {"PNP_RUNDETECTION", NDR_PNP_RUNDETECTION, api_PNP_RunDetection},
+ {"PNP_REGISTERNOTIFICATION", NDR_PNP_REGISTERNOTIFICATION, api_PNP_RegisterNotification},
+ {"PNP_UNREGISTERNOTIFICATION", NDR_PNP_UNREGISTERNOTIFICATION, api_PNP_UnregisterNotification},
+ {"PNP_GETCUSTOMDEVPROP", NDR_PNP_GETCUSTOMDEVPROP, api_PNP_GetCustomDevProp},
+ {"PNP_GETVERSIONINTERNAL", NDR_PNP_GETVERSIONINTERNAL, api_PNP_GetVersionInternal},
+ {"PNP_GETBLOCKEDDRIVERINFO", NDR_PNP_GETBLOCKEDDRIVERINFO, api_PNP_GetBlockedDriverInfo},
+ {"PNP_GETSERVERSIDEDEVICEINSTALLFLAGS", NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, api_PNP_GetServerSideDeviceInstallFlags},
+};
+
+void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_ntsvcs_cmds;
+ *n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_ntsvcs_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.h b/source3/librpc/gen_ndr/srv_ntsvcs.h
new file mode 100644
index 0000000000..c3969b11da
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_ntsvcs.h
@@ -0,0 +1,71 @@
+#include "librpc/gen_ndr/ndr_ntsvcs.h"
+#ifndef __SRV_NTSVCS__
+#define __SRV_NTSVCS__
+WERROR _PNP_Disconnect(pipes_struct *p, struct PNP_Disconnect *r);
+WERROR _PNP_Connect(pipes_struct *p, struct PNP_Connect *r);
+WERROR _PNP_GetVersion(pipes_struct *p, struct PNP_GetVersion *r);
+WERROR _PNP_GetGlobalState(pipes_struct *p, struct PNP_GetGlobalState *r);
+WERROR _PNP_InitDetection(pipes_struct *p, struct PNP_InitDetection *r);
+WERROR _PNP_ReportLogOn(pipes_struct *p, struct PNP_ReportLogOn *r);
+WERROR _PNP_ValidateDeviceInstance(pipes_struct *p, struct PNP_ValidateDeviceInstance *r);
+WERROR _PNP_GetRootDeviceInstance(pipes_struct *p, struct PNP_GetRootDeviceInstance *r);
+WERROR _PNP_GetRelatedDeviceInstance(pipes_struct *p, struct PNP_GetRelatedDeviceInstance *r);
+WERROR _PNP_EnumerateSubKeys(pipes_struct *p, struct PNP_EnumerateSubKeys *r);
+WERROR _PNP_GetDeviceList(pipes_struct *p, struct PNP_GetDeviceList *r);
+WERROR _PNP_GetDeviceListSize(pipes_struct *p, struct PNP_GetDeviceListSize *r);
+WERROR _PNP_GetDepth(pipes_struct *p, struct PNP_GetDepth *r);
+WERROR _PNP_GetDeviceRegProp(pipes_struct *p, struct PNP_GetDeviceRegProp *r);
+WERROR _PNP_SetDeviceRegProp(pipes_struct *p, struct PNP_SetDeviceRegProp *r);
+WERROR _PNP_GetClassInstance(pipes_struct *p, struct PNP_GetClassInstance *r);
+WERROR _PNP_CreateKey(pipes_struct *p, struct PNP_CreateKey *r);
+WERROR _PNP_DeleteRegistryKey(pipes_struct *p, struct PNP_DeleteRegistryKey *r);
+WERROR _PNP_GetClassCount(pipes_struct *p, struct PNP_GetClassCount *r);
+WERROR _PNP_GetClassName(pipes_struct *p, struct PNP_GetClassName *r);
+WERROR _PNP_DeleteClassKey(pipes_struct *p, struct PNP_DeleteClassKey *r);
+WERROR _PNP_GetInterfaceDeviceAlias(pipes_struct *p, struct PNP_GetInterfaceDeviceAlias *r);
+WERROR _PNP_GetInterfaceDeviceList(pipes_struct *p, struct PNP_GetInterfaceDeviceList *r);
+WERROR _PNP_GetInterfaceDeviceListSize(pipes_struct *p, struct PNP_GetInterfaceDeviceListSize *r);
+WERROR _PNP_RegisterDeviceClassAssociation(pipes_struct *p, struct PNP_RegisterDeviceClassAssociation *r);
+WERROR _PNP_UnregisterDeviceClassAssociation(pipes_struct *p, struct PNP_UnregisterDeviceClassAssociation *r);
+WERROR _PNP_GetClassRegProp(pipes_struct *p, struct PNP_GetClassRegProp *r);
+WERROR _PNP_SetClassRegProp(pipes_struct *p, struct PNP_SetClassRegProp *r);
+WERROR _PNP_CreateDevInst(pipes_struct *p, struct PNP_CreateDevInst *r);
+WERROR _PNP_DeviceInstanceAction(pipes_struct *p, struct PNP_DeviceInstanceAction *r);
+WERROR _PNP_GetDeviceStatus(pipes_struct *p, struct PNP_GetDeviceStatus *r);
+WERROR _PNP_SetDeviceProblem(pipes_struct *p, struct PNP_SetDeviceProblem *r);
+WERROR _PNP_DisableDevInst(pipes_struct *p, struct PNP_DisableDevInst *r);
+WERROR _PNP_UninstallDevInst(pipes_struct *p, struct PNP_UninstallDevInst *r);
+WERROR _PNP_AddID(pipes_struct *p, struct PNP_AddID *r);
+WERROR _PNP_RegisterDriver(pipes_struct *p, struct PNP_RegisterDriver *r);
+WERROR _PNP_QueryRemove(pipes_struct *p, struct PNP_QueryRemove *r);
+WERROR _PNP_RequestDeviceEject(pipes_struct *p, struct PNP_RequestDeviceEject *r);
+WERROR _PNP_IsDockStationPresent(pipes_struct *p, struct PNP_IsDockStationPresent *r);
+WERROR _PNP_RequestEjectPC(pipes_struct *p, struct PNP_RequestEjectPC *r);
+WERROR _PNP_HwProfFlags(pipes_struct *p, struct PNP_HwProfFlags *r);
+WERROR _PNP_GetHwProfInfo(pipes_struct *p, struct PNP_GetHwProfInfo *r);
+WERROR _PNP_AddEmptyLogConf(pipes_struct *p, struct PNP_AddEmptyLogConf *r);
+WERROR _PNP_FreeLogConf(pipes_struct *p, struct PNP_FreeLogConf *r);
+WERROR _PNP_GetFirstLogConf(pipes_struct *p, struct PNP_GetFirstLogConf *r);
+WERROR _PNP_GetNextLogConf(pipes_struct *p, struct PNP_GetNextLogConf *r);
+WERROR _PNP_GetLogConfPriority(pipes_struct *p, struct PNP_GetLogConfPriority *r);
+WERROR _PNP_AddResDes(pipes_struct *p, struct PNP_AddResDes *r);
+WERROR _PNP_FreeResDes(pipes_struct *p, struct PNP_FreeResDes *r);
+WERROR _PNP_GetNextResDes(pipes_struct *p, struct PNP_GetNextResDes *r);
+WERROR _PNP_GetResDesData(pipes_struct *p, struct PNP_GetResDesData *r);
+WERROR _PNP_GetResDesDataSize(pipes_struct *p, struct PNP_GetResDesDataSize *r);
+WERROR _PNP_ModifyResDes(pipes_struct *p, struct PNP_ModifyResDes *r);
+WERROR _PNP_DetectResourceLimit(pipes_struct *p, struct PNP_DetectResourceLimit *r);
+WERROR _PNP_QueryResConfList(pipes_struct *p, struct PNP_QueryResConfList *r);
+WERROR _PNP_SetHwProf(pipes_struct *p, struct PNP_SetHwProf *r);
+WERROR _PNP_QueryArbitratorFreeData(pipes_struct *p, struct PNP_QueryArbitratorFreeData *r);
+WERROR _PNP_QueryArbitratorFreeSize(pipes_struct *p, struct PNP_QueryArbitratorFreeSize *r);
+WERROR _PNP_RunDetection(pipes_struct *p, struct PNP_RunDetection *r);
+WERROR _PNP_RegisterNotification(pipes_struct *p, struct PNP_RegisterNotification *r);
+WERROR _PNP_UnregisterNotification(pipes_struct *p, struct PNP_UnregisterNotification *r);
+WERROR _PNP_GetCustomDevProp(pipes_struct *p, struct PNP_GetCustomDevProp *r);
+WERROR _PNP_GetVersionInternal(pipes_struct *p, struct PNP_GetVersionInternal *r);
+WERROR _PNP_GetBlockedDriverInfo(pipes_struct *p, struct PNP_GetBlockedDriverInfo *r);
+WERROR _PNP_GetServerSideDeviceInstallFlags(pipes_struct *p, struct PNP_GetServerSideDeviceInstallFlags *r);
+void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_ntsvcs_init(void);
+#endif /* __SRV_NTSVCS__ */
diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c
index afd458765e..75e586c716 100644
--- a/source3/librpc/gen_ndr/srv_srvsvc.c
+++ b/source3/librpc/gen_ndr/srv_srvsvc.c
@@ -2225,7 +2225,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero(r, struct srvsvc_NetRemoteTODInfo);
+ r->out.info = talloc_zero(r, struct srvsvc_NetRemoteTODInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c
index a7163917bd..10db320452 100644
--- a/source3/librpc/gen_ndr/srv_svcctl.c
+++ b/source3/librpc/gen_ndr/srv_svcctl.c
@@ -352,6 +352,19 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p)
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size);
+ if (r->out.buffer == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _svcctl_QueryServiceObjectSecurity(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c
deleted file mode 100644
index 6142bb113f..0000000000
--- a/source3/librpc/gen_ndr/srv_unixinfo.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * server auto-generated by pidl. DO NOT MODIFY!
- */
-
-#include "includes.h"
-#include "librpc/gen_ndr/srv_unixinfo.h"
-
-static bool api_unixinfo_SidToUid(pipes_struct *p)
-{
- const struct ndr_interface_call *call;
- struct ndr_pull *pull;
- struct ndr_push *push;
- enum ndr_err_code ndr_err;
- DATA_BLOB blob;
- struct unixinfo_SidToUid *r;
-
- call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID];
-
- r = talloc(talloc_tos(), struct unixinfo_SidToUid);
- if (r == NULL) {
- return false;
- }
-
- if (!prs_data_blob(&p->in_data.data, &blob, r)) {
- talloc_free(r);
- return false;
- }
-
- pull = ndr_pull_init_blob(&blob, r);
- if (pull == NULL) {
- talloc_free(r);
- return false;
- }
-
- pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- ndr_err = call->ndr_pull(pull, NDR_IN, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, r);
- }
-
- ZERO_STRUCT(r->out);
- r->out.uid = talloc_zero(r, uint64_t);
- if (r->out.uid == NULL) {
- talloc_free(r);
- return false;
- }
-
- r->out.result = _unixinfo_SidToUid(p, r);
-
- if (p->rng_fault_state) {
- talloc_free(r);
- /* Return true here, srv_pipe_hnd.c will take care */
- return true;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, r);
- }
-
- push = ndr_push_init_ctx(r);
- if (push == NULL) {
- talloc_free(r);
- return false;
- }
-
- ndr_err = call->ndr_push(push, NDR_OUT, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- blob = ndr_push_blob(push);
- if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
- talloc_free(r);
- return false;
- }
-
- talloc_free(r);
-
- return true;
-}
-
-static bool api_unixinfo_UidToSid(pipes_struct *p)
-{
- const struct ndr_interface_call *call;
- struct ndr_pull *pull;
- struct ndr_push *push;
- enum ndr_err_code ndr_err;
- DATA_BLOB blob;
- struct unixinfo_UidToSid *r;
-
- call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID];
-
- r = talloc(talloc_tos(), struct unixinfo_UidToSid);
- if (r == NULL) {
- return false;
- }
-
- if (!prs_data_blob(&p->in_data.data, &blob, r)) {
- talloc_free(r);
- return false;
- }
-
- pull = ndr_pull_init_blob(&blob, r);
- if (pull == NULL) {
- talloc_free(r);
- return false;
- }
-
- pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- ndr_err = call->ndr_pull(pull, NDR_IN, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, r);
- }
-
- ZERO_STRUCT(r->out);
- r->out.sid = talloc_zero(r, struct dom_sid);
- if (r->out.sid == NULL) {
- talloc_free(r);
- return false;
- }
-
- r->out.result = _unixinfo_UidToSid(p, r);
-
- if (p->rng_fault_state) {
- talloc_free(r);
- /* Return true here, srv_pipe_hnd.c will take care */
- return true;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, r);
- }
-
- push = ndr_push_init_ctx(r);
- if (push == NULL) {
- talloc_free(r);
- return false;
- }
-
- ndr_err = call->ndr_push(push, NDR_OUT, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- blob = ndr_push_blob(push);
- if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
- talloc_free(r);
- return false;
- }
-
- talloc_free(r);
-
- return true;
-}
-
-static bool api_unixinfo_SidToGid(pipes_struct *p)
-{
- const struct ndr_interface_call *call;
- struct ndr_pull *pull;
- struct ndr_push *push;
- enum ndr_err_code ndr_err;
- DATA_BLOB blob;
- struct unixinfo_SidToGid *r;
-
- call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID];
-
- r = talloc(talloc_tos(), struct unixinfo_SidToGid);
- if (r == NULL) {
- return false;
- }
-
- if (!prs_data_blob(&p->in_data.data, &blob, r)) {
- talloc_free(r);
- return false;
- }
-
- pull = ndr_pull_init_blob(&blob, r);
- if (pull == NULL) {
- talloc_free(r);
- return false;
- }
-
- pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- ndr_err = call->ndr_pull(pull, NDR_IN, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, r);
- }
-
- ZERO_STRUCT(r->out);
- r->out.gid = talloc_zero(r, uint64_t);
- if (r->out.gid == NULL) {
- talloc_free(r);
- return false;
- }
-
- r->out.result = _unixinfo_SidToGid(p, r);
-
- if (p->rng_fault_state) {
- talloc_free(r);
- /* Return true here, srv_pipe_hnd.c will take care */
- return true;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, r);
- }
-
- push = ndr_push_init_ctx(r);
- if (push == NULL) {
- talloc_free(r);
- return false;
- }
-
- ndr_err = call->ndr_push(push, NDR_OUT, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- blob = ndr_push_blob(push);
- if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
- talloc_free(r);
- return false;
- }
-
- talloc_free(r);
-
- return true;
-}
-
-static bool api_unixinfo_GidToSid(pipes_struct *p)
-{
- const struct ndr_interface_call *call;
- struct ndr_pull *pull;
- struct ndr_push *push;
- enum ndr_err_code ndr_err;
- DATA_BLOB blob;
- struct unixinfo_GidToSid *r;
-
- call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID];
-
- r = talloc(talloc_tos(), struct unixinfo_GidToSid);
- if (r == NULL) {
- return false;
- }
-
- if (!prs_data_blob(&p->in_data.data, &blob, r)) {
- talloc_free(r);
- return false;
- }
-
- pull = ndr_pull_init_blob(&blob, r);
- if (pull == NULL) {
- talloc_free(r);
- return false;
- }
-
- pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- ndr_err = call->ndr_pull(pull, NDR_IN, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, r);
- }
-
- ZERO_STRUCT(r->out);
- r->out.sid = talloc_zero(r, struct dom_sid);
- if (r->out.sid == NULL) {
- talloc_free(r);
- return false;
- }
-
- r->out.result = _unixinfo_GidToSid(p, r);
-
- if (p->rng_fault_state) {
- talloc_free(r);
- /* Return true here, srv_pipe_hnd.c will take care */
- return true;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, r);
- }
-
- push = ndr_push_init_ctx(r);
- if (push == NULL) {
- talloc_free(r);
- return false;
- }
-
- ndr_err = call->ndr_push(push, NDR_OUT, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- blob = ndr_push_blob(push);
- if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
- talloc_free(r);
- return false;
- }
-
- talloc_free(r);
-
- return true;
-}
-
-static bool api_unixinfo_GetPWUid(pipes_struct *p)
-{
- const struct ndr_interface_call *call;
- struct ndr_pull *pull;
- struct ndr_push *push;
- enum ndr_err_code ndr_err;
- DATA_BLOB blob;
- struct unixinfo_GetPWUid *r;
-
- call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID];
-
- r = talloc(talloc_tos(), struct unixinfo_GetPWUid);
- if (r == NULL) {
- return false;
- }
-
- if (!prs_data_blob(&p->in_data.data, &blob, r)) {
- talloc_free(r);
- return false;
- }
-
- pull = ndr_pull_init_blob(&blob, r);
- if (pull == NULL) {
- talloc_free(r);
- return false;
- }
-
- pull->flags |= LIBNDR_FLAG_REF_ALLOC;
- ndr_err = call->ndr_pull(pull, NDR_IN, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, r);
- }
-
- ZERO_STRUCT(r->out);
- r->out.count = r->in.count;
- r->out.infos = talloc_zero_array(r, struct unixinfo_GetPWUidInfo, *r->out.count);
- if (r->out.infos == NULL) {
- talloc_free(r);
- return false;
- }
-
- r->out.result = _unixinfo_GetPWUid(p, r);
-
- if (p->rng_fault_state) {
- talloc_free(r);
- /* Return true here, srv_pipe_hnd.c will take care */
- return true;
- }
-
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, r);
- }
-
- push = ndr_push_init_ctx(r);
- if (push == NULL) {
- talloc_free(r);
- return false;
- }
-
- ndr_err = call->ndr_push(push, NDR_OUT, r);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- talloc_free(r);
- return false;
- }
-
- blob = ndr_push_blob(push);
- if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
- talloc_free(r);
- return false;
- }
-
- talloc_free(r);
-
- return true;
-}
-
-
-/* Tables */
-static struct api_struct api_unixinfo_cmds[] =
-{
- {"UNIXINFO_SIDTOUID", NDR_UNIXINFO_SIDTOUID, api_unixinfo_SidToUid},
- {"UNIXINFO_UIDTOSID", NDR_UNIXINFO_UIDTOSID, api_unixinfo_UidToSid},
- {"UNIXINFO_SIDTOGID", NDR_UNIXINFO_SIDTOGID, api_unixinfo_SidToGid},
- {"UNIXINFO_GIDTOSID", NDR_UNIXINFO_GIDTOSID, api_unixinfo_GidToSid},
- {"UNIXINFO_GETPWUID", NDR_UNIXINFO_GETPWUID, api_unixinfo_GetPWUid},
-};
-
-void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns)
-{
- *fns = api_unixinfo_cmds;
- *n_fns = sizeof(api_unixinfo_cmds) / sizeof(struct api_struct);
-}
-
-NTSTATUS rpc_unixinfo_init(void)
-{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "unixinfo", "unixinfo", api_unixinfo_cmds, sizeof(api_unixinfo_cmds) / sizeof(struct api_struct));
-}
diff --git a/source3/librpc/gen_ndr/srv_unixinfo.h b/source3/librpc/gen_ndr/srv_unixinfo.h
deleted file mode 100644
index 6e5c033b61..0000000000
--- a/source3/librpc/gen_ndr/srv_unixinfo.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "librpc/gen_ndr/ndr_unixinfo.h"
-#ifndef __SRV_UNIXINFO__
-#define __SRV_UNIXINFO__
-NTSTATUS _unixinfo_SidToUid(pipes_struct *p, struct unixinfo_SidToUid *r);
-NTSTATUS _unixinfo_UidToSid(pipes_struct *p, struct unixinfo_UidToSid *r);
-NTSTATUS _unixinfo_SidToGid(pipes_struct *p, struct unixinfo_SidToGid *r);
-NTSTATUS _unixinfo_GidToSid(pipes_struct *p, struct unixinfo_GidToSid *r);
-NTSTATUS _unixinfo_GetPWUid(pipes_struct *p, struct unixinfo_GetPWUid *r);
-void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns);
-NTSTATUS rpc_unixinfo_init(void);
-#endif /* __SRV_UNIXINFO__ */
diff --git a/source3/librpc/gen_ndr/srvsvc.h b/source3/librpc/gen_ndr/srvsvc.h
index 6e6c7829a0..cede81e837 100644
--- a/source3/librpc/gen_ndr/srvsvc.h
+++ b/source3/librpc/gen_ndr/srvsvc.h
@@ -1299,7 +1299,7 @@ struct srvsvc_NetShareSetInfo {
const char *server_unc;/* [unique,charset(UTF16)] */
const char *share_name;/* [charset(UTF16)] */
uint32_t level;
- union srvsvc_NetShareInfo info;/* [switch_is(level)] */
+ union srvsvc_NetShareInfo *info;/* [ref,switch_is(level)] */
uint32_t *parm_error;/* [unique] */
} in;
@@ -1371,7 +1371,7 @@ struct srvsvc_NetSrvSetInfo {
struct {
const char *server_unc;/* [unique,charset(UTF16)] */
uint32_t level;
- union srvsvc_NetSrvInfo info;/* [switch_is(level)] */
+ union srvsvc_NetSrvInfo *info;/* [ref,switch_is(level)] */
uint32_t *parm_error;/* [unique] */
} in;
@@ -1472,7 +1472,7 @@ struct srvsvc_NetRemoteTOD {
} in;
struct {
- struct srvsvc_NetRemoteTODInfo *info;/* [unique] */
+ struct srvsvc_NetRemoteTODInfo **info;/* [ref] */
WERROR result;
} out;
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
index 7314be0a33..c13e96b2a0 100644
--- a/source3/librpc/gen_ndr/svcctl.h
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -134,6 +134,14 @@ struct svcctl_LockServiceDatabase {
struct svcctl_QueryServiceObjectSecurity {
struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t security_flags;
+ uint32_t buffer_size;/* [range(0,0x40000)] */
+ } in;
+
+ struct {
+ uint8_t *buffer;/* [ref,size_is(buffer_size)] */
+ uint32_t *needed;/* [ref,range(0,0x40000)] */
WERROR result;
} out;
@@ -142,6 +150,13 @@ struct svcctl_QueryServiceObjectSecurity {
struct svcctl_SetServiceObjectSecurity {
struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t security_flags;
+ uint8_t *buffer;/* [ref,size_is(buffer_size)] */
+ uint32_t buffer_size;
+ } in;
+
+ struct {
WERROR result;
} out;
diff --git a/source3/librpc/gen_ndr/unixinfo.h b/source3/librpc/gen_ndr/unixinfo.h
deleted file mode 100644
index bfe0934ccd..0000000000
--- a/source3/librpc/gen_ndr/unixinfo.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* header auto-generated by pidl */
-
-#include <stdint.h>
-
-#include "librpc/gen_ndr/security.h"
-#ifndef _HEADER_unixinfo
-#define _HEADER_unixinfo
-
-struct unixinfo_GetPWUidInfo {
- NTSTATUS status;
- const char * homedir;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */
- const char * shell;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */
-};
-
-
-struct unixinfo_SidToUid {
- struct {
- struct dom_sid sid;
- } in;
-
- struct {
- uint64_t *uid;/* [ref] */
- NTSTATUS result;
- } out;
-
-};
-
-
-struct unixinfo_UidToSid {
- struct {
- uint64_t uid;
- } in;
-
- struct {
- struct dom_sid *sid;/* [ref] */
- NTSTATUS result;
- } out;
-
-};
-
-
-struct unixinfo_SidToGid {
- struct {
- struct dom_sid sid;
- } in;
-
- struct {
- uint64_t *gid;/* [ref] */
- NTSTATUS result;
- } out;
-
-};
-
-
-struct unixinfo_GidToSid {
- struct {
- uint64_t gid;
- } in;
-
- struct {
- struct dom_sid *sid;/* [ref] */
- NTSTATUS result;
- } out;
-
-};
-
-
-struct unixinfo_GetPWUid {
- struct {
- uint64_t *uids;/* [size_is(*count)] */
- uint32_t *count;/* [ref,range(0,1023)] */
- } in;
-
- struct {
- struct unixinfo_GetPWUidInfo *infos;/* [size_is(*count)] */
- uint32_t *count;/* [ref,range(0,1023)] */
- NTSTATUS result;
- } out;
-
-};
-
-#endif /* _HEADER_unixinfo */
diff --git a/source3/librpc/idl/krb5pac.idl b/source3/librpc/idl/krb5pac.idl
new file mode 100644
index 0000000000..11f08e11aa
--- /dev/null
+++ b/source3/librpc/idl/krb5pac.idl
@@ -0,0 +1,119 @@
+/*
+ krb5 PAC
+*/
+
+#include "idl_types.h"
+
+import "security.idl", "netlogon.idl", "samr.idl";
+
+[
+ uuid("12345778-1234-abcd-0000-00000000"),
+ version(0.0),
+ pointer_default(unique),
+ helpstring("Active Directory KRB5 PAC")
+]
+interface krb5pac
+{
+ typedef struct {
+ NTTIME logon_time;
+ [value(2*strlen_m(account_name))] uint16 size;
+ [charset(UTF16)] uint8 account_name[size];
+ } PAC_LOGON_NAME;
+
+ typedef [public,flag(NDR_PAHEX)] struct {
+ uint32 type;
+ [flag(NDR_REMAINING)] DATA_BLOB signature;
+ } PAC_SIGNATURE_DATA;
+
+ typedef [gensize] struct {
+ netr_SamInfo3 info3;
+ dom_sid2 *res_group_dom_sid;
+ samr_RidWithAttributeArray res_groups;
+ } PAC_LOGON_INFO;
+
+ typedef struct {
+ [value(2*strlen_m(upn_name))] uint16 upn_size;
+ uint16 unknown1; /* 0x10 */
+ [value(2*strlen_m(domain_name))] uint16 domain_size;
+ uint16 unknown2; /* 0x50 */
+ uint16 unknown3; /* 0x01 */
+ uint16 unknown4;
+ uint32 unknown5;
+ [charset(UTF16)] uint8 upn_name[upn_size+2];
+ [charset(UTF16)] uint8 domain_name[domain_size+2];
+ uint32 unknown6;
+ } PAC_UNKNOWN_12;
+
+ typedef [public] struct {
+ [value(0x00081001)] uint32 unknown1;
+ [value(0xCCCCCCCC)] uint32 unknown2;
+ [value(NDR_ROUND(ndr_size_PAC_LOGON_INFO(info, ndr->flags)+4,8))] uint32 _ndr_size;
+ [value(0x00000000)] uint32 unknown3;
+ PAC_LOGON_INFO *info;
+ } PAC_LOGON_INFO_CTR;
+
+ typedef [public,v1_enum] enum {
+ PAC_TYPE_LOGON_INFO = 1,
+ PAC_TYPE_SRV_CHECKSUM = 6,
+ PAC_TYPE_KDC_CHECKSUM = 7,
+ PAC_TYPE_LOGON_NAME = 10,
+ PAC_TYPE_CONSTRAINED_DELEGATION = 11,
+ PAC_TYPE_UNKNOWN_12 = 12
+ } PAC_TYPE;
+
+ typedef [public,nodiscriminant,gensize] union {
+ [case(PAC_TYPE_LOGON_INFO)] PAC_LOGON_INFO_CTR logon_info;
+ [case(PAC_TYPE_SRV_CHECKSUM)] PAC_SIGNATURE_DATA srv_cksum;
+ [case(PAC_TYPE_KDC_CHECKSUM)] PAC_SIGNATURE_DATA kdc_cksum;
+ [case(PAC_TYPE_LOGON_NAME)] PAC_LOGON_NAME logon_name;
+ [case(PAC_TYPE_UNKNOWN_12)] PAC_UNKNOWN_12 unknown;
+ } PAC_INFO;
+
+ typedef [public,nopush,nopull,noprint] struct {
+ PAC_TYPE type;
+ [value(_ndr_size_PAC_INFO(info, type, 0))] uint32 _ndr_size;
+ [relative,switch_is(type),subcontext(0),subcontext_size(_subcontext_size_PAC_INFO(r, ndr->flags)),flag(NDR_ALIGN8)] PAC_INFO *info;
+ [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */
+ } PAC_BUFFER;
+
+ typedef [public] struct {
+ uint32 num_buffers;
+ uint32 version;
+ PAC_BUFFER buffers[num_buffers];
+ } PAC_DATA;
+
+ typedef struct {
+ [flag(NDR_REMAINING)] DATA_BLOB remaining;
+ } DATA_BLOB_REM;
+
+ typedef [public] struct {
+ PAC_TYPE type;
+ uint32 ndr_size;
+ [relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8)),flag(NDR_ALIGN8)] DATA_BLOB_REM *info;
+ [value(0)] uint32 _pad; /* Top half of a 64 bit pointer? */
+ } PAC_BUFFER_RAW;
+
+ typedef [public] struct {
+ uint32 num_buffers;
+ uint32 version;
+ PAC_BUFFER_RAW buffers[num_buffers];
+ } PAC_DATA_RAW;
+
+ void decode_pac(
+ [in] PAC_DATA pac
+ );
+
+ void decode_pac_raw(
+ [in] PAC_DATA_RAW pac
+ );
+
+ void decode_login_info(
+ [in] PAC_LOGON_INFO logon_info
+ );
+
+ /* used for samba3 netsamlogon cache */
+ typedef [public] struct {
+ time_t timestamp;
+ netr_SamInfo3 info3;
+ } netsamlogoncache_entry;
+}
diff --git a/source3/librpc/idl/libnet_join.idl b/source3/librpc/idl/libnet_join.idl
index 2741b7bd7b..3975d83a80 100644
--- a/source3/librpc/idl/libnet_join.idl
+++ b/source3/librpc/idl/libnet_join.idl
@@ -12,8 +12,9 @@ import "wkssvc.idl", "security.idl";
interface libnetjoin
{
typedef bitmap wkssvc_joinflags wkssvc_joinflags;
+ typedef enum netr_SchannelType netr_SchannelType;
- [nopush,nopull] WERROR libnet_JoinCtx(
+ [nopush,nopull,noopnum] WERROR libnet_JoinCtx(
[in] string dc_name,
[in] string machine_name,
[in,ref] string *domain_name,
@@ -29,6 +30,7 @@ interface libnetjoin
[in] boolean8 modify_config,
[in] ads_struct *ads,
[in] boolean8 debug,
+ [in] netr_SchannelType secure_channel_type,
[out] string account_name,
[out] string netbios_domain_name,
[out] string dns_domain_name,
@@ -39,7 +41,7 @@ interface libnetjoin
[out] boolean8 domain_is_ad
);
- [nopush,nopull] WERROR libnet_UnjoinCtx(
+ [nopush,nopull,noopnum] WERROR libnet_UnjoinCtx(
[in] string dc_name,
[in] string machine_name,
[in] string domain_name,
@@ -55,6 +57,8 @@ interface libnetjoin
[out] string netbios_domain_name,
[out] string dns_domain_name,
[out] boolean8 modified_config,
- [out] string error_string
+ [out] string error_string,
+ [out] boolean8 disabled_machine_account,
+ [out] boolean8 deleted_machine_account
);
}
diff --git a/source3/librpc/idl/lsa.idl b/source3/librpc/idl/lsa.idl
index 305bab3d03..ee8a2fe6b2 100644
--- a/source3/librpc/idl/lsa.idl
+++ b/source3/librpc/idl/lsa.idl
@@ -23,7 +23,7 @@ import "security.idl";
typedef [public] struct {
[value(2*strlen_m(string))] uint16 length;
- [value(2*(strlen_m(string)+1))] uint16 size;
+ [value(2*strlen_m_term(string))] uint16 size;
[charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
} lsa_StringLarge;
@@ -35,9 +35,15 @@ import "security.idl";
typedef [public] struct {
[value(strlen_m(string))] uint16 length;
[value(strlen_m(string))] uint16 size;
- ascstr_noterm *string;
+ [charset(DOS),size_is(size),length_is(length)] uint8 *string;
} lsa_AsciiString;
+ typedef [public] struct {
+ [value(strlen_m(string))] uint16 length;
+ [value(strlen_m_term(string))] uint16 size;
+ [charset(DOS),size_is(size),length_is(length)] uint8 *string;
+ } lsa_AsciiStringLarge;
+
/******************/
/* Function: 0x00 */
NTSTATUS lsa_Close (
@@ -117,12 +123,27 @@ import "security.idl";
lsa_QosInfo *sec_qos;
} lsa_ObjectAttribute;
+ typedef [public,bitmap32bit] bitmap {
+ LSA_POLICY_VIEW_LOCAL_INFORMATION = 0x00000001,
+ LSA_POLICY_VIEW_AUDIT_INFORMATION = 0x00000002,
+ LSA_POLICY_GET_PRIVATE_INFORMATION = 0x00000004,
+ LSA_POLICY_TRUST_ADMIN = 0x00000008,
+ LSA_POLICY_CREATE_ACCOUNT = 0x00000010,
+ LSA_POLICY_CREATE_SECRET = 0x00000020,
+ LSA_POLICY_CREATE_PRIVILEGE = 0x00000040,
+ LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS = 0x00000080,
+ LSA_POLICY_SET_AUDIT_REQUIREMENTS = 0x00000100,
+ LSA_POLICY_AUDIT_LOG_ADMIN = 0x00000200,
+ LSA_POLICY_SERVER_ADMIN = 0x00000400,
+ LSA_POLICY_LOOKUP_NAMES = 0x00000800
+ } lsa_PolicyAccessMask;
+
/* notice the screwup with the system_name - thats why MS created
OpenPolicy2 */
[public] NTSTATUS lsa_OpenPolicy (
[in,unique] uint16 *system_name,
[in] lsa_ObjectAttribute *attr,
- [in] uint32 access_mask,
+ [in] lsa_PolicyAccessMask access_mask,
[out] policy_handle *handle
);
@@ -297,9 +318,9 @@ import "security.idl";
[public] NTSTATUS lsa_EnumAccounts (
[in] policy_handle *handle,
- [in,out] uint32 *resume_handle,
- [in,range(0,8192)] uint32 num_entries,
- [out] lsa_SidArray *sids
+ [in,out,ref] uint32 *resume_handle,
+ [out,ref] lsa_SidArray *sids,
+ [in,range(0,8192)] uint32 num_entries
);
@@ -360,6 +381,8 @@ import "security.idl";
} lsa_TransSidArray;
const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
+ const int MAX_REF_DOMAINS = LSA_REF_DOMAIN_LIST_MULTIPLIER;
+
typedef struct {
[range(0,1000)] uint32 count;
[size_is(count)] lsa_DomainInfo *domains;
@@ -387,10 +410,10 @@ import "security.idl";
[in] policy_handle *handle,
[in,range(0,1000)] uint32 num_names,
[in,size_is(num_names)] lsa_String names[],
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransSidArray *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransSidArray *sids,
[in] lsa_LookupNamesLevel level,
- [in,out] uint32 *count
+ [in,out,ref] uint32 *count
);
@@ -408,13 +431,16 @@ import "security.idl";
[size_is(count)] lsa_TranslatedName *names;
} lsa_TransNameArray;
+ /* This number is based on Win2k and later maximum response allowed */
+ const int MAX_LOOKUP_SIDS = 0x5000; /* 20480 */
+
[public] NTSTATUS lsa_LookupSids (
[in] policy_handle *handle,
- [in] lsa_SidArray *sids,
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransNameArray *names,
+ [in,ref] lsa_SidArray *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransNameArray *names,
[in] uint16 level,
- [in,out] uint32 *count
+ [in,out,ref] uint32 *count
);
@@ -453,7 +479,7 @@ import "security.idl";
NTSTATUS lsa_EnumPrivsAccount (
[in] policy_handle *handle,
- [out,unique] lsa_PrivilegeSet *privs
+ [out,ref] lsa_PrivilegeSet **privs
);
@@ -461,7 +487,7 @@ import "security.idl";
/* Function: 0x13 */
NTSTATUS lsa_AddPrivilegesToAccount(
[in] policy_handle *handle,
- [in] lsa_PrivilegeSet *privs
+ [in,ref] lsa_PrivilegeSet *privs
);
@@ -637,8 +663,8 @@ import "security.idl";
/* Function: 0x1f */
NTSTATUS lsa_LookupPrivValue(
[in] policy_handle *handle,
- [in] lsa_String *name,
- [out] lsa_LUID *luid
+ [in,ref] lsa_String *name,
+ [out,ref] lsa_LUID *luid
);
@@ -682,14 +708,14 @@ import "security.idl";
} lsa_RightAttribute;
typedef struct {
- uint32 count;
+ [range(0,256)] uint32 count;
[size_is(count)] lsa_StringLarge *names;
} lsa_RightSet;
NTSTATUS lsa_EnumAccountRights (
[in] policy_handle *handle,
- [in] dom_sid2 *sid,
- [out] lsa_RightSet *rights
+ [in,ref] dom_sid2 *sid,
+ [out,ref] lsa_RightSet *rights
);
@@ -697,17 +723,17 @@ import "security.idl";
/* Function: 0x25 */
NTSTATUS lsa_AddAccountRights (
[in] policy_handle *handle,
- [in] dom_sid2 *sid,
- [in] lsa_RightSet *rights
+ [in,ref] dom_sid2 *sid,
+ [in,ref] lsa_RightSet *rights
);
/**********************/
/* Function: 0x26 */
NTSTATUS lsa_RemoveAccountRights (
[in] policy_handle *handle,
- [in] dom_sid2 *sid,
- [in] uint32 unknown,
- [in] lsa_RightSet *rights
+ [in,ref] dom_sid2 *sid,
+ [in] uint8 remove_all,
+ [in,ref] lsa_RightSet *rights
);
/* Function: 0x27 */
@@ -737,7 +763,7 @@ import "security.idl";
[public] NTSTATUS lsa_OpenPolicy2 (
[in,unique] [string,charset(UTF16)] uint16 *system_name,
[in] lsa_ObjectAttribute *attr,
- [in] uint32 access_mask,
+ [in] lsa_PolicyAccessMask access_mask,
[out] policy_handle *handle
);
@@ -879,11 +905,11 @@ import "security.idl";
[public] NTSTATUS lsa_LookupSids2(
[in] policy_handle *handle,
- [in] lsa_SidArray *sids,
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransNameArray2 *names,
+ [in,ref] lsa_SidArray *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransNameArray2 *names,
[in] uint16 level,
- [in,out] uint32 *count,
+ [in,out,ref] uint32 *count,
[in] uint32 unknown1,
[in] uint32 unknown2
);
@@ -907,10 +933,10 @@ import "security.idl";
[in] policy_handle *handle,
[in,range(0,1000)] uint32 num_names,
[in,size_is(num_names)] lsa_String names[],
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransSidArray2 *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransSidArray2 *sids,
[in] lsa_LookupNamesLevel level,
- [in,out] uint32 *count,
+ [in,out,ref] uint32 *count,
[in] uint32 unknown1,
[in] uint32 unknown2
);
@@ -960,10 +986,10 @@ import "security.idl";
[in] policy_handle *handle,
[in,range(0,1000)] uint32 num_names,
[in,size_is(num_names)] lsa_String names[],
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransSidArray3 *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransSidArray3 *sids,
[in] lsa_LookupNamesLevel level,
- [in,out] uint32 *count,
+ [in,out,ref] uint32 *count,
[in] uint32 unknown1,
[in] uint32 unknown2
);
@@ -1035,11 +1061,11 @@ import "security.idl";
/* Function 0x4c */
[public] NTSTATUS lsa_LookupSids3(
- [in] lsa_SidArray *sids,
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransNameArray2 *names,
+ [in,ref] lsa_SidArray *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransNameArray2 *names,
[in] uint16 level,
- [in,out] uint32 *count,
+ [in,out,ref] uint32 *count,
[in] uint32 unknown1,
[in] uint32 unknown2
);
@@ -1048,10 +1074,10 @@ import "security.idl";
NTSTATUS lsa_LookupNames4(
[in,range(0,1000)] uint32 num_names,
[in,size_is(num_names)] lsa_String names[],
- [out,unique] lsa_RefDomainList *domains,
- [in,out] lsa_TransSidArray3 *sids,
+ [out,ref] lsa_RefDomainList **domains,
+ [in,out,ref] lsa_TransSidArray3 *sids,
[in] lsa_LookupNamesLevel level,
- [in,out] uint32 *count,
+ [in,out,ref] uint32 *count,
[in] uint32 unknown1,
[in] uint32 unknown2
);
diff --git a/source3/librpc/idl/netlogon.idl b/source3/librpc/idl/netlogon.idl
index ae16884896..5979701703 100644
--- a/source3/librpc/idl/netlogon.idl
+++ b/source3/librpc/idl/netlogon.idl
@@ -245,7 +245,7 @@ interface netlogon
[in,unique] netr_Authenticator *credential,
[in,out,unique] netr_Authenticator *return_authenticator,
[in] uint16 logon_level,
- [in] [switch_is(logon_level)] netr_LogonLevel logon,
+ [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
[in] uint16 validation_level,
[out,ref] [switch_is(validation_level)] netr_Validation *validation,
[out,ref] uint8 *authoritative
@@ -272,7 +272,8 @@ interface netlogon
NTSTATUS netr_ServerReqChallenge(
[in,unique,string,charset(UTF16)] uint16 *server_name,
[in,string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials
);
@@ -286,7 +287,8 @@ interface netlogon
[in,string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in,string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials
);
@@ -298,9 +300,9 @@ interface netlogon
[in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in] [string,charset(UTF16)] uint16 computer_name[],
- [in] netr_Authenticator credential,
- [in] samr_Password new_password,
- [out,ref] netr_Authenticator *return_authenticator
+ [in,ref] netr_Authenticator *credential,
+ [out,ref] netr_Authenticator *return_authenticator,
+ [in,ref] samr_Password *new_password
);
@@ -680,12 +682,12 @@ interface netlogon
NTSTATUS netr_DatabaseDeltas(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
- [in] netr_Authenticator credential,
+ [in,ref] netr_Authenticator *credential,
[in,out,ref] netr_Authenticator *return_authenticator,
[in] netr_SamDatabaseID database_id,
[in,out,ref] udlong *sequence_num,
- [in] uint32 preferredmaximumlength,
- [out,ref] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ [in] uint32 preferredmaximumlength
);
@@ -796,6 +798,7 @@ interface netlogon
/* function_code values */
typedef [v1_enum] enum {
+ NETLOGON_CONTROL_SYNC = 2,
NETLOGON_CONTROL_REDISCOVER = 5,
NETLOGON_CONTROL_TC_QUERY = 6,
NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
@@ -834,7 +837,7 @@ interface netlogon
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
[in] uint32 function_code,
[in] uint32 level,
- [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
+ [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
[out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
);
@@ -854,7 +857,8 @@ interface netlogon
[in] [string,charset(UTF16)] uint16 account_name[],
[in] netr_SchannelType secure_channel_type,
[in] [string,charset(UTF16)] uint16 computer_name[],
- [in,out,ref] netr_Credential *credentials,
+ [in,ref] netr_Credential *credentials,
+ [out,ref] netr_Credential *return_credentials,
[in,out,ref] uint32 *negotiate_flags
);
@@ -865,13 +869,13 @@ interface netlogon
NTSTATUS netr_DatabaseSync2(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
- [in] netr_Authenticator credential,
+ [in] netr_Authenticator *credential,
[in,out,ref] netr_Authenticator *return_authenticator,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
[in,out,ref] uint32 *sync_context,
- [in] uint32 preferredmaximumlength,
- [out,ref] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
+ [in] uint32 preferredmaximumlength
);
@@ -1253,7 +1257,7 @@ interface netlogon
[in,unique] [string,charset(UTF16)] uint16 *server_name,
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
[in] uint16 logon_level,
- [in] [switch_is(logon_level)] netr_LogonLevel logon,
+ [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
[in] uint16 validation_level,
[out,ref] [switch_is(validation_level)] netr_Validation *validation,
[out,ref] uint8 *authoritative,
diff --git a/source3/librpc/idl/ntsvcs.idl b/source3/librpc/idl/ntsvcs.idl
index 05ba68e727..af0c7032da 100644
--- a/source3/librpc/idl/ntsvcs.idl
+++ b/source3/librpc/idl/ntsvcs.idl
@@ -9,69 +9,358 @@
]
interface ntsvcs
{
- void PNP_Disconnect();
- void PNP_Connect();
- void PNP_GetVersion();
- void PNP_GetGlobalState();
- void PNP_InitDetection();
- void PNP_ReportLogOn();
- void PNP_ValidateDeviceInstance();
- void PNP_GetRootDeviceInstance();
- void PNP_GetRelatedDeviceInstance();
- void PNP_EnumerateSubKeys();
- void PNP_GetDeviceList();
- void PNP_GetDeviceListSize();
- void PNP_GetDepth();
- void PNP_GetDeviceRegProp();
- void PNP_SetDeviceRegProp();
- void PNP_GetClassInstance();
- void PNP_CreateKey();
- void PNP_DeleteRegistryKey();
- void PNP_GetClassCount();
- void PNP_GetClassName();
- void PNP_DeleteClassKey();
- void PNP_GetInterfaceDeviceAlias();
- void PNP_GetInterfaceDeviceList();
- void PNP_GetInterfaceDeviceListSize();
- void PNP_RegisterDeviceClassAssociation();
- void PNP_UnregisterDeviceClassAssociation();
- void PNP_GetClassRegProp();
- void PNP_SetClassRegProp();
- void PNP_CreateDevInst();
- void PNP_DeviceInstanceAction();
- void PNP_GetDeviceStatus();
- void PNP_SetDeviceProblem();
- void PNP_DisableDevInst();
- void PNP_UninstallDevInst();
- void PNP_AddID();
- void PNP_RegisterDriver();
- void PNP_QueryRemove();
- void PNP_RequestDeviceEject();
- void PNP_IsDockStationPresent();
- void PNP_RequestEjectPC();
- void PNP_HwProfFlags();
- void PNP_GetHwProfInfo();
- void PNP_AddEmptyLogConf();
- void PNP_FreeLogConf();
- void PNP_GetFirstLogConf();
- void PNP_GetNextLogConf();
- void PNP_GetLogConfPriority();
- void PNP_AddResDes();
- void PNP_FreeResDes();
- void PNP_GetNextResDes();
- void PNP_GetResDesData();
- void PNP_GetResDesDataSize();
- void PNP_ModifyResDes();
- void PNP_DetectResourceLimit();
- void PNP_QueryResConfList();
- void PNP_SetHwProf();
- void PNP_QueryArbitratorFreeData();
- void PNP_QueryArbitratorFreeSize();
- void PNP_RunDetection();
- void PNP_RegisterNotification();
- void PNP_UnregisterNotification();
- void PNP_GetCustomDevProp();
- void PNP_GetVersionInternal();
- void PNP_GetBlockedDriverInfo();
- void PNP_GetServerSideDeviceInstallFlags();
+ /******************/
+ /* Function: 0x00 */
+
+ WERROR PNP_Disconnect();
+
+ /******************/
+ /* Function: 0x01 */
+
+ WERROR PNP_Connect();
+
+ /******************/
+ /* Function: 0x02 */
+
+ WERROR PNP_GetVersion(
+ [out,ref] uint16 *version
+ );
+
+ /******************/
+ /* Function: 0x03 */
+
+ WERROR PNP_GetGlobalState();
+
+ /******************/
+ /* Function: 0x04 */
+
+ WERROR PNP_InitDetection();
+
+ /******************/
+ /* Function: 0x05 */
+
+ WERROR PNP_ReportLogOn();
+
+ /******************/
+ /* Function: 0x06 */
+
+ WERROR PNP_ValidateDeviceInstance(
+ [in,ref] [string,charset(UTF16)] uint16 *devicepath,
+ [in] uint32 flags
+ );
+
+ /******************/
+ /* Function: 0x07 */
+
+ WERROR PNP_GetRootDeviceInstance();
+
+ /******************/
+ /* Function: 0x08 */
+
+ WERROR PNP_GetRelatedDeviceInstance();
+
+ /******************/
+ /* Function: 0x09 */
+
+ WERROR PNP_EnumerateSubKeys();
+
+ /******************/
+ /* Function: 0x0a */
+
+ WERROR PNP_GetDeviceList();
+
+ /******************/
+ /* Function: 0x0b */
+
+ WERROR PNP_GetDeviceListSize(
+ [in,unique] [string,charset(UTF16)] uint16 *devicename,
+ [out,ref] uint32 *size,
+ [in] uint32 flags
+ );
+
+ /******************/
+ /* Function: 0x0c */
+
+ WERROR PNP_GetDepth();
+
+ /******************/
+ /* Function: 0x0d */
+
+ WERROR PNP_GetDeviceRegProp();
+
+ /******************/
+ /* Function: 0x0e */
+
+ WERROR PNP_SetDeviceRegProp();
+
+ /******************/
+ /* Function: 0x0f */
+
+ WERROR PNP_GetClassInstance();
+
+ /******************/
+ /* Function: 0x10 */
+
+ WERROR PNP_CreateKey();
+
+ /******************/
+ /* Function: 0x11 */
+
+ WERROR PNP_DeleteRegistryKey();
+
+ /******************/
+ /* Function: 0x12 */
+
+ WERROR PNP_GetClassCount();
+
+ /******************/
+ /* Function: 0x13 */
+
+ WERROR PNP_GetClassName();
+
+ /******************/
+ /* Function: 0x14 */
+
+ WERROR PNP_DeleteClassKey();
+
+ /******************/
+ /* Function: 0x15 */
+
+ WERROR PNP_GetInterfaceDeviceAlias();
+
+ /******************/
+ /* Function: 0x16 */
+
+ WERROR PNP_GetInterfaceDeviceList();
+
+ /******************/
+ /* Function: 0x17 */
+
+ WERROR PNP_GetInterfaceDeviceListSize();
+
+ /******************/
+ /* Function: 0x18 */
+
+ WERROR PNP_RegisterDeviceClassAssociation();
+
+ /******************/
+ /* Function: 0x19 */
+
+ WERROR PNP_UnregisterDeviceClassAssociation();
+
+ /******************/
+ /* Function: 0x1a */
+
+ WERROR PNP_GetClassRegProp();
+
+ /******************/
+ /* Function: 0x1b */
+
+ WERROR PNP_SetClassRegProp();
+
+ /******************/
+ /* Function: 0x1c */
+
+ WERROR PNP_CreateDevInst();
+
+ /******************/
+ /* Function: 0x1d */
+
+ WERROR PNP_DeviceInstanceAction();
+
+ /******************/
+ /* Function: 0x1e */
+
+ WERROR PNP_GetDeviceStatus();
+
+ /******************/
+ /* Function: 0x1f */
+
+ WERROR PNP_SetDeviceProblem();
+
+ /******************/
+ /* Function: 0x20 */
+
+ WERROR PNP_DisableDevInst();
+
+ /******************/
+ /* Function: 0x21 */
+
+ WERROR PNP_UninstallDevInst();
+
+ /******************/
+ /* Function: 0x22 */
+
+ WERROR PNP_AddID();
+
+ /******************/
+ /* Function: 0x23 */
+
+ WERROR PNP_RegisterDriver();
+
+ /******************/
+ /* Function: 0x24 */
+
+ WERROR PNP_QueryRemove();
+
+ /******************/
+ /* Function: 0x25 */
+
+ WERROR PNP_RequestDeviceEject();
+
+ /******************/
+ /* Function: 0x26 */
+
+ WERROR PNP_IsDockStationPresent();
+
+ /******************/
+ /* Function: 0x27 */
+
+ WERROR PNP_RequestEjectPC();
+
+ /******************/
+ /* Function: 0x28 */
+
+ WERROR PNP_HwProfFlags(
+ [in] uint32 unknown1,
+ [in,ref] [string,charset(UTF16)] uint16 *devicepath,
+ [in] uint32 unknown2,
+ [in,out,ref] uint32 *unknown3,
+ [in,out,unique] uint16 *unknown4,
+ [in,unique] [string,charset(UTF16)] uint16 *unknown5,
+ [out,unique] [string,charset(UTF16)] uint16 **unknown5a,
+ [in] uint32 unknown6,
+ [in] uint32 unknown7
+ );
+
+ /******************/
+ /* Function: 0x29 */
+
+ typedef struct {
+ uint32 unknown1;
+ uint16 unknown2[160];
+ uint32 unknown3;
+ } PNP_HwProfInfo;
+
+ WERROR PNP_GetHwProfInfo(
+ [in] uint32 idx,
+ [in,out,ref] PNP_HwProfInfo *info,
+ [in] uint32 unknown1,
+ [in] uint32 unknown2
+ );
+
+ /******************/
+ /* Function: 0x2a */
+
+ WERROR PNP_AddEmptyLogConf();
+
+ /******************/
+ /* Function: 0x2b */
+
+ WERROR PNP_FreeLogConf();
+
+ /******************/
+ /* Function: 0x2c */
+
+ WERROR PNP_GetFirstLogConf();
+
+ /******************/
+ /* Function: 0x2d */
+
+ WERROR PNP_GetNextLogConf();
+
+ /******************/
+ /* Function: 0x2e */
+
+ WERROR PNP_GetLogConfPriority();
+
+ /******************/
+ /* Function: 0x2f */
+
+ WERROR PNP_AddResDes();
+
+ /******************/
+ /* Function: 0x30 */
+
+ WERROR PNP_FreeResDes();
+
+ /******************/
+ /* Function: 0x31 */
+
+ WERROR PNP_GetNextResDes();
+
+ /******************/
+ /* Function: 0x32 */
+
+ WERROR PNP_GetResDesData();
+
+ /******************/
+ /* Function: 0x33 */
+
+ WERROR PNP_GetResDesDataSize();
+
+ /******************/
+ /* Function: 0x34 */
+
+ WERROR PNP_ModifyResDes();
+
+ /******************/
+ /* Function: 0x35 */
+
+ WERROR PNP_DetectResourceLimit();
+
+ /******************/
+ /* Function: 0x36 */
+
+ WERROR PNP_QueryResConfList();
+
+ /******************/
+ /* Function: 0x37 */
+
+ WERROR PNP_SetHwProf();
+
+ /******************/
+ /* Function: 0x38 */
+
+ WERROR PNP_QueryArbitratorFreeData();
+
+ /******************/
+ /* Function: 0x39 */
+
+ WERROR PNP_QueryArbitratorFreeSize();
+
+ /******************/
+ /* Function: 0x3a */
+
+ WERROR PNP_RunDetection();
+
+ /******************/
+ /* Function: 0x3b */
+
+ WERROR PNP_RegisterNotification();
+
+ /******************/
+ /* Function: 0x3c */
+
+ WERROR PNP_UnregisterNotification();
+
+ /******************/
+ /* Function: 0x3d */
+
+ WERROR PNP_GetCustomDevProp();
+
+ /******************/
+ /* Function: 0x3e */
+
+ WERROR PNP_GetVersionInternal();
+
+ /******************/
+ /* Function: 0x3f */
+
+ WERROR PNP_GetBlockedDriverInfo();
+
+ /******************/
+ /* Function: 0x40 */
+
+ WERROR PNP_GetServerSideDeviceInstallFlags();
}
diff --git a/source3/librpc/idl/samr.idl b/source3/librpc/idl/samr.idl
index ebd1975458..c2449d3088 100644
--- a/source3/librpc/idl/samr.idl
+++ b/source3/librpc/idl/samr.idl
@@ -316,6 +316,10 @@ import "misc.idl", "lsa.idl", "security.idl";
/************************/
/* Function 0x0b */
+
+ const int MAX_SAM_ENTRIES_W2K = 0x400; /* 1024 */
+ const int MAX_SAM_ENTRIES_W95 = 50;
+
NTSTATUS samr_EnumDomainGroups(
[in] policy_handle *domain_handle,
[in,out,ref] uint32 *resume_handle,
@@ -779,6 +783,10 @@ import "misc.idl", "lsa.idl", "security.idl";
SAMR_FIELD_OWF_PWD = 0x20000000
} samr_FieldsPresent;
+ /* used for 'password_expired' in samr_UserInfo21 */
+ const int PASS_MUST_CHANGE_AT_NEXT_LOGON = 0x01;
+ const int PASS_DONT_CHANGE_AT_NEXT_LOGON = 0x00;
+
typedef struct {
NTTIME last_logon;
NTTIME last_logoff;
@@ -968,7 +976,7 @@ import "misc.idl", "lsa.idl", "security.idl";
typedef struct {
uint32 idx;
- lsa_AsciiString account_name;
+ lsa_AsciiStringLarge account_name;
} samr_DispEntryAscii;
typedef struct {
diff --git a/source3/librpc/idl/spoolss.idl b/source3/librpc/idl/spoolss.idl
index b64dfa481b..2144393ebd 100644
--- a/source3/librpc/idl/spoolss.idl
+++ b/source3/librpc/idl/spoolss.idl
@@ -3,16 +3,17 @@
/*
spoolss interface definitions
*/
+import "security.idl", "winreg.idl";
[ uuid("12345678-1234-abcd-ef00-0123456789ab"),
version(1.0),
endpoint("ncacn_np:[\\pipe\\spoolss]"),
pointer_default(unique),
helpstring("Spooler SubSystem"),
- depends(security),
helper("librpc/ndr/ndr_spoolss_buf.h")
] interface spoolss
{
+ typedef [v1_enum] enum winreg_Type winreg_Type;
typedef struct {
uint16 year;
uint16 month;
@@ -57,7 +58,7 @@
} spoolss_PrinterInfo0;
typedef [public,gensize] struct {
- string32 devicename;
+ [charset(UTF16)] uint16 devicename[32];
uint16 specversion;
uint16 driverversion;
uint16 size;
@@ -76,7 +77,7 @@
uint16 yresolution;
uint16 ttoption;
uint16 collate;
- string32 formname;
+ [charset(UTF16)] uint16 formname[32];
uint16 logpixels;
uint32 bitsperpel;
uint32 pelswidth;
@@ -103,7 +104,6 @@
PRINTER_ENUM_REMOTE = 0x00000010,
PRINTER_ENUM_SHARED = 0x00000020,
PRINTER_ENUM_NETWORK = 0x00000040,
- PRINTER_ENUM_UNKNOWN_8 = 0x00000008,
PRINTER_ENUM_EXPAND = 0x00004000,
PRINTER_ENUM_CONTAINER = 0x00008000,
PRINTER_ENUM_ICON1 = 0x00010000,
@@ -253,13 +253,13 @@
/* we are using this as internal parsing code */
[public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
[in] spoolss_EnumPrinterFlags flags,
- [in] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumPrinters(
[in] uint32 level,
@@ -268,16 +268,16 @@
);
[nopull,nopush] WERROR spoolss_EnumPrinters(
[in] spoolss_EnumPrinterFlags flags,
- [in] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
/* what we have here is a subcontext containing an array of no discriminant unions
* and the array has no size in front
*/
- [out,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
@@ -287,9 +287,9 @@
[subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
} spoolss_DevmodeContainer;
- WERROR spoolss_OpenPrinter(
- [in] [string,charset(UTF16)] uint16 *printername,
- [in] [string,charset(UTF16)] uint16 *datatype,
+ [public] WERROR spoolss_OpenPrinter(
+ [in,unique] [string,charset(UTF16)] uint16 *printername,
+ [in,unique] [string,charset(UTF16)] uint16 *datatype,
[in] spoolss_DevmodeContainer devmode_ctr,
[in] uint32 access_mask,
[out,ref] policy_handle *handle
@@ -338,7 +338,7 @@
WERROR spoolss_SetJob(
[in,ref] policy_handle *handle,
[in] uint32 job_id,
- [in] spoolss_JobInfoContainer *ctr,
+ [in,unique] spoolss_JobInfoContainer *ctr,
[in] spoolss_JobControl command
);
@@ -348,10 +348,10 @@
[in,ref] policy_handle *handle,
[in] uint32 job_id,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
- [out] uint32 *needed
+ [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
+ [out] uint32 needed
);
/******************/
@@ -361,11 +361,11 @@
[in] uint32 firstjob,
[in] uint32 numjobs,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumJobs(
[in] uint32 level,
@@ -377,11 +377,11 @@
[in] uint32 firstjob,
[in] uint32 numjobs,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_JobInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
@@ -431,13 +431,13 @@
/******************/
/* Function: 0x08 */
- WERROR spoolss_GetPrinter(
+ [public] WERROR spoolss_GetPrinter(
[in,ref] policy_handle *handle,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
- [out] uint32 *needed
+ [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
+ [out] uint32 needed
);
/******************/
@@ -537,14 +537,14 @@
/******************/
/* Function: 0x0a */
[public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
- [in] [string,charset(UTF16)] uint16 *server,
- [in] [string,charset(UTF16)] uint16 *environment,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *environment,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
[in] uint32 level,
@@ -552,14 +552,14 @@
[out,switch_is(level)] spoolss_DriverInfo info[count]
);
[nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
- [in] [string,charset(UTF16)] uint16 *server,
- [in] [string,charset(UTF16)] uint16 *environment,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *environment,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
@@ -581,21 +581,21 @@
[default] spoolss_DriverDirectoryInfo1 info1;
} spoolss_DriverDirectoryInfo;
- WERROR spoolss_GetPrinterDriverDirectory(
- [in] [string,charset(UTF16)] uint16 *server,
- [in] [string,charset(UTF16)] uint16 *environment,
+ [public] WERROR spoolss_GetPrinterDriverDirectory(
+ [in,unique] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *environment,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
- [out] uint32 *needed
+ [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
+ [out] uint32 needed
);
/******************/
/* Function: 0x0d */
WERROR spoolss_DeletePrinterDriver(
[in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
[in] [string,charset(UTF16)] uint16 architecture[],
[in] [string,charset(UTF16)] uint16 driver[]
);
@@ -617,14 +617,14 @@
} spoolss_PrintProcessorInfo;
[public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
- [in] [string,charset(UTF16)] uint16 *servername,
- [in] [string,charset(UTF16)] uint16 *environment,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *environment,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
[in] uint32 level,
@@ -632,14 +632,14 @@
[out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
);
[nopull,nopush] WERROR spoolss_EnumPrintProcessors(
- [in] [string,charset(UTF16)] uint16 *servername,
- [in] [string,charset(UTF16)] uint16 *environment,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *environment,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
@@ -666,7 +666,7 @@
[in,ref] policy_handle *handle,
[in] uint32 level,
[in,switch_is(level)] spoolss_DocumentInfo info,
- [out] uint32 *job_id
+ [out] uint32 job_id
);
/******************/
@@ -681,7 +681,7 @@
[in,ref] policy_handle *handle,
[in] DATA_BLOB data,
[in,value(r->in.data.length)] uint32 _data_size,
- [out] uint32 *num_written
+ [out] uint32 num_written
);
/******************/
@@ -701,8 +701,8 @@
WERROR spoolss_ReadPrinter(
[in,ref] policy_handle *handle,
[in] uint32 data_size,
- [out] DATA_BLOB *data,
- [out,value(r->out.data.length)] uint32 *_data_size
+ [out] DATA_BLOB data,
+ [out,value(r->out.data.length)] uint32 _data_size
);
/******************/
@@ -766,21 +766,21 @@
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
[in] uint32 offered,
- [out] spoolss_PrinterDataType *type,
- [out] DATA_BLOB *data,
- [out] uint32 *needed
+ [out] spoolss_PrinterDataType type,
+ [out] DATA_BLOB data,
+ [out] uint32 needed
);
[noopnum,noprint,public] void __spoolss_GetPrinterData(
[in] spoolss_PrinterDataType type,
- [out,switch_is(type)] spoolss_PrinterData *data
+ [out,switch_is(type)] spoolss_PrinterData data
);
- [nopull,nopush] WERROR spoolss_GetPrinterData(
+ [nopull,nopush,public] WERROR spoolss_GetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
[in] uint32 offered,
- [out] spoolss_PrinterDataType *type,
- [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData *data,
- [out] uint32 *needed
+ [out] spoolss_PrinterDataType type,
+ [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData data,
+ [out] uint32 needed
);
/******************/
@@ -790,11 +790,11 @@
[in] [string,charset(UTF16)] uint16 value_name[],
[in] spoolss_PrinterDataType type,
[in] DATA_BLOB data,
- [in] uint32 *_offered
+ [in] uint32 _offered
);
[noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
[in] spoolss_PrinterDataType type,
- [out,switch_is(type)] spoolss_PrinterData *data
+ [out,switch_is(type)] spoolss_PrinterData data
);
[nopush] WERROR spoolss_SetPrinterData(
[in,ref] policy_handle *handle,
@@ -811,7 +811,7 @@
/******************/
/* Function: 0x1d */
- WERROR spoolss_ClosePrinter(
+ [public] WERROR spoolss_ClosePrinter(
[in,out,ref] policy_handle *handle
);
@@ -877,10 +877,10 @@
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 form_name[],
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
- [out] uint32 *needed
+ [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
+ [out] uint32 needed
);
/******************/
@@ -897,11 +897,11 @@
[public,noopnum,noprint] WERROR _spoolss_EnumForms(
[in,ref] policy_handle *handle,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumForms(
[in] uint32 level,
@@ -911,11 +911,11 @@
[nopull,nopush] WERROR spoolss_EnumForms(
[in,ref] policy_handle *handle,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_FormInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
typedef struct {
@@ -947,13 +947,13 @@
/******************/
/* Function: 0x23 */
[public,noopnum,noprint] WERROR _spoolss_EnumPorts(
- [in] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumPorts(
[in] uint32 level,
@@ -961,13 +961,13 @@
[out,switch_is(level)] spoolss_PortInfo info[count]
);
[nopull,nopush] WERROR spoolss_EnumPorts(
- [in] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_PortInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
@@ -989,13 +989,13 @@
} spoolss_MonitorInfo;
[public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
- [in] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
[public,noopnum,noprint] void __spoolss_EnumMonitors(
[in] uint32 level,
@@ -1003,19 +1003,19 @@
[out,switch_is(level)] spoolss_MonitorInfo info[count]
);
[nopull,nopush] WERROR spoolss_EnumMonitors(
- [in] [string,charset(UTF16)] uint16 *servername,
+ [in,unique] [string,charset(UTF16)] uint16 *servername,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
- [out,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
/* Function: 0x25 */
WERROR spoolss_AddPort(
- [in] [string,charset(UTF16)] uint16 *server_name,
+ [in,unique] [string,charset(UTF16)] uint16 *server_name,
[in] uint32 unknown,
[in] [string,charset(UTF16)] uint16 monitor_name[]
);
@@ -1101,16 +1101,16 @@
/* Function: 0x35 */
WERROR spoolss_GetPrinterDriver2(
[in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 *architecture,
+ [in,unique] [string,charset(UTF16)] uint16 *architecture,
[in] uint32 level,
- [in] DATA_BLOB *buffer,
+ [in,unique] DATA_BLOB *buffer,
[in] uint32 offered,
[in] uint32 client_major_version,
[in] uint32 client_minor_version,
- [out] DATA_BLOB *info,
- [out] uint32 *needed,
- [out] uint32 *server_major_version,
- [out] uint32 *server_minor_version
+ [out,unique] DATA_BLOB *info,
+ [out] uint32 needed,
+ [out] uint32 server_major_version,
+ [out] uint32 server_minor_version
);
/******************/
@@ -1125,7 +1125,8 @@
/******************/
/* Function: 0x38 */
- WERROR spoolss_FindClosePrinterNotify(
+ [public] WERROR spoolss_FindClosePrinterNotify(
+ [in,ref] policy_handle *handle
);
/******************/
@@ -1135,7 +1136,13 @@
/******************/
/* Function: 0x3a */
- WERROR spoolss_ReplyOpenPrinter(
+ [public] WERROR spoolss_ReplyOpenPrinter(
+ [in,string,charset(UTF16)] uint16 server_name[],
+ [in] uint32 printer_local,
+ [in] winreg_Type type,
+ [in] uint32 unknown1,
+ [in] uint32 unknown2,
+ [out,ref] policy_handle *handle
);
/******************/
@@ -1145,7 +1152,8 @@
/******************/
/* Function: 0x3c */
- WERROR spoolss_ReplyClosePrinter(
+ [public] WERROR spoolss_ReplyClosePrinter(
+ [in,out,ref] policy_handle *handle
);
/******************/
@@ -1168,31 +1176,65 @@
WERROR spoolss_ResetPrinterEx(
);
+ typedef [enum16bit] enum {
+ SPOOLSS_FIELD_SERVER_NAME = 0,
+ SPOOLSS_FIELD_PRINTER_NAME = 1,
+ SPOOLSS_FIELD_SHARE_NAME = 2,
+ SPOOLSS_FIELD_PORT_NAME = 3,
+ SPOOLSS_FIELD_DRIVER_NAME = 4,
+ SPOOLSS_FIELD_COMMENT = 5,
+ SPOOLSS_FIELD_LOCATION = 6,
+ SPOOLSS_FIELD_DEVMODE = 7,
+ SPOOLSS_FIELD_SEPFILE = 8,
+ SPOOLSS_FIELD_PRINT_PROCESSOR = 9,
+ SPOOLSS_FIELD_PARAMETERS = 10,
+ SPOOLSS_FIELD_DATATYPE = 11,
+ SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
+ SPOOLSS_FIELD_ATTRIBUTES = 13,
+ SPOOLSS_FIELD_PRIORITY = 14,
+ SPOOLSS_FIELD_DEFAULT_PRIORITY = 15,
+ SPOOLSS_FIELD_START_TIME = 16,
+ SPOOLSS_FIELD_UNTIL_TIME = 17,
+ SPOOLSS_FIELD_STATUS = 18,
+ SPOOLSS_FIELD_STATUS_STRING = 19,
+ SPOOLSS_FIELD_CJOBS = 20,
+ SPOOLSS_FIELD_AVERAGE_PPM = 21,
+ SPOOLSS_FIELD_TOTAL_PAGES = 22,
+ SPOOLSS_FIELD_PAGES_PRINTED = 23,
+ SPOOLSS_FIELD_TOTAL_BYTES = 24,
+ SPOOLSS_FIELD_BYTES_PRINTED = 25
+ } spoolss_Field;
+
+ typedef [enum16bit] enum {
+ SPOOLSS_NOTIFY_PRINTER = 0,
+ SPOOLSS_NOTIFY_JOB = 1
+ } spoolss_NotifyType;
+
/******************/
/* Function: 0x41 */
- typedef [flag(NDR_PAHEX)] struct {
+ typedef struct {
+ spoolss_NotifyType type;
uint16 u1;
- uint16 u2;
+ uint32 u2;
uint32 u3;
- uint32 u4;
uint32 count;
- [size_is(count)] uint16 *array;
- } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2;
+ [size_is(count)] spoolss_Field *fields;
+ } spoolss_NotifyOptionsArray;
typedef struct {
- uint32 u1;
- uint32 u2;
+ uint32 version;
+ uint32 flags;
uint32 count;
- [size_is(count)] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t2 *t2;
- } spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1;
+ [size_is(count)] spoolss_NotifyOptionsArray *options;
+ } spoolss_NotifyOptionsContainer;
- WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
+ [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
[in,ref] policy_handle *handle,
- [in] uint32 u1,
- [in] uint32 u2,
- [in] [string,charset(UTF16)] uint16 *str,
- [in] uint32 u3,
- [in] spoolss_RemoteFindFirstPrinterChangeNotifyEx_t1 *t1
+ [in] uint32 flags,
+ [in] uint32 options,
+ [in,unique] [string,charset(UTF16)] uint16 *str,
+ [in] uint32 printer_local,
+ [in,unique] spoolss_NotifyOptionsContainer *t1
);
/******************/
@@ -1200,9 +1242,55 @@
WERROR spoolss_RouterRefreshPrinterChangeNotification(
);
+ typedef struct {
+ uint32 size;
+ [size_is(size/2),unique,charset(UTF16)] uint16 *string;
+ } spoolss_NotifyUTF16String;
+
+ typedef struct {
+ uint32 size;
+ [size_is(size),charset(DOS)] uint8 *string;
+ } spoolss_NotifyDOSString;
+
+ typedef struct {
+ uint16 data[8];
+ } spoolss_NotifyBlobData;
+
+ typedef struct {
+ uint32 len;
+ [unique] spoolss_NotifyBlobData *data;
+ } spoolss_NotifyBlob;
+
+ typedef [switch_type(uint32)] union {
+ [case(1)] dlong integer;
+ [case(2)] spoolss_NotifyUTF16String utf16_string;
+ [case(3)] spoolss_NotifyDOSString ascii_string;
+ [case(4)] spoolss_NotifyBlob blob;
+ [case(5)] spoolss_NotifyDOSString ascii_string;
+ } spoolss_NotifyData;
+
+ typedef struct {
+ spoolss_NotifyType type;
+ spoolss_Field field;
+ uint32 variable_type;
+ uint32 job_id;
+ [switch_is(variable_type)] spoolss_NotifyData data;
+ } spoolss_Notify;
+
+ typedef struct {
+ uint32 version;
+ uint32 flags;
+ uint32 count;
+ [size_is(count)] spoolss_Notify notifies[];
+ } spoolss_NotifyInfo;
+
/******************/
/* Function: 0x43 */
- WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
+ [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
+ [in,ref] policy_handle *handle,
+ [in] uint32 change_low,
+ [in,unique] spoolss_NotifyOptionsContainer *container,
+ [out, unique] spoolss_NotifyInfo *info
);
/******************/
@@ -1224,11 +1312,72 @@
[case(1)] spoolss_UserLevel1 *level1;
} spoolss_UserLevel;
+ typedef bitmap {
+ SERVER_ACCESS_ADMINISTER = 0x00000001,
+ SERVER_ACCESS_ENUMERATE = 0x00000002,
+ PRINTER_ACCESS_ADMINISTER = 0x00000004,
+ PRINTER_ACCESS_USE = 0x00000008,
+ JOB_ACCESS_ADMINISTER = 0x00000010
+ } spoolss_AccessRights;
+
+ /* Access rights for print servers */
+ const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
+ SERVER_ACCESS_ADMINISTER |
+ SERVER_ACCESS_ENUMERATE;
+
+ const int SERVER_READ = SEC_STD_READ_CONTROL |
+ SERVER_ACCESS_ENUMERATE;
+
+ const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
+ SERVER_ACCESS_ADMINISTER |
+ SERVER_ACCESS_ENUMERATE;
+
+ const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
+ SERVER_ACCESS_ENUMERATE;
+
+ /* Access rights for printers */
+ const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
+ PRINTER_ACCESS_ADMINISTER |
+ PRINTER_ACCESS_USE;
+
+ const int PRINTER_READ = SEC_STD_READ_CONTROL |
+ PRINTER_ACCESS_USE;
+
+ const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
+ PRINTER_ACCESS_USE;
+
+ const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
+ PRINTER_ACCESS_USE;
+
+ /* Access rights for jobs */
+ const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
+ JOB_ACCESS_ADMINISTER;
+
+ const int JOB_READ = SEC_STD_READ_CONTROL |
+ JOB_ACCESS_ADMINISTER;
+
+ const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
+ JOB_ACCESS_ADMINISTER;
+
+ const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
+ JOB_ACCESS_ADMINISTER;
+
+ /* ACE masks for various print permissions */
+ const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
+ PRINTER_ALL_ACCESS;
+
+ const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
+ READ_CONTROL_ACCESS;
+
+ const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS |
+ READ_CONTROL_ACCESS |
+ PRINTER_ACCESS_USE;
+
/******************/
/* Function: 0x45 */
- WERROR spoolss_OpenPrinterEx(
- [in] [string,charset(UTF16)] uint16 *printername,
- [in] [string,charset(UTF16)] uint16 *datatype,
+ [public] WERROR spoolss_OpenPrinterEx(
+ [in,unique] [string,charset(UTF16)] uint16 *printername,
+ [in,unique] [string,charset(UTF16)] uint16 *datatype,
[in] spoolss_DevmodeContainer devmode_ctr,
[in] uint32 access_mask,
[in] uint32 level,
@@ -1239,11 +1388,11 @@
/******************/
/* Function: 0x46 */
WERROR spoolss_AddPrinterEx(
- [in] [string,charset(UTF16)] uint16 *server,
+ [in,unique] [string,charset(UTF16)] uint16 *server,
[in] uint32 level,
- [in,switch_is(level)] spoolss_PrinterInfo *info,
+ [in,unique,switch_is(level)] spoolss_PrinterInfo *info,
[in] spoolss_DevmodeContainer devmode_ctr,
- [in] security_descriptor *secdesc,
+ [in,unique] security_descriptor *secdesc,
[in] uint32 ulevel,
[in,switch_is(ulevel)] spoolss_UserLevel userlevel
);
@@ -1258,12 +1407,13 @@
WERROR spoolss_EnumPrinterData(
[in,ref] policy_handle *handle,
[in] uint32 enum_index,
+ [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name,
[in] uint32 value_offered,
- [out] lstring *value_name,
- [out] uint32 *value_needed,
- [out] uint32 *printerdata_type,
- [out] DATA_BLOB *buffer,
- [in,out,ref] uint32 *data_size
+ [out,ref] uint32 *value_needed,
+ [out,ref] uint32 *printerdata_type,
+ [out,ref] DATA_BLOB *buffer,
+ [in] uint32 data_offered,
+ [out,ref] uint32 *data_needed
);
/******************/
@@ -1306,25 +1456,30 @@
[in] [string,charset(UTF16)] uint16 key_name[],
[in] [string,charset(UTF16)] uint16 value_name[],
[in] uint32 offered,
- [out] uint32 *type,
- [out] DATA_BLOB *buffer,
- [out] uint32 *needed
+ [out] uint32 type,
+ [out] DATA_BLOB buffer,
+ [out] uint32 needed
);
/******************/
/* Function: 0x4f */
- WERROR spoolss_EnumPrinterDataEx(
+ [public] WERROR spoolss_EnumPrinterDataEx(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
[in] uint32 offered,
- [out] DATA_BLOB *buffer,
- [out] uint32 *needed,
- [out] uint32 *count
+ [out] DATA_BLOB buffer,
+ [out] uint32 needed,
+ [out] uint32 count
);
/******************/
/* Function: 0x50 */
- WERROR spoolss_EnumPrinterKey(
+ [public] WERROR spoolss_EnumPrinterKey(
+ [in, ref] policy_handle *handle,
+ [in] [string,charset(UTF16)] uint16 key_name[],
+ [out] uint32 key_buffer_size,
+ [out] uint16 key_buffer[key_buffer_size],
+ [in,out] uint32 needed
);
/******************/
@@ -1374,14 +1529,14 @@
[in,value(r->in.in_data.length)] uint32 _in_data_length,
[in] uint32 offered,
[in] uint32 unknown1,
- [out] DATA_BLOB *out_data,
- [out] uint32 *needed,
- [out] uint32 *unknown2
+ [out] DATA_BLOB out_data,
+ [out] uint32 needed,
+ [out] uint32 unknown2
);
/******************/
/* Function: 0x59 */
- WERROR spoolss_AddPrinterDriverEx(
+ [public] WERROR spoolss_AddPrinterDriverEx(
);
/******************/
diff --git a/source3/librpc/idl/srvsvc.idl b/source3/librpc/idl/srvsvc.idl
index 2f23fd1e70..4ad7bebdbd 100644
--- a/source3/librpc/idl/srvsvc.idl
+++ b/source3/librpc/idl/srvsvc.idl
@@ -577,7 +577,7 @@ import "security.idl", "svcctl.idl";
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] [string,charset(UTF16)] uint16 share_name[],
[in] uint32 level,
- [in,switch_is(level)] srvsvc_NetShareInfo info,
+ [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
[in,out,unique] uint32 *parm_error
);
@@ -1120,7 +1120,7 @@ import "security.idl", "svcctl.idl";
WERROR srvsvc_NetSrvSetInfo(
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
[in] uint32 level,
- [in,switch_is(level)] srvsvc_NetSrvInfo info,
+ [in,ref,switch_is(level)] srvsvc_NetSrvInfo *info,
[in,out,unique] uint32 *parm_error
);
@@ -1299,7 +1299,7 @@ import "security.idl", "svcctl.idl";
/* Function: 0x1c */
WERROR srvsvc_NetRemoteTOD(
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
- [out,unique] srvsvc_NetRemoteTODInfo *info
+ [out,ref] srvsvc_NetRemoteTODInfo **info
);
/**************************/
diff --git a/source3/librpc/idl/svcctl.idl b/source3/librpc/idl/svcctl.idl
index 97c9f0e24b..e36a0918bf 100644
--- a/source3/librpc/idl/svcctl.idl
+++ b/source3/librpc/idl/svcctl.idl
@@ -115,11 +115,20 @@
/*****************/
/* Function 0x04 */
WERROR svcctl_QueryServiceObjectSecurity(
+ [in] policy_handle *handle,
+ [in] uint32 security_flags,
+ [out,ref,size_is(buffer_size)] uint8 *buffer,
+ [in,range(0,0x40000)] uint32 buffer_size,
+ [out,ref,range(0,0x40000)] uint32 *needed
);
/*****************/
/* Function 0x05 */
WERROR svcctl_SetServiceObjectSecurity(
+ [in] policy_handle *handle,
+ [in] uint32 security_flags,
+ [in,ref,size_is(buffer_size)] uint8 *buffer,
+ [in] uint32 buffer_size
);
/*****************/
diff --git a/source3/librpc/idl/unixinfo.idl b/source3/librpc/idl/unixinfo.idl
deleted file mode 100644
index 48bc565fff..0000000000
--- a/source3/librpc/idl/unixinfo.idl
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "idl_types.h"
-/*
- Unixinfo interface definition
-*/
-
-import "security.idl";
-
-[ uuid("9c54e310-a955-4885-bd31-78787147dfa6"),
- version(0.0),
- endpoint("ncacn_np:[\\pipe\\unixinfo]", "ncacn_ip_tcp:", "ncalrpc:"),
- pointer_default(unique),
- helpstring("Unixinfo specific stuff")
-] interface unixinfo
-{
- /******************/
- /* Function: 0x00 */
- NTSTATUS unixinfo_SidToUid (
- [in] dom_sid sid,
- [out] hyper *uid
- );
-
- /******************/
- /* Function: 0x01 */
- NTSTATUS unixinfo_UidToSid (
- [in] hyper uid,
- [out] dom_sid *sid
- );
-
- /******************/
- /* Function: 0x02 */
- NTSTATUS unixinfo_SidToGid (
- [in] dom_sid sid,
- [out] hyper *gid
- );
-
- /******************/
- /* Function: 0x03 */
- NTSTATUS unixinfo_GidToSid (
- [in] hyper gid,
- [out] dom_sid *sid
- );
-
- typedef struct {
- NTSTATUS status;
- utf8string homedir;
- utf8string shell;
- } unixinfo_GetPWUidInfo;
-
- /******************/
- /* Function: 0x04 */
- NTSTATUS unixinfo_GetPWUid (
- [in,out,ref,range(0,1023)] uint32 *count,
- [in,size_is(*count)] hyper uids[],
- [out,size_is(*count)] unixinfo_GetPWUidInfo infos[*]
- );
-}
diff --git a/source3/librpc/ndr/ndr.c b/source3/librpc/ndr/ndr.c
index 62a88a8856..53eff00d59 100644
--- a/source3/librpc/ndr/ndr.c
+++ b/source3/librpc/ndr/ndr.c
@@ -176,12 +176,16 @@ _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format,
{
va_list ap;
char *s = NULL;
- int i;
+ int i, ret;
va_start(ap, format);
- vasprintf(&s, format, ap);
+ ret = vasprintf(&s, format, ap);
va_end(ap);
+ if (ret == -1) {
+ return;
+ }
+
for (i=0;i<ndr->depth;i++) {
DEBUGADD(0,(" "));
}
@@ -450,11 +454,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
{
char *s=NULL;
va_list ap;
+ int ret;
va_start(ap, format);
- vasprintf(&s, format, ap);
+ ret = vasprintf(&s, format, ap);
va_end(ap);
+ if (ret == -1) {
+ return NDR_ERR_ALLOC;
+ }
+
DEBUG(3,("ndr_pull_error(%u): %s\n", ndr_err, s));
free(s);
@@ -471,11 +480,16 @@ _PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
{
char *s=NULL;
va_list ap;
+ int ret;
va_start(ap, format);
- vasprintf(&s, format, ap);
+ ret = vasprintf(&s, format, ap);
va_end(ap);
+ if (ret == -1) {
+ return NDR_ERR_ALLOC;
+ }
+
DEBUG(3,("ndr_push_error(%u): %s\n", ndr_err, s));
free(s);
diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c
index 54397c9469..f342c6e36f 100644
--- a/source3/librpc/ndr/ndr_basic.c
+++ b/source3/librpc/ndr/ndr_basic.c
@@ -773,8 +773,7 @@ _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
ndr->depth++;
for (i=0;i<count;i++) {
char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
+ if (asprintf(&idx, "[%d]", i) != -1) {
ndr_print_uint8(ndr, idx, data[i]);
free(idx);
}
diff --git a/source3/librpc/ndr/ndr_krb5pac.c b/source3/librpc/ndr/ndr_krb5pac.c
new file mode 100644
index 0000000000..b0eab44012
--- /dev/null
+++ b/source3/librpc/ndr/ndr_krb5pac.c
@@ -0,0 +1,141 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ routines for marshalling/unmarshalling spoolss subcontext buffer structures
+
+ Copyright (C) Stefan Metzmacher 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "includes.h"
+
+#include "librpc/gen_ndr/ndr_krb5pac.h"
+
+static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+{
+ size_t s = ndr_size_PAC_INFO(r, level, flags);
+ switch (level) {
+ case PAC_TYPE_LOGON_INFO:
+ return NDR_ROUND(s,8);
+ default:
+ return s;
+ }
+}
+
+static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+{
+ size_t s = ndr_size_PAC_INFO(r, level, flags);
+ return NDR_ROUND(s,8);
+}
+
+enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,0)));
+ {
+ uint32_t _flags_save_PAC_INFO = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
+ ndr->flags = _flags_save_PAC_INFO;
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_PAC_INFO = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ if (r->info) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info));
+ {
+ struct ndr_push *_ndr_info;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
+ NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->info, r->type));
+ NDR_CHECK(ndr_push_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
+ }
+ }
+ ndr->flags = _flags_save_PAC_INFO;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_info_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
+ {
+ uint32_t _flags_save_PAC_INFO = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->info);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
+ } else {
+ r->info = NULL;
+ }
+ ndr->flags = _flags_save_PAC_INFO;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ {
+ uint32_t _flags_save_PAC_INFO = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
+ if (r->info) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+ {
+ struct ndr_pull *_ndr_info;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, r->_ndr_size));
+ NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->info, r->type));
+ NDR_CHECK(ndr_pull_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, r->_ndr_size));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ ndr->offset = _relative_save_offset;
+ }
+ ndr->flags = _flags_save_PAC_INFO;
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r)
+{
+ ndr_print_struct(ndr, name, "PAC_BUFFER");
+ ndr->depth++;
+ ndr_print_PAC_TYPE(ndr, "type", r->type);
+ ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,0):r->_ndr_size);
+ ndr_print_ptr(ndr, "info", r->info);
+ ndr->depth++;
+ if (r->info) {
+ ndr_print_set_switch_value(ndr, r->info, r->type);
+ ndr_print_PAC_INFO(ndr, "info", r->info);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "_pad", r->_pad);
+ ndr->depth--;
+}
diff --git a/source3/librpc/ndr/ndr_string.c b/source3/librpc/ndr/ndr_string.c
index 711dbce538..e553443bd8 100644
--- a/source3/librpc/ndr/ndr_string.c
+++ b/source3/librpc/ndr/ndr_string.c
@@ -633,8 +633,7 @@ _PUBLIC_ void ndr_print_string_array(struct ndr_print *ndr, const char *name, co
ndr->depth++;
for (i=0;i<count;i++) {
char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
+ if (asprintf(&idx, "[%d]", i) != -1) {
ndr_print_string(ndr, idx, a[i]);
free(idx);
}