From 9fd97e71d0330d6b6509f28686cf53825bc80941 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 5 Nov 2025 20:13:19 +0900 Subject: treewide: fit test untyped int literals in 32-bit This enables hakurei test suite to run on 32-bit targets. Signed-off-by: Ophestra --- container/landlock.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'container/landlock.go') diff --git a/container/landlock.go b/container/landlock.go index 63d03817..7f0a821f 100644 --- a/container/landlock.go +++ b/container/landlock.go @@ -14,7 +14,8 @@ const ( LANDLOCK_CREATE_RULESET_VERSION = 1 << iota ) -type LandlockAccessFS uintptr +// LandlockAccessFS is bitmask of handled filesystem actions. +type LandlockAccessFS uint64 const ( LANDLOCK_ACCESS_FS_EXECUTE LandlockAccessFS = 1 << iota @@ -105,7 +106,8 @@ func (f LandlockAccessFS) String() string { } } -type LandlockAccessNet uintptr +// LandlockAccessNet is bitmask of handled network actions. +type LandlockAccessNet uint64 const ( LANDLOCK_ACCESS_NET_BIND_TCP LandlockAccessNet = 1 << iota @@ -140,7 +142,8 @@ func (f LandlockAccessNet) String() string { } } -type LandlockScope uintptr +// LandlockScope is bitmask of scopes restricting a Landlock domain from accessing outside resources. +type LandlockScope uint64 const ( LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET LandlockScope = 1 << iota @@ -175,6 +178,7 @@ func (f LandlockScope) String() string { } } +// RulesetAttr is equivalent to struct landlock_ruleset_attr. type RulesetAttr struct { // Bitmask of handled filesystem actions. HandledAccessFS LandlockAccessFS -- cgit v1.3.1