mirror of
git://git.musl-libc.org/musl
synced 2024-11-27 12:04:14 +08: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.
53 lines
949 B
C
53 lines
949 B
C
#ifndef _GRP_H
|
|
#define _GRP_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <features.h>
|
|
|
|
#define __NEED_size_t
|
|
#define __NEED_gid_t
|
|
|
|
#ifdef _GNU_SOURCE
|
|
#define __NEED_FILE
|
|
#endif
|
|
|
|
#include <bits/alltypes.h>
|
|
|
|
struct group
|
|
{
|
|
char *gr_name;
|
|
char *gr_passwd;
|
|
gid_t gr_gid;
|
|
char **gr_mem;
|
|
};
|
|
|
|
struct group *getgrgid(gid_t);
|
|
struct group *getgrnam(const char *);
|
|
|
|
int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
|
|
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
|
|
|
|
struct group *getgrent(void);
|
|
void endgrent(void);
|
|
void setgrent(void);
|
|
|
|
#ifdef _GNU_SOURCE
|
|
struct group *fgetgrent(FILE *stream);
|
|
int putgrent(const struct group *, FILE *);
|
|
#endif
|
|
|
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
int getgrouplist(const char *, gid_t, gid_t *, int *);
|
|
int setgroups(size_t, const gid_t *);
|
|
int initgroups(const char *, gid_t);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|