33 lines
879 B
Diff
33 lines
879 B
Diff
From 8ae6eb11184dcbd9eaf3c6badd4fad59fcc3863a Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
|
Date: Mon, 15 Aug 2022 17:38:12 +0200
|
|
Subject: [PATCH] cups/dest.c: Write data into /etc/cups/lpoptions if we're
|
|
root
|
|
|
|
Fixes #454 , the patch is created by Yair Yarom
|
|
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008053).
|
|
---
|
|
cups/dest.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/cups/dest.c b/cups/dest.c
|
|
index f563ce226..a9273ff93 100644
|
|
--- a/cups/dest.c
|
|
+++ b/cups/dest.c
|
|
@@ -2080,7 +2080,11 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
|
|
|
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
|
|
|
|
- if (cg->home)
|
|
+ if (cg->home
|
|
+#ifndef _WIN32
|
|
+ && getuid() != 0
|
|
+#endif /* !_WIN32 */
|
|
+ )
|
|
{
|
|
/*
|
|
* Create ~/.cups subdirectory...
|
|
--
|
|
2.44.0
|
|
|