From d5dc509e6f720301d2e4113082534765757bb303 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 5 Mar 1998 19:02:15 +0000 Subject: [PATCH] * ftpcmd.y (getline): Don't syslog passwords! (or newlines) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10498 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftpd/ChangeLog | 4 ++++ src/appl/gssftp/ftpd/ftpcmd.y | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index c9a30e597..7fcab65dd 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 5 13:59:47 1998 Dan Winship + + * ftpcmd.y (getline): Don't syslog passwords! (or newlines) + Tue Feb 24 21:34:34 1998 Tom Yu * ftpcmd.y: Add production "nonguest" to catch things that diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y index 0da118894..a7c400ba3 100644 --- a/src/appl/gssftp/ftpd/ftpcmd.y +++ b/src/appl/gssftp/ftpd/ftpcmd.y @@ -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: "); + else + syslog(LOG_DEBUG, "command: <%.*s>(%d)", + strlen(s) - 2, s, strlen(s)); + } return (s); } -- 2.26.2