From a851e7ddeee0d18fee6f6fee0baa3af8bd99771e Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Wed, 8 Sep 2021 11:49:12 -0400 Subject: [PATCH] unix: change Landlock type aliases to new types Type aliases were introduced in CL 348349 and I did not notice it during the review process. The typical convention is to create new types instead. Change-Id: I4789cfc836b8612abfd791451edfd619c93d23df Reviewed-on: https://go-review.googlesource.com/c/sys/+/348450 Trust: Matt Layher Run-TryBot: Matt Layher Reviewed-by: Tobias Klauser TryBot-Result: Go Bot --- unix/linux/types.go | 4 ++-- unix/ztypes_linux.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/linux/types.go b/unix/linux/types.go index 56012b89..7d76e5cc 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -3822,9 +3822,9 @@ const ( // Landlock -type LandlockRulesetAttr = C.struct_landlock_ruleset_attr +type LandlockRulesetAttr C.struct_landlock_ruleset_attr -type LandlockPathBeneathAttr = C.struct_landlock_path_beneath_attr +type LandlockPathBeneathAttr C.struct_landlock_path_beneath_attr const ( LANDLOCK_RULE_PATH_BENEATH = C.LANDLOCK_RULE_PATH_BENEATH diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index fffc9e31..06dcd787 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -3924,11 +3924,11 @@ const ( NFC_SDP_ATTR_SAP = 0x2 ) -type LandlockRulesetAttr = struct { +type LandlockRulesetAttr struct { Access_fs uint64 } -type LandlockPathBeneathAttr = struct { +type LandlockPathBeneathAttr struct { Allowed_access uint64 Parent_fd int32 }