From cc816a1aaa34946456c0a10ec6f001f865bc69f9 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Fri, 6 Dec 2024 16:05:04 +0900 Subject: proc: cleaner extra files Signed-off-by: Ophestra Umiker --- helper/bwrap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helper/bwrap.go') diff --git a/helper/bwrap.go b/helper/bwrap.go index 2788dbf9..5b674b49 100644 --- a/helper/bwrap.go +++ b/helper/bwrap.go @@ -9,6 +9,7 @@ import ( "sync" "git.ophivana.moe/security/fortify/helper/bwrap" + "git.ophivana.moe/security/fortify/internal/proc" ) // BubblewrapName is the file name or path to bubblewrap. @@ -76,8 +77,7 @@ func (b *bubblewrap) StartNotify(ready chan error) error { } if b.sync != nil { - b.Cmd.Args = append(b.Cmd.Args, "--sync-fd", strconv.Itoa(3+len(b.Cmd.ExtraFiles))) - b.Cmd.ExtraFiles = append(b.Cmd.ExtraFiles, b.sync) + b.Cmd.Args = append(b.Cmd.Args, "--sync-fd", strconv.Itoa(int(proc.ExtraFile(b.Cmd, b.sync)))) } if err := b.Cmd.Start(); err != nil { -- cgit v1.3.1