1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Use pidl for _svcctl_OpenSCManagerW().

Guenther
This commit is contained in:
Günther Deschner 2008-02-18 11:55:31 +01:00
parent d752d52f1a
commit 1131e914df
2 changed files with 6 additions and 27 deletions

View File

@ -53,23 +53,7 @@ static bool api_svcctl_close_service(pipes_struct *p)
static bool api_svcctl_open_scmanager(pipes_struct *p)
{
SVCCTL_Q_OPEN_SCMANAGER q_u;
SVCCTL_R_OPEN_SCMANAGER r_u;
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
if(!svcctl_io_q_open_scmanager("", &q_u, data, 0))
return False;
r_u.status = _svcctl_open_scmanager(p, &q_u, &r_u);
if(!svcctl_io_r_open_scmanager("", &r_u, rdata, 0))
return False;
return True;
return proxy_svcctl_call(p, NDR_SVCCTL_OPENSCMANAGERW);
}
/*******************************************************************

View File

@ -263,7 +263,8 @@ done:
/********************************************************************
********************************************************************/
WERROR _svcctl_open_scmanager(pipes_struct *p, SVCCTL_Q_OPEN_SCMANAGER *q_u, SVCCTL_R_OPEN_SCMANAGER *r_u)
WERROR _svcctl_OpenSCManagerW(pipes_struct *p,
struct svcctl_OpenSCManagerW *r)
{
SEC_DESC *sec_desc;
uint32 access_granted = 0;
@ -274,12 +275,12 @@ WERROR _svcctl_open_scmanager(pipes_struct *p, SVCCTL_Q_OPEN_SCMANAGER *q_u, SVC
if ( !(sec_desc = construct_scm_sd( p->mem_ctx )) )
return WERR_NOMEM;
se_map_generic( &q_u->access, &scm_generic_map );
status = svcctl_access_check( sec_desc, p->pipe_user.nt_user_token, q_u->access, &access_granted );
se_map_generic( &r->in.access_mask, &scm_generic_map );
status = svcctl_access_check( sec_desc, p->pipe_user.nt_user_token, r->in.access_mask, &access_granted );
if ( !NT_STATUS_IS_OK(status) )
return ntstatus_to_werror( status );
return create_open_service_handle( p, &r_u->handle, SVC_HANDLE_IS_SCM, NULL, access_granted );
return create_open_service_handle( p, r->out.handle, SVC_HANDLE_IS_SCM, NULL, access_granted );
}
/********************************************************************
@ -964,12 +965,6 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesSt
return WERR_NOT_SUPPORTED;
}
WERROR _svcctl_OpenSCManagerW(pipes_struct *p, struct svcctl_OpenSCManagerW *r)
{
p->rng_fault_state = True;
return WERR_NOT_SUPPORTED;
}
WERROR _svcctl_OpenServiceW(pipes_struct *p, struct svcctl_OpenServiceW *r)
{
p->rng_fault_state = True;