Set BindIPv6Only=ipv6-only in systemd socket unit file as better fix for bug #737230.
This commit is contained in:
parent
3d32f50550
commit
0928f7c050
@ -1,14 +0,0 @@
|
||||
diff -up cups-1.5.0/cups/http-addr.c.loopback cups-1.5.0/cups/http-addr.c
|
||||
--- cups-1.5.0/cups/http-addr.c.loopback 2011-10-05 17:48:36.469794399 +0100
|
||||
+++ cups-1.5.0/cups/http-addr.c 2011-10-05 17:48:52.293500663 +0100
|
||||
@@ -147,7 +147,9 @@ httpAddrLocalhost(
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (addr->addr.sa_family == AF_INET6 &&
|
||||
- IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)))
|
||||
+ (IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)) ||
|
||||
+ (IN6_IS_ADDR_V4COMPAT(&(addr->ipv6.sin6_addr)) &&
|
||||
+ addr->ipv6.sin6_addr.s6_addr[12] == 0x7f)))
|
||||
return (1);
|
||||
#endif /* AF_INET6 */
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.0/config-scripts/cups-systemd.m4
|
||||
--- cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket 2011-10-04 12:14:29.597746957 +0100
|
||||
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-10-04 12:14:29.598746938 +0100
|
||||
--- cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket 2011-10-10 13:24:38.727210334 +0100
|
||||
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-10-10 13:24:38.727210334 +0100
|
||||
@@ -0,0 +1,25 @@
|
||||
+dnl
|
||||
+dnl "$Id$"
|
||||
@ -29,7 +29,7 @@ diff -up cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.0/con
|
||||
+dnl
|
||||
diff -up cups-1.5.0/configure.in.systemd-socket cups-1.5.0/configure.in
|
||||
--- cups-1.5.0/configure.in.systemd-socket 2010-11-20 01:03:46.000000000 +0000
|
||||
+++ cups-1.5.0/configure.in 2011-10-04 12:14:29.598746938 +0100
|
||||
+++ cups-1.5.0/configure.in 2011-10-10 13:24:38.728210315 +0100
|
||||
@@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4)
|
||||
sinclude(config-scripts/cups-largefile.m4)
|
||||
sinclude(config-scripts/cups-dnssd.m4)
|
||||
@ -49,8 +49,8 @@ diff -up cups-1.5.0/configure.in.systemd-socket cups-1.5.0/configure.in
|
||||
doc/help/ref-cupsd-conf.html
|
||||
doc/help/standard.html
|
||||
diff -up cups-1.5.0/cups/usersys.c.systemd-socket cups-1.5.0/cups/usersys.c
|
||||
--- cups-1.5.0/cups/usersys.c.systemd-socket 2011-10-04 12:14:29.365751167 +0100
|
||||
+++ cups-1.5.0/cups/usersys.c 2011-10-04 12:14:29.599746919 +0100
|
||||
--- cups-1.5.0/cups/usersys.c.systemd-socket 2011-10-10 13:24:38.493214694 +0100
|
||||
+++ cups-1.5.0/cups/usersys.c 2011-10-10 13:24:38.729210297 +0100
|
||||
@@ -770,7 +770,7 @@ cups_read_client_conf(
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
@ -61,8 +61,8 @@ diff -up cups-1.5.0/cups/usersys.c.systemd-socket cups-1.5.0/cups/usersys.c
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
diff -up cups-1.5.0/data/cups.path.in.systemd-socket cups-1.5.0/data/cups.path.in
|
||||
--- cups-1.5.0/data/cups.path.in.systemd-socket 2011-10-04 12:14:29.600746900 +0100
|
||||
+++ cups-1.5.0/data/cups.path.in 2011-10-04 12:14:29.600746900 +0100
|
||||
--- cups-1.5.0/data/cups.path.in.systemd-socket 2011-10-10 13:24:38.729210297 +0100
|
||||
+++ cups-1.5.0/data/cups.path.in 2011-10-10 13:24:38.730210279 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printer Service Spool
|
||||
@ -73,8 +73,8 @@ diff -up cups-1.5.0/data/cups.path.in.systemd-socket cups-1.5.0/data/cups.path.i
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
diff -up cups-1.5.0/data/cups.service.in.systemd-socket cups-1.5.0/data/cups.service.in
|
||||
--- cups-1.5.0/data/cups.service.in.systemd-socket 2011-10-04 12:14:29.600746900 +0100
|
||||
+++ cups-1.5.0/data/cups.service.in 2011-10-04 12:14:29.600746900 +0100
|
||||
--- cups-1.5.0/data/cups.service.in.systemd-socket 2011-10-10 13:24:38.730210279 +0100
|
||||
+++ cups-1.5.0/data/cups.service.in 2011-10-10 13:24:38.730210279 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service
|
||||
@ -86,21 +86,22 @@ diff -up cups-1.5.0/data/cups.service.in.systemd-socket cups-1.5.0/data/cups.ser
|
||||
+Also=cups.socket cups.path
|
||||
+WantedBy=printer.target
|
||||
diff -up cups-1.5.0/data/cups.socket.in.systemd-socket cups-1.5.0/data/cups.socket.in
|
||||
--- cups-1.5.0/data/cups.socket.in.systemd-socket 2011-10-04 12:14:29.601746883 +0100
|
||||
+++ cups-1.5.0/data/cups.socket.in 2011-10-04 12:14:29.601746883 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
--- cups-1.5.0/data/cups.socket.in.systemd-socket 2011-10-10 13:24:38.730210279 +0100
|
||||
+++ cups-1.5.0/data/cups.socket.in 2011-10-10 13:25:05.726707278 +0100
|
||||
@@ -0,0 +1,10 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service Sockets
|
||||
+
|
||||
+[Socket]
|
||||
+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
|
||||
+ListenStream=631
|
||||
+BindIPv6Only=ipv6-only
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
||||
diff -up cups-1.5.0/data/Makefile.systemd-socket cups-1.5.0/data/Makefile
|
||||
--- cups-1.5.0/data/Makefile.systemd-socket 2011-05-12 06:21:56.000000000 +0100
|
||||
+++ cups-1.5.0/data/Makefile 2011-10-04 12:14:29.601746883 +0100
|
||||
+++ cups-1.5.0/data/Makefile 2011-10-10 13:24:38.731210260 +0100
|
||||
@@ -112,6 +112,12 @@ install-data:
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
|
||||
done
|
||||
@ -125,8 +126,8 @@ diff -up cups-1.5.0/data/Makefile.systemd-socket cups-1.5.0/data/Makefile
|
||||
|
||||
#
|
||||
diff -up cups-1.5.0/Makedefs.in.systemd-socket cups-1.5.0/Makedefs.in
|
||||
--- cups-1.5.0/Makedefs.in.systemd-socket 2011-10-04 12:14:29.441749789 +0100
|
||||
+++ cups-1.5.0/Makedefs.in 2011-10-04 12:14:29.602746866 +0100
|
||||
--- cups-1.5.0/Makedefs.in.systemd-socket 2011-10-10 13:24:38.567213315 +0100
|
||||
+++ cups-1.5.0/Makedefs.in 2011-10-10 13:24:38.731210260 +0100
|
||||
@@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
|
||||
CXXLIBS = @CXXLIBS@
|
||||
DBUS_NOTIFIER = @DBUS_NOTIFIER@
|
||||
@ -145,7 +146,7 @@ diff -up cups-1.5.0/Makedefs.in.systemd-socket cups-1.5.0/Makedefs.in
|
||||
#
|
||||
diff -up cups-1.5.0/scheduler/client.h.systemd-socket cups-1.5.0/scheduler/client.h
|
||||
--- cups-1.5.0/scheduler/client.h.systemd-socket 2011-03-25 21:25:38.000000000 +0000
|
||||
+++ cups-1.5.0/scheduler/client.h 2011-10-04 12:14:29.602746866 +0100
|
||||
+++ cups-1.5.0/scheduler/client.h 2011-10-10 13:24:38.732210241 +0100
|
||||
@@ -75,6 +75,7 @@ typedef struct
|
||||
int fd; /* File descriptor for this server */
|
||||
http_addr_t address; /* Bind address of socket */
|
||||
@ -156,7 +157,7 @@ diff -up cups-1.5.0/scheduler/client.h.systemd-socket cups-1.5.0/scheduler/clien
|
||||
|
||||
diff -up cups-1.5.0/scheduler/listen.c.systemd-socket cups-1.5.0/scheduler/listen.c
|
||||
--- cups-1.5.0/scheduler/listen.c.systemd-socket 2011-04-16 00:38:13.000000000 +0100
|
||||
+++ cups-1.5.0/scheduler/listen.c 2011-10-04 12:14:29.603746849 +0100
|
||||
+++ cups-1.5.0/scheduler/listen.c 2011-10-10 13:24:38.733210222 +0100
|
||||
@@ -401,7 +401,7 @@ cupsdStopListening(void)
|
||||
lis;
|
||||
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
|
||||
@ -167,8 +168,8 @@ diff -up cups-1.5.0/scheduler/listen.c.systemd-socket cups-1.5.0/scheduler/liste
|
||||
#ifdef WIN32
|
||||
closesocket(lis->fd);
|
||||
diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c
|
||||
--- cups-1.5.0/scheduler/main.c.systemd-socket 2011-10-04 12:14:29.563747574 +0100
|
||||
+++ cups-1.5.0/scheduler/main.c 2011-10-04 12:18:14.964656652 +0100
|
||||
--- cups-1.5.0/scheduler/main.c.systemd-socket 2011-10-10 13:24:38.689211041 +0100
|
||||
+++ cups-1.5.0/scheduler/main.c 2011-10-10 13:24:38.735210184 +0100
|
||||
@@ -26,6 +26,8 @@
|
||||
* launchd_checkin() - Check-in with launchd and collect the listening
|
||||
* fds.
|
||||
@ -320,8 +321,8 @@ diff -up cups-1.5.0/scheduler/main.c.systemd-socket cups-1.5.0/scheduler/main.c
|
||||
/*
|
||||
* 'parent_handler()' - Catch USR1/CHLD signals...
|
||||
diff -up cups-1.5.0/scheduler/Makefile.systemd-socket cups-1.5.0/scheduler/Makefile
|
||||
--- cups-1.5.0/scheduler/Makefile.systemd-socket 2011-10-04 12:14:29.574747375 +0100
|
||||
+++ cups-1.5.0/scheduler/Makefile 2011-10-04 12:14:29.607746775 +0100
|
||||
--- cups-1.5.0/scheduler/Makefile.systemd-socket 2011-10-10 13:24:38.704210762 +0100
|
||||
+++ cups-1.5.0/scheduler/Makefile 2011-10-10 13:24:38.736210166 +0100
|
||||
@@ -41,6 +41,7 @@ CUPSDOBJS = \
|
||||
server.o \
|
||||
statbuf.o \
|
||||
@ -346,8 +347,8 @@ diff -up cups-1.5.0/scheduler/Makefile.systemd-socket cups-1.5.0/scheduler/Makef
|
||||
#
|
||||
|
||||
diff -up cups-1.5.0/scheduler/sd-daemon.c.systemd-socket cups-1.5.0/scheduler/sd-daemon.c
|
||||
--- cups-1.5.0/scheduler/sd-daemon.c.systemd-socket 2011-10-04 12:14:29.609746739 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.c 2011-10-04 12:14:29.609746739 +0100
|
||||
--- cups-1.5.0/scheduler/sd-daemon.c.systemd-socket 2011-10-10 13:24:38.737210148 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.c 2011-10-10 13:24:38.737210148 +0100
|
||||
@@ -0,0 +1,520 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
@ -870,8 +871,8 @@ diff -up cups-1.5.0/scheduler/sd-daemon.c.systemd-socket cups-1.5.0/scheduler/sd
|
||||
+#endif
|
||||
+}
|
||||
diff -up cups-1.5.0/scheduler/sd-daemon.h.systemd-socket cups-1.5.0/scheduler/sd-daemon.h
|
||||
--- cups-1.5.0/scheduler/sd-daemon.h.systemd-socket 2011-10-04 12:14:29.609746739 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.h 2011-10-04 12:14:29.610746720 +0100
|
||||
--- cups-1.5.0/scheduler/sd-daemon.h.systemd-socket 2011-10-10 13:24:38.737210148 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.h 2011-10-10 13:24:38.738210130 +0100
|
||||
@@ -0,0 +1,277 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
|
11
cups.spec
11
cups.spec
@ -13,7 +13,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.5.0
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -73,7 +73,6 @@ Patch35: cups-icc.patch
|
||||
Patch36: cups-systemd-socket.patch
|
||||
Patch37: cups-CVE-2011-2896.patch
|
||||
Patch38: cups-driverd-bug.patch
|
||||
Patch39: cups-loopback.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -301,10 +300,6 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
# Work around PPDs cache handling issue (bug #742989).
|
||||
%patch38 -p1 -b .driverd-bug
|
||||
|
||||
# Handle "localhost" resolving to 127.0.0.1 on IPv6-addressed systems
|
||||
# (bug #737230).
|
||||
%patch39 -p1 -b .loopback
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
%patch100 -p1 -b .lspp
|
||||
@ -651,6 +646,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/ipptool.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Oct 10 2011 Tim Waugh <twaugh@redhat.com> 1:1.5.0-16
|
||||
- Set BindIPv6Only=ipv6-only in systemd socket unit file as better fix
|
||||
for bug #737230.
|
||||
|
||||
* Fri Oct 7 2011 Tim Waugh <twaugh@redhat.com> 1:1.5.0-15
|
||||
- Fixed Timeouts array comparison function (Ubuntu #860691).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user