提交 b1b3d352 编写于 作者: R Rich Felker

add getresuid and getresgid syscall wrappers

上级 80d7859f
......@@ -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);
......
#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);
}
#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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册