From e94acc424c5746eb6cf903ed97b4e71223fda50f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 21 Oct 2025 20:54:03 +0900 Subject: container/comp: rename from bits This package will also hold syscall lookup tables for seccomp. Signed-off-by: Ophestra --- hst/fsbind.go | 10 +++++----- hst/fsbind_test.go | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'hst') 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{ -- cgit v1.3.1