summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource3/include/rpc_spoolss.h3
-rw-r--r--source3/rpc_parse/parse_spoolss.c24
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c22
3 files changed, 36 insertions, 13 deletions
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 22606b2f30..d2b5efac07 100755
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -1810,7 +1810,8 @@ SPOOL_R_SETPRINTERDATA;
typedef struct spool_q_resetprinter
{
POLICY_HND handle;
- uint32 unknown1;
+ uint32 datatype_ptr;
+ UNISTR2 datatype;
DEVMODE_CTR devmode_ctr;
} SPOOL_Q_RESETPRINTER;
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 17af8394d8..97e2020a3e 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -4,7 +4,7 @@
* Copyright (C) Andrew Tridgell 1992-2000,
* Copyright (C) Luke Kenneth Casson Leighton 1996-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.
*
* 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
******************************************************************/
-BOOL make_spoolss_q_addprinterdriver(
- TALLOC_CTX *mem_ctx,
- SPOOL_Q_ADDPRINTERDRIVER *q_u,
- const char* srv_name,
- uint32 level,
- PRINTER_DRIVER_CTR *info)
+BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx,
+ SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name,
+ uint32 level, PRINTER_DRIVER_CTR *info)
{
DEBUG(5,("make_spoolss_q_addprinterdriver\n"));
@@ -4949,11 +4946,9 @@ BOOL make_spoolss_q_addprinterdriver(
return True;
}
-BOOL make_spoolss_driver_info_3(
- TALLOC_CTX *mem_ctx,
+BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx,
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info,
- DRIVER_INFO_3 *info3
-)
+ DRIVER_INFO_3 *info3)
{
uint32 len = 0;
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))
return False;
- if (!prs_uint32("unknown1", ps, depth, &q_u->unknown1))
+ if (!prs_uint32("datatype_ptr", ps, depth, &q_u->datatype_ptr))
+ 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))
return False;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index c4a2334c16..b23cbaa9ae 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -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)
{
+ 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;
}