EMILUA(3em)
πΈ EMILUA πΈ
hii bestie, welcome to the Emilua corner of the manual β aka the Lua execution engine that's lowkey carrying your whole sandboxing era. this page is officially part of the 3em manual, and it's all about one very specific, very iconic little function. let's get into it π
β¨ SYNOPSIS β¨
okay so here's the exact shape of it, no cap:
local system = require "system"
system.landlock_add_rule(ruleset_fd: file_descriptor, rule_type: "path_beneath", attr: table)
that's it. that's the whole vibe. ruleset_fd is a file_descriptor, rule_type is the string "path_beneath", and attr is a table. slay.
π¦ DESCRIPTION π¦
so what does it do? it adds a brand new Landlock rule to an existing ruleset. that's the whole thing. giving very much "one job, done well" main character energy. π
Note π β this is only available on Linux. bestie, if you're on anything else, this function simply does not exist for you. iykyk.
π PARAMETERS π
now the part you actually came for. two params, one of them is a whole list. buckle up. π
attr.allowed_access:string[]β a list of strings, and every single string has to be one of these iconic little values. here's the full menu, no substitutions, fr fr:"execute""write_file""read_file""read_dir""remove_dir""remove_file""make_char""make_dir""make_reg""make_sock""make_fifo""make_block""make_sym""refer""truncate"
that's fifteen of them, count 'em. fifteen little permission besties. π
attr.parent_fd:integerβ a plain old integer. the parent file descriptor. that's the whole description, she's mysterious, she's giving less-is-more. π«Ά
okay that's the page!! go forth and ruleset responsibly, bestie. π
π§ this wasEmilua 0.12.1-nixpkgs1, dated1980-01-01β yes the date is a whole vibe, she's timeless, she's a mystery, periodt. π
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms