TOMOYO-SELECTPOLICY(8)
π 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-roption 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
- debian bookworm: tomoyo-tools 2.6.1-20210910-1+b1 Β· GPL-2.0-only
- ubuntu jammy: tomoyo-tools 2.6.1-20210910-1 Β· GPL-2.0-only
- ubuntu noble: tomoyo-tools 2.6.1-20210910-1 Β· GPL-2.0-only
- ubuntu questing: tomoyo-tools 2.6.1-20210910-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms