1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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 commit is contained in:
Jeremy Allison 2007-01-29 22:51:44 +00:00 committed by Gerald (Jerry) Carter
parent 4fb57bce87
commit 01c659692c

View File

@ -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;
}