]> git.pld-linux.org Git - packages/cups.git/blame - cups-systemd-socket.patch
- up to 2.0.2; some SECURITY fixes
[packages/cups.git] / cups-systemd-socket.patch
CommitLineData
a04566f3
AM
1diff -up cups-2.0.2/cups/usersys.c.ustTJg cups-2.0.2/cups/usersys.c
2--- cups-2.0.2/cups/usersys.c.ustTJg 2015-02-10 13:40:24.294545077 +0100
3+++ cups-2.0.2/cups/usersys.c 2015-02-10 13:46:56.763989233 +0100
4@@ -1017,7 +1017,7 @@ cups_finalize_client_conf(
304fa3b3
JR
5 struct stat sockinfo; /* Domain socket information */
6
7 if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
8- (sockinfo.st_mode & S_IRWXO) == S_IRWXO)
9+ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH))
a04566f3 10 cups_set_server_name(cc, CUPS_DEFAULT_DOMAINSOCKET);
304fa3b3
JR
11 else
12 #endif /* CUPS_DEFAULT_DOMAINSOCKET */
a04566f3
AM
13diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
14--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100
15+++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100
16@@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm
17
18 #if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
19 if (OnDemand)
20+ {
862c04f1 21 cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
a04566f3
AM
22- else
23+# ifdef HAVE_SYSTEMD
24+ sd_notifyf(0, "READY=1\n"
25+ "STATUS=Scheduler is running...\n"
26+ "MAINPID=%lu",
27+ (unsigned long) getpid());
28+# endif /* HAVE_SYSTEMD */
29+ } else
862c04f1 30 #endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
f2552845 31 if (fg)
862c04f1 32 cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
a04566f3
AM
33diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
34--- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100
35+++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100
862c04f1
AM
36@@ -2,7 +2,7 @@
37 Description=CUPS Scheduler
38
39 [Path]
40-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
41+PathExistsGlob=@CUPS_REQUESTS@/d*
304fa3b3 42
862c04f1
AM
43 [Install]
44 WantedBy=multi-user.target
a04566f3
AM
45diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in
46--- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200
47+++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100
8196abcc
AM
48@@ -1,10 +1,11 @@
49 [Unit]
862c04f1 50 Description=CUPS Scheduler
8196abcc 51 Documentation=man:cupsd(8)
862c04f1
AM
52+After=network.target
53
54 [Service]
a04566f3 55 ExecStart=@sbindir@/cupsd -l
862c04f1 56-Type=simple
862c04f1 57+Type=notify
304fa3b3 58
862c04f1
AM
59 [Install]
60 Also=org.cups.cupsd.socket org.cups.cupsd.path
This page took 0.06818 seconds and 4 git commands to generate.