util.h revision 1.1
1249729Sgshapiro/*	$NetBSD: util.h,v 1.1 1996/05/15 21:36:46 jtc Exp $	*/
2132943Sgshapiro
3132943Sgshapiro/*-
4132943Sgshapiro * Copyright (c) 1995
5132943Sgshapiro *	The Regents of the University of California.  All rights reserved.
6132943Sgshapiro *
7132943Sgshapiro * Redistribution and use in source and binary forms, with or without
8132943Sgshapiro * modification, are permitted provided that the following conditions
9132943Sgshapiro * are met:
10132943Sgshapiro * 1. Redistributions of source code must retain the above copyright
11132943Sgshapiro *    notice, this list of conditions and the following disclaimer.
12173340Sgshapiro * 2. Redistributions in binary form must reproduce the above copyright
13249729Sgshapiro *    notice, this list of conditions and the following disclaimer in the
14249729Sgshapiro *    documentation and/or other materials provided with the distribution.
15249729Sgshapiro * 3. All advertising materials mentioning features or use of this software
16132943Sgshapiro *    must display the following acknowledgement:
17249729Sgshapiro *	This product includes software developed by the University of
18249729Sgshapiro *	California, Berkeley and its contributors.
19249729Sgshapiro * 4. Neither the name of the University nor the names of its contributors
20132943Sgshapiro *    may be used to endorse or promote products derived from this software
21132943Sgshapiro *    without specific prior written permission.
22249729Sgshapiro *
23249729Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24249729Sgshapiro * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25249729Sgshapiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26249729Sgshapiro * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27249729Sgshapiro * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28249729Sgshapiro * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29249729Sgshapiro * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30249729Sgshapiro * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31249729Sgshapiro * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32249729Sgshapiro * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33249729Sgshapiro * SUCH DAMAGE.
34249729Sgshapiro */
35249729Sgshapiro
36249729Sgshapiro#ifndef _UTIL_H_
37249729Sgshapiro#define _UTIL_H_
38249729Sgshapiro
39249729Sgshapiro#include <pwd.h>
40249729Sgshapiro#include <utmp.h>
41249729Sgshapiro#include <termios.h>
42132943Sgshapiro#include <sys/ttycom.h>
43132943Sgshapiro#include <sys/types.h>
44132943Sgshapiro#include <sys/cdefs.h>
45249729Sgshapiro
46132943Sgshapiro__BEGIN_DECLS
47249729Sgshapirovoid	login __P((struct utmp *));
48249729Sgshapiroint	login_tty __P((int));
49249729Sgshapiroint	logout __P((const char *));
50132943Sgshapirovoid	logwtmp __P((const char *, const char *, const char *));
51132943Sgshapiroint	pw_lock __P((int retries));
52249729Sgshapiroint	pw_mkdb __P((void));
53132943Sgshapiroint	pw_abort __P((void));
54249729Sgshapirovoid	pw_init __P((void));
55132943Sgshapirovoid	pw_edit __P((int notsetuid, const char *filename));
56249729Sgshapirovoid	pw_prompt __P((void));
57249729Sgshapirovoid	pw_copy __P((int ffd, int tfd, struct passwd *pw));
58249729Sgshapiroint	pw_scan __P((char *bp, struct passwd *pw, int *flags));
59249729Sgshapirovoid	pw_error __P((const char *name, int err, int eval));
60249729Sgshapiroint	openpty __P((int *, int *, char *, struct termios *,
61249729Sgshapiro		     struct winsize *));
62249729Sgshapiropid_t	forkpty __P((int *, char *, struct termios *, struct winsize *));
63249729Sgshapiro__END_DECLS
64249729Sgshapiro
65249729Sgshapiro#endif /* !_UTIL_H_ */
66249729Sgshapiro