version 1.1, 1995/10/18 08:45:33 |
version 1.2, 1996/05/24 09:19:50 |
|
|
/* $NetBSD: lock.c,v 1.7 1995/06/27 00:16:17 jtc Exp $ */ |
/* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1980, 1987, 1993 |
* Copyright (c) 1980, 1987, 1993 |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; |
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93"; |
#endif |
#endif |
static char rcsid[] = "$NetBSD: lock.c,v 1.7 1995/06/27 00:16:17 jtc Exp $"; |
static char rcsid[] = "$NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
/* |
/* |
|
|
#include <err.h> |
#include <err.h> |
#include <pwd.h> |
#include <pwd.h> |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <termios.h> |
#include <termios.h> |
|
#include <unistd.h> |
|
|
#define TIMEOUT 15 |
#define TIMEOUT 15 |
|
|
|
|
char **argv; |
char **argv; |
{ |
{ |
extern char *optarg; |
extern char *optarg; |
extern int errno, optind; |
|
struct passwd *pw; |
struct passwd *pw; |
struct timeval timval; |
struct timeval timval; |
struct itimerval ntimer, otimer; |
struct itimerval ntimer, otimer; |
|
|
int ch, sectimeout, usemine; |
int ch, sectimeout, usemine; |
char *ap, *mypw, *ttynam, *tzn; |
char *ap, *mypw, *ttynam, *tzn; |
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; |
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; |
char *crypt(), *ttyname(); |
char *crypt(); |
|
|
sectimeout = TIMEOUT; |
sectimeout = TIMEOUT; |
mypw = NULL; |
mypw = NULL; |