summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_svcctl_nt.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-18 13:43:12 +0100
committerGünther Deschner <gd@samba.org>2008-02-18 13:43:12 +0100
commit1c298d59a670f1c1ccf7c492b5a29dc8bb15ed0c (patch)
treec637b453133d1472860932acdab3af1644376974 /source3/rpc_server/srv_svcctl_nt.c
parent6d95d7d9b9277e3aba6b43869a31fd3226ac697c (diff)
downloadsamba-1c298d59a670f1c1ccf7c492b5a29dc8bb15ed0c.tar.gz
samba-1c298d59a670f1c1ccf7c492b5a29dc8bb15ed0c.tar.bz2
samba-1c298d59a670f1c1ccf7c492b5a29dc8bb15ed0c.zip
Use pidl for _svcctl_GetServiceDisplayNameW().
Guenther (This used to be commit 2746e88c5c4a9e859356d5c53106eba0c2cd7cbe)
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 40f3584e3e..bdd0f4ffe3 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -332,23 +332,30 @@ WERROR _svcctl_CloseServiceHandle(pipes_struct *p, struct svcctl_CloseServiceHan
}
/********************************************************************
+ _svcctl_GetServiceDisplayNameW
********************************************************************/
-WERROR _svcctl_get_display_name(pipes_struct *p, SVCCTL_Q_GET_DISPLAY_NAME *q_u, SVCCTL_R_GET_DISPLAY_NAME *r_u)
+WERROR _svcctl_GetServiceDisplayNameW(pipes_struct *p,
+ struct svcctl_GetServiceDisplayNameW *r)
{
- fstring service;
+ const char *service;
const char *display_name;
- SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle );
+ SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
/* can only use an SCM handle here */
if ( !info || (info->type != SVC_HANDLE_IS_SCM) )
return WERR_BADFID;
- rpcstr_pull(service, q_u->servicename.buffer, sizeof(service), q_u->servicename.uni_str_len*2, 0);
+ service = r->in.service_name;
display_name = svcctl_lookup_dispname(p->mem_ctx, service, p->pipe_user.nt_user_token );
- init_svcctl_r_get_display_name( r_u, display_name ? display_name : "");
+ if (!display_name) {
+ display_name = "";
+ }
+
+ *r->out.display_name = display_name;
+ *r->out.display_name_length = strlen(display_name);
return WERR_OK;
}
@@ -981,12 +988,6 @@ WERROR _svcctl_StartServiceW(pipes_struct *p, struct svcctl_StartServiceW *r)
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;