Merge pull request #251 from unclejack/fix_go1.4_syscalls
use system.Set{u,g}id to fix Set{u,g}id on Go 1.4
This commit is contained in:
commit
ddb4f8a12f
|
@ -164,11 +164,11 @@ func SetupUser(u string) error {
|
||||||
return fmt.Errorf("setgroups %s", err)
|
return fmt.Errorf("setgroups %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := syscall.Setgid(gid); err != nil {
|
if err := system.Setgid(gid); err != nil {
|
||||||
return fmt.Errorf("setgid %s", err)
|
return fmt.Errorf("setgid %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := syscall.Setuid(uid); err != nil {
|
if err := system.Setuid(uid); err != nil {
|
||||||
return fmt.Errorf("setuid %s", err)
|
return fmt.Errorf("setuid %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue