aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-21 20:54:03 +0900
committerOphestra <cat@gensokyo.uk>2025-10-21 20:54:03 +0900
commite94acc424c5746eb6cf903ed97b4e71223fda50f (patch)
treec55f4b467ed11149006a799421936845bf64de99 /hst
parentb1a4d801be033b41c559e9642ee05e2f0ec43d5b (diff)
container/comp: rename from bits
This package will also hold syscall lookup tables for seccomp. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst')
-rw-r--r--hst/fsbind.go10
-rw-r--r--hst/fsbind_test.go14
2 files changed, 12 insertions, 12 deletions
diff --git a/hst/fsbind.go b/hst/fsbind.go
index bb1fc036..70e8bdc1 100644
--- a/hst/fsbind.go
+++ b/hst/fsbind.go
@@ -4,8 +4,8 @@ import (
"encoding/gob"
"strings"
- "hakurei.app/container/bits"
"hakurei.app/container/check"
+ "hakurei.app/container/comp"
"hakurei.app/container/fhs"
)
@@ -97,16 +97,16 @@ func (b *FSBind) Apply(z *ApplyState) {
}
var flags int
if b.Write {
- flags |= bits.BindWritable
+ flags |= comp.BindWritable
}
if b.Device {
- flags |= bits.BindDevice | bits.BindWritable
+ flags |= comp.BindDevice | comp.BindWritable
}
if b.Ensure {
- flags |= bits.BindEnsure
+ flags |= comp.BindEnsure
}
if b.Optional {
- flags |= bits.BindOptional
+ flags |= comp.BindOptional
}
switch {
diff --git a/hst/fsbind_test.go b/hst/fsbind_test.go
index d5cf102a..037d07bb 100644
--- a/hst/fsbind_test.go
+++ b/hst/fsbind_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"hakurei.app/container"
- "hakurei.app/container/bits"
+ "hakurei.app/container/comp"
"hakurei.app/hst"
)
@@ -24,7 +24,7 @@ func TestFSBind(t *testing.T) {
}, true, container.Ops{&container.BindMountOp{
Source: m("/mnt/dev"),
Target: m("/dev"),
- Flags: bits.BindWritable | bits.BindDevice | bits.BindOptional,
+ Flags: comp.BindWritable | comp.BindDevice | comp.BindOptional,
}}, m("/dev"), ms("/mnt/dev"),
"d+/mnt/dev:/dev"},
@@ -36,7 +36,7 @@ func TestFSBind(t *testing.T) {
}, true, container.Ops{&container.BindMountOp{
Source: m("/mnt/dev"),
Target: m("/dev"),
- Flags: bits.BindWritable | bits.BindDevice | bits.BindEnsure,
+ Flags: comp.BindWritable | comp.BindDevice | comp.BindEnsure,
}}, m("/dev"), ms("/mnt/dev"),
"d-/mnt/dev:/dev"},
@@ -48,7 +48,7 @@ func TestFSBind(t *testing.T) {
}, true, container.Ops{&container.BindMountOp{
Source: m("/mnt/dev"),
Target: m("/dev"),
- Flags: bits.BindWritable | bits.BindDevice,
+ Flags: comp.BindWritable | comp.BindDevice,
}}, m("/dev"), ms("/mnt/dev"),
"d*/mnt/dev:/dev"},
@@ -59,7 +59,7 @@ func TestFSBind(t *testing.T) {
}, true, container.Ops{&container.BindMountOp{
Source: m("/mnt/tmp"),
Target: m("/tmp"),
- Flags: bits.BindWritable,
+ Flags: comp.BindWritable,
}}, m("/tmp"), ms("/mnt/tmp"),
"w*/mnt/tmp:/tmp"},
@@ -98,7 +98,7 @@ func TestFSBind(t *testing.T) {
Special: true,
}, true, container.Ops{&container.AutoRootOp{
Host: m("/"),
- Flags: bits.BindWritable,
+ Flags: comp.BindWritable,
}}, m("/"), ms("/"), "autoroot:w"},
{"autoroot silly", &hst.FSBind{
@@ -108,7 +108,7 @@ func TestFSBind(t *testing.T) {
Special: true,
}, true, container.Ops{&container.AutoRootOp{
Host: m("/etc"),
- Flags: bits.BindWritable,
+ Flags: comp.BindWritable,
}}, m("/"), ms("/etc"), "autoroot:w:/etc"},
{"autoetc", &hst.FSBind{