cdaa46736b
Some time ago we were using the following in cupsd.socket: ListenStream=631 ListenDatagram=0.0.0.0:631 Then later we removed it due to https://bugzilla.redhat.com/show_bug.cgi?id=842365 Upstream now (2.0rc1) uses ListenStream=[::1]:631 ListenStream=127.0.0.1:631 which I think avoids the vulnerability (CVE-2012-6094) so I guess we can actually go along with it.
55 lines
2.3 KiB
Diff
55 lines
2.3 KiB
Diff
diff -up cups-2.0rc1/cups/usersys.c.systemd-socket cups-2.0rc1/cups/usersys.c
|
|
--- cups-2.0rc1/cups/usersys.c.systemd-socket 2014-08-28 17:37:22.000000000 +0200
|
|
+++ cups-2.0rc1/cups/usersys.c 2014-09-12 14:35:37.462374923 +0200
|
|
@@ -1028,7 +1028,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-2.0rc1/scheduler/main.c.systemd-socket cups-2.0rc1/scheduler/main.c
|
|
--- cups-2.0rc1/scheduler/main.c.systemd-socket 2014-09-12 14:59:08.000000000 +0200
|
|
+++ cups-2.0rc1/scheduler/main.c 2014-09-12 14:59:23.229299751 +0200
|
|
@@ -653,6 +653,12 @@ main(int argc, /* I - Number of comm
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
|
else
|
|
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
|
+#ifdef HAVE_SYSTEMD
|
|
+ sd_notifyf(0, "READY=1\n"
|
|
+ "STATUS=Scheduler is running...\n"
|
|
+ "MAINPID=%lu",
|
|
+ (unsigned long) getpid());
|
|
+#endif /* HAVE_SYSTEMD */
|
|
if (fg)
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
|
else
|
|
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.path.in
|
|
--- cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket 2014-09-12 14:42:57.942162725 +0200
|
|
+++ cups-2.0rc1/scheduler/org.cups.cupsd.path.in 2014-09-12 14:42:54.254214614 +0200
|
|
@@ -2,7 +2,7 @@
|
|
Description=CUPS Scheduler
|
|
|
|
[Path]
|
|
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.service.in
|
|
--- cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket 2014-09-12 14:40:13.000000000 +0200
|
|
+++ cups-2.0rc1/scheduler/org.cups.cupsd.service.in 2014-09-12 14:43:17.534887056 +0200
|
|
@@ -2,8 +2,8 @@
|
|
Description=CUPS Scheduler
|
|
|
|
[Service]
|
|
-ExecStart=@sbindir@/cupsd -l
|
|
-Type=simple
|
|
+ExecStart=@sbindir@/cupsd -f
|
|
+Type=notify
|
|
|
|
[Install]
|
|
Also=org.cups.cupsd.socket org.cups.cupsd.path
|