aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-12-06 16:05:04 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-12-06 16:05:04 +0900
commitcc816a1aaa34946456c0a10ec6f001f865bc69f9 (patch)
treefd94abb9ff5fee7cf24ea82a4558ff6dd82ea443 /cmd
parentb3ef53b193bdf764d8f04e19ea47901b71eec10b (diff)
proc: cleaner extra files
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fshim/ipc/shim/shim.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/fshim/ipc/shim/shim.go b/cmd/fshim/ipc/shim/shim.go
index d01d02e8..4b6b5f87 100644
--- a/cmd/fshim/ipc/shim/shim.go
+++ b/cmd/fshim/ipc/shim/shim.go
@@ -16,6 +16,7 @@ import (
shim0 "git.ophivana.moe/security/fortify/cmd/fshim/ipc"
"git.ophivana.moe/security/fortify/internal"
"git.ophivana.moe/security/fortify/internal/fmsg"
+ "git.ophivana.moe/security/fortify/internal/proc"
)
const shimSetupTimeout = 5 * time.Second
@@ -113,9 +114,8 @@ func (s *Shim) Start() (*time.Time, error) {
// pass sync fd if set
if s.payload.Bwrap.Sync() != nil {
- fd := uintptr(3 + len(s.cmd.ExtraFiles))
+ fd := proc.ExtraFile(s.cmd, s.payload.Bwrap.Sync())
s.payload.Sync = &fd
- s.cmd.ExtraFiles = append(s.cmd.ExtraFiles, s.payload.Bwrap.Sync())
}
fmsg.VPrintln("starting shim via fsu:", s.cmd)