summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-31 17:24:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:01 -0500
commitd99f4f004ca46e4c0f2e60a231a14708a128f0f2 (patch)
tree4a6cfa91d9ffbc137249260ace6f4a59525cfac6 /source3
parenteec5e026adb176ad48b1ebcb0ddf71bbb609ad95 (diff)
downloadsamba-d99f4f004ca46e4c0f2e60a231a14708a128f0f2.tar.gz
samba-d99f4f004ca46e4c0f2e60a231a14708a128f0f2.tar.bz2
samba-d99f4f004ca46e4c0f2e60a231a14708a128f0f2.zip
r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26
(This used to be commit 0b1bc3521fac52f3164b6cc9e053abc3ceabf5e7)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in5
-rw-r--r--source3/include/includes.h4
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/libmsrpc/cac_svcctl.c4
-rw-r--r--source3/rpc_client/cli_svcctl.c24
-rw-r--r--source3/rpc_parse/parse_svcctl.c47
-rw-r--r--source3/rpc_server/srv_svcctl.c45
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c265
-rw-r--r--source3/utils/net_rpc_service.c20
9 files changed, 305 insertions, 111 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 07735c0e80..49005f46e3 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -349,7 +349,7 @@ LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_unixinfo.o librpc/gen_ndr/cli_lsa.o \
librpc/gen_ndr/cli_dfs.o librpc/gen_ndr/cli_echo.o \
- librpc/gen_ndr/cli_srvsvc.o \
+ librpc/gen_ndr/cli_srvsvc.o librpc/gen_ndr/cli_svcctl.o \
librpc/gen_ndr/cli_winreg.o librpc/gen_ndr/cli_initshutdown.o \
librpc/gen_ndr/cli_eventlog.o librpc/gen_ndr/cli_epmapper.o \
$(LIBNDR_GEN_OBJ) $(RPCCLIENT_NDR_OBJ)
@@ -384,6 +384,7 @@ RPC_SVC_OBJ = librpc/gen_ndr/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o
RPC_WKS_OBJ = librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
RPC_SVCCTL_OBJ = rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
+ librpc/gen_ndr/srv_svcctl.o \
services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
services/svc_netlogon.o services/svc_winreg.o \
services/svc_wins.o
@@ -399,7 +400,7 @@ RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_se
RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
-RPC_ECHO_OBJ = librpc/gen_ndr/srv_echo.o rpc_server/srv_echo_nt.o
+RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o librpc/gen_ndr/srv_echo.o
RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 6c1931844e..e3e24eff07 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -687,8 +687,6 @@ typedef int BOOL;
#include "rpc_ds.h"
#include "rpc_perfcount.h"
#include "rpc_perfcount_defs.h"
-#include "librpc/gen_ndr/srvsvc.h"
-#include "librpc/gen_ndr/echo.h"
#include "librpc/gen_ndr/notify.h"
#include "nt_printing.h"
#include "idmap.h"
@@ -782,6 +780,8 @@ enum flush_reason_enum {
/* generated rpc server implementation functions */
#include "librpc/gen_ndr/srv_echo.h"
+#include "librpc/gen_ndr/srv_svcctl.h"
+#include "librpc/gen_ndr/srv_lsa.h"
/***** automatically generated prototypes *****/
#ifndef NO_PROTO_H
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7a3b487f08..6f10eb67c8 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -313,6 +313,8 @@ struct id_map {
#include "librpc/gen_ndr/eventlog.h"
#include "librpc/gen_ndr/srvsvc.h"
#include "librpc/gen_ndr/wkssvc.h"
+#include "librpc/gen_ndr/echo.h"
+#include "librpc/gen_ndr/svcctl.h"
struct lsa_dom_info {
BOOL valid;
diff --git a/source3/libmsrpc/cac_svcctl.c b/source3/libmsrpc/cac_svcctl.c
index 3d3034df15..71cdfba73e 100644
--- a/source3/libmsrpc/cac_svcctl.c
+++ b/source3/libmsrpc/cac_svcctl.c
@@ -91,7 +91,6 @@ int cac_SvcClose( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
POLICY_HND * scm_hnd )
{
struct rpc_pipe_client *pipe_hnd = NULL;
- WERROR err;
if ( !hnd )
return CAC_FAILURE;
@@ -112,8 +111,7 @@ int cac_SvcClose( CacServerHandle * hnd, TALLOC_CTX * mem_ctx,
return CAC_FAILURE;
}
- err = rpccli_svcctl_close_service( pipe_hnd, mem_ctx, scm_hnd );
- hnd->status = werror_to_ntstatus( err );
+ hnd->status = rpccli_svcctl_CloseServiceHandle( pipe_hnd, mem_ctx, scm_hnd );
if ( !NT_STATUS_IS_OK( hnd->status ) )
return CAC_FAILURE;
diff --git a/source3/rpc_client/cli_svcctl.c b/source3/rpc_client/cli_svcctl.c
index d183670f5f..021648ba1c 100644
--- a/source3/rpc_client/cli_svcctl.c
+++ b/source3/rpc_client/cli_svcctl.c
@@ -133,30 +133,6 @@ WERROR rpccli_svcctl_open_service( struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return out.status;
}
-/********************************************************************
-********************************************************************/
-
-WERROR rpccli_svcctl_close_service(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hService )
-{
- SVCCTL_Q_CLOSE_SERVICE in;
- SVCCTL_R_CLOSE_SERVICE out;
- prs_struct qbuf, rbuf;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- memcpy( &in.handle, hService, sizeof(POLICY_HND) );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_CLOSE_SERVICE,
- in, out,
- qbuf, rbuf,
- svcctl_io_q_close_service,
- svcctl_io_r_close_service,
- WERR_GENERAL_FAILURE );
-
- return out.status;
-}
-
/*******************************************************************
*******************************************************************/
diff --git a/source3/rpc_parse/parse_svcctl.c b/source3/rpc_parse/parse_svcctl.c
index 3846812f31..8302218e34 100644
--- a/source3/rpc_parse/parse_svcctl.c
+++ b/source3/rpc_parse/parse_svcctl.c
@@ -196,53 +196,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config )
return size;
}
-
-
-/*******************************************************************
-********************************************************************/
-
-BOOL svcctl_io_q_close_service(const char *desc, SVCCTL_Q_CLOSE_SERVICE *q_u, prs_struct *ps, int depth)
-{
-
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "svcctl_io_q_close_service");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
-********************************************************************/
-
-BOOL svcctl_io_r_close_service(const char *desc, SVCCTL_R_CLOSE_SERVICE *r_u, prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "svcctl_io_r_close_service");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol_handle", &r_u->handle, ps, depth))
- return False;
-
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
/*******************************************************************
********************************************************************/
diff --git a/source3/rpc_server/srv_svcctl.c b/source3/rpc_server/srv_svcctl.c
index 74ae3aaa16..e36df7ac93 100644
--- a/source3/rpc_server/srv_svcctl.c
+++ b/source3/rpc_server/srv_svcctl.c
@@ -1,7 +1,7 @@
/*
* Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
- * Copyright (C) Gerald Carter 2005.
+ * Copyright (C) Gerald Carter 2005 - 2007
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,28 +23,30 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-/*******************************************************************
- ********************************************************************/
-
-static BOOL api_svcctl_close_service(pipes_struct *p)
+static BOOL proxy_svcctl_call(pipes_struct *p, uint8 opnum)
{
- SVCCTL_Q_CLOSE_SERVICE q_u;
- SVCCTL_R_CLOSE_SERVICE r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
+ struct api_struct *fns;
+ int n_fns;
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
+ svcctl_get_pipe_fns(&fns, &n_fns);
- if(!svcctl_io_q_close_service("", &q_u, data, 0))
+ if (opnum >= n_fns)
return False;
- r_u.status = _svcctl_close_service(p, &q_u, &r_u);
+ if (fns[opnum].opnum != opnum) {
+ smb_panic("SVCCTL function table not sorted\n");
+ }
- if(!svcctl_io_r_close_service("", &r_u, rdata, 0))
- return False;
+ return fns[opnum].fn(p);
+}
- return True;
+
+/*******************************************************************
+ ********************************************************************/
+
+static BOOL api_svcctl_close_service(pipes_struct *p)
+{
+ return proxy_svcctl_call( p, DCERPC_SVCCTL_CLOSESERVICEHANDLE );
}
/*******************************************************************
@@ -432,14 +434,15 @@ static struct api_struct api_svcctl_cmds[] =
};
-void svcctl_get_pipe_fns( struct api_struct **fns, int *n_fns )
+void svcctl2_get_pipe_fns( struct api_struct **fns, int *n_fns )
{
- *fns = api_svcctl_cmds;
+ *fns = api_svcctl_cmds;
*n_fns = sizeof(api_svcctl_cmds) / sizeof(struct api_struct);
}
-NTSTATUS rpc_svcctl_init(void)
+NTSTATUS rpc_svcctl2_init(void)
{
- return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "svcctl", "ntsvcs", api_svcctl_cmds,
- sizeof(api_svcctl_cmds) / sizeof(struct api_struct));
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION,
+ "svcctl", "ntsvcs", api_svcctl_cmds,
+ sizeof(api_svcctl_cmds) / sizeof(struct api_struct));
}
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 0b985f83dc..433abf06a8 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -318,9 +318,12 @@ WERROR _svcctl_open_service(pipes_struct *p, SVCCTL_Q_OPEN_SERVICE *q_u, SVCCTL_
/********************************************************************
********************************************************************/
-WERROR _svcctl_close_service(pipes_struct *p, SVCCTL_Q_CLOSE_SERVICE *q_u, SVCCTL_R_CLOSE_SERVICE *r_u)
+WERROR _svcctl_CloseServiceHandle(pipes_struct *p, struct svcctl_CloseServiceHandle *r)
{
- return close_policy_hnd( p, &q_u->handle ) ? WERR_OK : WERR_BADFID;
+ if ( !close_policy_hnd( p, r->in.handle ) )
+ return WERR_BADFID;
+
+ return WERR_OK;
}
/********************************************************************
@@ -871,3 +874,261 @@ WERROR _svcctl_set_service_sec( pipes_struct *p, SVCCTL_Q_SET_SERVICE_SEC *q_u,
}
+WERROR _svcctl_ControlService(pipes_struct *p, struct svcctl_ControlService *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_DeleteService(pipes_struct *p, struct svcctl_DeleteService *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_LockServiceDatabase(pipes_struct *p, struct svcctl_LockServiceDatabase *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p, struct svcctl_QueryServiceObjectSecurity *r)
+{
+ p->rng_fault_state = True;
+ 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_QueryServiceStatus(pipes_struct *p, struct svcctl_QueryServiceStatus *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;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_UnlockServiceDatabase(pipes_struct *p, struct svcctl_UnlockServiceDatabase *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_NotifyBootConfigStatus(pipes_struct *p, struct svcctl_NotifyBootConfigStatus *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_SCSetServiceBitsW(pipes_struct *p, struct svcctl_SCSetServiceBitsW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_ChangeServiceConfigW(pipes_struct *p, struct svcctl_ChangeServiceConfigW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_CreateServiceW(pipes_struct *p, struct svcctl_CreateServiceW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_EnumDependentServicesW(pipes_struct *p, struct svcctl_EnumDependentServicesW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesStatusW *r)
+{
+ p->rng_fault_state = True;
+ 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;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceConfigW(pipes_struct *p, struct svcctl_QueryServiceConfigW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct svcctl_QueryServiceLockStatusW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_StartServiceW(pipes_struct *p, struct svcctl_StartServiceW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_GetServiceDisplayNameW(pipes_struct *p, struct svcctl_GetServiceDisplayNameW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_GetServiceKeyNameW(pipes_struct *p, struct svcctl_GetServiceKeyNameW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_SCSetServiceBitsA(pipes_struct *p, struct svcctl_SCSetServiceBitsA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_ChangeServiceConfigA(pipes_struct *p, struct svcctl_ChangeServiceConfigA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_CreateServiceA(pipes_struct *p, struct svcctl_CreateServiceA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_EnumDependentServicesA(pipes_struct *p, struct svcctl_EnumDependentServicesA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_EnumServicesStatusA(pipes_struct *p, struct svcctl_EnumServicesStatusA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_OpenSCManagerA(pipes_struct *p, struct svcctl_OpenSCManagerA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_OpenServiceA(pipes_struct *p, struct svcctl_OpenServiceA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceConfigA(pipes_struct *p, struct svcctl_QueryServiceConfigA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceLockStatusA(pipes_struct *p, struct svcctl_QueryServiceLockStatusA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_StartServiceA(pipes_struct *p, struct svcctl_StartServiceA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_GetServiceDisplayNameA(pipes_struct *p, struct svcctl_GetServiceDisplayNameA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_GetServiceKeyNameA(pipes_struct *p, struct svcctl_GetServiceKeyNameA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_GetCurrentGroupeStateW(pipes_struct *p, struct svcctl_GetCurrentGroupeStateW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_EnumServiceGroupW(pipes_struct *p, struct svcctl_EnumServiceGroupW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_ChangeServiceConfig2A(pipes_struct *p, struct svcctl_ChangeServiceConfig2A *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_ChangeServiceConfig2W(pipes_struct *p, struct svcctl_ChangeServiceConfig2W *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceConfig2A(pipes_struct *p, struct svcctl_QueryServiceConfig2A *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p, struct svcctl_QueryServiceConfig2W *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p, struct svcctl_QueryServiceStatusEx *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _EnumServicesStatusExA(pipes_struct *p, struct EnumServicesStatusExA *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _EnumServicesStatusExW(pipes_struct *p, struct EnumServicesStatusExW *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR _svcctl_SCSendTSMessage(pipes_struct *p, struct svcctl_SCSendTSMessage *r)
+{
+ p->rng_fault_state = True;
+ return WERR_NOT_SUPPORTED;
+}
+
diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c
index 58a5b27f40..c0b1fe3515 100644
--- a/source3/utils/net_rpc_service.c
+++ b/source3/utils/net_rpc_service.c
@@ -49,7 +49,7 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd,
*state = service_status.state;
}
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hService );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
return result;
}
@@ -131,7 +131,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd,
d_printf("%s service is %s.\n", service, svc_status_string(state));
done:
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hService );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
return result;
}
@@ -185,7 +185,7 @@ static NTSTATUS rpc_service_list_internal(const DOM_SID *domain_sid,
}
done:
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}
@@ -286,8 +286,8 @@ static NTSTATUS rpc_service_status_internal(const DOM_SID *domain_sid,
}
done:
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hService );
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}
@@ -325,7 +325,7 @@ static NTSTATUS rpc_service_stop_internal(const DOM_SID *domain_sid,
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
SVCCTL_CONTROL_STOP, SVCCTL_STOPPED );
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}
@@ -363,7 +363,7 @@ static NTSTATUS rpc_service_pause_internal(const DOM_SID *domain_sid,
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
SVCCTL_CONTROL_PAUSE, SVCCTL_PAUSED );
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}
@@ -401,7 +401,7 @@ static NTSTATUS rpc_service_resume_internal(const DOM_SID *domain_sid,
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
SVCCTL_CONTROL_CONTINUE, SVCCTL_RUNNING );
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}
@@ -463,8 +463,8 @@ static NTSTATUS rpc_service_start_internal(const DOM_SID *domain_sid,
d_fprintf(stderr, "Failed to start service: %s [%s]\n", servicename, dos_errstr(result) );
done:
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hService );
- rpccli_svcctl_close_service(pipe_hnd, mem_ctx, &hSCM );
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
+ rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
return werror_to_ntstatus(result);
}