fix(agent): add new envs to .env.example (#39041)

This commit is contained in:
Yunlu Wen
2026-07-16 03:31:16 +00:00
committed by GitHub
parent 4381ec8fee
commit 511dbb9974
9 changed files with 55 additions and 22 deletions
+4 -4
View File
@@ -8,16 +8,16 @@ import "os"
const (
// EnvEnablePathIsolation controls whether Landlock is applied at all.
EnvEnablePathIsolation = "ENABLE_PATH_ISOLATION"
EnvEnablePathIsolation = "SHELLCTL_ENABLE_PATH_ISOLATION"
// EnvRWPaths overrides the default RW directories (comma-separated).
EnvRWPaths = "LANDLOCK_RW_PATHS"
EnvRWPaths = "SHELLCTL_LANDLOCK_RW_PATHS"
// EnvROPaths overrides the default RO+exec directories (comma-separated).
EnvROPaths = "LANDLOCK_RO_PATHS"
EnvROPaths = "SHELLCTL_LANDLOCK_RO_PATHS"
// EnvRWDevPaths overrides the default device files (comma-separated).
EnvRWDevPaths = "LANDLOCK_RW_DEV_PATHS"
EnvRWDevPaths = "SHELLCTL_LANDLOCK_RW_DEV_PATHS"
)
// --- Agent Stub ---
@@ -63,10 +63,6 @@ func DefaultConfig(home, cwd, jobDir string) *Config {
//
// If a variable is set (even to empty string), its value replaces the default.
// Set to empty to grant no additional paths beyond $HOME.
//
// LANDLOCK_RW_PATHS — comma-separated RW dirs (default: empty)
// LANDLOCK_RO_PATHS — comma-separated RO dirs (default: system paths)
// LANDLOCK_RW_DEV_PATHS — comma-separated dev files (default: /dev/null,...)
func ConfigFromEnv(home, cwd, jobDir string) *Config {
cfg := DefaultConfig(home, cwd, jobDir)