summaryrefslogtreecommitdiff
path: root/src/unistd/setuid.c
blob: 61e8be557d9a8a6b9a32489e96f4c1c82569c3bf (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 syscall(SYS_setuid, uid);
}