diff options
Diffstat (limited to 'src/unistd/setuid.c')
-rw-r--r-- | src/unistd/setuid.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c new file mode 100644 index 0000000..53b74d8 --- /dev/null +++ b/src/unistd/setuid.c @@ -0,0 +1,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); +} |