From: Zdenek Dohnal Date: Mon, 15 Aug 2022 15:38:12 +0000 (+0200) Subject: cups/dest.c: Write data into /etc/cups/lpoptions if we're root X-Git-Tag: v2.4.3~149^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ae6eb11184dcbd9eaf3c6badd4fad59fcc3863a;p=thirdparty%2Fcups.git 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). --- diff --git a/cups/dest.c b/cups/dest.c index f563ce2260..a9273ff93a 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...