Use PrivateTmp=true in the service file (bug #782495).

This commit is contained in:
Tim Waugh 2012-01-17 16:30:01 +00:00
parent 9e0aa17df2
commit f0db99cc84
2 changed files with 32 additions and 28 deletions

View File

@ -1,6 +1,6 @@
diff -up cups-1.5.0/config.h.in.systemd-socket cups-1.5.0/config.h.in
--- cups-1.5.0/config.h.in.systemd-socket 2011-12-08 17:21:46.397159342 +0000
+++ cups-1.5.0/config.h.in 2011-12-08 17:21:46.500157383 +0000
--- cups-1.5.0/config.h.in.systemd-socket 2012-01-17 16:22:39.776859041 +0000
+++ cups-1.5.0/config.h.in 2012-01-17 16:22:39.869857281 +0000
@@ -503,6 +503,13 @@
@ -16,8 +16,8 @@ diff -up cups-1.5.0/config.h.in.systemd-socket cups-1.5.0/config.h.in
*/
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-12-08 17:21:46.501157363 +0000
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2011-12-08 17:21:46.501157363 +0000
--- cups-1.5.0/config-scripts/cups-systemd.m4.systemd-socket 2012-01-17 16:22:39.870857262 +0000
+++ cups-1.5.0/config-scripts/cups-systemd.m4 2012-01-17 16:22:39.870857262 +0000
@@ -0,0 +1,36 @@
+dnl
+dnl "$Id$"
@ -57,7 +57,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-12-08 17:21:46.501157363 +0000
+++ cups-1.5.0/configure.in 2012-01-17 16:22:39.876857149 +0000
@@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4)
sinclude(config-scripts/cups-largefile.m4)
sinclude(config-scripts/cups-dnssd.m4)
@ -77,8 +77,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-12-08 17:21:46.312160958 +0000
+++ cups-1.5.0/cups/usersys.c 2011-12-08 17:21:46.502157344 +0000
--- cups-1.5.0/cups/usersys.c.systemd-socket 2012-01-17 16:22:39.691860648 +0000
+++ cups-1.5.0/cups/usersys.c 2012-01-17 16:22:39.877857130 +0000
@@ -770,7 +770,7 @@ cups_read_client_conf(
struct stat sockinfo; /* Domain socket information */
@ -89,8 +89,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-12-08 17:21:46.503157325 +0000
+++ cups-1.5.0/data/cups.path.in 2011-12-08 17:21:46.503157325 +0000
--- cups-1.5.0/data/cups.path.in.systemd-socket 2012-01-17 16:22:39.878857111 +0000
+++ cups-1.5.0/data/cups.path.in 2012-01-17 16:22:39.878857111 +0000
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
@ -101,21 +101,22 @@ 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-12-08 17:21:46.503157325 +0000
+++ cups-1.5.0/data/cups.service.in 2011-12-08 17:21:46.503157325 +0000
@@ -0,0 +1,9 @@
--- cups-1.5.0/data/cups.service.in.systemd-socket 2012-01-17 16:22:39.878857111 +0000
+++ cups-1.5.0/data/cups.service.in 2012-01-17 16:29:04.259586106 +0000
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@sbindir@/cupsd -f
+PrivateTmp=true
+
+[Install]
+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-12-08 17:21:46.504157306 +0000
+++ cups-1.5.0/data/cups.socket.in 2011-12-08 17:21:46.504157306 +0000
--- cups-1.5.0/data/cups.socket.in.systemd-socket 2012-01-17 16:22:39.878857111 +0000
+++ cups-1.5.0/data/cups.socket.in 2012-01-17 16:22:39.878857111 +0000
@@ -0,0 +1,11 @@
+[Unit]
+Description=CUPS Printing Service Sockets
@ -130,7 +131,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-12-08 17:21:46.504157306 +0000
+++ cups-1.5.0/data/Makefile 2012-01-17 16:22:39.879857092 +0000
@@ -112,6 +112,12 @@ install-data:
$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
done
@ -155,8 +156,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-12-08 17:21:46.375159760 +0000
+++ cups-1.5.0/Makedefs.in 2011-12-08 17:21:46.505157287 +0000
--- cups-1.5.0/Makedefs.in.systemd-socket 2012-01-17 16:22:39.757859400 +0000
+++ cups-1.5.0/Makedefs.in 2012-01-17 16:22:39.879857092 +0000
@@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
CXXLIBS = @CXXLIBS@
DBUS_NOTIFIER = @DBUS_NOTIFIER@
@ -183,7 +184,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-12-08 17:21:46.505157287 +0000
+++ cups-1.5.0/scheduler/client.h 2012-01-17 16:22:39.880857073 +0000
@@ -75,6 +75,9 @@ typedef struct
int fd; /* File descriptor for this server */
http_addr_t address; /* Bind address of socket */
@ -195,8 +196,8 @@ diff -up cups-1.5.0/scheduler/client.h.systemd-socket cups-1.5.0/scheduler/clien
diff -up cups-1.5.0/scheduler/dirsvc.c.systemd-socket cups-1.5.0/scheduler/dirsvc.c
--- cups-1.5.0/scheduler/dirsvc.c.systemd-socket 2011-12-08 17:21:46.452158297 +0000
+++ cups-1.5.0/scheduler/dirsvc.c 2011-12-08 17:21:46.510157192 +0000
--- cups-1.5.0/scheduler/dirsvc.c.systemd-socket 2012-01-17 16:22:39.813858341 +0000
+++ cups-1.5.0/scheduler/dirsvc.c 2012-01-17 16:22:39.885856979 +0000
@@ -1512,7 +1512,7 @@ cupsdStartBrowsing(void)
}
}
@ -273,8 +274,8 @@ diff -up cups-1.5.0/scheduler/dirsvc.c.systemd-socket cups-1.5.0/scheduler/dirsv
cupsdRemoveSelect(BrowseSocket);
BrowseSocket = -1;
diff -up cups-1.5.0/scheduler/dirsvc.h.systemd-socket cups-1.5.0/scheduler/dirsvc.h
--- cups-1.5.0/scheduler/dirsvc.h.systemd-socket 2011-12-08 17:21:46.454158257 +0000
+++ cups-1.5.0/scheduler/dirsvc.h 2011-12-08 17:21:46.511157174 +0000
--- cups-1.5.0/scheduler/dirsvc.h.systemd-socket 2012-01-17 16:22:39.816858284 +0000
+++ cups-1.5.0/scheduler/dirsvc.h 2012-01-17 16:22:39.887856941 +0000
@@ -100,6 +100,8 @@ VAR int Browsing VALUE(TRUE),
/* Short names for remote printers? */
BrowseSocket VALUE(-1),
@ -286,7 +287,7 @@ diff -up cups-1.5.0/scheduler/dirsvc.h.systemd-socket cups-1.5.0/scheduler/dirsv
BrowseInterval VALUE(DEFAULT_INTERVAL),
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-12-08 17:21:46.512157155 +0000
+++ cups-1.5.0/scheduler/listen.c 2012-01-17 16:22:39.888856922 +0000
@@ -401,7 +401,11 @@ cupsdStopListening(void)
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
@ -301,8 +302,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-12-08 17:21:46.467158009 +0000
+++ cups-1.5.0/scheduler/main.c 2011-12-08 17:23:05.944645297 +0000
--- cups-1.5.0/scheduler/main.c.systemd-socket 2012-01-17 16:22:39.830858019 +0000
+++ cups-1.5.0/scheduler/main.c 2012-01-17 16:22:39.890856884 +0000
@@ -26,6 +26,8 @@
* launchd_checkin() - Check-in with launchd and collect the listening
* fds.
@ -512,8 +513,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-12-08 17:21:46.477157820 +0000
+++ cups-1.5.0/scheduler/Makefile 2011-12-08 17:21:46.515157096 +0000
--- cups-1.5.0/scheduler/Makefile.systemd-socket 2012-01-17 16:22:39.839857849 +0000
+++ cups-1.5.0/scheduler/Makefile 2012-01-17 16:22:39.891856865 +0000
@@ -382,7 +382,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
$(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \

View File

@ -13,7 +13,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.5.0
Release: 26%{?dist}
Release: 27%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@ -670,6 +670,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/ipptool.1.gz
%changelog
* Tue Jan 17 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.0-27
- Use PrivateTmp=true in the service file (bug #782495).
* Tue Jan 17 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.0-26
- Replace newline characters with spaces in reported Device IDs
(bug #782129, STR #4005).