1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 | Samba utility functions
|
---|
4 | Copyright (C) Simo Sorce 2001
|
---|
5 |
|
---|
6 | This program is free software; you can redistribute it and/or modify
|
---|
7 | it under the terms of the GNU General Public License as published by
|
---|
8 | the Free Software Foundation; either version 2 of the License, or
|
---|
9 | (at your option) any later version.
|
---|
10 |
|
---|
11 | This program is distributed in the hope that it will be useful,
|
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | GNU General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License
|
---|
17 | along with this program; if not, write to the Free Software
|
---|
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef _UTIL_GETENT_H
|
---|
22 | #define _UTIL_GETENT_H
|
---|
23 |
|
---|
24 | /* Element for a single linked list of group entries */
|
---|
25 | /* Replace the use of struct group in some cases */
|
---|
26 | /* Used by getgrent_list() */
|
---|
27 |
|
---|
28 | struct sys_grent {
|
---|
29 | char *gr_name;
|
---|
30 | char *gr_passwd;
|
---|
31 | gid_t gr_gid;
|
---|
32 | char **gr_mem;
|
---|
33 | struct sys_grent *next;
|
---|
34 | };
|
---|
35 |
|
---|
36 | /* Element for a single linked list of passwd entries */
|
---|
37 | /* Replace the use of struct passwd in some cases */
|
---|
38 | /* Used by getpwent_list() */
|
---|
39 |
|
---|
40 | struct sys_pwent {
|
---|
41 | char *pw_name;
|
---|
42 | char *pw_passwd;
|
---|
43 | uid_t pw_uid;
|
---|
44 | gid_t pw_gid;
|
---|
45 | char *pw_gecos;
|
---|
46 | char *pw_dir;
|
---|
47 | char *pw_shell;
|
---|
48 | struct sys_pwent *next;
|
---|
49 | };
|
---|
50 |
|
---|
51 | /* Element for a single linked list of user names in a group. */
|
---|
52 | /* Used to return group lists that may span multiple lines in
|
---|
53 | /etc/group file. */
|
---|
54 | /* Used by get_users_in_group() */
|
---|
55 |
|
---|
56 | struct sys_userlist {
|
---|
57 | struct sys_userlist *next, *prev;
|
---|
58 | char *unix_name;
|
---|
59 | };
|
---|
60 |
|
---|
61 | #endif /* _UTIL_GETENT_H */
|
---|