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: [EMAIL PROTECTED], [EMAIL PROTECTED] (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/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to