summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-10-16 23:55:19 +0000
committerbrian <brian@FreeBSD.org>1997-10-16 23:55:19 +0000
commitd134eaa71d9a433cd45b920cfc5905c69a3d8bcc (patch)
treebfdeaf677aefdd00b8a168def87ffacf6eec5212 /usr.sbin
parentf82436f706f0fd55f9f71918a244ef6d26254734 (diff)
downloadFreeBSD-src-d134eaa71d9a433cd45b920cfc5905c69a3d8bcc.zip
FreeBSD-src-d134eaa71d9a433cd45b920cfc5905c69a3d8bcc.tar.gz
cosmetic:
o Log client connection commands when "set log +command" o Don't display PAP password in the log unless we're "set log +debug".
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/main.c4
-rw-r--r--usr.sbin/ppp/pap.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 9e07a6a..23b0ea7 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.81 1997/09/22 00:46:55 brian Exp $
+ * $Id: main.c,v 1.82 1997/10/07 00:56:57 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -547,6 +547,8 @@ ReadTty()
n = read(netfd, linebuff, sizeof(linebuff) - 1);
if (n > 0) {
aft_cmd = 1;
+ linebuff[n] = '\0';
+ LogPrintf(LogCOMMAND, "Client: %s\n", linebuff);
DecodeCommand(linebuff, n, 1);
} else {
LogPrintf(LogPHASE, "client connection closed.\n");
diff --git a/usr.sbin/ppp/pap.c b/usr.sbin/ppp/pap.c
index aad7a30..9d9580c 100644
--- a/usr.sbin/ppp/pap.c
+++ b/usr.sbin/ppp/pap.c
@@ -18,7 +18,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: pap.c,v 1.15 1997/09/22 23:59:15 brian Exp $
+ * $Id: pap.c,v 1.16 1997/09/27 19:11:41 brian Exp $
*
* TODO:
*/
@@ -61,7 +61,10 @@ SendPapChallenge(int papid)
plen = namelen + keylen + 2;
LogPrintf(LogDEBUG, "SendPapChallenge: namelen = %d, keylen = %d\n",
namelen, keylen);
- LogPrintf(LogPHASE, "PAP: %s (%s)\n", VarAuthName, VarAuthKey);
+ if (LogIsKept(LogDEBUG))
+ LogPrintf(LogPHASE, "PAP: %s (%s)\n", VarAuthName, VarAuthKey);
+ else
+ LogPrintf(LogPHASE, "PAP: %s\n", VarAuthName);
lh.code = PAP_REQUEST;
lh.id = papid;
lh.length = htons(plen + sizeof(struct fsmheader));
OpenPOWER on IntegriCloud