Reversed the check for strchr(). If strchr(varp, '=') is true then we
authorRichard Basch <probe@mit.edu>
Tue, 24 Oct 1995 23:11:06 +0000 (23:11 +0000)
committerRichard Basch <probe@mit.edu>
Tue, 24 Oct 1995 23:11:06 +0000 (23:11 +0000)
reject the bad environment variable as it contains an =.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6993 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnetd/state.c

index b364dfff1456b55b5a4389d566b860228f223492..921425980628c9a717d52edfdb729d3dc31ac313 100644 (file)
@@ -1629,7 +1629,7 @@ char *varp;
     if (!strncmp(varp, "LD_", 3) || !strncmp(varp, "_RLD_", 5) ||
        !strncmp(varp, "ELF_LD_", 7) ||
         !strcmp(varp, "LIBPATH") || !strcmp(varp, "IFS") ||
-       !strchr(varp, '='))
+       strchr(varp, '='))
     {
        syslog(LOG_INFO, "Rejected the attempt to modify the environment variable \"%s\"", varp);
        return 0;