STRUCT LANDLOCK_RULE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 in layers 🧚
  • 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