unsupported.go 529 B

12345678910111213141516171819202122232425262728
  1. // +build !linux
  2. package system
  3. import (
  4. "os"
  5. "github.com/opencontainers/runc/libcontainer/user"
  6. )
  7. // RunningInUserNS is a stub for non-Linux systems
  8. // Always returns false
  9. func RunningInUserNS() bool {
  10. return false
  11. }
  12. // UIDMapInUserNS is a stub for non-Linux systems
  13. // Always returns false
  14. func UIDMapInUserNS(uidmap []user.IDMap) bool {
  15. return false
  16. }
  17. // GetParentNSeuid returns the euid within the parent user namespace
  18. // Always returns os.Geteuid on non-linux
  19. func GetParentNSeuid() int {
  20. return os.Geteuid()
  21. }