EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

🌸 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 was Emilua 0.12.1-nixpkgs1, dated 1980-01-01 β€” yes the date is a whole vibe, she's timeless, she's a mystery, periodt. πŸ‘‘
πŸ“¦ where this page comes from