mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
parent
e9f2a38ff1
commit
826f3fb86b
@ -1810,7 +1810,8 @@ SPOOL_R_SETPRINTERDATA;
|
|||||||
typedef struct spool_q_resetprinter
|
typedef struct spool_q_resetprinter
|
||||||
{
|
{
|
||||||
POLICY_HND handle;
|
POLICY_HND handle;
|
||||||
uint32 unknown1;
|
uint32 datatype_ptr;
|
||||||
|
UNISTR2 datatype;
|
||||||
DEVMODE_CTR devmode_ctr;
|
DEVMODE_CTR devmode_ctr;
|
||||||
|
|
||||||
} SPOOL_Q_RESETPRINTER;
|
} SPOOL_Q_RESETPRINTER;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) Andrew Tridgell 1992-2000,
|
* Copyright (C) Andrew Tridgell 1992-2000,
|
||||||
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
|
* Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
|
||||||
* Copyright (C) Jean François Micouleau 1998-2000,
|
* Copyright (C) Jean François Micouleau 1998-2000,
|
||||||
* Copyright (C) Gerald Carter 2000,
|
* Copyright (C) Gerald Carter 2000-2002
|
||||||
* Copyright (C) Tim Potter 2001.
|
* Copyright (C) Tim Potter 2001.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -4913,12 +4913,9 @@ BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LE
|
|||||||
init a SPOOL_Q_ADDPRINTERDRIVER struct
|
init a SPOOL_Q_ADDPRINTERDRIVER struct
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
BOOL make_spoolss_q_addprinterdriver(
|
BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name,
|
||||||
SPOOL_Q_ADDPRINTERDRIVER *q_u,
|
uint32 level, PRINTER_DRIVER_CTR *info)
|
||||||
const char* srv_name,
|
|
||||||
uint32 level,
|
|
||||||
PRINTER_DRIVER_CTR *info)
|
|
||||||
{
|
{
|
||||||
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));
|
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));
|
||||||
|
|
||||||
@ -4949,11 +4946,9 @@ BOOL make_spoolss_q_addprinterdriver(
|
|||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL make_spoolss_driver_info_3(
|
BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
|
||||||
TALLOC_CTX *mem_ctx,
|
|
||||||
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
|
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
|
||||||
DRIVER_INFO_3 *info3
|
DRIVER_INFO_3 *info3)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
uint32 len = 0;
|
uint32 len = 0;
|
||||||
uint16 *ptr = info3->dependentfiles;
|
uint16 *ptr = info3->dependentfiles;
|
||||||
@ -5741,8 +5736,13 @@ BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct
|
|||||||
if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
|
if (!smb_io_pol_hnd("printer handle", &q_u->handle, ps, depth))
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1))
|
if (!prs_uint32("datatype_ptr", ps, depth, &q_u->datatype_ptr))
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
|
if (q_u->datatype_ptr) {
|
||||||
|
if (!smb_io_unistr2("datatype", &q_u->datatype, q_u->datatype_ptr?True:False, ps, depth))
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
|
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
|
||||||
return False;
|
return False;
|
||||||
|
@ -6680,6 +6680,28 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP
|
|||||||
|
|
||||||
WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u)
|
WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u)
|
||||||
{
|
{
|
||||||
|
POLICY_HND *handle = &q_u->handle;
|
||||||
|
Printer_entry *Printer=find_printer_index_by_hnd(p, handle);
|
||||||
|
int snum;
|
||||||
|
|
||||||
|
DEBUG(5,("_spoolss_resetprinter\n"));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* All we do is to check to see if the handle and queue is valid.
|
||||||
|
* This call really doesn't mean anything to us because we only
|
||||||
|
* support RAW printing. --jerry
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!Printer) {
|
||||||
|
DEBUG(2,("_spoolss_resetprinter: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle)));
|
||||||
|
return WERR_BADFID;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!get_printer_snum(p,handle, &snum))
|
||||||
|
return WERR_BADFID;
|
||||||
|
|
||||||
|
|
||||||
|
/* blindly return success */
|
||||||
return WERR_OK;
|
return WERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user