2016-03-04 05:33:43 +08:00
|
|
|
// +build !linux
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
2018-01-13 15:39:28 +08:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/opencontainers/runc/libcontainer/user"
|
|
|
|
)
|
2018-01-16 14:11:56 +08:00
|
|
|
|
2016-03-04 05:33:43 +08:00
|
|
|
// RunningInUserNS is a stub for non-Linux systems
|
|
|
|
// Always returns false
|
|
|
|
func RunningInUserNS() bool {
|
|
|
|
return false
|
|
|
|
}
|
2018-01-16 14:11:56 +08:00
|
|
|
|
|
|
|
// UIDMapInUserNS is a stub for non-Linux systems
|
|
|
|
// Always returns false
|
|
|
|
func UIDMapInUserNS(uidmap []user.IDMap) bool {
|
|
|
|
return false
|
|
|
|
}
|
2018-01-13 15:39:28 +08:00
|
|
|
|
|
|
|
// GetParentNSeuid returns the euid within the parent user namespace
|
|
|
|
// Always returns os.Geteuid on non-linux
|
|
|
|
func GetParentNSeuid() int {
|
|
|
|
return os.Geteuid()
|
|
|
|
}
|