From def2a7b14eff6f7f6cb13fc21d14afca38e3cef7 Mon Sep 17 00:00:00 2001 From: Alexander Holler Date: Mon, 17 Nov 2014 14:14:19 +0100 Subject: [PATCH] Use SYS_SETUID32 for system.Setuid() on Linux for ARM Besides possible other problems 16bit UIDs might be disabled by the kernel configuration on Linux for ARM (see CONFIG_UID16). Signed-off-by: Alexander Holler --- system/syscall_linux_arm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/syscall_linux_arm.go b/system/syscall_linux_arm.go index faf17995..7d8cda9d 100644 --- a/system/syscall_linux_arm.go +++ b/system/syscall_linux_arm.go @@ -7,7 +7,7 @@ import ( // Setuid sets the uid of the calling thread to the specified uid. func Setuid(uid int) (err error) { - _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0, 0) + _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0) if e1 != 0 { err = e1 }