2011-02-12 05:22:29 +00:00
|
|
|
#ifndef _PWD_H
|
|
|
|
#define _PWD_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-09-08 03:13:55 +00:00
|
|
|
#include <features.h>
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#define __NEED_size_t
|
|
|
|
#define __NEED_uid_t
|
|
|
|
#define __NEED_gid_t
|
|
|
|
|
2012-01-29 16:54:18 +00:00
|
|
|
#ifdef _GNU_SOURCE
|
|
|
|
#define __NEED_FILE
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#include <bits/alltypes.h>
|
|
|
|
|
2016-07-03 18:40:11 +00:00
|
|
|
struct passwd {
|
2011-02-12 05:22:29 +00:00
|
|
|
char *pw_name;
|
|
|
|
char *pw_passwd;
|
|
|
|
uid_t pw_uid;
|
|
|
|
gid_t pw_gid;
|
|
|
|
char *pw_gecos;
|
|
|
|
char *pw_dir;
|
|
|
|
char *pw_shell;
|
|
|
|
};
|
|
|
|
|
2016-10-20 21:20:01 +00:00
|
|
|
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
2011-02-12 05:22:29 +00:00
|
|
|
void setpwent (void);
|
|
|
|
void endpwent (void);
|
|
|
|
struct passwd *getpwent (void);
|
2016-10-20 21:20:01 +00:00
|
|
|
#endif
|
2011-02-12 05:22:29 +00:00
|
|
|
|
|
|
|
struct passwd *getpwuid (uid_t);
|
|
|
|
struct passwd *getpwnam (const char *);
|
|
|
|
int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **);
|
|
|
|
int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **);
|
|
|
|
|
2011-03-29 00:43:51 +00:00
|
|
|
#ifdef _GNU_SOURCE
|
2012-01-29 16:54:18 +00:00
|
|
|
struct passwd *fgetpwent(FILE *);
|
2013-04-04 23:23:47 +00:00
|
|
|
int putpwent(const struct passwd *, FILE *);
|
2011-03-29 00:43:51 +00:00
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|