Documentation ¶
Index ¶
Constants ¶
View Source
const PreservedUnsafePrefix = "SNAP_SAVED_"
Variables ¶
This section is empty.
Functions ¶
func ExecEnv ¶
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.
Click to show internal directories.
Click to hide internal directories.