mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
Fix svcctl callers.
Guenther
This commit is contained in:
@ -4921,7 +4921,7 @@ static NTSTATUS rpc_file_close_internals(const DOM_SID *domain_sid,
|
|||||||
{
|
{
|
||||||
return rpccli_srvsvc_NetFileClose(pipe_hnd, mem_ctx,
|
return rpccli_srvsvc_NetFileClose(pipe_hnd, mem_ctx,
|
||||||
pipe_hnd->cli->desthost,
|
pipe_hnd->cli->desthost,
|
||||||
atoi(argv[0]));
|
atoi(argv[0]), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,7 +48,7 @@ static WERROR query_service_state(struct rpc_pipe_client *pipe_hnd,
|
|||||||
*state = service_status.state;
|
*state = service_status.state;
|
||||||
}
|
}
|
||||||
|
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ static WERROR control_service(struct rpc_pipe_client *pipe_hnd,
|
|||||||
d_printf("%s service is %s.\n", service, svc_status_string(state));
|
d_printf("%s service is %s.\n", service, svc_status_string(state));
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ static NTSTATUS rpc_service_list_internal(const DOM_SID *domain_sid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
@ -285,8 +285,8 @@ static NTSTATUS rpc_service_status_internal(const DOM_SID *domain_sid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ static NTSTATUS rpc_service_stop_internal(const DOM_SID *domain_sid,
|
|||||||
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
||||||
SVCCTL_CONTROL_STOP, SVCCTL_STOPPED );
|
SVCCTL_CONTROL_STOP, SVCCTL_STOPPED );
|
||||||
|
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ static NTSTATUS rpc_service_pause_internal(const DOM_SID *domain_sid,
|
|||||||
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
||||||
SVCCTL_CONTROL_PAUSE, SVCCTL_PAUSED );
|
SVCCTL_CONTROL_PAUSE, SVCCTL_PAUSED );
|
||||||
|
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
@ -400,7 +400,7 @@ static NTSTATUS rpc_service_resume_internal(const DOM_SID *domain_sid,
|
|||||||
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
result = control_service(pipe_hnd, mem_ctx, &hSCM, servicename,
|
||||||
SVCCTL_CONTROL_CONTINUE, SVCCTL_RUNNING );
|
SVCCTL_CONTROL_CONTINUE, SVCCTL_RUNNING );
|
||||||
|
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
@ -462,8 +462,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) );
|
d_fprintf(stderr, "Failed to start service: %s [%s]\n", servicename, dos_errstr(result) );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hService, NULL);
|
||||||
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM);
|
rpccli_svcctl_CloseServiceHandle(pipe_hnd, mem_ctx, &hSCM, NULL);
|
||||||
|
|
||||||
return werror_to_ntstatus(result);
|
return werror_to_ntstatus(result);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user