diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-01-15 10:07:51 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-01-15 10:13:18 +0900 |
| commit | 562f5ed7971603a4e4e3315a7fe4188153bfc205 (patch) | |
| tree | 2a751ea418e305c97bcef5625b5d4b8633b74834 /internal/app/seal.go | |
| parent | db03565614821695efdb283a81a4733e6d321670 (diff) | |
fst: hide sockets exposed via Filesystem
This is mostly useful for permissive defaults.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/seal.go')
| -rw-r--r-- | internal/app/seal.go | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/internal/app/seal.go b/internal/app/seal.go index 27663771..a67feb45 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -194,7 +194,6 @@ func (a *app) Seal(config *fst.Config) error { switch p { case "/proc": case "/dev": - case "/run": case "/tmp": case "/mnt": case "/etc": @@ -205,23 +204,7 @@ func (a *app) Seal(config *fst.Config) error { } conf.Filesystem = append(conf.Filesystem, b...) } - // bind entries in /run - if d, err := a.os.ReadDir("/run"); err != nil { - return err - } else { - b := make([]*fst.FilesystemConfig, 0, len(d)) - for _, ent := range d { - name := ent.Name() - switch name { - case "user": - case "dbus": - default: - p := "/run/" + name - b = append(b, &fst.FilesystemConfig{Src: p, Write: true, Must: true}) - } - } - conf.Filesystem = append(conf.Filesystem, b...) - } + // hide nscd from sandbox if present nscd := "/var/run/nscd" if _, err := a.os.Stat(nscd); !errors.Is(err, fs.ErrNotExist) { |
