rootless

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NSEnv  = "_SINGULARITY_NAMESPACE"
	UIDEnv = "_CONTAINERS_ROOTLESS_UID"
	GIDEnv = "_CONTAINERS_ROOTLESS_GID"
)

Variables

This section is empty.

Functions

func ExecWithFakeroot

func ExecWithFakeroot(args []string) error

ExecWithFakeroot will exec singularity with provided args, in a subuid/gid-mapped fakeroot user namespace. This uses the fakeroot engine.

func GetUser

func GetUser() (*user.User, error)

GetUser retrieves the User struct for the uid stored in the env var _CONTAINERS_ROOTLESS_UID, or the current euid if the env var is not set.

func Getgid

func Getgid() (uid int, err error)

Getgid retrieves the uid stored in the env var _CONTAINERS_ROOTLESS_GID, or the current egid if the env var is not set.

func Getuid

func Getuid() (uid int, err error)

Getuid retrieves the uid stored in the env var _CONTAINERS_ROOTLESS_UID, or the current euid if the env var is not set.

func InNS

func InNS() bool

InNS returns true if we are in a namespace created using this package.

func RunInMountNS

func RunInMountNS(args []string) error

RunInMountNS will run singularity with provided args, in a mount namespace only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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