diff options
author | Günther Deschner <gd@samba.org> | 2011-01-12 19:12:07 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-01-13 12:18:45 +0100 |
commit | f9ca6904a474e8c33532708977878940ad5696e0 (patch) | |
tree | b32031179734ec1e151dbf318c6fee5f2eaec5c3 /source3/utils | |
parent | d0c05ab2ec5af5090048091d65a48736dcc2ba6b (diff) | |
download | samba-f9ca6904a474e8c33532708977878940ad5696e0.tar.gz samba-f9ca6904a474e8c33532708977878940ad5696e0.tar.xz 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/utils')
-rw-r--r-- | source3/utils/net_rpc_service.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c index 1fabdef294d..f1cd2a6b0d9 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)) { |