summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-29 22:51:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:29 -0500
commit6beb5192801f63b7cb73bf0448aef550f9b1ccd8 (patch)
tree63123e4ede8b590b97158a501f50902284bad861 /source3/rpc_server
parent594ab518a581f3728c82bdb9cf563e5fa449c0e1 (diff)
downloadsamba-6beb5192801f63b7cb73bf0448aef550f9b1ccd8.tar.gz
samba-6beb5192801f63b7cb73bf0448aef550f9b1ccd8.tar.bz2
samba-6beb5192801f63b7cb73bf0448aef550f9b1ccd8.zip
r21047: Hand marshalling hack from Martin Zielinski <mz@seh.de>
to allow Vista to upload printer drivers (it wants level 8 which we don't support yet). Downgrade in the same way that Windows servers do. Jeremy. (This used to be commit 01c659692c3e054904f1af815cf243b8a1dde109)
Diffstat (limited to 'source3/rpc_server')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 0a43e8ae8a..dcc357f804 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -1477,6 +1477,15 @@ static BOOL api_spoolss_addprinterdriverex(pipes_struct *p)
ZERO_STRUCT(r_u);
if(!spoolss_io_q_addprinterdriverex("", &q_u, data, 0)) {
+ if (q_u.level != 3 && q_u.level != 6) {
+ /* Clever hack from Martin Zielinski <mz@seh.de>
+ * to allow downgrade from level 8 (Vista).
+ */
+ DEBUG(3,("api_spoolss_addprinterdriverex: unknown SPOOL_Q_ADDPRINTERDRIVEREX level %u.\n",
+ (unsigned int)q_u.level ));
+ setup_fault_pdu(p, NT_STATUS(DCERPC_FAULT_INVALID_TAG));
+ return True;
+ }
DEBUG(0,("spoolss_io_q_addprinterdriverex: unable to unmarshall SPOOL_Q_ADDPRINTERDRIVEREX.\n"));
return False;
}