Bug#1008053: cups-client: lpoptions as root doesn't update /etc/cups/lpoptions
Package: cups-client
Version: 2.3.3op2-3+deb11u1huji
Severity: normal
Tags: patch
Dear Maintainer,
Running lpoptions as root (e.g. "lpoptions -d mafil") should update
/etc/cups/lpoptions to be the defaults for all users (at least it was in the
past and still claim to do so in the manual). But instead it tries to update
/root/.cups/lpoptions.
Attached is a patch to fix it (to actually check the uid instead of home).
-- System Information:
Debian Release: 11.2
APT prefers stable-security
APT policy: (910, 'stable-security'), (900, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.104-aufs-2 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_IL.UTF-8, LC_CTYPE=en_IL.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en_GB:en
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages cups-client depends on:
ii adduser 3.118
ii cups-common 2.3.3op2-3+deb11u1huji
ii libc6 2.31-13+deb11u2
ii libcups2 2.3.3op2-3+deb11u1huji
cups-client recommends no packages.
Versions of packages cups-client suggests:
ii cups 2.3.3op2-3+deb11u1
ii cups-bsd 2.3.3op2-3+deb11u1
ii smbclient 2:4.13.13+dfsg-1~deb11u2
-- no debconf information
--- a/cups/dest.c
+++ b/cups/dest.c
@@ -2067,7 +2067,11 @@
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- if (cg->home)
+ if (cg->home
+#ifndef _WIN32
+ && getuid() != 0
+#endif
+ )
{
/*
* Create ~/.cups subdirectory...
Reply to: