From: nekral-guest Date: Sun, 24 Jan 2010 17:23:42 +0000 (+0000) Subject: * libmisc/env.c: Fix sanitize_env() noslash support. This fixes X-Git-Tag: 4.1.5~359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ba95d4c5369cee7780bd5cd8436010ca7077186;p=thirdparty%2Fshadow.git * libmisc/env.c: Fix sanitize_env() noslash support. This fixes Alioth#311740. Thanks to Jason Cassell. --- diff --git a/ChangeLog b/ChangeLog index e440b310b..6a0095d79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ +2009-01-24 Nicolas François + + * libmisc/env.c: Fix sanitize_env() noslash support. This fixes + Alioth#311740. + 2009-01-24 Nicolas François * src/su.c: Do not sanitize the environment. This breaks --preserve-environment. This sanitation was disabled on Debian since quite some time with no reported issues, and sanitize_env() documentation agrees that it should be useless as all modern - Unixes will handle setuid executables properly. This Fixes + Unixes will handle setuid executables properly. This fixes Alioth#312287. 2009-01-24 Nicolas François diff --git a/libmisc/env.c b/libmisc/env.c index b46ca10c8..056602c46 100644 --- a/libmisc/env.c +++ b/libmisc/env.c @@ -251,7 +251,7 @@ void sanitize_env (void) if (strncmp (*cur, *bad, strlen (*bad)) != 0) { continue; } - if (strchr (*cur, '/') != NULL) { + if (strchr (*cur, '/') == NULL) { continue; /* OK */ } for (move = cur; NULL != *move; move++) {