STRUCT LANDLOCK_RULE(9)
hii bestie π welcome to the <struct landlock_rule> page from the Kernel API Manual β this is the little struct that ties access rights to an object, and we're gonna get into it β¨
πΈ NAME πΈ
struct landlock_rule β access rights tied to an object π
π¦ SYNOPSIS π¦
okay so here's the exact shape, no cap β copy it character for character:
struct landlock_rule {
struct rb_node node;
union landlock_key key;
u32 num_layers;
struct landlock_layer layers[];
};
π Members π
nodeβ the node in the ruleset's red-black tree π³keyβ a union that identifies either a kernel object (e.g. an inode) or a raw data value (e.g. a network socket port) π this is used as a key for this ruleset element. The pointer is set once and never modified. It always points to an allocated object because each rule increments the refcount of its object π₯num_layersβ the number of entries inlayersπ§layersβ the stack of layers, from the latest to the newest, implemented as a flexible array member (FAM) π
π SEE ALSO π
- Kernel file
./security/landlock/ruleset.h struct landlock_layer(9)union landlock_key(9)enum landlock_key_type(9)struct landlock_id(9)struct landlock_rules(9)struct landlock_ruleset(9)landlock_get_rule_root(9)
mwah π that's the whole vibe β this page lives at ./security/landlock, dated October 2026, and it's literally the struct landlock_rule(9) manual page. byeee π¦β¨
π¦ 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