summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-09-22 23:59:16 +0000
committerbrian <brian@FreeBSD.org>1997-09-22 23:59:16 +0000
commit3884570228b4fa8937f60dd6d2fcba459b3a17d3 (patch)
tree50b89e1bd1f71f2296e7205dab3ed03434607277 /usr.sbin/ppp/lcp.c
parent21a8eb1d318f2fd4ee79da9aac7115e89b4bc033 (diff)
downloadFreeBSD-src-3884570228b4fa8937f60dd6d2fcba459b3a17d3.zip
FreeBSD-src-3884570228b4fa8937f60dd6d2fcba459b3a17d3.tar.gz
Don't allow accept/deny when it's not appropriate.
Log PAP/CHAP users in utmp & wtmp, allowing it to be avoided with "disable utmp"
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 1aa31b0..ca7006a 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.31 1997/09/21 23:01:34 brian Exp $
+ * $Id: lcp.c,v 1.32 1997/09/22 02:51:24 brian Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -291,7 +291,7 @@ LcpSendConfigReq(struct fsm * fp)
break;
case PROTO_CHAP:
PutConfValue(&cp, cftypes, TY_AUTHPROTO, 5, lcp->want_auth);
- *cp++ = 5; /* Use MD5 */
+ *cp++ = VarEncMD4 ? 0x80 : 0x05; /* Use MD4/MD5 */
break;
}
FsmOutput(fp, CODE_CONFIGREQ, fp->reqid++, ReqBuff, cp - ReqBuff);
@@ -510,10 +510,11 @@ LcpDecodeConfig(u_char * cp, int plen, int mode)
LogPrintf(LogLCP, " %s bad length (%d)\n", request, length);
goto reqreject;
}
- if (Acceptable(ConfChap) && cp[4] == 5) {
+ if (Acceptable(ConfChap) && (cp[4] == 5 || cp[4] == 0x80)) {
LcpInfo.his_auth = proto;
bcopy(cp, ackp, length);
ackp += length;
+ VarEncMD4 = cp[4] == 0x80;
} else if (Acceptable(ConfPap)) {
*nakp++ = *cp;
*nakp++ = 4;
OpenPOWER on IntegriCloud