namespaces

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enter

func Enter(pid int, namespace string) error

Enter enters in provided process namespace.

func HostGID added in v1.1.0

func HostGID() (int, error)

Likewise for HostGID

func HostUID

func HostUID() (int, error)

HostUID attempts to find the original host UID if the current process is running inside a user namespace, if it doesn't it simply returns the current UID

func IsInsideUserNamespace

func IsInsideUserNamespace(pid int) (bool, bool)

IsInsideUserNamespace checks if a process is already running in a user namespace and also returns if the process has permissions to use setgroups in this user namespace.

func IsUnprivileged added in v1.1.0

func IsUnprivileged() bool

IsUnprivileged returns true if running as an unprivileged user, even if the user id is root inside an unprivileged user namespace; otherwise it returns false

Types

This section is empty.

Jump to

Keyboard shortcuts

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