unix: add Landlock consts and types

Change-Id: I5b8eee0594072e58951dd8b655058b96caeba497
Reviewed-on: https://go-review.googlesource.com/c/sys/+/348349
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Tobias Klauser
2021-09-08 14:30:11 +00:00
committed by Matt Layher
parent 6f6e22806c
commit c212e73226
4 changed files with 41 additions and 0 deletions
+12
View File
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
/*
@@ -106,6 +107,7 @@ struct termios2 {
#include <linux/if_pppox.h>
#include <linux/if_xdp.h>
#include <linux/keyctl.h>
#include <linux/landlock.h>
#include <linux/loop.h>
#include <linux/lwtunnel.h>
#include <linux/mpls_iptunnel.h>
@@ -3817,3 +3819,13 @@ const (
NFC_SDP_ATTR_URI = C.NFC_SDP_ATTR_URI
NFC_SDP_ATTR_SAP = C.NFC_SDP_ATTR_SAP
)
// Landlock
type LandlockRulesetAttr = C.struct_landlock_ruleset_attr
type LandlockPathBeneathAttr = C.struct_landlock_path_beneath_attr
const (
LANDLOCK_RULE_PATH_BENEATH = C.LANDLOCK_RULE_PATH_BENEATH
)