summarylogtreecommitdiffstats
path: root/guid.patch
diff options
context:
space:
mode:
authorFabioLolix2022-03-06 14:13:21 +0100
committerFabioLolix2022-03-06 14:13:21 +0100
commit12d9120006e9aa5b44cc84ce068f89b128100253 (patch)
tree5a7f0b2e81f401b017bad3e8768d7e7ad72f64fe /guid.patch
parentcc5d59e34c37686ae4a0c61ef2830de82fa725ee (diff)
downloadaur-12d9120006e9aa5b44cc84ce068f89b128100253.tar.gz
use openprinting source, sync with Arch pkgbuild
Diffstat (limited to 'guid.patch')
-rw-r--r--guid.patch25
1 files changed, 11 insertions, 14 deletions
diff --git a/guid.patch b/guid.patch
index ce28e024f3fd..b1bd19232e72 100644
--- a/guid.patch
+++ b/guid.patch
@@ -1,12 +1,11 @@
-diff --git a/scheduler/cups-exec.c b/scheduler/cups-exec.c
-index aab43a797..46c549075 100644
---- a/scheduler/cups-exec.c
-+++ b/scheduler/cups-exec.c
-@@ -133,8 +133,13 @@ main(int argc, /* I - Number of command-line args */
- if (setgid(gid))
- exit(errno + 100);
-
+--- cups-2.4.0/scheduler/cups-exec.c 2021-11-29 16:19:34.235186064 +0100
++++ cups-2.4.0/scheduler/cups-exec.c.new 2021-11-29 16:25:30.764049649 +0100
+@@ -134,9 +134,14 @@ main(int argc, /* I - Number of command-line args */
+ # if CUPS_SNAP
+ if (setgroups(0, NULL))
+ # else
- if (setgroups(1, &gid))
+-# endif /* CUPS_SNAP */
+#include <pwd.h>
+ struct passwd * pwd = getpwuid(uid);
+ if(initgroups(pwd->pw_name,pwd->pw_gid))
@@ -14,14 +13,13 @@ index aab43a797..46c549075 100644
+ fprintf(stderr, "DEBUG: initgroups failed\n");
exit(errno + 100);
+ }
++# endif /* CUPS_SNAP */
if (uid && setuid(uid))
exit(errno + 100);
-diff --git a/scheduler/util.c b/scheduler/util.c
-index 19ebf069b..4638562bd 100644
---- a/scheduler/util.c
-+++ b/scheduler/util.c
-@@ -300,7 +300,16 @@ cupsdPipeCommand(int *pid, /* O - Process ID or 0 on error */
+--- cups-2.4.0/scheduler/util.c 2021-11-29 15:27:31.000000000 +0100
++++ cups-2.4.0/scheduler/util.c.new 2021-11-29 16:29:58.810719066 +0100
+@@ -296,7 +296,16 @@
*/
if (!getuid() && user)
@@ -39,4 +37,3 @@ index 19ebf069b..4638562bd 100644
if ((fd = open("/dev/null", O_RDONLY)) > 0)
{
-