TOMOYO-SAVEPOLICY(8)

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

πŸ’Ύ TOMOYO-SAVEPOLICY β€” save TOMOYO Linux policy ✨

okay bestie, so this is tomoyo-savepolicy from the System Administration Utilities corner of the tomoyo-tools world, and it's literally the girl who makes sure your kernel's policy vibes get written down before they evaporate. no cap.


🌸 SYNOPSIS 🌸

tomoyo-savepolicy [directory]

tomoyo-savepolicy [directory] [remote_ip:remote:port]
ok yes the second line says remote:port in the synopsis and remote_port down in the options. that's not me being messy, that's just how the page is. copy it exact, bestie 🫢

πŸŽ€ DESCRIPTION πŸŽ€

so like. this program saves TOMOYO Linux policy onto disk from kernel memory. that's the whole job. that's her purpose. main character energy.

the directory /etc/tomoyo/policy/YY-MM-DD.hh:mm:ss gets created, and inside it there are four files:

  • domain_policy.conf
  • exception_policy.conf
  • profile.conf
  • manager.conf

and the symbolic links /etc/tomoyo/policy/previous and /etc/tomoyo/policy/current get updated so they point to the previous and current YY-MM-DD.hh:mm:ss directories respectively. the way she keeps a lil receipts folder for every single save?? iconic.

these symbolic links should exist within the /etc/tomoyo directory:

domain_policy.conf -> policy/current/domain_policy.conf
exception_policy.conf -> policy/current/exception_policy.conf
profile.conf -> policy/current/profile.conf
manager.conf -> policy/current/manager.conf
policy/current -> policy/YY-MM-DD.hh:mm:ss
policy/previous -> policy/YY-MM-DD.hh:mm:ss

so the whole point is: you can access the current policy files without having to descend into subdirectories, and without having to sit there like "hmm which YY-MM-DD.hh:mm:ss directory is the most recent πŸ™ˆ". the symlinks handle it. she handles it. periodt.

and if the policy type is specified, this program works similar to cat(1). yes ma'am, she can just print it at you.


πŸ’… OPTIONS πŸ’…

  • -e β€” prints /sys/kernel/security/tomoyo/exception_policy to standard output.
  • -d β€” prints /sys/kernel/security/tomoyo/domain_policy to standard output.
  • -p β€” prints /sys/kernel/security/tomoyo/profile to standard output.
  • -m β€” prints /sys/kernel/security/tomoyo/manager to standard output.
  • -s β€” prints /sys/kernel/security/tomoyo/stat to standard output.
  • directory β€” saves policy to an alternative directory, rather than the default /etc/tomoyo directory.
  • remote_ip:remote_port β€” saves policy on a remote system via an agent waiting at port remote_port on IP address remote_ip. yes she can reach across the network and grab it. obsessed.

πŸ”₯ EXAMPLES πŸ”₯

save policy to disk:

tomoyo-savepolicy

print "/sys/kernel/security/tomoyo/exception_policy" to standard output:

tomoyo-savepolicy -e

retrieve policy from a remote system and save it in a local directory:

tomoyo-savepolicy /etc/tomoyo/192.168.1.1/ 192.168.1.1:10000

πŸ’€ BUGS πŸ’€

if you find any bugs, send an email to <tomoyo-users-en@lists.osdn.me>. she reads her inbox fr fr, so don't be shy.


πŸ‘‘ AUTHORS πŸ‘‘

  • Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    • Main author.
  • Jamie Nguyen <jamie@tomoyolinux.co.uk>
    • Documentation and website.

🌈 SEE ALSO 🌈

tomoyo-editpolicy-agent(8), tomoyo-loadpolicy(8)

see <https://tomoyo.osdn.jp> for more information. iykyk πŸ’–


k that's the whole page bestie πŸ’– this was tomoyo-tools 2.6.0, dated 2019-02-05, and yes it's the TOMOYO-SAVEPOLICY(8) manual. go save some policy, you ate πŸŽ€βœ¨

πŸ“¦ where this page comes from