summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-09 11:13:10 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 12:34:03 +0100
commit160e8c7a3779b263130469bffb168d142a7cd708 (patch)
tree7f69ec13b78fb61158b490674b4c816ddbb69a52 /source3
parent763fe063d2aacb40c87208155d3d35d19ebc971d (diff)
downloadsamba-160e8c7a3779b263130469bffb168d142a7cd708.tar.gz
samba-160e8c7a3779b263130469bffb168d142a7cd708.tar.bz2
samba-160e8c7a3779b263130469bffb168d142a7cd708.zip
s3-spoolss: use pidl for _spoolss_DeletePrinterDriverEx.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss.c22
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c32
2 files changed, 12 insertions, 42 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index c3fafbd10d..732d127632 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -1232,27 +1232,7 @@ static bool api_spoolss_addprinterdriverex(pipes_struct *p)
static bool api_spoolss_deleteprinterdriverex(pipes_struct *p)
{
- SPOOL_Q_DELETEPRINTERDRIVEREX q_u;
- SPOOL_R_DELETEPRINTERDRIVEREX 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_deleteprinterdriverex("", &q_u, data, 0)) {
- DEBUG(0,("spoolss_io_q_deleteprinterdriverex: unable to unmarshall SPOOL_Q_DELETEPRINTERDRIVEREX.\n"));
- return False;
- }
-
- r_u.status = _spoolss_deleteprinterdriverex(p, &q_u, &r_u);
-
- if(!spoolss_io_r_deleteprinterdriverex("", &r_u, rdata, 0)) {
- DEBUG(0,("spoolss_io_r_deleteprinterdriverex: unable to marshall SPOOL_R_DELETEPRINTERDRIVEREX.\n"));
- return False;
- }
-
- return True;
+ return proxy_spoolss_call(p, NDR_SPOOLSS_DELETEPRINTERDRIVEREX);
}
/****************************************************************************
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index ec99bca9aa..9d8fc88113 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2087,18 +2087,19 @@ done:
return status;
}
-/********************************************************************
- * spoolss_deleteprinterdriverex
- ********************************************************************/
+/****************************************************************
+ _spoolss_DeletePrinterDriverEx
+****************************************************************/
-WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u)
+WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p,
+ struct spoolss_DeletePrinterDriverEx *r)
{
- fstring driver;
- fstring arch;
+ char *driver;
+ char *arch;
NT_PRINTER_DRIVER_INFO_LEVEL info;
NT_PRINTER_DRIVER_INFO_LEVEL info_win2k;
int version;
- uint32 flags = q_u->delete_flags;
+ uint32_t flags = r->in.delete_flags;
bool delete_files;
WERROR status;
WERROR status_win2k = WERR_ACCESS_DENIED;
@@ -2116,8 +2117,8 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
return WERR_ACCESS_DENIED;
}
- unistr2_to_ascii(driver, &q_u->driver, sizeof(driver));
- unistr2_to_ascii(arch, &q_u->arch, sizeof(arch));
+ driver = CONST_DISCARD(char *, r->in.driver);
+ arch = CONST_DISCARD(char *, r->in.architecture);
/* check that we have a valid driver name first */
if ((version=get_version_id(arch)) == -1) {
@@ -2126,7 +2127,7 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
}
if ( flags & DPD_DELETE_SPECIFIC_VERSION )
- version = q_u->version;
+ version = r->in.version;
ZERO_STRUCT(info);
ZERO_STRUCT(info_win2k);
@@ -10734,17 +10735,6 @@ WERROR _spoolss_53(pipes_struct *p,
}
/****************************************************************
- _spoolss_DeletePrinterDriverEx
-****************************************************************/
-
-WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p,
- struct spoolss_DeletePrinterDriverEx *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
_spoolss_55
****************************************************************/