Fix for systemd socket activation: relax permissions check for
domain socket in libcups.
This commit is contained in:
parent
4c3d853b67
commit
3bce791019
@ -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-09-22 13:01:02.909065794 +0100
|
||||
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-09-22 13:01:02.909065794 +0100
|
||||
--- cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket 2011-10-04 11:58:42.554997916 +0100
|
||||
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-10-04 11:58:42.554997916 +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-09-22 13:01:02.910065775 +0100
|
||||
+++ cups-1.5.0/configure.in 2011-10-04 11:58:42.555997897 +0100
|
||||
@@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4)
|
||||
sinclude(config-scripts/cups-largefile.m4)
|
||||
sinclude(config-scripts/cups-dnssd.m4)
|
||||
@ -48,9 +48,21 @@ diff -up cups-1.5.0/configure.in.systemd-socket cups-1.5.0/configure.in
|
||||
desktop/cups.desktop
|
||||
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 11:59:16.310382444 +0100
|
||||
+++ cups-1.5.0/cups/usersys.c 2011-10-04 12:01:28.849965809 +0100
|
||||
@@ -770,7 +770,7 @@ cups_read_client_conf(
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
- (sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
+ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH))
|
||||
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
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-09-22 13:01:02.911065757 +0100
|
||||
+++ cups-1.5.0/data/cups.path.in 2011-09-22 13:01:02.911065757 +0100
|
||||
--- cups-1.5.0/data/cups.path.in.systemd-socket 2011-10-04 11:58:42.555997897 +0100
|
||||
+++ cups-1.5.0/data/cups.path.in 2011-10-04 11:58:42.555997897 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printer Service Spool
|
||||
@ -61,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-09-22 13:01:02.911065757 +0100
|
||||
+++ cups-1.5.0/data/cups.service.in 2011-09-22 13:01:02.911065757 +0100
|
||||
--- cups-1.5.0/data/cups.service.in.systemd-socket 2011-10-04 11:58:42.556997879 +0100
|
||||
+++ cups-1.5.0/data/cups.service.in 2011-10-04 11:58:42.556997879 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service
|
||||
@ -74,8 +86,8 @@ 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-09-22 13:01:02.911065757 +0100
|
||||
+++ cups-1.5.0/data/cups.socket.in 2011-09-22 13:01:02.911065757 +0100
|
||||
--- cups-1.5.0/data/cups.socket.in.systemd-socket 2011-10-04 11:58:42.556997879 +0100
|
||||
+++ cups-1.5.0/data/cups.socket.in 2011-10-04 11:58:42.556997879 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service Sockets
|
||||
@ -88,7 +100,7 @@ diff -up cups-1.5.0/data/cups.socket.in.systemd-socket cups-1.5.0/data/cups.sock
|
||||
+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-09-22 13:01:02.912065740 +0100
|
||||
+++ cups-1.5.0/data/Makefile 2011-10-04 11:58:42.557997861 +0100
|
||||
@@ -112,6 +112,12 @@ install-data:
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
|
||||
done
|
||||
@ -113,8 +125,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-09-22 13:01:02.732069025 +0100
|
||||
+++ cups-1.5.0/Makedefs.in 2011-09-22 13:01:02.912065740 +0100
|
||||
--- cups-1.5.0/Makedefs.in.systemd-socket 2011-10-04 11:58:42.334001946 +0100
|
||||
+++ cups-1.5.0/Makedefs.in 2011-10-04 11:58:42.558997843 +0100
|
||||
@@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
|
||||
CXXLIBS = @CXXLIBS@
|
||||
DBUS_NOTIFIER = @DBUS_NOTIFIER@
|
||||
@ -133,7 +145,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-09-22 13:09:10.016177338 +0100
|
||||
+++ cups-1.5.0/scheduler/client.h 2011-10-04 11:58:42.559997825 +0100
|
||||
@@ -75,6 +75,7 @@ typedef struct
|
||||
int fd; /* File descriptor for this server */
|
||||
http_addr_t address; /* Bind address of socket */
|
||||
@ -144,7 +156,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-09-22 13:14:20.173517762 +0100
|
||||
+++ cups-1.5.0/scheduler/listen.c 2011-10-04 11:58:42.559997825 +0100
|
||||
@@ -401,7 +401,7 @@ cupsdStopListening(void)
|
||||
lis;
|
||||
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
|
||||
@ -155,8 +167,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-09-22 13:01:02.871066488 +0100
|
||||
+++ cups-1.5.0/scheduler/main.c 2011-09-22 13:09:42.409586242 +0100
|
||||
--- cups-1.5.0/scheduler/main.c.systemd-socket 2011-10-04 11:58:42.507998773 +0100
|
||||
+++ cups-1.5.0/scheduler/main.c 2011-10-04 11:58:42.561997789 +0100
|
||||
@@ -26,6 +26,8 @@
|
||||
* launchd_checkin() - Check-in with launchd and collect the listening
|
||||
* fds.
|
||||
@ -308,8 +320,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-09-22 13:01:02.884066251 +0100
|
||||
+++ cups-1.5.0/scheduler/Makefile 2011-09-22 13:01:02.915065685 +0100
|
||||
--- cups-1.5.0/scheduler/Makefile.systemd-socket 2011-10-04 11:58:42.518998573 +0100
|
||||
+++ cups-1.5.0/scheduler/Makefile 2011-10-04 11:58:42.562997771 +0100
|
||||
@@ -41,6 +41,7 @@ CUPSDOBJS = \
|
||||
server.o \
|
||||
statbuf.o \
|
||||
@ -334,8 +346,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-09-22 13:01:02.916065667 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.c 2011-09-22 13:01:02.917065649 +0100
|
||||
--- cups-1.5.0/scheduler/sd-daemon.c.systemd-socket 2011-10-04 11:58:42.563997752 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.c 2011-10-04 11:58:42.563997752 +0100
|
||||
@@ -0,0 +1,520 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
@ -858,8 +870,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-09-22 13:01:02.917065649 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.h 2011-09-22 13:01:02.917065649 +0100
|
||||
--- cups-1.5.0/scheduler/sd-daemon.h.systemd-socket 2011-10-04 11:58:42.564997733 +0100
|
||||
+++ cups-1.5.0/scheduler/sd-daemon.h 2011-10-04 11:58:42.564997733 +0100
|
||||
@@ -0,0 +1,277 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
|
@ -13,7 +13,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.5.0
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -642,6 +642,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/ipptool.1.gz
|
||||
|
||||
%changelog
|
||||
* Tue Oct 4 2011 Tim Waugh <twaugh@redhat.com> 1:1.5.0-12
|
||||
- Fix for systemd socket activation: relax permissions check for
|
||||
domain socket in libcups.
|
||||
|
||||
* Mon Oct 03 2011 Richard Hughes <rhughes@redhat.com> 1:1.5.0-11
|
||||
- Updated colord patch with fixes to DeleteDevice.
|
||||
- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=741697
|
||||
|
Loading…
Reference in New Issue
Block a user