diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-26 00:52:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-26 00:56:10 +0900 |
| commit | c9facb746b7be0f2d8f6b9b2227340ba2ec12060 (patch) | |
| tree | 7a48ac5212b45908ecc5df7b08a0fc75c54fc7db /internal/app/shim_linux.go | |
| parent | 878b66022e7573ca89fd1fbc266133c7776a98dd (diff) | |
hst/config: remove data field, rename dir to home
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/shim_linux.go')
| -rw-r--r-- | internal/app/shim_linux.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/internal/app/shim_linux.go b/internal/app/shim_linux.go index b1eddcbc..33ede520 100644 --- a/internal/app/shim_linux.go +++ b/internal/app/shim_linux.go @@ -34,8 +34,6 @@ type shimParams struct { // finalised container params Container *container.Params - // path to outer home directory - Home string // verbosity pass through Verbose bool @@ -142,21 +140,6 @@ func ShimMain() { // not fatal } - // ensure home directory as target user - if s, err := os.Stat(params.Home); err != nil { - if os.IsNotExist(err) { - if err = os.Mkdir(params.Home, 0700); err != nil { - log.Fatalf("cannot create home directory: %v", err) - } - } else { - log.Fatalf("cannot access home directory: %v", err) - } - - // home directory is created, proceed - } else if !s.IsDir() { - log.Fatalf("path %q is not a directory", params.Home) - } - ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) cancelContainer.Store(&stop) z := container.New(ctx) |
