spoolss: fix handling of bad EnumJobs levels
commit5126c0157757d16c723d3a23f3b0218c06994f86
authorDavid Disseldorp <ddiss@samba.org>
Mon, 27 Oct 2014 19:13:59 +0000 (27 20:13 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sun, 9 Nov 2014 19:47:09 +0000 (9 20:47 +0100)
tree14fe7af6bac48c56c903797e007789778f73ee22
parent39a9211e2c59f98b3185419c6409298c0abb77f5
spoolss: fix handling of bad EnumJobs levels

Currently Samba is inconsistent when returning WERR_UNKNOWN_LEVEL
errors for spoolss EnumJobs requests - if no print jobs are present,
then WERR_OK will be returned, regardless of whether the EnumJobs level
is supported or not.
This change fixes this behaviour, by catching invalid or unsupported
levels prior to the no-jobs response fast-path.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10898

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 28 03:05:35 CET 2014 on sn-devel-104

(cherry picked from commit d4f233a746d89e13aae78008b499c71b695ff882)
source3/rpc_server/spoolss/srv_spoolss_nt.c