rootless: remove SkipStorageSetup()

in the few places where we care about skipping the storage
initialization, we can simply use the process effective UID, instead
of relying on a global boolean flag.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2019-03-19 10:59:43 +01:00
parent cd35e20772
commit ed326206f2
22 changed files with 6 additions and 88 deletions

View File

@ -46,20 +46,6 @@ func IsRootless() bool {
return isRootless
}
var (
skipStorageSetup = false
)
// SetSkipStorageSetup tells the runtime to not setup containers/storage
func SetSkipStorageSetup(v bool) {
skipStorageSetup = v
}
// SkipStorageSetup tells if we should skip the containers/storage setup
func SkipStorageSetup() bool {
return skipStorageSetup
}
// Argument returns the argument that was set for the rootless session.
func Argument() string {
return os.Getenv("_CONTAINERS_ROOTLESS_ARG")

View File

@ -30,15 +30,6 @@ func GetRootlessUID() int {
return -1
}
// SetSkipStorageSetup tells the runtime to not setup containers/storage
func SetSkipStorageSetup(bool) {
}
// SkipStorageSetup tells if we should skip the containers/storage setup
func SkipStorageSetup() bool {
return false
}
// JoinNS re-exec podman in a new userNS and join the user namespace of the specified
// PID.
func JoinNS(pid uint, preserveFDs int) (bool, int, error) {