xref: /utopia/UTPA2-700.0.x/projects/tools/lint/aeon_include/pwd.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi /*-
2*53ee8cc1Swenshuai.xi  * Copyright (c) 1989 The Regents of the University of California.
3*53ee8cc1Swenshuai.xi  * All rights reserved.
4*53ee8cc1Swenshuai.xi  *
5*53ee8cc1Swenshuai.xi  * Redistribution and use in source and binary forms, with or without
6*53ee8cc1Swenshuai.xi  * modification, are permitted provided that the following conditions
7*53ee8cc1Swenshuai.xi  * are met:
8*53ee8cc1Swenshuai.xi  * 1. Redistributions of source code must retain the above copyright
9*53ee8cc1Swenshuai.xi  *    notice, this list of conditions and the following disclaimer.
10*53ee8cc1Swenshuai.xi  * 2. Redistributions in binary form must reproduce the above copyright
11*53ee8cc1Swenshuai.xi  *    notice, this list of conditions and the following disclaimer in the
12*53ee8cc1Swenshuai.xi  *    documentation and/or other materials provided with the distribution.
13*53ee8cc1Swenshuai.xi  * 3. All advertising materials mentioning features or use of this software
14*53ee8cc1Swenshuai.xi  *    must display the following acknowledgement:
15*53ee8cc1Swenshuai.xi  *	This product includes software developed by the University of
16*53ee8cc1Swenshuai.xi  *	California, Berkeley and its contributors.
17*53ee8cc1Swenshuai.xi  * 4. Neither the name of the University nor the names of its contributors
18*53ee8cc1Swenshuai.xi  *    may be used to endorse or promote products derived from this software
19*53ee8cc1Swenshuai.xi  *    without specific prior written permission.
20*53ee8cc1Swenshuai.xi  *
21*53ee8cc1Swenshuai.xi  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*53ee8cc1Swenshuai.xi  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*53ee8cc1Swenshuai.xi  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*53ee8cc1Swenshuai.xi  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*53ee8cc1Swenshuai.xi  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*53ee8cc1Swenshuai.xi  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*53ee8cc1Swenshuai.xi  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*53ee8cc1Swenshuai.xi  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*53ee8cc1Swenshuai.xi  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*53ee8cc1Swenshuai.xi  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*53ee8cc1Swenshuai.xi  * SUCH DAMAGE.
32*53ee8cc1Swenshuai.xi  *
33*53ee8cc1Swenshuai.xi  *	@(#)pwd.h	5.13 (Berkeley) 5/28/91
34*53ee8cc1Swenshuai.xi  */
35*53ee8cc1Swenshuai.xi 
36*53ee8cc1Swenshuai.xi #ifndef _PWD_H_
37*53ee8cc1Swenshuai.xi #ifdef __cplusplus
38*53ee8cc1Swenshuai.xi extern "C" {
39*53ee8cc1Swenshuai.xi #endif
40*53ee8cc1Swenshuai.xi #define	_PWD_H_
41*53ee8cc1Swenshuai.xi 
42*53ee8cc1Swenshuai.xi #include <sys/types.h>
43*53ee8cc1Swenshuai.xi 
44*53ee8cc1Swenshuai.xi #ifndef _POSIX_SOURCE
45*53ee8cc1Swenshuai.xi #define	_PATH_PASSWD		"/etc/passwd"
46*53ee8cc1Swenshuai.xi 
47*53ee8cc1Swenshuai.xi #define	_PASSWORD_LEN		128	/* max length, not counting NULL */
48*53ee8cc1Swenshuai.xi #endif
49*53ee8cc1Swenshuai.xi 
50*53ee8cc1Swenshuai.xi struct passwd {
51*53ee8cc1Swenshuai.xi 	char	*pw_name;		/* user name */
52*53ee8cc1Swenshuai.xi 	char	*pw_passwd;		/* encrypted password */
53*53ee8cc1Swenshuai.xi 	uid_t	pw_uid;			/* user uid */
54*53ee8cc1Swenshuai.xi 	gid_t	pw_gid;			/* user gid */
55*53ee8cc1Swenshuai.xi 	char	*pw_comment;		/* comment */
56*53ee8cc1Swenshuai.xi 	char	*pw_gecos;		/* Honeywell login info */
57*53ee8cc1Swenshuai.xi 	char	*pw_dir;		/* home directory */
58*53ee8cc1Swenshuai.xi 	char	*pw_shell;		/* default shell */
59*53ee8cc1Swenshuai.xi };
60*53ee8cc1Swenshuai.xi 
61*53ee8cc1Swenshuai.xi #ifndef __INSIDE_CYGWIN__
62*53ee8cc1Swenshuai.xi struct passwd	*getpwuid (uid_t);
63*53ee8cc1Swenshuai.xi struct passwd	*getpwnam (const char *);
64*53ee8cc1Swenshuai.xi int 		 getpwnam_r (const char *, struct passwd *,
65*53ee8cc1Swenshuai.xi 			char *, size_t , struct passwd **);
66*53ee8cc1Swenshuai.xi int		 getpwuid_r (uid_t, struct passwd *, char *,
67*53ee8cc1Swenshuai.xi 			size_t, struct passwd **);
68*53ee8cc1Swenshuai.xi #ifndef _POSIX_SOURCE
69*53ee8cc1Swenshuai.xi struct passwd	*getpwent (void);
70*53ee8cc1Swenshuai.xi void		 setpwent (void);
71*53ee8cc1Swenshuai.xi void		 endpwent (void);
72*53ee8cc1Swenshuai.xi #endif
73*53ee8cc1Swenshuai.xi #endif
74*53ee8cc1Swenshuai.xi 
75*53ee8cc1Swenshuai.xi #ifdef __cplusplus
76*53ee8cc1Swenshuai.xi }
77*53ee8cc1Swenshuai.xi #endif
78*53ee8cc1Swenshuai.xi #endif /* _PWD_H_ */
79