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 <holler@ahsoftware.de>
This commit is contained in:
Alexander Holler 2014-11-17 14:14:19 +01:00
parent 3f17f897c2
commit def2a7b14e
1 changed files with 1 additions and 1 deletions

View File

@ -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
}