blob: 50d79d81e26b57460728992416d204d571ed8fda [file] [log] [blame]
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +00001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_LANDLOCK_H
20#define _UAPI_LINUX_LANDLOCK_H
21#include <linux/types.h>
22struct landlock_ruleset_attr {
23 __u64 handled_access_fs;
24};
25#define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
26enum landlock_rule_type {
27 LANDLOCK_RULE_PATH_BENEATH = 1,
28};
29struct landlock_path_beneath_attr {
30 __u64 allowed_access;
31 __s32 parent_fd;
32} __attribute__((packed));
33#define LANDLOCK_ACCESS_FS_EXECUTE (1ULL << 0)
34#define LANDLOCK_ACCESS_FS_WRITE_FILE (1ULL << 1)
35#define LANDLOCK_ACCESS_FS_READ_FILE (1ULL << 2)
36#define LANDLOCK_ACCESS_FS_READ_DIR (1ULL << 3)
37#define LANDLOCK_ACCESS_FS_REMOVE_DIR (1ULL << 4)
38#define LANDLOCK_ACCESS_FS_REMOVE_FILE (1ULL << 5)
39#define LANDLOCK_ACCESS_FS_MAKE_CHAR (1ULL << 6)
40#define LANDLOCK_ACCESS_FS_MAKE_DIR (1ULL << 7)
41#define LANDLOCK_ACCESS_FS_MAKE_REG (1ULL << 8)
42#define LANDLOCK_ACCESS_FS_MAKE_SOCK (1ULL << 9)
43#define LANDLOCK_ACCESS_FS_MAKE_FIFO (1ULL << 10)
44#define LANDLOCK_ACCESS_FS_MAKE_BLOCK (1ULL << 11)
45#define LANDLOCK_ACCESS_FS_MAKE_SYM (1ULL << 12)
46#endif