1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r19797: Convert the remaining pipes to the "new" unique out ptr handling

(This used to be commit bc4e0a388a)
This commit is contained in:
Volker Lendecke 2006-11-19 18:57:52 +00:00 committed by Gerald (Jerry) Carter
parent 3372adce58
commit 01367cdfd0
16 changed files with 219 additions and 304 deletions

View File

@ -2788,6 +2788,7 @@ static BOOL browse_host_rpc(BOOL sort)
struct rpc_pipe_client *pipe_hnd;
TALLOC_CTX *mem_ctx;
uint32 enum_hnd = 0;
uint32 *penum_hnd = &enum_hnd;
struct srvsvc_NetShareCtr1 ctr1;
union srvsvc_NetShareCtr ctr;
int i;
@ -2813,8 +2814,9 @@ static BOOL browse_host_rpc(BOOL sort)
level = 1;
ctr.ctr1 = &ctr1;
status = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, "", &level, &ctr,
0xffffffff, &numentries, &enum_hnd);
status = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, "", &level,
&ctr, 0xffffffff, &numentries,
&penum_hnd);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(mem_ctx);

View File

@ -37,7 +37,7 @@ NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, ui
return NT_STATUS_OK;
}
NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *in_data, uint8_t *out_data)
NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *in_data, uint8_t **out_data)
{
struct echo_EchoData r;
NTSTATUS status;
@ -63,7 +63,7 @@ NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
}
/* Return variables */
*out_data = *r.out.out_data;
*out_data = r.out.out_data;
/* Return result */
return NT_STATUS_OK;
@ -100,7 +100,7 @@ NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *data)
NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t **data)
{
struct echo_SourceData r;
NTSTATUS status;
@ -125,7 +125,7 @@ NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
*data = *r.out.data;
*data = r.out.data;
/* Return result */
return NT_STATUS_OK;

View File

@ -2,9 +2,9 @@
#ifndef __CLI_RPCECHO__
#define __CLI_RPCECHO__
NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t in_data, uint32_t *out_data);
NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *in_data, uint8_t *out_data);
NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *in_data, uint8_t **out_data);
NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *data);
NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t *data);
NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len, uint8_t **data);
NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *s1, const char **s2);
NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t level, union echo_Info *info);
NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t seconds);

View File

@ -6,7 +6,7 @@
#include "includes.h"
#include "librpc/gen_ndr/cli_netlogon.h"
NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info)
NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo **info)
{
struct netr_LogonUasLogon r;
NTSTATUS status;
@ -33,9 +33,7 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
}
/* Return variables */
if ( info ) {
*info = *r.out.info;
}
*info = r.out.info;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -74,7 +72,7 @@ NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative)
NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative)
{
struct netr_LogonSamLogon r;
NTSTATUS status;
@ -83,7 +81,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.server_name = server_name;
r.in.computer_name = computer_name;
r.in.credential = credential;
r.in.return_authenticator = return_authenticator;
r.in.return_authenticator = *return_authenticator;
r.in.logon_level = logon_level;
r.in.logon = logon;
r.in.validation_level = validation_level;
@ -105,9 +103,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
}
/* Return variables */
if ( return_authenticator ) {
*return_authenticator = *r.out.return_authenticator;
}
*return_authenticator = r.out.return_authenticator;
*validation = *r.out.validation;
*authoritative = *r.out.authoritative;
@ -115,7 +111,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return r.out.result;
}
NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon)
NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon)
{
struct netr_LogonSamLogoff r;
NTSTATUS status;
@ -124,7 +120,7 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem
r.in.server_name = server_name;
r.in.computer_name = computer_name;
r.in.credential = credential;
r.in.return_authenticator = return_authenticator;
r.in.return_authenticator = *return_authenticator;
r.in.logon_level = logon_level;
r.in.logon = logon;
@ -145,9 +141,7 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem
}
/* Return variables */
if ( return_authenticator ) {
*return_authenticator = *r.out.return_authenticator;
}
*return_authenticator = r.out.return_authenticator;
/* Return result */
return r.out.result;
@ -257,7 +251,7 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *
return r.out.result;
}
NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array)
{
struct netr_DatabaseDeltas r;
NTSTATUS status;
@ -290,15 +284,13 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem
/* Return variables */
*return_authenticator = *r.out.return_authenticator;
*sequence_num = *r.out.sequence_num;
if ( delta_enum_array ) {
*delta_enum_array = *r.out.delta_enum_array;
}
*delta_enum_array = r.out.delta_enum_array;
/* Return result */
return r.out.result;
}
NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array)
{
struct netr_DatabaseSync r;
NTSTATUS status;
@ -331,9 +323,7 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/* Return variables */
*return_authenticator = *r.out.return_authenticator;
*sync_context = *r.out.sync_context;
if ( delta_enum_array ) {
*delta_enum_array = *r.out.delta_enum_array;
}
*delta_enum_array = r.out.delta_enum_array;
/* Return result */
return r.out.result;
@ -592,7 +582,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX
return r.out.result;
}
NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array)
{
struct netr_DatabaseSync2 r;
NTSTATUS status;
@ -626,15 +616,13 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
/* Return variables */
*return_authenticator = *r.out.return_authenticator;
*sync_context = *r.out.sync_context;
if ( delta_enum_array ) {
*delta_enum_array = *r.out.delta_enum_array;
}
*delta_enum_array = r.out.delta_enum_array;
/* Return result */
return r.out.result;
}
NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY **delta_enum_array)
{
struct netr_DatabaseRedo r;
NTSTATUS status;
@ -665,9 +653,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
/* Return variables */
*return_authenticator = *r.out.return_authenticator;
if ( delta_enum_array ) {
*delta_enum_array = *r.out.delta_enum_array;
}
*delta_enum_array = r.out.delta_enum_array;
/* Return result */
return r.out.result;
@ -736,7 +722,7 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TA
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo **info)
{
struct netr_DsRGetDCName r;
NTSTATUS status;
@ -765,9 +751,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
}
/* Return variables */
if ( info ) {
*info = *r.out.info;
}
*info = r.out.info;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -956,7 +940,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX
return r.out.result;
}
NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo **info)
{
struct netr_DsRGetDCNameEx r;
NTSTATUS status;
@ -985,9 +969,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem
}
/* Return variables */
if ( info ) {
*info = *r.out.info;
}
*info = r.out.info;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -1184,7 +1166,7 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info)
NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo **info)
{
struct netr_DsRGetDCNameEx2 r;
NTSTATUS status;
@ -1215,9 +1197,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *me
}
/* Return variables */
if ( info ) {
*info = *r.out.info;
}
*info = r.out.info;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -1526,7 +1506,7 @@ NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags)
NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags)
{
struct netr_LogonSamLogonWithFlags r;
NTSTATUS status;
@ -1535,7 +1515,7 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_
r.in.server_name = server_name;
r.in.computer_name = computer_name;
r.in.credential = credential;
r.in.return_authenticator = return_authenticator;
r.in.return_authenticator = *return_authenticator;
r.in.logon_level = logon_level;
r.in.logon = logon;
r.in.validation_level = validation_level;
@ -1558,9 +1538,7 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_
}
/* Return variables */
if ( return_authenticator ) {
*return_authenticator = *r.out.return_authenticator;
}
*return_authenticator = r.out.return_authenticator;
*validation = *r.out.validation;
*authoritative = *r.out.authoritative;
*flags = *r.out.flags;

View File

@ -1,15 +1,15 @@
#include "librpc/gen_ndr/ndr_netlogon.h"
#ifndef __CLI_NETLOGON__
#define __CLI_NETLOGON__
NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info);
NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo **info);
NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info);
NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative);
NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon);
NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative);
NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon);
NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Credential *credentials);
NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials);
NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct samr_Password new_password, struct netr_Authenticator *return_authenticator);
NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint64_t *sequence_num, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array);
NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array);
NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, struct netr_UAS_INFO_0 uas, uint32_t count, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, struct netr_UAS_INFO_0 *recordid);
NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint32_t reference, uint32_t level, uint32_t buffersize, struct netr_AccountBuffer *buffer, uint32_t *count_returned, uint32_t *total_entries, uint32_t *next_reference, struct netr_UAS_INFO_0 *recordid);
NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname);
@ -17,25 +17,25 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname);
NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags);
NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY *delta_enum_array);
NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, enum netr_SamDatabaseID database_id, uint16_t restart_state, uint32_t *sync_context, uint32_t preferredmaximumlength, struct netr_DELTA_ENUM_ARRAY **delta_enum_array);
NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *computername, struct netr_Authenticator credential, struct netr_Authenticator *return_authenticator, uint8_t *change_log_entry, uint32_t change_log_entry_size, struct netr_DELTA_ENUM_ARRAY **delta_enum_array);
NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query);
NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo **info);
NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Credential *credentials, uint32_t *negotiate_flags, uint32_t *rid);
NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo **info);
NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site);
NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint32_t level, union netr_DomainQuery query, union netr_DomainInfo *info);
NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, enum netr_SchannelType secure_channel_type, const char *computer_name, struct netr_Authenticator credential, struct netr_CryptPassword new_password, struct netr_Authenticator *return_authenticator);
NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info);
NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo **info);
NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
@ -46,6 +46,6 @@ NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TA
NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator *return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *computer_name, struct netr_Authenticator *credential, struct netr_Authenticator **return_authenticator, uint16_t logon_level, union netr_LogonLevel logon, uint16_t validation_level, union netr_Validation *validation, uint8_t *authoritative, uint32_t *flags);
NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
#endif /* __CLI_NETLOGON__ */

View File

@ -6,7 +6,7 @@
#include "includes.h"
#include "librpc/gen_ndr/cli_srvsvc.h"
NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetCharDevEnum r;
NTSTATUS status;
@ -16,7 +16,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &r);
@ -38,9 +38,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -111,7 +109,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetCharDevQEnum r;
NTSTATUS status;
@ -122,7 +120,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &r);
@ -144,9 +142,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -186,7 +182,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CT
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error)
NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t **parm_error)
{
struct srvsvc_NetCharDevQSetInfo r;
NTSTATUS status;
@ -196,7 +192,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT
r.in.queue_name = queue_name;
r.in.level = level;
r.in.info = info;
r.in.parm_error = parm_error;
r.in.parm_error = *parm_error;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &r);
@ -215,9 +211,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT
}
/* Return variables */
if ( parm_error ) {
*parm_error = *r.out.parm_error;
}
*parm_error = r.out.parm_error;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -286,7 +280,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetConnEnum r;
NTSTATUS status;
@ -297,7 +291,7 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &r);
@ -319,15 +313,13 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetFileEnum r;
NTSTATUS status;
@ -339,7 +331,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &r);
@ -361,9 +353,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -433,7 +423,7 @@ NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetSessEnum r;
NTSTATUS status;
@ -445,7 +435,7 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &r);
@ -467,9 +457,7 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -507,7 +495,7 @@ NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error)
NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t **parm_error)
{
struct srvsvc_NetShareAdd r;
NTSTATUS status;
@ -516,7 +504,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.server_unc = server_unc;
r.in.level = level;
r.in.info = info;
r.in.parm_error = parm_error;
r.in.parm_error = *parm_error;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &r);
@ -535,15 +523,13 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
}
/* Return variables */
if ( parm_error ) {
*parm_error = *r.out.parm_error;
}
*parm_error = r.out.parm_error;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetShareEnumAll r;
NTSTATUS status;
@ -553,7 +539,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &r);
@ -575,9 +561,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -616,7 +600,7 @@ NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error)
NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t **parm_error)
{
struct srvsvc_NetShareSetInfo r;
NTSTATUS status;
@ -626,7 +610,7 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *
r.in.share_name = share_name;
r.in.level = level;
r.in.info = info;
r.in.parm_error = parm_error;
r.in.parm_error = *parm_error;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &r);
@ -645,9 +629,7 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *
}
/* Return variables */
if ( parm_error ) {
*parm_error = *r.out.parm_error;
}
*parm_error = r.out.parm_error;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -781,7 +763,7 @@ NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error)
NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t **parm_error)
{
struct srvsvc_NetSrvSetInfo r;
NTSTATUS status;
@ -790,7 +772,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me
r.in.server_unc = server_unc;
r.in.level = level;
r.in.info = info;
r.in.parm_error = parm_error;
r.in.parm_error = *parm_error;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &r);
@ -809,15 +791,13 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me
}
/* Return variables */
if ( parm_error ) {
*parm_error = *r.out.parm_error;
}
*parm_error = r.out.parm_error;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetDiskEnum r;
NTSTATUS status;
@ -827,7 +807,7 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
r.in.level = level;
r.in.info = info;
r.in.maxlen = maxlen;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &r);
@ -848,9 +828,7 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
/* Return variables */
*info = *r.out.info;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -922,7 +900,7 @@ NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetTransportEnum r;
NTSTATUS status;
@ -932,7 +910,7 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX
r.in.level = level;
r.in.transports = transports;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &r);
@ -954,9 +932,7 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX
*level = *r.out.level;
*transports = *r.out.transports;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -994,7 +970,7 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info)
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo **info)
{
struct srvsvc_NetRemoteTOD r;
NTSTATUS status;
@ -1019,9 +995,7 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem
}
/* Return variables */
if ( info ) {
*info = *r.out.info;
}
*info = r.out.info;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -1093,7 +1067,7 @@ NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags)
NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t **can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags)
{
struct srvsvc_NetPathCanonicalize r;
NTSTATUS status;
@ -1123,7 +1097,7 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
*can_path = *r.out.can_path;
*can_path = r.out.can_path;
*pathtype = *r.out.pathtype;
/* Return result */
@ -1260,7 +1234,7 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle)
{
struct srvsvc_NetShareEnum r;
NTSTATUS status;
@ -1270,7 +1244,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem
r.in.level = level;
r.in.ctr = ctr;
r.in.max_buffer = max_buffer;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &r);
@ -1292,15 +1266,13 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem
*level = *r.out.level;
*ctr = *r.out.ctr;
*totalentries = *r.out.totalentries;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd)
NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle **hnd)
{
struct srvsvc_NetShareDelStart r;
NTSTATUS status;
@ -1327,21 +1299,19 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX
}
/* Return variables */
if ( hnd ) {
*hnd = *r.out.hnd;
}
*hnd = r.out.hnd;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd)
NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle **hnd)
{
struct srvsvc_NetShareDelCommit r;
NTSTATUS status;
/* In parameters */
r.in.hnd = hnd;
r.in.hnd = *hnd;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &r);
@ -1360,15 +1330,13 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX
}
/* Return variables */
if ( hnd ) {
*hnd = *r.out.hnd;
}
*hnd = r.out.hnd;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf)
NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf **sd_buf)
{
struct srvsvc_NetGetFileSecurity r;
NTSTATUS status;
@ -1396,9 +1364,7 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT
}
/* Return variables */
if ( sd_buf ) {
*sd_buf = *r.out.sd_buf;
}
*sd_buf = r.out.sd_buf;
/* Return result */
return werror_to_ntstatus(r.out.result);

View File

@ -1,46 +1,46 @@
#include "librpc/gen_ndr/ndr_srvsvc.h"
#ifndef __CLI_SRVSVC__
#define __CLI_SRVSVC__
NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info);
NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t opcode);
NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info);
NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error);
NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t **parm_error);
NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name);
NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *computer_name);
NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info);
NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid);
NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user);
NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t **parm_error);
NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info);
NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error);
NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t **parm_error);
NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved);
NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved);
NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type);
NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info);
NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error);
NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t **parm_error);
NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stats);
NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport);
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info);
NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo **info);
NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately);
NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype);
NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags);
NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t **can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags);
NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags);
NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags);
NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags);
NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd);
NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd);
NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf);
NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t **resume_handle);
NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle **hnd);
NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle **hnd);
NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf **sd_buf);
NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf);
NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info);
NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately);

View File

@ -381,7 +381,7 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle)
NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t **TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle)
{
struct svcctl_CreateServiceW r;
NTSTATUS status;
@ -396,7 +396,7 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m
r.in.error_control = error_control;
r.in.binary_path = binary_path;
r.in.LoadOrderGroupKey = LoadOrderGroupKey;
r.in.TagId = TagId;
r.in.TagId = *TagId;
r.in.dependencies = dependencies;
r.in.dependencies_size = dependencies_size;
r.in.service_start_name = service_start_name;
@ -420,16 +420,14 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m
}
/* Return variables */
if ( TagId ) {
*TagId = *r.out.TagId;
}
*TagId = r.out.TagId;
*handle = *r.out.handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS **status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
{
struct svcctl_EnumDependentServicesW r;
NTSTATUS status;
@ -456,9 +454,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO
}
/* Return variables */
if ( status ) {
*status = *r.out.status;
}
*status = r.out.status;
*bytes_needed = *r.out.bytes_needed;
*services_returned = *r.out.services_returned;
@ -466,7 +462,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle)
NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t **service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t **resume_handle)
{
struct svcctl_EnumServicesStatusW r;
NTSTATUS status;
@ -476,7 +472,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C
r.in.type = type;
r.in.state = state;
r.in.buf_size = buf_size;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r);
@ -495,12 +491,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
*service = *r.out.service;
*service = r.out.service;
*bytes_needed = *r.out.bytes_needed;
*services_returned = *r.out.services_returned;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -572,7 +566,7 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed)
NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t **query, uint32_t buf_size, uint32_t *bytes_needed)
{
struct svcctl_QueryServiceConfigW r;
NTSTATUS status;
@ -598,7 +592,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
*query = *r.out.query;
*query = r.out.query;
*bytes_needed = *r.out.bytes_needed;
/* Return result */
@ -670,7 +664,7 @@ NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *me
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length)
NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t **display_name_length)
{
struct svcctl_GetServiceDisplayNameW r;
NTSTATUS status;
@ -678,7 +672,7 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO
/* In parameters */
r.in.handle = handle;
r.in.service_name = service_name;
r.in.display_name_length = display_name_length;
r.in.display_name_length = *display_name_length;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r);
@ -698,15 +692,13 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO
/* Return variables */
*display_name = *r.out.display_name;
if ( display_name_length ) {
*display_name_length = *r.out.display_name_length;
}
*display_name_length = r.out.display_name_length;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length)
NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t **display_name_length)
{
struct svcctl_GetServiceKeyNameW r;
NTSTATUS status;
@ -714,7 +706,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT
/* In parameters */
r.in.handle = handle;
r.in.service_name = service_name;
r.in.display_name_length = display_name_length;
r.in.display_name_length = *display_name_length;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r);
@ -734,9 +726,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT
/* Return variables */
*key_name = *r.out.key_name;
if ( display_name_length ) {
*display_name_length = *r.out.display_name_length;
}
*display_name_length = r.out.display_name_length;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -815,7 +805,7 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password)
NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t **TagId, const char *dependencies, const char *service_start_name, const char *password)
{
struct svcctl_CreateServiceA r;
NTSTATUS status;
@ -851,15 +841,13 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *m
}
/* Return variables */
if ( TagId ) {
*TagId = *r.out.TagId;
}
*TagId = r.out.TagId;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS **status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
{
struct svcctl_EnumDependentServicesA r;
NTSTATUS status;
@ -886,9 +874,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO
}
/* Return variables */
if ( status ) {
*status = *r.out.status;
}
*status = r.out.status;
*bytes_needed = *r.out.bytes_needed;
*services_returned = *r.out.services_returned;
@ -896,7 +882,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle)
NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t **service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t **resume_handle)
{
struct svcctl_EnumServicesStatusA r;
NTSTATUS status;
@ -906,7 +892,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C
r.in.type = type;
r.in.state = state;
r.in.buf_size = buf_size;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r);
@ -925,12 +911,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
*service = *r.out.service;
*service = r.out.service;
*bytes_needed = *r.out.bytes_needed;
*services_returned = *r.out.services_returned;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -1001,7 +985,7 @@ NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed)
NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t **query, uint32_t buf_size, uint32_t *bytes_needed)
{
struct svcctl_QueryServiceConfigA r;
NTSTATUS status;
@ -1027,7 +1011,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
*query = *r.out.query;
*query = r.out.query;
*bytes_needed = *r.out.bytes_needed;
/* Return result */
@ -1099,7 +1083,7 @@ NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *me
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length)
NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t **display_name_length)
{
struct svcctl_GetServiceDisplayNameA r;
NTSTATUS status;
@ -1107,7 +1091,7 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO
/* In parameters */
r.in.handle = handle;
r.in.service_name = service_name;
r.in.display_name_length = display_name_length;
r.in.display_name_length = *display_name_length;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r);
@ -1127,15 +1111,13 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO
/* Return variables */
*display_name = *r.out.display_name;
if ( display_name_length ) {
*display_name_length = *r.out.display_name_length;
}
*display_name_length = r.out.display_name_length;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length)
NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t **display_name_length)
{
struct svcctl_GetServiceKeyNameA r;
NTSTATUS status;
@ -1143,7 +1125,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT
/* In parameters */
r.in.handle = handle;
r.in.service_name = service_name;
r.in.display_name_length = display_name_length;
r.in.display_name_length = *display_name_length;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r);
@ -1163,9 +1145,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT
/* Return variables */
*key_name = *r.out.key_name;
if ( display_name_length ) {
*display_name_length = *r.out.display_name_length;
}
*display_name_length = r.out.display_name_length;
/* Return result */
return werror_to_ntstatus(r.out.result);
@ -1293,7 +1273,7 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed)
{
struct svcctl_QueryServiceConfig2A r;
NTSTATUS status;
@ -1320,14 +1300,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_
}
/* Return variables */
*buffer = *r.out.buffer;
*buffer = r.out.buffer;
*bytes_needed = *r.out.bytes_needed;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed)
{
struct svcctl_QueryServiceConfig2W r;
NTSTATUS status;
@ -1354,14 +1334,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_
}
/* Return variables */
*buffer = *r.out.buffer;
*buffer = r.out.buffer;
*bytes_needed = *r.out.bytes_needed;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed)
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed)
{
struct svcctl_QueryServiceStatusEx r;
NTSTATUS status;
@ -1388,14 +1368,14 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_
}
/* Return variables */
*buffer = *r.out.buffer;
*buffer = r.out.buffer;
*bytes_needed = *r.out.bytes_needed;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name)
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t **services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t **resume_handle, const char **group_name)
{
struct EnumServicesStatusExA r;
NTSTATUS status;
@ -1406,7 +1386,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m
r.in.type = type;
r.in.state = state;
r.in.buf_size = buf_size;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r);
@ -1425,19 +1405,17 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m
}
/* Return variables */
*services = *r.out.services;
*services = r.out.services;
*bytes_needed = *r.out.bytes_needed;
*service_returned = *r.out.service_returned;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
*group_name = *r.out.group_name;
/* Return result */
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name)
NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t **services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t **resume_handle, const char **group_name)
{
struct EnumServicesStatusExW r;
NTSTATUS status;
@ -1448,7 +1426,7 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m
r.in.type = type;
r.in.state = state;
r.in.buf_size = buf_size;
r.in.resume_handle = resume_handle;
r.in.resume_handle = *resume_handle;
if (DEBUGLEVEL >= 10)
NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
@ -1467,12 +1445,10 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m
}
/* Return variables */
*services = *r.out.services;
*services = r.out.services;
*bytes_needed = *r.out.bytes_needed;
*service_returned = *r.out.service_returned;
if ( resume_handle ) {
*resume_handle = *r.out.resume_handle;
}
*resume_handle = r.out.resume_handle;
*group_name = *r.out.group_name;
/* Return result */

View File

@ -13,36 +13,36 @@ NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC
NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle);
NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t **TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle);
NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS **status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t **service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t **resume_handle);
NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle);
NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t **query, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t **display_name_length);
NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t **display_name_length);
NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate);
NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name);
NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password);
NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle);
NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t **TagId, const char *dependencies, const char *service_start_name, const char *password);
NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS **status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned);
NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t **service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t **resume_handle);
NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle);
NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask);
NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t **query, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *status, uint32_t *required_buf_size);
NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments);
NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length);
NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length);
NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t **display_name_length);
NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t **display_name_length);
NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info);
NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name);
NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t **buffer, uint32_t buf_size, uint32_t *bytes_needed);
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t **services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t **resume_handle, const char **group_name);
NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t **services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t **resume_handle, const char **group_name);
NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
#endif /* __CLI_SVCCTL__ */

View File

@ -72,7 +72,7 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union WKS_USER_ENUM_UNION *users, uint32_t prefmaxlen, uint32_t *entriesread, uint32_t *totalentries, uint32_t *resumehandle)
NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union WKS_USER_ENUM_UNION *users, uint32_t prefmaxlen, uint32_t **entriesread, uint32_t **totalentries, uint32_t *resumehandle)
{
struct wkssvc_NetWkstaEnumUsers r;
NTSTATUS status;
@ -102,12 +102,8 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX
/* Return variables */
*users = *r.out.users;
if ( entriesread ) {
*entriesread = *r.out.entriesread;
}
if ( totalentries ) {
*totalentries = *r.out.totalentries;
}
*entriesread = r.out.entriesread;
*totalentries = r.out.totalentries;
*resumehandle = *r.out.resumehandle;
/* Return result */
@ -172,7 +168,7 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERSETINFO(struct rpc_pipe_client *cli, TALLOC_
return werror_to_ntstatus(r.out.result);
}
NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t *level, union wkssvc_NetWkstaTransportCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle)
NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t *level, union wkssvc_NetWkstaTransportCtr *ctr, uint32_t max_buffer, uint32_t **totalentries, uint32_t *resume_handle)
{
struct wkssvc_NetWkstaTransportEnum r;
NTSTATUS status;
@ -203,9 +199,7 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC
/* Return variables */
*level = *r.out.level;
*ctr = *r.out.ctr;
if ( totalentries ) {
*totalentries = *r.out.totalentries;
}
*totalentries = r.out.totalentries;
*resume_handle = *r.out.resume_handle;
/* Return result */

View File

@ -3,10 +3,10 @@
#define __CLI_WKSSVC__
NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info);
NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info, uint32_t *parm_error);
NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union WKS_USER_ENUM_UNION *users, uint32_t prefmaxlen, uint32_t *entriesread, uint32_t *totalentries, uint32_t *resumehandle);
NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union WKS_USER_ENUM_UNION *users, uint32_t prefmaxlen, uint32_t **entriesread, uint32_t **totalentries, uint32_t *resumehandle);
NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERSETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t *level, union wkssvc_NetWkstaTransportCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t *level, union wkssvc_NetWkstaTransportCtr *ctr, uint32_t max_buffer, uint32_t **totalentries, uint32_t *resume_handle);
NTSTATUS rpccli_WKSSVC_NETRWKSTATRANSPORTADD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_WKSSVC_NETRWKSTATRANSPORTDEL(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_WKSSVC_NETRUSEADD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);

View File

@ -2474,6 +2474,7 @@ net_share_enum_rpc(struct cli_state *cli,
int i;
NTSTATUS result;
uint32 enum_hnd;
uint32 *penum_hnd = &enum_hnd;
uint32 info_level = 1;
uint32 preferred_len = 0xffffffff;
struct srvsvc_NetShareCtr1 ctr1;
@ -2503,14 +2504,9 @@ net_share_enum_rpc(struct cli_state *cli,
/* Issue the NetShareEnum RPC call and retrieve the response */
enum_hnd = 0;
result = rpccli_srvsvc_NetShareEnum(pipe_hnd,
mem_ctx,
NULL,
&info_level,
&ctr,
preferred_len,
&numentries,
&enum_hnd);
result = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL,
&info_level, &ctr, preferred_len,
&numentries, &penum_hnd);
/* Was it successful? */
if (!NT_STATUS_IS_OK(result) || numentries == 0) {

View File

@ -61,12 +61,11 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
size = atoi(argv[1]);
in_data = (uint8 *)SMB_MALLOC(size);
out_data = (uint8 *)SMB_MALLOC(size);
for (i = 0; i < size; i++)
in_data[i] = i & 0xff;
result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, out_data);
result = rpccli_echo_EchoData(cli, mem_ctx, size, in_data, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@ -81,7 +80,7 @@ static NTSTATUS cmd_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
done:
SAFE_FREE(in_data);
SAFE_FREE(out_data);
TALLOC_FREE(out_data);
return result;
}
@ -100,11 +99,8 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
size = atoi(argv[1]);
if (!(out_data = (uint8 *)SMB_MALLOC(size))) {
return NT_STATUS_NO_MEMORY;
}
result = rpccli_echo_SourceData(cli, mem_ctx, size, out_data);
result = rpccli_echo_SourceData(cli, mem_ctx, size, &out_data);
if (!NT_STATUS_IS_OK(result))
goto done;
@ -118,7 +114,7 @@ static NTSTATUS cmd_echo_source_data(struct rpc_pipe_client *cli,
}
done:
SAFE_FREE(out_data);
TALLOC_FREE(out_data);
return result;
}

View File

@ -249,6 +249,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
union srvsvc_NetShareCtr ctr;
NTSTATUS result;
uint32 hnd;
uint32 *phnd = &hnd;
uint32 preferred_len = 0xffffffff, i;
uint32 numentries;
@ -288,7 +289,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct rpc_pipe_client *cli,
result = rpccli_srvsvc_NetShareEnum(
cli, mem_ctx, cli->cli->desthost, &info_level, &ctr, preferred_len, &numentries,
&hnd);
&phnd);
if (!NT_STATUS_IS_OK(result) || !numentries)
goto done;
@ -366,7 +367,7 @@ static NTSTATUS cmd_srvsvc_net_share_set_info(struct rpc_pipe_client *cli,
uint32 info_level = 502;
union srvsvc_NetShareInfo info_get;
NTSTATUS result;
uint32 parm_error;
uint32 *parm_error = NULL;
if (argc > 3) {
printf("Usage: %s [sharename] [comment]\n", argv[0]);
@ -401,7 +402,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct rpc_pipe_client *cli,
{
fstring srv_name_slash;
NTSTATUS result;
struct srvsvc_NetRemoteTODInfo tod;
struct srvsvc_NetRemoteTODInfo *tod;
if (argc > 1) {
printf("Usage: %s\n", argv[0]);
@ -427,6 +428,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
union srvsvc_NetFileCtr ctr;
NTSTATUS result;
uint32 hnd;
uint32 *phnd = &hnd;
uint32 preferred_len = 0xffff;
uint32 numentries;
@ -443,7 +445,7 @@ static NTSTATUS cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
ZERO_STRUCT(ctr);
result = rpccli_srvsvc_NetFileEnum(
cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &hnd);
cli, mem_ctx, NULL, NULL, NULL, &info_level, &ctr, preferred_len, &numentries, &phnd);
if (!NT_STATUS_IS_OK(result))
goto done;

View File

@ -3021,7 +3021,7 @@ static NTSTATUS rpc_share_add_internals(const DOM_SID *domain_sid,
uint32 num_users=0, perms=0;
char *password=NULL; /* don't allow a share password */
uint32 level = 2;
uint32 parm_error;
uint32 *pparm_error = NULL;
union srvsvc_NetShareInfo info;
struct srvsvc_NetShareInfo2 info2;
@ -3046,7 +3046,7 @@ static NTSTATUS rpc_share_add_internals(const DOM_SID *domain_sid,
info2.name = sharename;
result = rpccli_srvsvc_NetShareAdd(pipe_hnd, mem_ctx, NULL, level,
info, &parm_error);
info, &pparm_error);
return result;
}
@ -3158,9 +3158,11 @@ static NTSTATUS get_share_info(struct rpc_pipe_client *pipe_hnd,
/* no specific share requested, enumerate all */
if (argc == 0) {
uint32 hnd = 0;
uint32 *phnd = &hnd;
return rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, &level, ctr,
0xffffffff, numentries, &hnd);
return rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL,
&level, ctr, 0xffffffff,
numentries, &phnd);
}
/* request just one share */
@ -3328,7 +3330,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(const DOM_SID *domain_sid,
for (i = 0; i < numentries; i++) {
uint32 parm_error;
uint32 *pparm_error = NULL;
union srvsvc_NetShareInfo info;
/* reset error-code */
@ -3349,7 +3351,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(const DOM_SID *domain_sid,
info.info502 = &ctr_src.ctr502->array[i];
result = rpccli_srvsvc_NetShareAdd(srvsvc_pipe, mem_ctx, NULL,
502, info, &parm_error);
502, info, &pparm_error);
if (NT_STATUS_EQUAL(result, NT_STATUS_OBJECT_NAME_COLLISION)) {
printf(" [%s] does already exist\n", ctr_src.ctr502->array[i].name);
@ -3724,7 +3726,7 @@ static NTSTATUS rpc_share_migrate_security_internals(const DOM_SID *domain_sid,
struct cli_state *cli_dst = NULL;
uint32 level = 502; /* includes secdesc */
uint32 numentries;
uint32 parm_error;
uint32 *parm_error = NULL;
result = get_share_info(pipe_hnd, mem_ctx, level, argc, argv, &ctr_src,
&numentries);
@ -3757,8 +3759,8 @@ static NTSTATUS rpc_share_migrate_security_internals(const DOM_SID *domain_sid,
ZERO_STRUCT(info);
/* finally modify the share on the dst server */
result = rpccli_srvsvc_NetShareSetInfo(srvsvc_pipe, mem_ctx, NULL,
argv[0], level, info,
result = rpccli_srvsvc_NetShareSetInfo(
srvsvc_pipe, mem_ctx, NULL, argv[0], level, info,
&parm_error);
if (!NT_STATUS_IS_OK(result)) {
@ -4691,7 +4693,7 @@ static NTSTATUS rpc_sh_share_add(TALLOC_CTX *mem_ctx,
union srvsvc_NetShareInfo info;
struct srvsvc_NetShareInfo2 info2;
NTSTATUS result;
uint32 parm_error;
uint32 *parm_error = NULL;
if ((argc < 2) || (argc > 3)) {
d_fprintf(stderr, "usage: %s <share> <path> [comment]\n",
@ -4873,6 +4875,7 @@ static NTSTATUS rpc_file_list_internals(const DOM_SID *domain_sid,
union srvsvc_NetFileCtr ctr;
NTSTATUS result;
uint32 hnd;
uint32 *phnd = &hnd;
uint32 preferred_len = 0xffffffff, i;
const char *username=NULL;
uint32 level = 3;
@ -4884,8 +4887,9 @@ static NTSTATUS rpc_file_list_internals(const DOM_SID *domain_sid,
if (argc > 0)
username = smb_xstrdup(argv[0]);
result = rpccli_srvsvc_NetFileEnum(pipe_hnd,
mem_ctx, NULL, NULL, username, &level, &ctr, preferred_len, &numentries, &hnd);
result = rpccli_srvsvc_NetFileEnum(pipe_hnd, mem_ctx, NULL, NULL,
username, &level, &ctr,
preferred_len, &numentries, &phnd);
if (!NT_STATUS_IS_OK(result))
goto done;

View File

@ -135,6 +135,7 @@ static BOOL get_rpc_shares(struct cli_state *cli,
struct rpc_pipe_client *pipe_hnd;
TALLOC_CTX *mem_ctx;
uint32 enum_hnd;
uint32 *penum_hnd = &enum_hnd;
struct srvsvc_NetShareCtr1 ctr1;
union srvsvc_NetShareCtr ctr;
uint32 numentries;
@ -164,7 +165,7 @@ static BOOL get_rpc_shares(struct cli_state *cli,
status = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL,
&info_level, &ctr,
0xffffffff, &numentries,
&enum_hnd);
&penum_hnd);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(mem_ctx);