mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
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:
@ -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")
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user