Honor user passed on container in nsinit

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-02-24 13:52:56 -08:00
parent b899d9bc44
commit d50dc3cb7e
2 changed files with 33 additions and 9 deletions

View file

@ -71,6 +71,14 @@ func Setresuid(ruid, euid, suid int) error {
return syscall.Setresuid(ruid, euid, suid)
}
func Setgid(gid int) error {
return syscall.Setgid(gid)
}
func Setuid(uid int) error {
return syscall.Setuid(uid)
}
func Sethostname(name string) error {
return syscall.Sethostname([]byte(name))
}