rootless

package
v5.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootlessEUID

func GetRootlessEUID() int

GetRootlessEUID returns the UID of the current user (in the parent userNS, if any)

Podman and similar software, in “rootless” configuration, when run as a non-root user, very early switches to a user namespace, where Geteuid() == 0 (but does not switch to a limited mount namespace); so, code relying on Geteuid() would use system-wide paths in e.g. /var, when the user is actually not privileged to write to them, and expects state to be stored in the home directory.

If Podman is setting up such a user namespace, it records the original UID in an environment variable, allowing us to make choices based on the actual user’s identity.

Types

This section is empty.

Jump to

Keyboard shortcuts

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