From 5d18af00077ae6ba8ef686d1fd93d888f69681b2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 7 Oct 2025 21:29:16 +0900 Subject: container/fhs: move pathname constants This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra --- container/container.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'container/container.go') 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) -- cgit v1.3.1