mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-spoolss: remove old rpccli_spoolss_getprinterdriver wrapper.
Guenther
This commit is contained in:
parent
3ceffcaa46
commit
5ffa03dcd8
@ -5487,10 +5487,6 @@ WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
|
||||
WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *pol, uint32 level,
|
||||
PRINTER_INFO_CTR *ctr, uint32 command);
|
||||
WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *pol, uint32 level,
|
||||
const char *env, int version, PRINTER_DRIVER_CTR *ctr);
|
||||
WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 level, const char *env,
|
||||
|
@ -801,85 +801,6 @@ WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
|
||||
/**********************************************************************
|
||||
**********************************************************************/
|
||||
|
||||
WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
POLICY_HND *pol, uint32 level,
|
||||
const char *env, int version, PRINTER_DRIVER_CTR *ctr)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
SPOOL_Q_GETPRINTERDRIVER2 in;
|
||||
SPOOL_R_GETPRINTERDRIVER2 out;
|
||||
RPC_BUFFER buffer;
|
||||
fstring server;
|
||||
uint32 offered;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
fstrcpy(server, cli->desthost);
|
||||
strupper_m(server);
|
||||
|
||||
offered = 0;
|
||||
if (!rpcbuf_init(&buffer, offered, mem_ctx))
|
||||
return WERR_NOMEM;
|
||||
make_spoolss_q_getprinterdriver2( &in, pol, env, level,
|
||||
version, 2, &buffer, offered);
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDRIVER2,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
spoolss_io_q_getprinterdriver2,
|
||||
spoolss_io_r_getprinterdriver2,
|
||||
WERR_GENERAL_FAILURE );
|
||||
|
||||
if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
|
||||
offered = out.needed;
|
||||
|
||||
ZERO_STRUCT(in);
|
||||
ZERO_STRUCT(out);
|
||||
|
||||
if (!rpcbuf_init(&buffer, offered, mem_ctx))
|
||||
return WERR_NOMEM;
|
||||
make_spoolss_q_getprinterdriver2( &in, pol, env, level,
|
||||
version, 2, &buffer, offered);
|
||||
|
||||
CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_GETPRINTERDRIVER2,
|
||||
in, out,
|
||||
qbuf, rbuf,
|
||||
spoolss_io_q_getprinterdriver2,
|
||||
spoolss_io_r_getprinterdriver2,
|
||||
WERR_GENERAL_FAILURE );
|
||||
}
|
||||
|
||||
if ( !W_ERROR_IS_OK(out.status) )
|
||||
return out.status;
|
||||
|
||||
switch (level) {
|
||||
case 1:
|
||||
if (!decode_printer_driver_1(mem_ctx, out.buffer, 1, &ctr->info1)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!decode_printer_driver_2(mem_ctx, out.buffer, 1, &ctr->info2)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!decode_printer_driver_3(mem_ctx, out.buffer, 1, &ctr->info3)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return WERR_UNKNOWN_LEVEL;
|
||||
}
|
||||
|
||||
return out.status;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
**********************************************************************/
|
||||
|
||||
WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 level, const char *env,
|
||||
|
@ -2050,33 +2050,6 @@ uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info)
|
||||
return size;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* init a structure.
|
||||
********************************************************************/
|
||||
|
||||
bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u,
|
||||
const POLICY_HND *hnd,
|
||||
const fstring architecture,
|
||||
uint32 level, uint32 clientmajor, uint32 clientminor,
|
||||
RPC_BUFFER *buffer, uint32 offered)
|
||||
{
|
||||
if (q_u == NULL)
|
||||
return False;
|
||||
|
||||
memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
|
||||
|
||||
init_buf_unistr2(&q_u->architecture, &q_u->architecture_ptr, architecture);
|
||||
|
||||
q_u->level=level;
|
||||
q_u->clientmajorversion=clientmajor;
|
||||
q_u->clientminorversion=clientminor;
|
||||
|
||||
q_u->buffer=buffer;
|
||||
q_u->offered=offered;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* read a structure.
|
||||
* called from spoolss_getprinterdriver2 (srv_spoolss.c)
|
||||
|
Loading…
Reference in New Issue
Block a user