mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
r8507: BUG 2557: don't give and rpc fault when you get an unsupported SetPrinter() level
This commit is contained in:
parent
2f5de718a9
commit
f617ca33f4
@ -3817,6 +3817,22 @@ BOOL spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_stru
|
||||
return False;
|
||||
if(!prs_uint32("level", ps, depth, &q_u->level))
|
||||
return False;
|
||||
|
||||
/* check for supported levels and structures we know about */
|
||||
|
||||
switch ( q_u->level ) {
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 7:
|
||||
/* supported levels */
|
||||
break;
|
||||
default:
|
||||
DEBUG(0,("spoolss_io_q_setprinter: unsupported printer info level [%d]\n",
|
||||
q_u->level));
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
if(!spool_io_printer_info_level("", &q_u->info, ps, depth))
|
||||
return False;
|
||||
|
Loading…
Reference in New Issue
Block a user