aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-07 14:36:44 +0900
committerOphestra <cat@gensokyo.uk>2026-04-07 14:36:44 +0900
commitc758e762bd0334b6f86fbc41ab3223b9115e9982 (patch)
tree87da439790a08d0c282f7976bd95dad0b84a398b
parent10f8b1c2214bf75cc2d755956c57bac193fe6427 (diff)
container: skip landlock on hostnet
This overlaps with net namespace, so can be skipped without degrading security. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--container/container.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/container/container.go b/container/container.go
index 30b77c8d..480452cd 100644
--- a/container/container.go
+++ b/container/container.go
@@ -324,9 +324,9 @@ func (p *Container) Start() error {
}
if abi, err := LandlockGetABI(); err != nil {
- if p.HostAbstract {
+ if p.HostAbstract || !p.HostNet {
// landlock can be skipped here as it restricts access
- // to resources already covered by namespaces (pid)
+ // to resources already covered by namespaces (pid, net)
goto landlockOut
}
return &StartError{Step: "get landlock ABI", Err: err}