summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authoramurai <amurai@FreeBSD.org>1995-09-02 17:20:54 +0000
committeramurai <amurai@FreeBSD.org>1995-09-02 17:20:54 +0000
commit9a28cf053e0253a84225e0cd75dda5047d6bba8c (patch)
tree4e6b794c1199fd47264885cc1e6f40b97af13fb1 /usr.sbin/ppp/chat.c
parent5c97b17f6e144daf5501e5001506baf86759318e (diff)
downloadFreeBSD-src-9a28cf053e0253a84225e0cd75dda5047d6bba8c.zip
FreeBSD-src-9a28cf053e0253a84225e0cd75dda5047d6bba8c.tar.gz
1. Do not log the password itself to ppp.log ( Mr. Rich Murphey )
2. Add ability to execute shell commands and suspend back into invoking shell (Mr. J Wunsch) Reviewed by: amurai@spec.co.jp Submitted by: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Rich Murphey <rich@lamprey.utmb.edu>
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index ebfefe8..5d49a1b 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.3 1995/03/11 15:18:37 amurai Exp $
+ * $Id: chat.c,v 1.4 1995/05/30 03:50:29 rgrimes Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -373,7 +373,11 @@ char *str;
} else {
(void) ExpandString(str, buff+2, 1);
}
- LogPrintf(LOG_CHAT, "sending: %s\n", buff+2);
+ if (strstr(str, "\\P")) { /* Do not log the password itself. */
+ LogPrintf(LOG_CHAT, "sending: %s\n", str);
+ } else {
+ LogPrintf(LOG_CHAT, "sending: %s\n", buff+2);
+ }
cp = buff;
if (DEV_IS_SYNC)
bcopy("\377\003", buff, 2); /* Prepend HDLC header */
OpenPOWER on IntegriCloud