2017-04-17 18:08:24 -04:00
|
|
|
// +build !linux
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
2018-06-29 11:17:00 -04:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/opencontainers/runc/libcontainer/user"
|
|
|
|
)
|
|
|
|
|
2017-04-17 18:08:24 -04:00
|
|
|
// RunningInUserNS is a stub for non-Linux systems
|
|
|
|
// Always returns false
|
|
|
|
func RunningInUserNS() bool {
|
|
|
|
return false
|
|
|
|
}
|
2018-06-29 11:17:00 -04:00
|
|
|
|
|
|
|
// UIDMapInUserNS is a stub for non-Linux systems
|
|
|
|
// Always returns false
|
|
|
|
func UIDMapInUserNS(uidmap []user.IDMap) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetParentNSeuid returns the euid within the parent user namespace
|
|
|
|
// Always returns os.Geteuid on non-linux
|
|
|
|
func GetParentNSeuid() int {
|
|
|
|
return os.Geteuid()
|
|
|
|
}
|