aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/container.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-07 21:29:16 +0900
committerOphestra <cat@gensokyo.uk>2025-10-07 21:29:16 +0900
commit5d18af00077ae6ba8ef686d1fd93d888f69681b2 (patch)
treeeff32422fe3ef095c6a915ccb41c2a10a06990f7 /container/container.go
parent0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (diff)
container/fhs: move pathname constants
This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/container.go')
-rw-r--r--container/container.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/container/container.go b/container/container.go
index 08dc9e45..5b6514d4 100644
--- a/container/container.go
+++ b/container/container.go
@@ -16,6 +16,7 @@ import (
"hakurei.app/container/bits"
"hakurei.app/container/check"
+ "hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
)
@@ -200,7 +201,7 @@ func (p *Container) Start() error {
} else {
p.cmd.Cancel = func() error { return p.cmd.Process.Signal(CancelSignal) }
}
- p.cmd.Dir = FHSRoot
+ p.cmd.Dir = fhs.Root
p.cmd.SysProcAttr = &SysProcAttr{
Setsid: !p.RetainSession,
Pdeathsig: SIGKILL,
@@ -316,7 +317,7 @@ func (p *Container) Serve() error {
// do not transmit nil
if p.Dir == nil {
- p.Dir = AbsFHSRoot
+ p.Dir = fhs.AbsRoot
}
if p.SeccompRules == nil {
p.SeccompRules = make([]seccomp.NativeRule, 0)