TOMOYO-SELECTPOLICY(8)

πŸ“¦ version 2.6.1-20210910, in debian bookworm, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ‘‘ TOMOYO-SELECTPOLICY β€” the manual, bestie edition πŸ’…

okay so real talk: this is tomoyo-selectpolicy, part of the System Administration Utilities fam, and it lives in section 8 of the manual (that's the "admin commands only, civilians keep out" section, iykyk). She's a lil tool from the TOMOYO Linux universe and she's here to pull exactly the policy you asked for out of a big pile of policy. no cap.


✨ NAME ✨

tomoyo-selectpolicy β€” policy selection utility for TOMOYO Linux πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

tomoyo-selectpolicy [options] <domain> ...

like. that's it. that's the whole vibe.


🌸 DESCRIPTION 🌸

okay so here's the tea, and it's genuinely so simple it's iconic:

This program reads domain policy from standard input, and then it outputs policy from the specified domain to standard output.

that's the whole job. she reads in, she picks out your domain, she writes out. main character energy, no notes πŸ’–


πŸ’… OPTIONS πŸ’…

  • -r β€” pick up all domains whose domain name starts with the specified string. so like, prefix matching mode. slay.
  • <domain> β€” this is the string you're matching against. and listen, bestie, this part is important: it must be quoted or escaped to avoid misinterpretation by the shell 🫢. also, it only matches an exact string unless the -r option is specified. so if you want the fuzzy prefix matching you gotta pass -r, otherwise it's exact match or nothing, periodt.

🌈 EXAMPLES 🌈

Pick up domain policy for sshd and its descendents πŸ‘‘

tomoyo-selectpolicy -r '<kernel> /usr/sbin/sshd' < /sys/kernel/security/tomoyo/domain_policy

see how the <domain> is wrapped in single quotes? that's the shell-safety thing from the options section. don't skip it or the shell will eat your angle brackets for breakfast 😭


πŸ’€ BUGS πŸ’€

If you find any bugs, send an email to <tomoyo-users-en@lists.osdn.me>.

(ngl, finding a bug and then emailing the mailing list is kind of a serve. do it.)


🧚 AUTHORS 🧚

  • Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    • Main author. the blueprint. the blueprint-er. πŸ’œ
  • Jamie Nguyen <jamie@tomoyolinux.co.uk>
    • Documentation and website. the words and the web, iconic combo ✨

⭐ SEE ALSO ⭐

See <https://tomoyo.osdn.jp> for more information.


lowkey a reminder: the <domain> arg needs quoting/escaping or your shell will do crimes to it. protect your angle brackets, protect your peace πŸŽ€

okay that's the whole page, bestie! this was tomoyo-tools version 2.6.0, dated 2019-02-05 β€” and honestly? timeless. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from