The Samba-Bugzilla – Attachment 9967 Details for
Bug 10612
set_printer(SPOOLSS_PRINTER_CONTROL_PURGE) doesn't purge print jobs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.1.next, cherry-picked from master
printing-fix-purge-of-all-print-jobs_41t.patch (text/plain), 1.86 KB, created by
David Disseldorp
on 2014-05-22 09:44:17 UTC
(
hide
)
Description:
patch for 4.1.next, cherry-picked from master
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2014-05-22 09:44:17 UTC
Size:
1.86 KB
patch
obsolete
>From 6846c39c56f2775e51bacca611224e2ebda35401 Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Wed, 21 May 2014 21:55:58 +0200 >Subject: [PATCH] printing: fix purge of all print jobs >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The incorrect (system) jobid is currently passed to the job deletion >function. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=10612 > >Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> >Signed-off-by: David Disseldorp <ddiss@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit efb4684a3fc0b32a71eab013000f730e6b144a67) >--- > source3/printing/printing.c | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > >diff --git a/source3/printing/printing.c b/source3/printing/printing.c >index b126bd5..52d24dc 100644 >--- a/source3/printing/printing.c >+++ b/source3/printing/printing.c >@@ -3373,13 +3373,28 @@ WERROR print_queue_purge(const struct auth_session_info *server_info, > if ( can_job_admin ) > become_root(); > >- for (i=0;i<njobs;i++) { >- bool owner = is_owner(server_info, lp_const_servicename(snum), >- queue[i].sysjob); >+ for (i = 0; i < njobs; i++) { >+ struct tdb_print_db *pdb; >+ int jobid; >+ bool owner; >+ pdb = get_print_db_byname(lp_const_servicename(snum)); >+ if (pdb == NULL) { >+ DEBUG(1, ("failed to find printdb for %s\n", >+ lp_const_servicename(snum))); >+ continue; >+ } >+ jobid = sysjob_to_jobid_pdb(pdb, queue[i].sysjob); >+ if (jobid == (uint32_t)-1) { >+ DEBUG(2, ("jobid for system job %d not found\n", >+ queue[i].sysjob)); >+ continue; /* unix job */ >+ } >+ owner = is_owner(server_info, lp_const_servicename(snum), >+ jobid); > > if (owner || can_job_admin) { > print_job_delete1(server_event_context(), msg_ctx, >- snum, queue[i].sysjob); >+ snum, jobid); > } > } > >-- >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
Flags:
ddiss
:
review?
(
jra
)
asn
:
review+
Actions:
View
Attachments on
bug 10612
:
9966
| 9967