aboutsummaryrefslogtreecommitdiffhomepage
path: root/sandbox/seccomp/proc.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-02 00:32:48 +0900
committerOphestra <cat@gensokyo.uk>2025-07-02 00:32:48 +0900
commit26b7afc890e23af19fe6662fd27f46b47e9feea9 (patch)
tree9c6375c4d46e5767b01826eb90ba50d0ae4c9f99 /sandbox/seccomp/proc.go
parentd5532aade0c3f042c5daa7d1c16e7cce2f4b524a (diff)
sandbox/seccomp: prepare -> export
Export makes a lot more sense, and also matches the libseccomp function. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/seccomp/proc.go')
-rw-r--r--sandbox/seccomp/proc.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/sandbox/seccomp/proc.go b/sandbox/seccomp/proc.go
index 51c3bce8..e4ce1853 100644
--- a/sandbox/seccomp/proc.go
+++ b/sandbox/seccomp/proc.go
@@ -13,10 +13,10 @@ const (
)
// New returns an inactive Encoder instance.
-func New(rules []NativeRule, flags PrepareFlag) *Encoder { return &Encoder{newExporter(rules, flags)} }
+func New(rules []NativeRule, flags ExportFlag) *Encoder { return &Encoder{newExporter(rules, flags)} }
// Load loads a filter into the kernel.
-func Load(rules []NativeRule, flags PrepareFlag) error { return Prepare(-1, rules, flags) }
+func Load(rules []NativeRule, flags ExportFlag) error { return Export(-1, rules, flags) }
/*
An Encoder writes a BPF program to an output stream.
@@ -46,14 +46,14 @@ func (e *Encoder) Close() error {
}
// NewFile returns an instance of exporter implementing [proc.File].
-func NewFile(rules []NativeRule, flags PrepareFlag) proc.File {
+func NewFile(rules []NativeRule, flags ExportFlag) proc.File {
return &File{rules: rules, flags: flags}
}
// File implements [proc.File] and provides access to the read end of exporter pipe.
type File struct {
rules []NativeRule
- flags PrepareFlag
+ flags ExportFlag
proc.BaseFile
}