diff options
author | Gerald Carter <jerry@samba.org> | 2005-07-15 18:13:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:07 -0500 |
commit | a5868d58c718e9122f65db50f1799bcb82c778a0 (patch) | |
tree | f22a2a1fd6f61760a492597daba9d2831ecc31ff /source3/rpc_parse | |
parent | eb1123e5009c900c0eb741c0a075f918b16bbeab (diff) | |
download | samba-a5868d58c718e9122f65db50f1799bcb82c778a0.tar.gz samba-a5868d58c718e9122f65db50f1799bcb82c778a0.tar.bz2 samba-a5868d58c718e9122f65db50f1799bcb82c778a0.zip |
r8507: BUG 2557: don't give and rpc fault when you get an unsupported SetPrinter() level
(This used to be commit f617ca33f45fbc779356c52664c1e689114accdd)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 8050712d97..2663b09381 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -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; |