-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpwent.h
38 lines (31 loc) · 878 Bytes
/
pwent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifdef mini_pwent
#ifndef mini_pwent_h
#define mini_pwent_h
//+doc define passwd and group structures
//+def pwent
typedef struct passwd {
char *pw_name; /* username */
char *pw_passwd; /* user password */
uid_t pw_uid; /* user ID */
gid_t pw_gid; /* group ID */
char *pw_gecos; /* user information */
char *pw_dir; /* home directory */
char *pw_shell; /* shell program */
} _passwd;
typedef struct group {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
gid_t gr_gid; /* group ID */
char *gr_mem[MAX_GROUPMEMBERS]; /* NULL-terminated array of pointers
to names of group members */
}_group;
// the structure keeping the files
// passwd and group
typedef struct {
char* file;
char* p;
char** p2;
int size;
} userdb;
#endif
#endif