2006-09-20 16:32:29 +00:00
/*
* Unix SMB / CIFS implementation .
* client auto - generated by pidl . DO NOT MODIFY !
*/
# include "includes.h"
# include "librpc/gen_ndr/cli_svcctl.h"
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_CloseServiceHandle ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in,out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_CloseServiceHandle r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_CloseServiceHandle , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CLOSESERVICEHANDLE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_CloseServiceHandle , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_ControlService ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t control /* [in] */ ,
struct SERVICE_STATUS * service_status /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_ControlService r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . control = control ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_ControlService , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CONTROLSERVICE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_ControlService , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-05-31 15:46:01 +00:00
* service_status = * r . out . service_status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_DeleteService ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_DeleteService r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_DeleteService , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_DELETESERVICE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_DeleteService , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_LockServiceDatabase ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
struct policy_handle * lock /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_LockServiceDatabase r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_LockServiceDatabase , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_LOCKSERVICEDATABASE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_LockServiceDatabase , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* lock = * r . out . lock ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t security_flags /* [in] */ ,
uint8_t * buffer /* [out] [ref,size_is(buffer_size)] */ ,
uint32_t buffer_size /* [in] [range(0,0x40000)] */ ,
uint32_t * needed /* [out] [ref,range(0,0x40000)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceObjectSecurity r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-02-28 00:03:00 +01:00
r . in . handle = handle ;
r . in . security_flags = security_flags ;
r . in . buffer_size = buffer_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceObjectSecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceObjectSecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( buffer , r . out . buffer , r . in . buffer_size * sizeof ( * buffer ) ) ;
2008-02-28 00:03:00 +01:00
* needed = * r . out . needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_SetServiceObjectSecurity ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t security_flags /* [in] */ ,
uint8_t * buffer /* [in] [ref,size_is(buffer_size)] */ ,
uint32_t buffer_size /* [in] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_SetServiceObjectSecurity r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-02-28 00:18:37 +01:00
r . in . handle = handle ;
r . in . security_flags = security_flags ;
r . in . buffer = buffer ;
r . in . buffer_size = buffer_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_SetServiceObjectSecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_SETSERVICEOBJECTSECURITY ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_SetServiceObjectSecurity , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceStatus ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
struct SERVICE_STATUS * service_status /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceStatus r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICESTATUS ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-05-31 15:46:01 +00:00
* service_status = * r . out . service_status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_SetServiceStatus ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_SetServiceStatus r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_SetServiceStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_SETSERVICESTATUS ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_SetServiceStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_UnlockServiceDatabase ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * lock /* [in,out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_UnlockServiceDatabase r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . lock = lock ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_UnlockServiceDatabase , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_UNLOCKSERVICEDATABASE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_UnlockServiceDatabase , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* lock = * r . out . lock ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_NotifyBootConfigStatus ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_NotifyBootConfigStatus r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_NotifyBootConfigStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_NotifyBootConfigStatus , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_SCSetServiceBitsW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t bits /* [in] */ ,
uint32_t bitson /* [in] */ ,
uint32_t immediate /* [in] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_SCSetServiceBitsW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . bits = bits ;
r . in . bitson = bitson ;
r . in . immediate = immediate ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_SCSetServiceBitsW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_SCSETSERVICEBITSW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_SCSetServiceBitsW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_ChangeServiceConfigW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t type /* [in] */ ,
uint32_t start /* [in] */ ,
uint32_t error /* [in] */ ,
const char * binary_path /* [in] [unique,charset(UTF16)] */ ,
const char * load_order_group /* [in] [unique,charset(UTF16)] */ ,
uint32_t * tag_id /* [out] [ref] */ ,
const char * dependencies /* [in] [unique,charset(UTF16)] */ ,
const char * service_start_name /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
const char * display_name /* [in] [unique,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_ChangeServiceConfigW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . type = type ;
r . in . start = start ;
r . in . error = error ;
r . in . binary_path = binary_path ;
r . in . load_order_group = load_order_group ;
r . in . dependencies = dependencies ;
r . in . service_start_name = service_start_name ;
r . in . password = password ;
r . in . display_name = display_name ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_ChangeServiceConfigW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CHANGESERVICECONFIGW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_ChangeServiceConfigW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* tag_id = * r . out . tag_id ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_CreateServiceW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * scmanager_handle /* [in] [ref] */ ,
const char * ServiceName /* [in] [charset(UTF16)] */ ,
const char * DisplayName /* [in] [unique,charset(UTF16)] */ ,
uint32_t desired_access /* [in] */ ,
uint32_t type /* [in] */ ,
uint32_t start_type /* [in] */ ,
uint32_t error_control /* [in] */ ,
const char * binary_path /* [in] [charset(UTF16)] */ ,
const char * LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */ ,
uint32_t * TagId /* [in,out] [unique] */ ,
uint8_t * dependencies /* [in] [unique,size_is(dependencies_size)] */ ,
uint32_t dependencies_size /* [in] */ ,
const char * service_start_name /* [in] [unique,charset(UTF16)] */ ,
uint8_t * password /* [in] [unique,size_is(password_size)] */ ,
uint32_t password_size /* [in] */ ,
struct policy_handle * handle /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_CreateServiceW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . scmanager_handle = scmanager_handle ;
r . in . ServiceName = ServiceName ;
r . in . DisplayName = DisplayName ;
r . in . desired_access = desired_access ;
r . in . type = type ;
r . in . start_type = start_type ;
r . in . error_control = error_control ;
r . in . binary_path = binary_path ;
r . in . LoadOrderGroupKey = LoadOrderGroupKey ;
2007-01-16 15:42:03 +00:00
r . in . TagId = TagId ;
2006-09-20 16:32:29 +00:00
r . in . dependencies = dependencies ;
r . in . dependencies_size = dependencies_size ;
r . in . service_start_name = service_start_name ;
r . in . password = password ;
r . in . password_size = password_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_CreateServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CREATESERVICEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_CreateServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-10-17 10:35:51 +02:00
if ( TagId & & r . out . TagId ) {
2007-01-16 15:42:03 +00:00
* TagId = * r . out . TagId ;
}
2006-09-20 16:32:29 +00:00
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_EnumDependentServicesW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * service /* [in] [ref] */ ,
uint32_t state /* [in] */ ,
uint8_t * service_status /* [out] [ref,size_is(buf_size)] */ ,
uint32_t buf_size /* [in] [range(0,0x40000)] */ ,
uint32_t * bytes_needed /* [out] [ref,range(0,0x40000)] */ ,
uint32_t * services_returned /* [out] [ref,range(0,0x40000)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_EnumDependentServicesW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . service = service ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_EnumDependentServicesW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_ENUMDEPENDENTSERVICESW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_EnumDependentServicesW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( service_status , r . out . service_status , r . in . buf_size * sizeof ( * service_status ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* services_returned = * r . out . services_returned ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_EnumServicesStatusW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t type /* [in] */ ,
uint32_t state /* [in] */ ,
uint32_t buf_size /* [in] */ ,
uint8_t * service /* [out] [size_is(buf_size)] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
uint32_t * services_returned /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_EnumServicesStatusW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . type = type ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2007-01-16 15:42:03 +00:00
r . in . resume_handle = resume_handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_EnumServicesStatusW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_ENUMSERVICESSTATUSW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_EnumServicesStatusW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( service , r . out . service , r . in . buf_size * sizeof ( * service ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* services_returned = * r . out . services_returned ;
2007-10-17 10:35:51 +02:00
if ( resume_handle & & r . out . resume_handle ) {
2007-01-16 15:42:03 +00:00
* resume_handle = * r . out . resume_handle ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_OpenSCManagerW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
const char * MachineName /* [in] [unique,charset(UTF16)] */ ,
const char * DatabaseName /* [in] [unique,charset(UTF16)] */ ,
uint32_t access_mask /* [in] */ ,
struct policy_handle * handle /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_OpenSCManagerW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . MachineName = MachineName ;
r . in . DatabaseName = DatabaseName ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_OpenSCManagerW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_OPENSCMANAGERW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_OpenSCManagerW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_OpenServiceW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * scmanager_handle /* [in] [ref] */ ,
const char * ServiceName /* [in] [charset(UTF16)] */ ,
uint32_t access_mask /* [in] */ ,
struct policy_handle * handle /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_OpenServiceW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . scmanager_handle = scmanager_handle ;
r . in . ServiceName = ServiceName ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_OpenServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_OPENSERVICEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_OpenServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceConfigW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint8_t * query /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceConfigW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceConfigW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICECONFIGW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceConfigW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( query , r . out . query , r . in . buf_size * sizeof ( * query ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceLockStatusW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t buf_size /* [in] */ ,
struct SERVICE_LOCK_STATUS * lock_status /* [out] [ref] */ ,
uint32_t * required_buf_size /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceLockStatusW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceLockStatusW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICELOCKSTATUSW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceLockStatusW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-05-31 15:46:01 +00:00
* lock_status = * r . out . lock_status ;
2006-09-20 16:32:29 +00:00
* required_buf_size = * r . out . required_buf_size ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_StartServiceW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t NumArgs /* [in] */ ,
const char * Arguments /* [in] [unique,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_StartServiceW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . NumArgs = NumArgs ;
r . in . Arguments = Arguments ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_StartServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_STARTSERVICEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_StartServiceW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_GetServiceDisplayNameW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
const char * service_name /* [in] [unique,charset(UTF16)] */ ,
const char * * display_name /* [out] [ref,charset(UTF16)] */ ,
uint32_t * display_name_length /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_GetServiceDisplayNameW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . service_name = service_name ;
2007-01-16 15:42:03 +00:00
r . in . display_name_length = display_name_length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_GetServiceDisplayNameW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_GETSERVICEDISPLAYNAMEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_GetServiceDisplayNameW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* display_name = * r . out . display_name ;
2007-10-17 10:35:51 +02:00
if ( display_name_length & & r . out . display_name_length ) {
2007-01-16 15:42:03 +00:00
* display_name_length = * r . out . display_name_length ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_GetServiceKeyNameW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
const char * service_name /* [in] [unique,charset(UTF16)] */ ,
const char * * key_name /* [out] [ref,charset(UTF16)] */ ,
uint32_t * display_name_length /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_GetServiceKeyNameW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . service_name = service_name ;
2007-01-16 15:42:03 +00:00
r . in . display_name_length = display_name_length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_GetServiceKeyNameW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_GETSERVICEKEYNAMEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_GetServiceKeyNameW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* key_name = * r . out . key_name ;
2007-10-17 10:35:51 +02:00
if ( display_name_length & & r . out . display_name_length ) {
2007-01-16 15:42:03 +00:00
* display_name_length = * r . out . display_name_length ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_SCSetServiceBitsA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t bits /* [in] */ ,
uint32_t bitson /* [in] */ ,
uint32_t immediate /* [in] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_SCSetServiceBitsA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . bits = bits ;
r . in . bitson = bitson ;
r . in . immediate = immediate ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_SCSetServiceBitsA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_SCSETSERVICEBITSA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_SCSetServiceBitsA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_ChangeServiceConfigA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t type /* [in] */ ,
uint32_t start /* [in] */ ,
uint32_t error /* [in] */ ,
const char * binary_path /* [in] [unique,charset(UTF16)] */ ,
const char * load_order_group /* [in] [unique,charset(UTF16)] */ ,
uint32_t * tag_id /* [out] [ref] */ ,
const char * dependencies /* [in] [unique,charset(UTF16)] */ ,
const char * service_start_name /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
const char * display_name /* [in] [unique,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_ChangeServiceConfigA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . type = type ;
r . in . start = start ;
r . in . error = error ;
r . in . binary_path = binary_path ;
r . in . load_order_group = load_order_group ;
r . in . dependencies = dependencies ;
r . in . service_start_name = service_start_name ;
r . in . password = password ;
r . in . display_name = display_name ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_ChangeServiceConfigA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CHANGESERVICECONFIGA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_ChangeServiceConfigA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* tag_id = * r . out . tag_id ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_CreateServiceA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
const char * ServiceName /* [in] [unique,charset(UTF16)] */ ,
const char * DisplayName /* [in] [unique,charset(UTF16)] */ ,
uint32_t desired_access /* [in] */ ,
uint32_t type /* [in] */ ,
uint32_t start_type /* [in] */ ,
uint32_t error_control /* [in] */ ,
const char * binary_path /* [in] [unique,charset(UTF16)] */ ,
const char * LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */ ,
uint32_t * TagId /* [out] [unique] */ ,
const char * dependencies /* [in] [unique,charset(UTF16)] */ ,
const char * service_start_name /* [in] [unique,charset(UTF16)] */ ,
const char * password /* [in] [unique,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_CreateServiceA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . ServiceName = ServiceName ;
r . in . DisplayName = DisplayName ;
r . in . desired_access = desired_access ;
r . in . type = type ;
r . in . start_type = start_type ;
r . in . error_control = error_control ;
r . in . binary_path = binary_path ;
r . in . LoadOrderGroupKey = LoadOrderGroupKey ;
r . in . dependencies = dependencies ;
r . in . service_start_name = service_start_name ;
r . in . password = password ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_CreateServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CREATESERVICEA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_CreateServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-10-17 10:35:51 +02:00
if ( TagId & & r . out . TagId ) {
2007-01-16 15:42:03 +00:00
* TagId = * r . out . TagId ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_EnumDependentServicesA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * service /* [in] [ref] */ ,
uint32_t state /* [in] */ ,
struct ENUM_SERVICE_STATUS * service_status /* [out] [unique] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
uint32_t * services_returned /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_EnumDependentServicesA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . service = service ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_EnumDependentServicesA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_ENUMDEPENDENTSERVICESA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_EnumDependentServicesA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-10-17 10:35:51 +02:00
if ( service_status & & r . out . service_status ) {
2007-05-31 15:46:01 +00:00
* service_status = * r . out . service_status ;
2007-01-16 15:42:03 +00:00
}
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* services_returned = * r . out . services_returned ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_EnumServicesStatusA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t type /* [in] */ ,
uint32_t state /* [in] */ ,
uint32_t buf_size /* [in] */ ,
uint8_t * service /* [out] [size_is(buf_size)] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
uint32_t * services_returned /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_EnumServicesStatusA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . type = type ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2007-01-16 15:42:03 +00:00
r . in . resume_handle = resume_handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_EnumServicesStatusA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_ENUMSERVICESSTATUSA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_EnumServicesStatusA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( service , r . out . service , r . in . buf_size * sizeof ( * service ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* services_returned = * r . out . services_returned ;
2007-10-17 10:35:51 +02:00
if ( resume_handle & & r . out . resume_handle ) {
2007-01-16 15:42:03 +00:00
* resume_handle = * r . out . resume_handle ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_OpenSCManagerA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
const char * MachineName /* [in] [unique,charset(UTF16)] */ ,
const char * DatabaseName /* [in] [unique,charset(UTF16)] */ ,
uint32_t access_mask /* [in] */ ,
struct policy_handle * handle /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_OpenSCManagerA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . MachineName = MachineName ;
r . in . DatabaseName = DatabaseName ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_OpenSCManagerA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_OPENSCMANAGERA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_OpenSCManagerA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* handle = * r . out . handle ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_OpenServiceA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * scmanager_handle /* [in] [ref] */ ,
const char * ServiceName /* [in] [unique,charset(UTF16)] */ ,
uint32_t access_mask /* [in] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_OpenServiceA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . scmanager_handle = scmanager_handle ;
r . in . ServiceName = ServiceName ;
r . in . access_mask = access_mask ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_OpenServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_OPENSERVICEA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_OpenServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceConfigA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint8_t * query /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceConfigA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceConfigA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICECONFIGA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceConfigA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( query , r . out . query , r . in . buf_size * sizeof ( * query ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceLockStatusA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t buf_size /* [in] */ ,
struct SERVICE_LOCK_STATUS * lock_status /* [out] [ref] */ ,
uint32_t * required_buf_size /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceLockStatusA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceLockStatusA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICELOCKSTATUSA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceLockStatusA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2007-05-31 15:46:01 +00:00
* lock_status = * r . out . lock_status ;
2006-09-20 16:32:29 +00:00
* required_buf_size = * r . out . required_buf_size ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_StartServiceA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t NumArgs /* [in] */ ,
const char * Arguments /* [in] [unique,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_StartServiceA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . NumArgs = NumArgs ;
r . in . Arguments = Arguments ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_StartServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_STARTSERVICEA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_StartServiceA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_GetServiceDisplayNameA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
const char * service_name /* [in] [unique,charset(UTF16)] */ ,
const char * * display_name /* [out] [ref,charset(UTF16)] */ ,
uint32_t * display_name_length /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_GetServiceDisplayNameA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . service_name = service_name ;
2007-01-16 15:42:03 +00:00
r . in . display_name_length = display_name_length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_GetServiceDisplayNameA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_GETSERVICEDISPLAYNAMEA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_GetServiceDisplayNameA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* display_name = * r . out . display_name ;
2007-10-17 10:35:51 +02:00
if ( display_name_length & & r . out . display_name_length ) {
2007-01-16 15:42:03 +00:00
* display_name_length = * r . out . display_name_length ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_GetServiceKeyNameA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
const char * service_name /* [in] [unique,charset(UTF16)] */ ,
const char * * key_name /* [out] [ref,charset(UTF16)] */ ,
uint32_t * display_name_length /* [in,out] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_GetServiceKeyNameA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . service_name = service_name ;
2007-01-16 15:42:03 +00:00
r . in . display_name_length = display_name_length ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_GetServiceKeyNameA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_GETSERVICEKEYNAMEA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_GetServiceKeyNameA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
* key_name = * r . out . key_name ;
2007-10-17 10:35:51 +02:00
if ( display_name_length & & r . out . display_name_length ) {
2007-01-16 15:42:03 +00:00
* display_name_length = * r . out . display_name_length ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_GetCurrentGroupeStateW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_GetCurrentGroupeStateW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_GETCURRENTGROUPESTATEW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_GetCurrentGroupeStateW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_EnumServiceGroupW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_EnumServiceGroupW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_EnumServiceGroupW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_ENUMSERVICEGROUPW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_EnumServiceGroupW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_ChangeServiceConfig2A ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint8_t * info /* [in] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_ChangeServiceConfig2A r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . info_level = info_level ;
r . in . info = info ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_ChangeServiceConfig2A , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CHANGESERVICECONFIG2A ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_ChangeServiceConfig2A , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_ChangeServiceConfig2W ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint8_t * info /* [in] [unique] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_ChangeServiceConfig2W r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . info_level = info_level ;
r . in . info = info ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_ChangeServiceConfig2W , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_CHANGESERVICECONFIG2W ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_ChangeServiceConfig2W , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceConfig2A ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint8_t * buffer /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceConfig2A r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . info_level = info_level ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceConfig2A , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICECONFIG2A ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceConfig2A , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( buffer , r . out . buffer , r . in . buf_size * sizeof ( * buffer ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceConfig2W ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint8_t * buffer /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceConfig2W r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . info_level = info_level ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceConfig2W , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICECONFIG2W ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceConfig2W , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( buffer , r . out . buffer , r . in . buf_size * sizeof ( * buffer ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_QueryServiceStatusEx ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * handle /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint8_t * buffer /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_QueryServiceStatusEx r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . handle = handle ;
r . in . info_level = info_level ;
r . in . buf_size = buf_size ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_QueryServiceStatusEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_QUERYSERVICESTATUSEX ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_QueryServiceStatusEx , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( buffer , r . out . buffer , r . in . buf_size * sizeof ( * buffer ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_EnumServicesStatusExA ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * scmanager /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint32_t type /* [in] */ ,
uint32_t state /* [in] */ ,
uint8_t * services /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
uint32_t * service_returned /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
const char * * group_name /* [out] [ref,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct EnumServicesStatusExA r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . scmanager = scmanager ;
r . in . info_level = info_level ;
r . in . type = type ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2007-01-16 15:42:03 +00:00
r . in . resume_handle = resume_handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( EnumServicesStatusExA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_ENUMSERVICESSTATUSEXA ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( EnumServicesStatusExA , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( services , r . out . services , r . in . buf_size * sizeof ( * services ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* service_returned = * r . out . service_returned ;
2007-10-17 10:35:51 +02:00
if ( resume_handle & & r . out . resume_handle ) {
2007-01-16 15:42:03 +00:00
* resume_handle = * r . out . resume_handle ;
}
2006-09-20 16:32:29 +00:00
* group_name = * r . out . group_name ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_EnumServicesStatusExW ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
2008-03-25 17:52:33 +01:00
struct policy_handle * scmanager /* [in] [ref] */ ,
uint32_t info_level /* [in] */ ,
uint32_t type /* [in] */ ,
uint32_t state /* [in] */ ,
uint8_t * services /* [out] */ ,
uint32_t buf_size /* [in] */ ,
uint32_t * bytes_needed /* [out] [ref] */ ,
uint32_t * service_returned /* [out] [ref] */ ,
uint32_t * resume_handle /* [in,out] [unique] */ ,
const char * * group_name /* [out] [ref,charset(UTF16)] */ ,
2008-01-09 11:59:11 +01:00
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct EnumServicesStatusExW r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
r . in . scmanager = scmanager ;
r . in . info_level = info_level ;
r . in . type = type ;
r . in . state = state ;
r . in . buf_size = buf_size ;
2007-01-16 15:42:03 +00:00
r . in . resume_handle = resume_handle ;
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( EnumServicesStatusExW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_ENUMSERVICESSTATUSEXW ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( EnumServicesStatusExW , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-04-15 16:11:10 +02:00
memcpy ( services , r . out . services , r . in . buf_size * sizeof ( * services ) ) ;
2006-09-20 16:32:29 +00:00
* bytes_needed = * r . out . bytes_needed ;
* service_returned = * r . out . service_returned ;
2007-10-17 10:35:51 +02:00
if ( resume_handle & & r . out . resume_handle ) {
2007-01-16 15:42:03 +00:00
* resume_handle = * r . out . resume_handle ;
}
2006-09-20 16:32:29 +00:00
* group_name = * r . out . group_name ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}
2008-01-09 11:59:11 +01:00
NTSTATUS rpccli_svcctl_SCSendTSMessage ( struct rpc_pipe_client * cli ,
TALLOC_CTX * mem_ctx ,
WERROR * werror )
2006-09-20 16:32:29 +00:00
{
struct svcctl_SCSendTSMessage r ;
NTSTATUS status ;
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* In parameters */
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_IN_DEBUG ( svcctl_SCSendTSMessage , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
status = cli_do_rpc_ndr ( cli ,
mem_ctx ,
PI_SVCCTL ,
& ndr_table_svcctl ,
NDR_SVCCTL_SCSENDTSMESSAGE ,
& r ) ;
2008-01-08 18:07:55 +01:00
2007-02-16 14:50:57 +00:00
if ( ! NT_STATUS_IS_OK ( status ) ) {
2006-09-28 21:19:08 +00:00
return status ;
}
2008-01-08 18:07:55 +01:00
2008-01-09 11:59:11 +01:00
if ( DEBUGLEVEL > = 10 ) {
2006-09-20 16:32:29 +00:00
NDR_PRINT_OUT_DEBUG ( svcctl_SCSendTSMessage , & r ) ;
2008-01-09 11:59:11 +01:00
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
if ( NT_STATUS_IS_ERR ( status ) ) {
return status ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return variables */
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
/* Return result */
2007-12-03 18:19:20 +01:00
if ( werror ) {
* werror = r . out . result ;
}
2008-01-08 18:07:55 +01:00
2006-09-20 16:32:29 +00:00
return werror_to_ntstatus ( r . out . result ) ;
}