aa_prepare_ns(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aa_prepare_ns β€” like, the kernel API manual bestie ✨

Okay so this is aa_prepare_ns(9) from the Kernel API Manual, and honestly? It's giving "find or make" energy and I'm obsessed πŸŽ€


✨ NAME ✨

aa_prepare_ns β€” find an existing namespace of @name, or create a new one if it's not already there πŸ¦‹


🌸 SYNOPSIS 🌸

struct aa_ns * aa_prepare_ns (struct aa_ns *parent , const char *name );

🫢 ARGUMENTS 🫢

  • parent β€” the ns you're treating as the parent πŸ‘‘ like, this is the mom friend of the operation
  • name β€” the namespace you wanna find or add, and ngl it is NOT NULL β€” do not come for this parameter with a null, fr fr πŸ’€

⭐ RETURN ⭐

You get back a refcounted namespace πŸ’– β€” or, if it failed to create one, a PTR_ERR 😭 so like, always vibe check your return value before you dereference it, iykyk


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./security/apparmor/policy_ns.c β€” that's the main character source file right there, periodt πŸ’…


🧚 reminder bestie: those double-underscore ones are not typos, they're the internal versions β€” don't go "fixing" them and then wonder why the build is crying πŸ”₯

and that's the whole page!! 🌈 written under ./security/apparmor, dated October 2026, in the Kernel API Manual β€” slay, go read aa_ns_visible(9) next πŸ’œπŸŽ€

πŸ“¦ where this page comes from