The Samba-Bugzilla – Attachment 10370 Details for
Bug 10898
spoolss EnumJobs(level=4) returns WERR_OK with 0 jobs and WERR_UNKNOWN_LEVEL with > 0 jobs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cherry-pick against 3.6-test branch
0001-spoolss-fix-handling-of-bad-EnumJobs-levels_36t.patch (text/plain), 1.79 KB, created by
David Disseldorp
on 2014-10-28 11:06:34 UTC
(
hide
)
Description:
cherry-pick against 3.6-test branch
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2014-10-28 11:06:34 UTC
Size:
1.79 KB
patch
obsolete
>From 521b8150b3e1d3fd4b002d85f5e52f3566878bcf Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Mon, 27 Oct 2014 20:13:59 +0100 >Subject: [PATCH] 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 | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c >index 8372c43..a8574e4 100644 >--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c >+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c >@@ -7111,6 +7111,11 @@ WERROR _spoolss_EnumJobs(struct pipes_struct *p, > return WERR_INVALID_PARAM; > } > >+ if ((r->in.level != 1) && (r->in.level != 2) && (r->in.level != 3)) { >+ DEBUG(4, ("EnumJobs level %d not supported\n", r->in.level)); >+ return WERR_UNKNOWN_LEVEL; >+ } >+ > DEBUG(4,("_spoolss_EnumJobs\n")); > > *r->out.needed = 0; >@@ -7156,7 +7161,7 @@ WERROR _spoolss_EnumJobs(struct pipes_struct *p, > pinfo2, r->out.info, r->out.count); > break; > default: >- result = WERR_UNKNOWN_LEVEL; >+ SMB_ASSERT(false); /* level checked on entry */ > break; > } > >-- >1.8.4.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10898
: 10370 |
10371
|
10372
|
10373