snapenv

package
v2.42.5-go-mod+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PreservedUnsafePrefix = "SNAP_SAVED_"

Variables

This section is empty.

Functions

func ExecEnv

func ExecEnv(info *snap.Info, extra map[string]string) []string

ExecEnv returns the full environment that is required for snap-{confine,exec}(like SNAP_{NAME,REVISION} etc are all set).

It merges it with the existing os.Environ() and ensures the SNAP_* overrides the any pre-existing environment variables. For a classic snap, environment variables that are usually stripped out by ld.so when starting a setuid process are renamed by prepending PreservedUnsafePrefix -- which snap-exec will remove, restoring the variables to their original names.

With the extra parameter additional environment variables can be supplied which will be set in the execution environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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