blob: 3f081e872a9e9b74b3c594df62c92248a1cff693 [file] [log] [blame]
Eric Andersenbdfd0d72001-10-24 05:00:29 +00001#ifndef __CONFIG_PWD_H
2#define __CONFIG_PWD_H
Eric Andersenab050f52001-01-27 06:01:43 +00003
Robert Grieblea1a63a2002-06-04 20:10:23 +00004#if !defined CONFIG_USE_BB_PWD_GRP
Eric Andersen887ca792002-07-03 23:19:26 +00005#include <pwd.h>
Robert Grieblea1a63a2002-06-04 20:10:23 +00006
Eric Andersenab050f52001-01-27 06:01:43 +00007#else
8
Eric Andersenab050f52001-01-27 06:01:43 +00009#include <sys/types.h>
10#include <features.h>
11#include <stdio.h>
12
13/* The passwd structure. */
14struct passwd
15{
16 char *pw_name; /* Username. */
17 char *pw_passwd; /* Password. */
18 uid_t pw_uid; /* User ID. */
19 gid_t pw_gid; /* Group ID. */
20 char *pw_gecos; /* Real name. */
21 char *pw_dir; /* Home directory. */
22 char *pw_shell; /* Shell program. */
23};
24
Eric Andersened3ef502001-01-27 08:24:39 +000025extern void setpwent __P ((void));
26extern void endpwent __P ((void));
27extern struct passwd * getpwent __P ((void));
Eric Andersenab050f52001-01-27 06:01:43 +000028
Eric Andersened3ef502001-01-27 08:24:39 +000029extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
30extern int getpw __P ((uid_t uid, char *buf));
Eric Andersenab050f52001-01-27 06:01:43 +000031
Eric Andersened3ef502001-01-27 08:24:39 +000032extern struct passwd * fgetpwent __P ((FILE * file));
Eric Andersenab050f52001-01-27 06:01:43 +000033
Eric Andersened3ef502001-01-27 08:24:39 +000034extern struct passwd * getpwuid __P ((__const uid_t));
35extern struct passwd * getpwnam __P ((__const char *));
Eric Andersenab050f52001-01-27 06:01:43 +000036
Eric Andersened3ef502001-01-27 08:24:39 +000037extern struct passwd * __getpwent __P ((__const int passwd_fd));
Eric Andersenab050f52001-01-27 06:01:43 +000038
39#endif /* USE_SYSTEM_PWD_GRP */
Eric Andersenbdfd0d72001-10-24 05:00:29 +000040#endif /* __CONFIG_PWD_H */
Eric Andersenab050f52001-01-27 06:01:43 +000041