mirror of
git://git.musl-libc.org/musl
synced 2024-12-16 03:35:06 +00:00
ddfb267b0e
since shadow does not yet support enumeration (getspent), the corresponding FILE-based get and put versions are also subbed out for now. this is partly out of laziness and partly because it's not clear how they should work in the presence of TCB shadow files. the stubs should make it possible to compile some software that expects them to exist, but such software still may not work properly.
50 lines
817 B
C
50 lines
817 B
C
#ifndef _PWD_H
|
|
#define _PWD_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <features.h>
|
|
|
|
#define __NEED_size_t
|
|
#define __NEED_uid_t
|
|
#define __NEED_gid_t
|
|
|
|
#ifdef _GNU_SOURCE
|
|
#define __NEED_FILE
|
|
#endif
|
|
|
|
#include <bits/alltypes.h>
|
|
|
|
struct passwd
|
|
{
|
|
char *pw_name;
|
|
char *pw_passwd;
|
|
uid_t pw_uid;
|
|
gid_t pw_gid;
|
|
char *pw_gecos;
|
|
char *pw_dir;
|
|
char *pw_shell;
|
|
};
|
|
|
|
void setpwent (void);
|
|
void endpwent (void);
|
|
struct passwd *getpwent (void);
|
|
|
|
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 **);
|
|
|
|
#ifdef _GNU_SOURCE
|
|
struct passwd *fgetpwent(FILE *);
|
|
int putpwent(const struct passwd *, FILE *);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|