LOAD_POLICY(8)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– load_policy β€” the glow-up your kernel's been waiting for πŸ’–

okay bestie, gather round, because we're talking about load_policy, and it lives in section 8 of the System Manager's Manual. this is the little icon that shoves a whole new SELinux policy straight into your kernel, and honestly? she's serving. 🫢


✨ NAME ✨

load_policy β€” load a new SELinux policy into the kernel πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

load_policy [-qi]

that's it. that's the whole vibe. two little flags, zero drama. πŸ¦‹


🌸 DESCRIPTION 🌸

so here's the tea, bestie: load_policy loads the installed policy file into the kernel. like, takes it from "sitting there on disk" to "actively running the show." main character behavior, no cap. πŸ‘‘

and the part that's lowkey the most iconic? your existing policy boolean values are automatically preserved across policy reloads. they do NOT get reset back to the default values that live in the policy file. so all your carefully curated booleans survive the reload untouched. it's giving "loyal to you" energy. πŸ₯Ήβœ¨


πŸ’… OPTIONS πŸ’…

  • -q β€” hush mode. suppress warning messages. the "not me ignoring my problems" flag, but make it intentional. 🀫
  • -i β€” initial policy load. πŸ‘‘ only use this if this is literally the first time policy is being loaded since boot (which usually means it's being called from initramfs). like, this flag is for the first load and the first load only. do not be out here using it casually, that's not the move. 🚨

⭐ EXIT STATUS ⭐

  • 0 β€” Success πŸ’– slay, it worked
  • 1 β€” Invalid option πŸ™ˆ you gave it a flag it does not know
  • 2 β€” Policy load failed 😭
  • 3 β€” Initial policy load failed and enforcing mode requested πŸ’€ double trouble, and it wanted enforcing

🌈 SEE ALSO 🌈

  • booleans(8) β€” go read about your booleans, they're the ones being preserved, iykyk πŸŽ€

🧚 AUTHORS 🧚

this manual page was written by Dan Walsh <dwalsh@redhat.com>.

the program itself was written by Stephen Smalley <stephen.smalley.work@gmail.com>.

absolute legends, both of them. πŸ’œ


Security Enhanced Linux β€” this whole page is dated May 2003, and yes, she's been serving policy-loading realness since way before it was cool. periodt. πŸ’…βœ¨πŸŒΈ