--- sudo-1.6.8p12/env.c 2006-02-06 14:23:31.000000000 +0100 +++ sudo-1.6.8p12-fix/env.c 2006-02-06 14:31:06.000000000 +0100 @@ -142,6 +142,7 @@ "LC_*", "LANG", "LANGUAGE", + "TERM", NULL }; @@ -440,6 +441,7 @@ } /* Skip anything listed in env_delete. */ +#if 0 for (cur = def_env_delete; cur && okvar; cur = cur->next) { len = strlen(cur->value); /* Deal with '*' wildcard */ @@ -453,9 +455,10 @@ okvar = 0; } } +#endif /* Check certain variables for '%' and '/' characters. */ - for (cur = def_env_check; cur && okvar; cur = cur->next) { + for (cur = def_env_check; cur; cur = cur->next) { len = strlen(cur->value); /* Deal with '*' wildcard */ if (cur->value[len - 1] == '*') { @@ -465,8 +468,8 @@ iswild = 0; if (strncmp(cur->value, *ep, len) == 0 && (iswild || (*ep)[len] == '=') && - strpbrk(*ep, "/%")) { - okvar = 0; + strpbrk(*ep, "/%") == NULL) { + okvar = 1; } }