summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-31 21:33:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:37 -0500
commit5eb536601aadf3015a677bb83d02f8ae2b9cc725 (patch)
tree308cb909a6de96d3722dcc27663174e05d55899f
parent0150bd394ba73c7fb379294f7a78d710abdcbabf (diff)
downloadsamba-5eb536601aadf3015a677bb83d02f8ae2b9cc725.tar.gz
samba-5eb536601aadf3015a677bb83d02f8ae2b9cc725.tar.bz2
samba-5eb536601aadf3015a677bb83d02f8ae2b9cc725.zip
r21100: Add the RPC hack fix to adddriver as well as adddriverex.
Thanks to Martin Zielinski <mz@seh.de>. Jeremy. (This used to be commit d18a3f8b72f0f4cf0aa5b599f36ce3f4125adac3)
-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 dcc357f804..c9ff9697e0 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -910,6 +910,15 @@ static BOOL api_spoolss_addprinterdriver(pipes_struct *p)
ZERO_STRUCT(r_u);
if(!spoolss_io_q_addprinterdriver("", &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_addprinterdriver: unknown SPOOL_Q_ADDPRINTERDRIVER 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_addprinterdriver: unable to unmarshall SPOOL_Q_ADDPRINTERDRIVER.\n"));
return False;
}