Luna/libc/include/grp.h
apio 8a90db837b
kernel+libc: Add support for supplementary groups (2/2)
Adds system calls for setting and getting groups, along with libc wrappers.
2023-11-22 21:31:07 +01:00

44 lines
801 B
C

/* grp.h: Group file parsing. */
#ifndef _GRP_H
#define _GRP_H
#include <sys/types.h>
struct group
{
char* gr_name;
char* gr_passwd;
gid_t gr_gid;
char** gr_mem;
};
#ifdef __cplusplus
extern "C"
{
#endif
/* Read the next entry from the group file. */
struct group* getgrent(void);
/* Find the entry with a matching group name in the group file. */
struct group* getgrnam(const char* name);
/* Find the entry with a matching group ID in the group file. */
struct group* getgrgid(gid_t gid);
/* Rewind the group file. */
void setgrent(void);
/* End group file parsing. */
void endgrent(void);
/* Set this process's list of supplementary groups. */
int setgroups(int size, const gid_t* list);
#ifdef __cplusplus
}
#endif
#endif