mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s3-svcctl: use pidl based struct SERVICE_STATUS.
Guenther
This commit is contained in:
parent
490a14068e
commit
50721b485f
@ -47,16 +47,10 @@
|
||||
|
||||
/* utility structures for RPCs */
|
||||
|
||||
/*
|
||||
* "struct SERVICE_STATUS" comes from librpc/gen_ndr/svcctl.h
|
||||
*/
|
||||
|
||||
typedef struct SERVICE_STATUS SERVICE_STATUS;
|
||||
|
||||
typedef struct {
|
||||
UNISTR servicename;
|
||||
UNISTR displayname;
|
||||
SERVICE_STATUS status;
|
||||
struct SERVICE_STATUS status;
|
||||
} ENUM_SERVICES_STATUS;
|
||||
|
||||
/* rpc structures */
|
||||
|
@ -30,9 +30,9 @@
|
||||
|
||||
typedef struct {
|
||||
/* functions for enumerating subkeys and values */
|
||||
WERROR (*stop_service)( const char *service, SERVICE_STATUS *status );
|
||||
WERROR (*stop_service)( const char *service, struct SERVICE_STATUS *status );
|
||||
WERROR (*start_service) ( const char *service );
|
||||
WERROR (*service_status)( const char *service, SERVICE_STATUS *status );
|
||||
WERROR (*service_status)( const char *service, struct SERVICE_STATUS *status );
|
||||
} SERVICE_CONTROL_OPS;
|
||||
|
||||
/* structure to store the service handle information */
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
static bool svcctl_io_service_status( const char *desc, SERVICE_STATUS *status, prs_struct *ps, int depth )
|
||||
static bool svcctl_io_service_status( const char *desc, struct SERVICE_STATUS *status, prs_struct *ps, int depth )
|
||||
{
|
||||
|
||||
prs_debug(ps, depth, desc, "svcctl_io_service_status");
|
||||
@ -85,7 +85,7 @@ uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status )
|
||||
|
||||
size += size_of_relative_string( &status->servicename );
|
||||
size += size_of_relative_string( &status->displayname );
|
||||
size += sizeof(SERVICE_STATUS);
|
||||
size += sizeof(struct SERVICE_STATUS);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR netlogon_status( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
ZERO_STRUCTP( service_status );
|
||||
|
||||
@ -44,7 +44,7 @@ static WERROR netlogon_status( const char *service, SERVICE_STATUS *service_stat
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR netlogon_stop( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR netlogon_stop( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
netlogon_status( service, service_status );
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR rcinit_stop( const char *service, SERVICE_STATUS *status )
|
||||
static WERROR rcinit_stop( const char *service, struct SERVICE_STATUS *status )
|
||||
{
|
||||
char *command = NULL;
|
||||
int ret, fd;
|
||||
@ -81,7 +81,7 @@ static WERROR rcinit_start( const char *service )
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR rcinit_status( const char *service, SERVICE_STATUS *status )
|
||||
static WERROR rcinit_status( const char *service, struct SERVICE_STATUS *status )
|
||||
{
|
||||
char *command = NULL;
|
||||
int ret, fd;
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR spoolss_stop( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR spoolss_stop( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
ZERO_STRUCTP( service_status );
|
||||
|
||||
@ -57,7 +57,7 @@ static WERROR spoolss_start( const char *service )
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR spoolss_status( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR spoolss_status( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
ZERO_STRUCTP( service_status );
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR winreg_stop( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR winreg_stop( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
return WERR_ACCESS_DENIED;
|
||||
}
|
||||
@ -40,7 +40,7 @@ static WERROR winreg_start( const char *service )
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR winreg_status( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR winreg_status( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
ZERO_STRUCTP( service_status );
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR wins_status( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR wins_status( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
ZERO_STRUCTP( service_status );
|
||||
|
||||
@ -44,7 +44,7 @@ static WERROR wins_status( const char *service, SERVICE_STATUS *service_status )
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
static WERROR wins_stop( const char *service, SERVICE_STATUS *service_status )
|
||||
static WERROR wins_stop( const char *service, struct SERVICE_STATUS *service_status )
|
||||
{
|
||||
wins_status( service, service_status );
|
||||
|
||||
|
@ -66,7 +66,7 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd,
|
||||
uint32 *state )
|
||||
{
|
||||
POLICY_HND hService;
|
||||
SERVICE_STATUS service_status;
|
||||
struct SERVICE_STATUS service_status;
|
||||
WERROR result = WERR_GENERAL_FAILURE;
|
||||
NTSTATUS status;
|
||||
|
||||
@ -145,7 +145,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd,
|
||||
POLICY_HND hService;
|
||||
WERROR result = WERR_GENERAL_FAILURE;
|
||||
NTSTATUS status;
|
||||
SERVICE_STATUS service_status;
|
||||
struct SERVICE_STATUS service_status;
|
||||
uint32 state = 0;
|
||||
|
||||
/* Open the Service */
|
||||
@ -263,7 +263,7 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
|
||||
POLICY_HND hSCM, hService;
|
||||
WERROR result = WERR_GENERAL_FAILURE;
|
||||
NTSTATUS status;
|
||||
SERVICE_STATUS service_status;
|
||||
struct SERVICE_STATUS service_status;
|
||||
struct QUERY_SERVICE_CONFIG config;
|
||||
uint32_t buf_size = sizeof(config);
|
||||
uint32_t ret_size = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user