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:
parent
3f17f897c2
commit
def2a7b14e
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue