rootless

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argument

func Argument() string

Argument returns the argument that was set for the rootless session.

func BecomeRootInUserNS

func BecomeRootInUserNS() (bool, int, error)

BecomeRootInUserNS re-exec podman in a new userNS. It returns whether podman was re-executed into a new user namespace and the return code from the re-executed podman process. If podman was re-executed the caller needs to propagate the error code returned by the child process. It is a convenience function for BecomeRootInUserNSWithOpts with a default configuration.

func BecomeRootInUserNSWithOpts

func BecomeRootInUserNSWithOpts(opts *Opts) (bool, int, error)

BecomeRootInUserNSWithOpts re-exec podman in a new userNS. It returns whether podman was re-execute into a new user namespace and the return code from the re-executed podman process. If podman was re-executed the caller needs to propagate the error code returned by the child process.

func GetRootlessUID

func GetRootlessUID() int

GetRootlessUID returns the UID of the user in the parent userNS

func IsRootless

func IsRootless() bool

IsRootless tells us if we are running in rootless mode

func JoinDirectUserAndMountNS

func JoinDirectUserAndMountNS(pid uint) (bool, int, error)

JoinDirectUserAndMountNS re-exec podman in a new userNS and join the user and mount namespace of the specified PID without looking up its parent. Useful to join directly the conmon process. It is a convenience function for JoinDirectUserAndMountNSWithOpts with a default configuration.

func JoinDirectUserAndMountNSWithOpts

func JoinDirectUserAndMountNSWithOpts(pid uint, opts *Opts) (bool, int, error)

JoinDirectUserAndMountNSWithOpts re-exec podman in a new userNS and join the user and mount namespace of the specified PID without looking up its parent. Useful to join directly the conmon process.

func JoinNS

func JoinNS(pid uint, preserveFDs int) (bool, int, error)

JoinNS re-exec podman in a new userNS and join the user namespace of the specified PID.

func JoinNSPath

func JoinNSPath(path string) (bool, int, error)

JoinNSPath re-exec podman in a new userNS and join the owner user namespace of the specified path.

func SetSkipStorageSetup

func SetSkipStorageSetup(v bool)

SetSkipStorageSetup tells the runtime to not setup containers/storage

func SkipStorageSetup

func SkipStorageSetup() bool

SkipStorageSetup tells if we should skip the containers/storage setup

Types

type Opts

type Opts struct {
	// Argument overrides the arguments on the command line
	// for the re-execed process.  The process in the namespace
	// must use rootless.Argument() to read its value.
	Argument string
}

Opts allows to customize how re-execing to a rootless process is done

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL