diff options
| author | Ophestra <cat@gensokyo.uk> | 2024-12-28 14:07:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2024-12-28 14:07:49 +0900 |
| commit | b9e2003d5b078a0704ee751aec80cfe8b4434646 (patch) | |
| tree | 3f502f01cdbdefa4bf4138bb0288dd7562eaca76 /internal/app/seal.go | |
| parent | 66ec0d882f6e4bcd6d9318c59e8c8b9a174d8115 (diff) | |
app: ensure extra paths
The primary use case for extra perms is app-specific state directories, which may or may not exist (first run of any app).
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/seal.go')
| -rw-r--r-- | internal/app/seal.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/app/seal.go b/internal/app/seal.go index 82b7983e..27663771 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -63,8 +63,9 @@ type appSeal struct { } type sealedExtraPerm struct { - name string - perms acl.Perms + name string + perms acl.Perms + ensure bool } // Seal seals the app launch context @@ -169,6 +170,7 @@ func (a *app) Seal(config *fst.Config) error { if p.Execute { seal.extraPerms[i].perms = append(seal.extraPerms[i].perms, acl.Execute) } + seal.extraPerms[i].ensure = p.Ensure } // map sandbox config to bwrap |
