*/
#ifndef lint
-static char rcsid[] = "$Id: auth.c,v 1.16 1995/07/04 12:34:17 paulus Exp $";
+static char rcsid[] = "$Id: auth.c,v 1.18 1995/10/27 03:39:53 paulus Exp $";
#endif
#include <stdio.h>
#define CHAP_WITHPEER 4
#define CHAP_PEER 8
-/* Prototypes */
-void check_access __P((FILE *, char *));
+/* Prototypes for procedures local to this file. */
static void network_phase __P((int));
static int login __P((char *, char *, char **, int *));
/*
* Write a wtmp entry for this user.
*/
- tty = strrchr(devnam, '/');
- if (tty == NULL)
- tty = devnam;
- else
- tty++;
+ tty = devnam;
+ if (strncmp(tty, "/dev/", 5) == 0)
+ tty += 5;
logwtmp(tty, user, ""); /* Add wtmp login entry */
logged_in = TRUE;
{
char *tty;
- tty = strrchr(devnam, '/');
- if (tty == NULL)
- tty = devnam;
- else
- tty++;
+ tty = devnam;
+ if (strncmp(tty, "/dev/", 5) == 0)
+ tty += 5;
logwtmp(tty, "", ""); /* Wipe out wtmp logout entry */
logged_in = FALSE;
}