Your message dated Thu, 25 Feb 2021 17:46:27 +0100 with message-id <[email protected]> and subject line Re: Bug#392321: sudo: cannot use env_delete with env_reset has caused the Debian Bug report #392321, regarding sudo: cannot use env_delete with env_reset to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 392321: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392321 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: sudo Version: 1.6.8p12-4 Severity: normal Tags: patch Hi, When env_reset is in use, env_delete is currently not honored. It is not possible to delete additional environment variables. For example, I want to use env_reset but I do not want to keep the locale-related variables LANG, LANGUAGE, and LC_*. The patch below causes to the deletion of the variables listed in env_deleted, even when env_reset is in use. Regards, Arnaud Giersch --- sudo-1.6.8p12.debian/env.c 2006-10-11 10:31:27.000000000 +0200 +++ sudo-1.6.8p12/env.c 2006-10-11 10:30:28.000000000 +0200 @@ -377,6 +377,21 @@ || !strncmp (*ep, "LC_", 3)) keepit = 1; + /* Skip anything listed in env_delete. */ + for (cur = def_env_delete; cur && keepit; cur = cur->next) { + len = strlen(cur->value); + /* Deal with '*' wildcard */ + if (cur->value[len - 1] == '*') { + len--; + iswild = 1; + } else + iswild = 0; + if (strncmp(cur->value, *ep, len) == 0 && + (iswild || (*ep)[len] == '=')) { + keepit = 0; + } + } + /* For SUDO_PS1 -> PS1 conversion. */ if (strncmp(*ep, "SUDO_PS1=", 8) == 0) ps1 = *ep + 5; -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing'), (50, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-2-686 Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15) Versions of packages sudo depends on: ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries ii libpam-modules 0.79-3.2 Pluggable Authentication Modules f ii libpam0g 0.79-3.2 Pluggable Authentication Modules l sudo recommends no packages. -- no debconf information -- Arnaud Giersch http://info.iut-bm.univ-fcomte.fr/staff/giersch/
--- End Message ---
--- Begin Message ---Version: 1.8.3p1-2 On Wed, Jan 25, 2012 at 09:44:22AM +0100, Jan Braun wrote: > fixed 392321 1.8.3p1-2 > fixed 523882 1.8.3p1-2 > thanks > > Hi, > both these bugs have been fixed in the meantime. All environment > variables can now be preserved and removed by env_keep/env_check and > env_delete, respectively. Or at least I tried the examples given, got > the desired results, and see no reason to suspect other problems. The referred message from 2012 has for some reason not actually closed the bug. I hope this message does the job now. Greetings Marc
--- End Message ---

