diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-12-06 16:05:04 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-12-06 16:05:04 +0900 |
| commit | cc816a1aaa34946456c0a10ec6f001f865bc69f9 (patch) | |
| tree | fd94abb9ff5fee7cf24ea82a4558ff6dd82ea443 /cmd | |
| parent | b3ef53b193bdf764d8f04e19ea47901b71eec10b (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.go | 4 |
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) |
