summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_svcctl_nt.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-28 00:33:06 +0100
committerGünther Deschner <gd@samba.org>2008-02-28 00:43:31 +0100
commitc86cbd736957b6d5f3c3f648ce07c593fd60af99 (patch)
tree76741316081e4d2b944db5d4d5127980042a6b86 /source3/rpc_server/srv_svcctl_nt.c
parent8b23d4a6c3e615015ef230070a3f4f9ee5095d2a (diff)
downloadsamba-c86cbd736957b6d5f3c3f648ce07c593fd60af99.tar.gz
samba-c86cbd736957b6d5f3c3f648ce07c593fd60af99.tar.bz2
samba-c86cbd736957b6d5f3c3f648ce07c593fd60af99.zip
Use pidl for _svcctl_SetServiceObjectSecurity().
Guenther (This used to be commit 19048ab4ad1b262536efae5b8b8b4411ec088921)
Diffstat (limited to 'source3/rpc_server/srv_svcctl_nt.c')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 2672647c1d..73d09b1bbb 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -854,13 +854,16 @@ WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
}
/********************************************************************
+ _svcctl_SetServiceObjectSecurity
********************************************************************/
-WERROR _svcctl_set_service_sec( pipes_struct *p, SVCCTL_Q_SET_SERVICE_SEC *q_u, SVCCTL_R_SET_SERVICE_SEC *r_u )
+WERROR _svcctl_SetServiceObjectSecurity(pipes_struct *p,
+ struct svcctl_SetServiceObjectSecurity *r)
{
- SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle );
+ SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
SEC_DESC *sec_desc = NULL;
uint32 required_access;
+ NTSTATUS status;
if ( !info || !(info->type & (SVC_HANDLE_IS_SERVICE|SVC_HANDLE_IS_SCM)) )
return WERR_BADFID;
@@ -872,7 +875,7 @@ WERROR _svcctl_set_service_sec( pipes_struct *p, SVCCTL_Q_SET_SERVICE_SEC *q_u,
/* check the access on the open handle */
- switch ( q_u->security_flags ) {
+ switch ( r->in.security_flags ) {
case DACL_SECURITY_INFORMATION:
required_access = STD_RIGHT_WRITE_DAC_ACCESS;
break;
@@ -893,8 +896,12 @@ WERROR _svcctl_set_service_sec( pipes_struct *p, SVCCTL_Q_SET_SERVICE_SEC *q_u,
/* read the security descfriptor */
- if ( !sec_io_desc("", &sec_desc, &q_u->buffer.prs, 0 ) )
- return WERR_NOMEM;
+ status = unmarshall_sec_desc(p->mem_ctx,
+ r->in.buffer, r->in.buffer_size,
+ &sec_desc);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
/* store the new SD */
@@ -911,12 +918,6 @@ WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r)
return WERR_NOT_SUPPORTED;
}
-WERROR _svcctl_SetServiceObjectSecurity(pipes_struct *p, struct svcctl_SetServiceObjectSecurity *r)
-{
- p->rng_fault_state = True;
- return WERR_NOT_SUPPORTED;
-}
-
WERROR _svcctl_SetServiceStatus(pipes_struct *p, struct svcctl_SetServiceStatus *r)
{
p->rng_fault_state = True;