libcups: avoid race condition when sending IPP requests (STR #4386, bug #1072952).

New upstream patch to fix problems caused by first version of patch.

Resolves: rhbz#1072952
This commit is contained in:
Tim Waugh 2014-04-03 17:17:18 +01:00
parent ea58b56951
commit ef073d1223
2 changed files with 21 additions and 1 deletions

12
cups-str4386.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up cups-1.7.1/cups/request.c.str4386 cups-1.7.1/cups/request.c
--- cups-1.7.1/cups/request.c.str4386 2013-07-23 13:33:52.000000000 +0100
+++ cups-1.7.1/cups/request.c 2014-03-06 10:58:39.018807898 +0000
@@ -261,7 +261,7 @@ cupsDoIORequest(http_t *http, /* I -
* Get the server's response...
*/
- if (status != HTTP_STATUS_ERROR)
+ if (status <= HTTP_STATUS_CONTINUE || status == HTTP_STATUS_OK)
{
response = cupsGetResponse(http, resource);
status = httpGetStatus(http);

View File

@ -11,7 +11,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 1.7.1
Release: 8%{?dist}
Release: 9%{?dist}
License: GPLv2
Group: System Environment/Daemons
Url: http://www.cups.org/
@ -31,6 +31,7 @@ Source8: macros.cups
Patch1: cups-no-gzip-man.patch
Patch2: cups-system-auth.patch
Patch3: cups-multilib.patch
Patch4: cups-str4386.patch
Patch5: cups-banners.patch
Patch6: cups-serverbin-compat.patch
Patch7: cups-no-export-ssllibs.patch
@ -191,6 +192,9 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch2 -p1 -b .system-auth
# Prevent multilib conflict in cups-config script.
%patch3 -p1 -b .multilib
# libcups: avoid race condition when sending IPP requests (STR #4386,
# bug #1072952).
%patch4 -p1 -b .str4386
# Ignore rpm save/new files in the banners directory.
%patch5 -p1 -b .banners
# Use compatibility fallback path for ServerBin.
@ -653,6 +657,10 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz
%changelog
* Thu Apr 3 2014 Tim Waugh <twaugh@redhat.com> - 1:1.7.1-9
- libcups: avoid race condition when sending IPP requests (STR #4386,
bug #1072952).
* Tue Mar 18 2014 Tim Waugh <twaugh@redhat.com> - 1:1.7.1-8
- Removed patch for STR #4386 as it does not work and causes problems
instead (bug #1077239).