mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Remove unused marshalling for SVCCTL_GET_DISPLAY_NAME.
Guenther
This commit is contained in:
parent
2746e88c5c
commit
144f41e7c3
@ -196,20 +196,6 @@ typedef struct _ServiceInfo {
|
||||
|
||||
/**************************/
|
||||
|
||||
typedef struct {
|
||||
POLICY_HND handle;
|
||||
UNISTR2 servicename;
|
||||
uint32 display_name_len;
|
||||
} SVCCTL_Q_GET_DISPLAY_NAME;
|
||||
|
||||
typedef struct {
|
||||
UNISTR2 displayname;
|
||||
uint32 display_name_len;
|
||||
WERROR status;
|
||||
} SVCCTL_R_GET_DISPLAY_NAME;
|
||||
|
||||
/**************************/
|
||||
|
||||
typedef struct {
|
||||
POLICY_HND handle;
|
||||
uint32 parmcount;
|
||||
|
@ -290,48 +290,3 @@ WERROR rpccli_svcctl_control_service( struct rpc_pipe_client *cli, TALLOC_CTX *m
|
||||
|
||||
return out.status;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
|
||||
WERROR rpccli_svcctl_get_dispname( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *hService, fstring displayname )
|
||||
{
|
||||
SVCCTL_Q_GET_DISPLAY_NAME in;
|
||||
SVCCTL_R_GET_DISPLAY_NAME out;
|
||||
prs_struct qbuf, rbuf;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
memcpy( &in.handle, hService, sizeof(POLICY_HND) );
|
||||
in.display_name_len = 0;
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
svcctl_io_q_get_display_name,
|
||||
svcctl_io_r_get_display_name,
|
||||
WERR_GENERAL_FAILURE );
|
||||
|
||||
/* second time with correct buffer size...should be ok */
|
||||
|
||||
if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
|
||||
in.display_name_len = out.display_name_len;
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, PI_SVCCTL, SVCCTL_GET_DISPLAY_NAME,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
svcctl_io_q_get_display_name,
|
||||
svcctl_io_r_get_display_name,
|
||||
WERR_GENERAL_FAILURE );
|
||||
}
|
||||
|
||||
if ( !W_ERROR_IS_OK( out.status ) )
|
||||
return out.status;
|
||||
|
||||
rpcstr_pull( displayname, out.displayname.buffer, sizeof(displayname), -1, STR_TERMINATE );
|
||||
|
||||
return out.status;
|
||||
}
|
||||
|
@ -195,77 +195,6 @@ uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config )
|
||||
return size;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
bool svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth)
|
||||
{
|
||||
if (q_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "svcctl_io_q_get_display_name");
|
||||
depth++;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!prs_uint32("display_name_len", ps, depth, &q_u->display_name_len))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
bool init_svcctl_r_get_display_name( SVCCTL_R_GET_DISPLAY_NAME *r_u, const char *displayname )
|
||||
{
|
||||
r_u->display_name_len = strlen(displayname);
|
||||
init_unistr2( &r_u->displayname, displayname, UNI_STR_TERMINATE );
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
bool svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth)
|
||||
{
|
||||
if (r_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "svcctl_io_r_get_display_name");
|
||||
depth++;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
|
||||
if(!smb_io_unistr2("displayname", &r_u->displayname, 1, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!prs_uint32("display_name_len", ps, depth, &r_u->display_name_len))
|
||||
return False;
|
||||
|
||||
if(!prs_werror("status", ps, depth, &r_u->status))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
********************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user