summaryrefslogtreecommitdiff
path: root/source3/rpc_server/spoolss
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-01-18 00:22:31 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-01-21 16:11:02 +0100
commit58fadf2f48a2a409b4ee98fdc0166c7f801a7629 (patch)
treecb31761cc3dcff9a4bbc00683ddfcb790bd90cc5 /source3/rpc_server/spoolss
parentc38fb0b106b62e42a5b75b1c78386bb8912c7d7e (diff)
downloadsamba-58fadf2f48a2a409b4ee98fdc0166c7f801a7629.tar.gz
samba-58fadf2f48a2a409b4ee98fdc0166c7f801a7629.tar.bz2
samba-58fadf2f48a2a409b4ee98fdc0166c7f801a7629.zip
BUG 9474: Downgrade v4 printer driver requests to v3.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 21 16:11:02 CET 2013 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 9df0b8ab32..9601ce6a62 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -5606,6 +5606,7 @@ WERROR _spoolss_GetPrinterDriver2(struct pipes_struct *p,
{
struct printer_handle *printer;
WERROR result;
+ uint32_t version = r->in.client_major_version;
int snum;
@@ -5630,13 +5631,19 @@ WERROR _spoolss_GetPrinterDriver2(struct pipes_struct *p,
return WERR_BADFID;
}
+ if (r->in.client_major_version == SPOOLSS_DRIVER_VERSION_2012) {
+ DEBUG(3,("_spoolss_GetPrinterDriver2: v4 driver requested, "
+ "downgrading to v3\n"));
+ version = SPOOLSS_DRIVER_VERSION_200X;
+ }
+
result = construct_printer_driver_info_level(p->mem_ctx,
get_session_info_system(),
p->msg_ctx,
r->in.level, r->out.info,
snum, printer->servername,
r->in.architecture,
- r->in.client_major_version);
+ version);
if (!W_ERROR_IS_OK(result)) {
TALLOC_FREE(r->out.info);
return result;