add getresuid and getresgid syscall wrappers

This commit is contained in:
Rich Felker 2012-04-22 10:37:19 -04:00
parent 80d7859f32
commit b1b3d3525b
3 changed files with 18 additions and 0 deletions

View File

@ -158,6 +158,8 @@ unsigned ualarm(unsigned, unsigned);
int setgroups(size_t, const gid_t []);
int setresuid(uid_t, uid_t, uid_t);
int setresgid(gid_t, gid_t, gid_t);
int getresuid(uid_t *, uid_t *, uid_t *);
int getresgid(gid_t *, gid_t *, gid_t *);
char *get_current_dir_name(void);
int daemon(int, int);
int getdomainname(char *, size_t);

8
src/misc/getresgid.c Normal file
View File

@ -0,0 +1,8 @@
#define _GNU_SOURCE
#include <unistd.h>
#include "syscall.h"
int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid)
{
return syscall(SYS_getresgid, rgid, egid, sgid);
}

8
src/misc/getresuid.c Normal file
View File

@ -0,0 +1,8 @@
#define _GNU_SOURCE
#include <unistd.h>
#include "syscall.h"
int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid)
{
return syscall(SYS_getresuid, ruid, euid, suid);
}