spoolss: fix handling of bad EnumJobs levels
authorDavid Disseldorp <ddiss@samba.org>
Mon, 27 Oct 2014 19:13:59 +0000 (20:13 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 28 Oct 2014 02:05:35 +0000 (03:05 +0100)
commitd4f233a746d89e13aae78008b499c71b695ff882
treeab47025f5399fbd95a0b87201b5478b9249a7df2
parent814b0ade8c1aa62a15f896d2dc7091403a582968
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
source3/rpc_server/spoolss/srv_spoolss_nt.c