mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Remove unused marshalling for SVCCTL_OPEN_SERVICE.
Guenther
This commit is contained in:
parent
1537a2ff36
commit
e0a8818af0
@ -210,19 +210,6 @@ typedef struct {
|
||||
|
||||
/**************************/
|
||||
|
||||
typedef struct {
|
||||
POLICY_HND handle;
|
||||
UNISTR2 servicename;
|
||||
uint32 access;
|
||||
} SVCCTL_Q_OPEN_SERVICE;
|
||||
|
||||
typedef struct {
|
||||
POLICY_HND handle;
|
||||
WERROR status;
|
||||
} SVCCTL_R_OPEN_SERVICE;
|
||||
|
||||
/**************************/
|
||||
|
||||
typedef struct {
|
||||
POLICY_HND handle;
|
||||
uint32 parmcount;
|
||||
|
@ -57,39 +57,6 @@ const char* svc_status_string( uint32 state )
|
||||
return talloc_strdup(talloc_tos(), msg);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
********************************************************************/
|
||||
|
||||
WERROR rpccli_svcctl_open_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *hSCM, POLICY_HND *hService,
|
||||
const char *servicename, uint32 access_desired )
|
||||
{
|
||||
SVCCTL_Q_OPEN_SERVICE in;
|
||||
SVCCTL_R_OPEN_SERVICE out;
|
||||
prs_struct qbuf, rbuf;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
memcpy( &in.handle, hSCM, sizeof(POLICY_HND) );
|
||||
init_unistr2( &in.servicename, servicename, UNI_STR_TERMINATE );
|
||||
in.access = access_desired;
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_OPEN_SERVICE_W,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
svcctl_io_q_open_service,
|
||||
svcctl_io_r_open_service,
|
||||
WERR_GENERAL_FAILURE );
|
||||
|
||||
if ( !W_ERROR_IS_OK( out.status ) )
|
||||
return out.status;
|
||||
|
||||
memcpy( hService, &out.handle, sizeof(POLICY_HND) );
|
||||
|
||||
return out.status;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
|
||||
|
@ -266,58 +266,6 @@ bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
bool svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth)
|
||||
{
|
||||
if (q_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "svcctl_io_q_open_service");
|
||||
depth++;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!prs_uint32("access", ps, depth, &q_u->access))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
bool svcctl_io_r_open_service(const char *desc, SVCCTL_R_OPEN_SERVICE *r_u, prs_struct *ps, int depth)
|
||||
{
|
||||
if (r_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "svcctl_io_r_open_service");
|
||||
depth++;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!smb_io_pol_hnd("service_pol", &r_u->handle, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!prs_werror("status", ps, depth, &r_u->status))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user