summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-12 19:12:07 +0100
committerAndreas Schneider <asn@samba.org>2011-01-13 12:18:45 +0100
commitf9ca6904a474e8c33532708977878940ad5696e0 (patch)
treeb32031179734ec1e151dbf318c6fee5f2eaec5c3 /source3
parentd0c05ab2ec5af5090048091d65a48736dcc2ba6b (diff)
downloadsamba-f9ca6904a474e8c33532708977878940ad5696e0.tar.gz
samba-f9ca6904a474e8c33532708977878940ad5696e0.tar.bz2
samba-f9ca6904a474e8c33532708977878940ad5696e0.zip
s3-net: remove some pointless fstrings in "net rpc service".
Guenther Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc_service.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c
index 1fabdef294..f1cd2a6b0d 100644
--- a/source3/utils/net_rpc_service.c
+++ b/source3/utils/net_rpc_service.c
@@ -551,7 +551,6 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c,
{
struct policy_handle hSCM;
WERROR result = WERR_GENERAL_FAILURE;
- fstring servicename;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
if (argc != 1 ) {
@@ -559,8 +558,6 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c,
return NT_STATUS_OK;
}
- fstrcpy( servicename, argv[0] );
-
/* Open the Service Control Manager */
result = open_scm(b, mem_ctx, pipe_hnd->srv_name_slash,
SC_RIGHT_MGR_ENUMERATE_SERVICE,
@@ -569,7 +566,7 @@ static NTSTATUS rpc_service_stop_internal(struct net_context *c,
return werror_to_ntstatus(result);
}
- result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
+ result = control_service(pipe_hnd, mem_ctx, &hSCM, argv[0],
SVCCTL_CONTROL_STOP, SVCCTL_STOPPED );
if (is_valid_policy_hnd(&hSCM)) {
@@ -594,7 +591,6 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c,
{
struct policy_handle hSCM;
WERROR result = WERR_GENERAL_FAILURE;
- fstring servicename;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
if (argc != 1 ) {
@@ -602,8 +598,6 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c,
return NT_STATUS_OK;
}
- fstrcpy( servicename, argv[0] );
-
/* Open the Service Control Manager */
result = open_scm(b, mem_ctx, pipe_hnd->srv_name_slash,
SC_RIGHT_MGR_ENUMERATE_SERVICE,
@@ -612,7 +606,7 @@ static NTSTATUS rpc_service_pause_internal(struct net_context *c,
return werror_to_ntstatus(result);
}
- result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
+ result = control_service(pipe_hnd, mem_ctx, &hSCM, argv[0],
SVCCTL_CONTROL_PAUSE, SVCCTL_PAUSED );
if (is_valid_policy_hnd(&hSCM)) {
@@ -637,7 +631,6 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c,
{
struct policy_handle hSCM;
WERROR result = WERR_GENERAL_FAILURE;
- fstring servicename;
struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
if (argc != 1 ) {
@@ -645,8 +638,6 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c,
return NT_STATUS_OK;
}
- fstrcpy( servicename, argv[0] );
-
/* Open the Service Control Manager */
result = open_scm(b, mem_ctx, pipe_hnd->srv_name_slash,
SC_RIGHT_MGR_ENUMERATE_SERVICE,
@@ -655,7 +646,7 @@ static NTSTATUS rpc_service_resume_internal(struct net_context *c,
return werror_to_ntstatus(result);
}
- result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
+ result = control_service(pipe_hnd, mem_ctx, &hSCM, argv[0],
SVCCTL_CONTROL_CONTINUE, SVCCTL_RUNNING );
if (is_valid_policy_hnd(&hSCM)) {