aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/bwrap/trivial.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-25 05:35:02 +0900
committerOphestra <cat@gensokyo.uk>2025-03-25 05:35:02 +0900
commitb39f3aeb59095aef123920d891fecf890ce0b088 (patch)
tree1940f9bbe0cae854e8d5bcc1d5e921b6c2778fed /helper/bwrap/trivial.go
parent61dbfeffe77df9c1a11413b3cb8954933e79b45f (diff)
helper: remove bubblewrap wrapper
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/bwrap/trivial.go')
-rw-r--r--helper/bwrap/trivial.go52
1 files changed, 0 insertions, 52 deletions
diff --git a/helper/bwrap/trivial.go b/helper/bwrap/trivial.go
deleted file mode 100644
index 5aa8a1eb..00000000
--- a/helper/bwrap/trivial.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package bwrap
-
-import (
- "context"
- "encoding/gob"
- "os"
- "strconv"
-
- "git.gensokyo.uk/security/fortify/helper/proc"
-)
-
-func init() {
- gob.Register(new(pairF))
- gob.Register(new(stringF))
-}
-
-type pairF [3]string
-
-func (p *pairF) Path() string { return p[2] }
-func (p *pairF) Len() int { return len(p) }
-func (p *pairF) Append(args *[]string) { *args = append(*args, p[0], p[1], p[2]) }
-
-type stringF [2]string
-
-func (s stringF) Path() string { return s[1] }
-func (s stringF) Len() int { return len(s) /* compiler replaces this with 2 */ }
-func (s stringF) Append(args *[]string) { *args = append(*args, s[0], s[1]) }
-
-func newFile(name string, f *os.File) FDBuilder { return &fileF{name: name, file: f} }
-
-type fileF struct {
- name string
- file *os.File
- proc.BaseFile
-}
-
-func (f *fileF) ErrCount() int { return 0 }
-func (f *fileF) Fulfill(_ context.Context, _ func(error)) error { f.Set(f.file); return nil }
-
-func (f *fileF) Len() int {
- if f.file == nil {
- return 0
- }
- return 2
-}
-
-func (f *fileF) Append(args *[]string) {
- if f.file == nil {
- return
- }
- *args = append(*args, f.name, strconv.Itoa(int(f.Fd())))
-}