]>
Commit | Line | Data |
---|---|---|
64bc6412 EA |
1 | #ifndef __PWD_H |
2 | #define __PWD_H | |
3 | ||
4 | #include <sys/types.h> | |
5 | #include <features.h> | |
6 | #include <stdio.h> | |
7 | ||
ce8ee8d9 DM |
8 | __BEGIN_DECLS |
9 | ||
64bc6412 EA |
10 | /* The passwd structure. */ |
11 | struct passwd | |
12 | { | |
13 | char *pw_name; /* Username. */ | |
14 | char *pw_passwd; /* Password. */ | |
15 | uid_t pw_uid; /* User ID. */ | |
16 | gid_t pw_gid; /* Group ID. */ | |
17 | char *pw_gecos; /* Real name. */ | |
18 | char *pw_dir; /* Home directory. */ | |
19 | char *pw_shell; /* Shell program. */ | |
20 | }; | |
21 | ||
22 | ||
23 | extern void setpwent __P ((void)); | |
24 | extern void endpwent __P ((void)); | |
25 | extern struct passwd * getpwent __P ((void)); | |
26 | ||
791312e7 | 27 | extern int putpwent __P ((const struct passwd * __p, FILE * __f)); |
64bc6412 EA |
28 | extern int getpw __P ((uid_t uid, char *buf)); |
29 | ||
30 | extern struct passwd * fgetpwent __P ((FILE * file)); | |
31 | ||
791312e7 EA |
32 | extern struct passwd * getpwuid __P ((const uid_t)); |
33 | extern struct passwd * getpwnam __P ((const char *)); | |
34 | ||
35 | ||
36 | extern int getpwent_r __P ((struct passwd *__restrict __resultbuf, | |
37 | char *__restrict __buffer, size_t __buflen, | |
38 | struct passwd **__restrict __result)); | |
39 | extern int getpwuid_r __P ((uid_t __uid, | |
40 | struct passwd *__restrict __resultbuf, | |
41 | char *__restrict __buffer, size_t __buflen, | |
42 | struct passwd **__restrict __result)); | |
43 | extern int getpwnam_r __P ((const char *__restrict __name, | |
44 | struct passwd *__restrict __resultbuf, | |
45 | char *__restrict __buffer, size_t __buflen, | |
46 | struct passwd **__restrict __result)); | |
47 | extern int fgetpwent_r __P ((FILE *__restrict __stream, | |
48 | struct passwd *__restrict __resultbuf, | |
49 | char *__restrict __buffer, size_t __buflen, | |
50 | struct passwd **__restrict __result)); | |
64bc6412 | 51 | |
62787816 | 52 | #ifdef _LIBC |
791312e7 EA |
53 | /* This is used internally to uClibc */ |
54 | extern int __getpwent_r(struct passwd * passwd, char * line_buff, | |
55 | size_t buflen, int pwd_fd); | |
64bc6412 EA |
56 | #endif |
57 | ||
ce8ee8d9 | 58 | __END_DECLS |
791312e7 | 59 | |
64bc6412 EA |
60 | #endif /* pwd.h */ |
61 | ||
62 | ||
63 |