Fix logic inversion when checking environment variables on the
authormillert <millert@openbsd.org>
Thu, 24 Apr 2014 16:29:48 +0000 (16:29 +0000)
committermillert <millert@openbsd.org>
Thu, 24 Apr 2014 16:29:48 +0000 (16:29 +0000)
command line against the blacklist.  This is only a problem when
env_reset is disabled.  CVE 2014-0106

usr.bin/sudo/env.c

index 3dc1183..ef2785d 100644 (file)
@@ -832,7 +832,7 @@ validate_env_vars(env_vars)
                okvar = matches_env_keep(var->value);
        } else {
            okvar = matches_env_delete(var->value) == FALSE;
-           if (okvar == FALSE)
+           if (okvar == TRUE)
                okvar = matches_env_check(var->value) != FALSE;
        }
        if (okvar == FALSE) {