about summary refs log tree commit diff
path: root/src/unistd/setuid.c
blob: 53b74d886762127e743e8dce64e22ca8269d63a4 (plain) (blame)
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_setuid32, uid, 0, 0, 0, 0, 0);
	return syscall1(__NR_setuid32, uid);
}