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