summaryrefslogtreecommitdiff
path: root/src/unistd/setuid.c
blob: 9e9da61fac39a1870c22d5c8e3065aaee815097f (plain)
1
2
3
4
5
6
7
8
9
#include <unistd.h>
#include "syscall.h"
#include "libc.h"

int setuid(uid_t uid)
{
	if (libc.rsyscall) return libc.rsyscall(__NR_setuid, uid, 0, 0, 0, 0, 0);
	return syscall1(__NR_setuid, uid);
}