summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c30
2 files changed, 11 insertions, 41 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 96823cd923..c3fafbd10d 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -191,27 +191,7 @@ static bool api_spoolss_deleteprinter(pipes_struct *p)
static bool api_spoolss_deleteprinterdriver(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDRIVER q_u;
- SPOOL_R_DELETEPRINTERDRIVER r_u;
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if (!spoolss_io_q_deleteprinterdriver("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdriver: unable to unmarshall SPOOL_Q_DELETEPRINTERDRIVER.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdriver(p, &q_u, &r_u);
-
- if (!spoolss_io_r_deleteprinterdriver("",&r_u,rdata,0)) {
- DEBUG(0,("spoolss_io_r_deleteprinter: unable to marshall SPOOL_R_DELETEPRINTER.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVER);
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 118c2e0a92..ec99bca9aa 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1990,14 +1990,15 @@ static int get_version_id (char * arch)
return -1;
}
-/********************************************************************
- * _spoolss_deleteprinterdriver
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinterDriver
+****************************************************************/
-WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u)
+WERROR _spoolss_DeletePrinterDriver(pipes_struct *p,
+ struct spoolss_DeletePrinterDriver *r)
{
- fstring driver;
- fstring arch;
+ char *driver;
+ char *arch;
NT_PRINTER_DRIVER_INFO_LEVEL info;
NT_PRINTER_DRIVER_INFO_LEVEL info_win2k;
int version;
@@ -2018,9 +2019,6 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver));
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch));
-
/* check that we have a valid driver name first */
if ((version=get_version_id(arch)) == -1)
@@ -2029,6 +2027,9 @@ WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER
ZERO_STRUCT(info);
ZERO_STRUCT(info_win2k);
+ driver = CONST_DISCARD(char *, r->in.driver);
+ arch = CONST_DISCARD(char *, r->in.architecture);
+
if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version)))
{
/* try for Win2k driver if "Windows NT x86" */
@@ -10106,17 +10107,6 @@ WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p,
}
/****************************************************************
- _spoolss_DeletePrinterDriver
-****************************************************************/
-
-WERROR _spoolss_DeletePrinterDriver(pipes_struct *p,
- struct spoolss_DeletePrinterDriver *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_AddPrintProcessor
****************************************************************/