chap.c (31616) | chap.c (31962) |
---|---|
1/* 2 * PPP CHAP Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * PPP CHAP Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: chap.c,v 1.26 1997/11/22 03:37:25 brian Exp $ | 20 * $Id: chap.c,v 1.27 1997/12/07 23:55:25 brian Exp $ |
21 * 22 * TODO: 23 */ 24#include <sys/param.h> 25#include <netinet/in.h> 26 27#include <ctype.h> 28#ifdef HAVE_DES --- 196 unchanged lines hidden (view full) --- 225 if (memcmp(cp, cdigest, 16) == 0) { 226 ChapOutput(CHAP_SUCCESS, chp->id, "Welcome!!", 10); 227 if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp)) 228 if (Utmp) 229 LogPrintf(LogERROR, "Oops, already logged in on %s\n", 230 VarBaseDevice); 231 else { 232 struct utmp ut; | 21 * 22 * TODO: 23 */ 24#include <sys/param.h> 25#include <netinet/in.h> 26 27#include <ctype.h> 28#ifdef HAVE_DES --- 196 unchanged lines hidden (view full) --- 225 if (memcmp(cp, cdigest, 16) == 0) { 226 ChapOutput(CHAP_SUCCESS, chp->id, "Welcome!!", 10); 227 if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp)) 228 if (Utmp) 229 LogPrintf(LogERROR, "Oops, already logged in on %s\n", 230 VarBaseDevice); 231 else { 232 struct utmp ut; |
233 memset(&ut, 0, sizeof(ut)); | 233 memset(&ut, 0, sizeof ut); |
234 time(&ut.ut_time); | 234 time(&ut.ut_time); |
235 strncpy(ut.ut_name, name, sizeof(ut.ut_name)-1); 236 strncpy(ut.ut_line, VarBaseDevice, sizeof(ut.ut_line)-1); | 235 strncpy(ut.ut_name, name, sizeof ut.ut_name - 1); 236 strncpy(ut.ut_line, VarBaseDevice, sizeof ut.ut_line - 1); |
237 if (logout(ut.ut_line)) 238 logwtmp(ut.ut_line, "", ""); 239 login(&ut); 240 Utmp = 1; 241 } 242 NewPhase(PHASE_NETWORK); 243 break; 244 } --- 67 unchanged lines hidden --- | 237 if (logout(ut.ut_line)) 238 logwtmp(ut.ut_line, "", ""); 239 login(&ut); 240 Utmp = 1; 241 } 242 NewPhase(PHASE_NETWORK); 243 break; 244 } --- 67 unchanged lines hidden --- |