user

package
v0.0.0-...-e4c45ee Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Overview

Package user contains methods for resolving filesystem paths based on the user and their environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaybeAddExecUserHome

func MaybeAddExecUserHome(ctx context.Context, vmns *vfs.MountNamespace, uid auth.KUID, envv []string) ([]string, error)

MaybeAddExecUserHome returns a new slice with the HOME environment variable set if the slice does not already contain it, otherwise it returns the original slice unmodified.

func ResolveExecutablePath

func ResolveExecutablePath(ctx context.Context, args *kernel.CreateProcessArgs) (string, error)

ResolveExecutablePath resolves the given executable name given the working dir and environment. Returns *ExecutableResolveError when the executable cannot be resolved.

Types

type ExecutableResolveError

type ExecutableResolveError struct {
	// contains filtered or unexported fields
}

ExecutableResolveError represents a failure to resolve the executable in ResolveExecutablePath.

Jump to

Keyboard shortcuts

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