* ftpcmd.y (getline): Don't syslog passwords! (or newlines)
authorDan Winship <danw@mit.edu>
Thu, 5 Mar 1998 19:02:15 +0000 (19:02 +0000)
committerDan Winship <danw@mit.edu>
Thu, 5 Mar 1998 19:02:15 +0000 (19:02 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10498 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftpd/ChangeLog
src/appl/gssftp/ftpd/ftpcmd.y

index c9a30e597902fd3e0ad6673b8f57deac80094061..7fcab65dd9052f65cc322a87425f5f0df0069e1a 100644 (file)
@@ -1,3 +1,7 @@
+Thu Mar  5 13:59:47 1998  Dan Winship  <danw@mit.edu>
+
+       * ftpcmd.y (getline): Don't syslog passwords! (or newlines)
+
 Tue Feb 24 21:34:34 1998  Tom Yu  <tlyu@mit.edu>
 
        * ftpcmd.y: Add production "nonguest" to catch things that
index 0da1188941ef5d6dac3f3f2352abcf92c8c86691..a7c400ba3c745f68f8823c77136f4c2fffc8431c 100644 (file)
@@ -1095,8 +1095,13 @@ getline(s, n, iop)
        }
 #endif /* KERBEROS */
 
-       if (debug)
-               syslog(LOG_DEBUG, "command: <%s>(%d)", s, strlen(s));
+       if (debug) {
+               if (!strncmp(s, "PASS ", 5) && !guest)
+                       syslog(LOG_DEBUG, "command: <PASS XXX>");
+               else
+                       syslog(LOG_DEBUG, "command: <%.*s>(%d)",
+                              strlen(s) - 2, s, strlen(s));
+       }
        return (s);
 }