aa_prepare_ns(9)
π 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 operationnameβ the namespace you wanna find or add, and ngl it isNOT 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 π
aa_ns_visible(9)aa_ns_name(9)alloc_ns(9)aa_free_ns(9)__aa_lookupn_ns(9)aa_lookupn_ns(9)__aa_find_or_create_ns(9)destroy_ns(9)__aa_remove_ns(9)__ns_list_release(9)aa_alloc_root_ns(9)
π§ 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms