2217283 - The command "cancel -x <job>" does not remove job files
Resolves: rhbz#2217283
This commit is contained in:
		
							parent
							
								
									7eb68f998d
								
							
						
					
					
						commit
						11837f3568
					
				| @ -0,0 +1,48 @@ | ||||
| From c5ad7aaf6c8063a39974c6b4a3cf59b7f912daae Mon Sep 17 00:00:00 2001 | ||||
| From: Bryan Mason <bmason@redhat.com> | ||||
| Date: Tue, 27 Jun 2023 04:18:46 -0700 | ||||
| Subject: [PATCH 1/2] Use "purge-job" instead of "purge-jobs" when canceling a | ||||
|  single job (#742) | ||||
| 
 | ||||
| The command "cancel -x <job>" adds "purge-jobs true" to the Cancel-Job | ||||
| operation; however, the correct attribute to use for Cancel-job is | ||||
| "purge-job" (singular), not "purge-jobs" (plural).  As a result, job | ||||
| files are not removed from /var/spool/cups when "cancel -x <job>" is | ||||
| executed. | ||||
| 
 | ||||
| This patch resolves the issue by adding "purge-job" when the IPP | ||||
| operation is Cancel-Job and "purge-jobs" for other IPP operations | ||||
| (Purge-Jobs, Cancel-Jobs, and Cancel-My-Jobs) | ||||
| ---
 | ||||
|  systemv/cancel.c | 8 +++++++- | ||||
|  1 file changed, 7 insertions(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/systemv/cancel.c b/systemv/cancel.c
 | ||||
| index 572f413e1..f5b8e12b5 100644
 | ||||
| --- a/systemv/cancel.c
 | ||||
| +++ b/systemv/cancel.c
 | ||||
| @@ -260,6 +260,7 @@ main(int  argc,				/* I - Number of command-line arguments */
 | ||||
|        *    attributes-natural-language | ||||
|        *    printer-uri + job-id *or* job-uri | ||||
|        *    [requesting-user-name] | ||||
| +      *    [purge-job] or [purge-jobs]
 | ||||
|        */ | ||||
|   | ||||
|        request = ippNewRequest(op); | ||||
| @@ -294,7 +295,12 @@ main(int  argc,				/* I - Number of command-line arguments */
 | ||||
|                       "requesting-user-name", NULL, cupsUser()); | ||||
|   | ||||
|        if (purge) | ||||
| -	ippAddBoolean(request, IPP_TAG_OPERATION, "purge-jobs", (char)purge);
 | ||||
| +      {
 | ||||
| +	if (op == IPP_CANCEL_JOB)
 | ||||
| +	  ippAddBoolean(request, IPP_TAG_OPERATION, "purge-job", (char)purge);
 | ||||
| +	else
 | ||||
| +	  ippAddBoolean(request, IPP_TAG_OPERATION, "purge-jobs", (char)purge);
 | ||||
| +      }
 | ||||
|   | ||||
|       /* | ||||
|        * Do the request and get back a response... | ||||
| -- 
 | ||||
| 2.41.0 | ||||
| 
 | ||||
| @ -145,6 +145,8 @@ Patch78: 0001-Update-man-pages-for-h-option-Issue-357.patch | ||||
| Patch79: cups-kerberos.patch | ||||
| # 2217178 - Delays printing to lpd when reserved ports are exhausted | ||||
| Patch80: 0001-Fix-delays-printing-to-lpd-when-reserved-ports-are-e.patch | ||||
| # 2217283 - The command "cancel -x <job>" does not remove job files | ||||
| Patch81: 0001-Use-purge-job-instead-of-purge-jobs-when-canceling-a.patch | ||||
| 
 | ||||
| Patch1000: cups-lspp.patch | ||||
| 
 | ||||
| @ -433,6 +435,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results. | ||||
| %patch79 -p1 -b .kerberos | ||||
| # 2217178 - Delays printing to lpd when reserved ports are exhausted | ||||
| %patch80 -p1 -b .lpd-delay | ||||
| # 2217283 - The command "cancel -x <job>" does not remove job files | ||||
| %patch81 -p1 -b .purge-job | ||||
| 
 | ||||
| sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in | ||||
| 
 | ||||
| @ -854,6 +858,7 @@ rm -f %{cups_serverbin}/backend/smb | ||||
| %changelog | ||||
| * Thu Jun 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-52 | ||||
| - 2217178 - Delays printing to lpd when reserved ports are exhausted | ||||
| - 2217283 - The command "cancel -x <job>" does not remove job files | ||||
| 
 | ||||
| * Mon Apr 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-51 | ||||
| - RHEL-316 - Enable fmf tests in centos stream | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user