xref: /netbsd-src/usr.bin/login/common.h (revision ec88541aff676301080cd2b947cbcf513cb51734)
1*ec88541aSchristos /*	$NetBSD: common.h,v 1.4 2012/05/19 00:02:44 christos Exp $	*/
2d74e5fa8Schristos 
3d74e5fa8Schristos /*-
4d74e5fa8Schristos  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
5d74e5fa8Schristos  *	The Regents of the University of California.  All rights reserved.
6d74e5fa8Schristos  *
7d74e5fa8Schristos  * Redistribution and use in source and binary forms, with or without
8d74e5fa8Schristos  * modification, are permitted provided that the following conditions
9d74e5fa8Schristos  * are met:
10d74e5fa8Schristos  * 1. Redistributions of source code must retain the above copyright
11d74e5fa8Schristos  *    notice, this list of conditions and the following disclaimer.
12d74e5fa8Schristos  * 2. Redistributions in binary form must reproduce the above copyright
13d74e5fa8Schristos  *    notice, this list of conditions and the following disclaimer in the
14d74e5fa8Schristos  *    documentation and/or other materials provided with the distribution.
15d74e5fa8Schristos  * 3. Neither the name of the University nor the names of its contributors
16d74e5fa8Schristos  *    may be used to endorse or promote products derived from this software
17d74e5fa8Schristos  *    without specific prior written permission.
18d74e5fa8Schristos  *
19d74e5fa8Schristos  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20d74e5fa8Schristos  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21d74e5fa8Schristos  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22d74e5fa8Schristos  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23d74e5fa8Schristos  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24d74e5fa8Schristos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25d74e5fa8Schristos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26d74e5fa8Schristos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27d74e5fa8Schristos  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28d74e5fa8Schristos  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29d74e5fa8Schristos  * SUCH DAMAGE.
30d74e5fa8Schristos  */
31d74e5fa8Schristos 
32d74e5fa8Schristos __BEGIN_DECLS
33d74e5fa8Schristos 
34d74e5fa8Schristos void	 badlogin(const char *);
35d74e5fa8Schristos void	 update_db(int, int, int);
36e694c7c9Schristos char	*trimloginname(char *);
37e694c7c9Schristos char	*getloginname(void);
38e694c7c9Schristos void	 motd(const char *);
39d74e5fa8Schristos int	 rootterm(char *);
40*ec88541aSchristos void	 __dead sigint(int);
41*ec88541aSchristos void	 __dead sleepexit(int);
42d74e5fa8Schristos const	 char *stypeof(const char *);
43*ec88541aSchristos void	 __dead timedout(int);
44d74e5fa8Schristos void	 decode_ss(const char *);
45d74e5fa8Schristos 
46d74e5fa8Schristos extern u_int	timeout;
47d74e5fa8Schristos extern struct	passwd *pwd;
48d74e5fa8Schristos extern int	failures, have_ss;
49e694c7c9Schristos extern char	term[64], *envinit[1], *hostname, *tty, *nested;
50e694c7c9Schristos extern const char *username;
51d74e5fa8Schristos extern struct timeval now;
52d74e5fa8Schristos extern struct sockaddr_storage ss;
53d74e5fa8Schristos extern const char copyrightstr[];
54d74e5fa8Schristos 
55d74e5fa8Schristos __END_DECLS
56