xref: /titanic_51/usr/src/lib/libbc/inc/5include/pwd.h (revision 3db86aab554edbb4244c8d1a1c90f152eee768af)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*      Copyright (c) 1984 AT&T */
28 /*        All Rights Reserved   */
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifndef	__pwd_h
33 #define	__pwd_h
34 
35 #include <sys/types.h>
36 
37 /*
38  * We have to make this POSIX.1 compatible header compatible with SunOS
39  * Release 4.0.x and the BSD interface provided by /usr/include/pwd.h
40  * so we have fillers to make the gid_t pw_gid field here match the
41  * int pw_gid field there and the uid_t pw_uid field here match the
42  * int pw_uid field there.
43  * This will all go away in a later release when gid_t is enlarged.
44  * Until then watch out for big- vs. little-endian problems in the filler.
45  */
46 struct passwd {
47 	char	*pw_name;
48 	char	*pw_passwd;
49 #if defined(mc68000) || defined(sparc)
50 	short	pw_uid_filler;
51 #endif
52 	uid_t	pw_uid;
53 #if defined(i386)
54 	short	pw_uid_filler;
55 #endif
56 #if defined(mc68000) || defined(sparc)
57 	short	pw_gid_filler;
58 #endif
59 	gid_t	pw_gid;
60 #if defined(i386)
61 	short	pw_gid_filler;
62 #endif
63 	char	*pw_age;
64 	char	*pw_comment;
65 	char	*pw_gecos;
66 	char	*pw_dir;
67 	char	*pw_shell;
68 };
69 
70 
71 #ifndef	_POSIX_SOURCE
72 extern struct passwd *getpwent();
73 
74 struct comment {
75         char    *c_dept;
76         char    *c_name;
77         char    *c_acct;
78         char    *c_bin;
79 };
80 
81 #endif
82 
83 struct passwd *getpwuid(/* uid_t uid */);
84 struct passwd *getpwnam(/* char *name */);
85 
86 #endif	/* !__pwd_h */
87