diff --git a/libcontainer/userns/userns.go b/libcontainer/userns/userns.go index b225f18f2..069a9bb28 100644 --- a/libcontainer/userns/userns.go +++ b/libcontainer/userns/userns.go @@ -1,4 +1,8 @@ package userns -// RunningInUserNS detects whether we are currently running in a user namespace. -var RunningInUserNS = runningInUserNS +// RunningInUserNS detects whether we are currently running in a Linux +// user namespace and memoizes the result. It returns false on non-Linux +// platforms. +func RunningInUserNS() bool { + return runningInUserNS() +}