STRUCT LANDLOCK_PATH_BENEATH_ATTR(9)
π struct landlock_path_beneath_attr(9) β the Kernel API Manual, bestie edition π
okay so this is struct landlock_path_beneath_attr from the Kernel API Manual, and it's genuinely the moment where you tell the kernel "hey, this little corner of the filesystem tree right here? that's the one I care about" πΈ it's giving path hierarchy definition and honestly? iconic.
β¨ NAME β¨
struct landlock_path_beneath_attr β Path hierarchy definition π¦
like, literally: you're defining which path hierarchy you're talking about. that's the whole vibe.
π SYNOPSIS π
struct landlock_path_beneath_attr {
__u64 allowed_access;
__s32 parent_fd;
};
not me noticing the little space before that last }; β yes bestie, it's in the original, we keep it exactly as-is π
π Members π
allowed_accessβ a bitmask of all the allowed actions for this file hierarchy (cf.Filesystem flags_). so like... which things are you letting happen in here? that's this field. it's the permission-slip energy πparent_fdβ a file descriptor, preferably opened withO_PATH, that identifies the parent directory of a file hierarchy, or honestly just a file, that works too π«Ά one fd, two possible meanings, lowkey flexible.
π Description π
it's an argument of sys_landlock_add_rule. that's the whole job. it shows up, it gets passed in, it slays πβ¨
π SEE ALSO π
the source of truth lives in ./include/uapi/linux/landlock.h β go read the family, they're all connected fr fr:
struct landlock_ruleset_attr(9)landlock_create_ruleset_flags(9)landlock_add_rule_flags(9)landlock_restrict_self_flags(9)enum landlock_rule_type(9)struct landlock_net_port_attr(9)fs_access(9)net_access(9)scope(9)
π§ friendly reminder:parent_fdprefersO_PATHβ it says "preferably", not "mandatory", but bestie, take the hint π
and that's the page!! sourced from ./include/uapi/linux, dated October 2026, signed off with a struct land...beneath_attr(9) in the corner and a whole lot of love π
no cap, you now know this struct better than most people know their own passwords πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms