mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
* func: Allow custom paths to be added the the getter landlock Fixes: 20315 * fix: slices imports fix: more meaningful examples fix: improve documentation fix: quote error output
26 lines
552 B
Go
26 lines
552 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
//go:build !linux && !windows
|
|
|
|
package getter
|
|
|
|
import (
|
|
"path/filepath"
|
|
)
|
|
|
|
// lockdown is not implemented by default
|
|
func lockdown(string, string, []string) error {
|
|
return nil
|
|
}
|
|
|
|
// defaultEnvironment is the default minimal environment variables for Unix-like
|
|
// operating systems.
|
|
func defaultEnvironment(taskDir string) map[string]string {
|
|
tmpDir := filepath.Join(taskDir, "tmp")
|
|
return map[string]string{
|
|
"PATH": "/usr/local/bin:/usr/bin:/bin",
|
|
"TMPDIR": tmpDir,
|
|
}
|
|
}
|