mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add support for Landlock based Sandbox for Linux (#238)
* feat: Initial implementation of landlock based sandbox driver * fix: Handle seccom probe failure * fix: Remove unnecessary seccomp probe * fix: Use file based policy load * fix: Keep bpf filter in memory * fix: Use TSYNC for seccom filter * fix: Use TSYNC for seccom filter * fix: Update landlock translator * fix: Landlock sandbox implementation * fix: Landlock + seccomp based sandboxing on Linux * fix: Misc fixes * fix: Cleanup sandbox files * fix: Handle mandatory deny API change post merge * fix: Landlock write access translation * chore: Fix linter issues * ci: Use /tmp for npm cache for landlock
This commit is contained in:
@@ -424,6 +424,12 @@ func (f *proxyFlow) executeWithProxy(
|
||||
return fmt.Errorf("failed to apply sandbox: %w", err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := result.Close(); err != nil {
|
||||
log.Errorf("failed to close sandbox: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
if !result.ShouldRun() {
|
||||
return usefulerror.Useful().
|
||||
Wrap(fmt.Errorf("sandbox not supported for PTY sessions")).
|
||||
|
||||
Reference in New Issue
Block a user