blob: 2fd0ab06e23408d19d86d738202016017a957b48 [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
4#if defined USE_SYSTEM_PWD_GRP
5#include <pwd.h>
6#else
7
Eric Andersenab050f52001-01-27 06:01:43 +00008#include <sys/types.h>
9#include <features.h>
10#include <stdio.h>
11
12/* The passwd structure. */
13struct passwd
14{
15 char *pw_name; /* Username. */
16 char *pw_passwd; /* Password. */
17 uid_t pw_uid; /* User ID. */
18 gid_t pw_gid; /* Group ID. */
19 char *pw_gecos; /* Real name. */
20 char *pw_dir; /* Home directory. */
21 char *pw_shell; /* Shell program. */
22};
23
Eric Andersened3ef502001-01-27 08:24:39 +000024extern void setpwent __P ((void));
25extern void endpwent __P ((void));
26extern struct passwd * getpwent __P ((void));
Eric Andersenab050f52001-01-27 06:01:43 +000027
Eric Andersened3ef502001-01-27 08:24:39 +000028extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
29extern int getpw __P ((uid_t uid, char *buf));
Eric Andersenab050f52001-01-27 06:01:43 +000030
Eric Andersened3ef502001-01-27 08:24:39 +000031extern struct passwd * fgetpwent __P ((FILE * file));
Eric Andersenab050f52001-01-27 06:01:43 +000032
Eric Andersened3ef502001-01-27 08:24:39 +000033extern struct passwd * getpwuid __P ((__const uid_t));
34extern struct passwd * getpwnam __P ((__const char *));
Eric Andersenab050f52001-01-27 06:01:43 +000035
Eric Andersened3ef502001-01-27 08:24:39 +000036extern struct passwd * __getpwent __P ((__const int passwd_fd));
Eric Andersenab050f52001-01-27 06:01:43 +000037
38#endif /* USE_SYSTEM_PWD_GRP */
Eric Andersenbdfd0d72001-10-24 05:00:29 +000039#endif /* __CONFIG_PWD_H */
Eric Andersenab050f52001-01-27 06:01:43 +000040