summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chap.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-02-19 02:10:13 +0000
committerbrian <brian@FreeBSD.org>1998-02-19 02:10:13 +0000
commit5b9c68270e4cd9c5f15391f1690bab700d14d3c6 (patch)
tree79cdbf4ab50c51835cc0f9372fe5b2c4e08750de /usr.sbin/ppp/chap.c
parent7a0499eae564b147d6bd8e5703bdce285e56e446 (diff)
downloadFreeBSD-src-5b9c68270e4cd9c5f15391f1690bab700d14d3c6.zip
FreeBSD-src-5b9c68270e4cd9c5f15391f1690bab700d14d3c6.tar.gz
MFMP: Allow 8 character login names.
Do the login()/logwtmp()/logout() as id 0.
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r--usr.sbin/ppp/chap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
index 28bd5e3..727699d 100644
--- a/usr.sbin/ppp/chap.c
+++ b/usr.sbin/ppp/chap.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: chap.c,v 1.27 1997/12/07 23:55:25 brian Exp $
+ * $Id: chap.c,v 1.28 1997/12/24 09:28:53 brian Exp $
*
* TODO:
*/
@@ -56,6 +56,7 @@
#include "loadalias.h"
#include "vars.h"
#include "auth.h"
+#include "id.h"
static const char *chapcodes[] = {
"???", "CHALLENGE", "RESPONSE", "SUCCESS", "FAILURE"
@@ -232,11 +233,9 @@ RecvChapTalk(struct fsmheader *chp, struct mbuf *bp)
struct utmp ut;
memset(&ut, 0, sizeof ut);
time(&ut.ut_time);
- strncpy(ut.ut_name, name, sizeof ut.ut_name - 1);
+ strncpy(ut.ut_name, name, sizeof ut.ut_name);
strncpy(ut.ut_line, VarBaseDevice, sizeof ut.ut_line - 1);
- if (logout(ut.ut_line))
- logwtmp(ut.ut_line, "", "");
- login(&ut);
+ ID0login(&ut);
Utmp = 1;
}
NewPhase(PHASE_NETWORK);
OpenPOWER on IntegriCloud