alloc_ns(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– alloc_ns(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for alloc_ns. This entry is lowkey iconic β€” it's giving "allocate, initialize and return a new namespace" energy, and we are keeping every detail exactly where it belongs. no cap. ✨


✨ NAME ✨

alloc_ns β€” does exactly what it says on the tin: allocate, initialize and return a new namespace. periodt. πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

struct aa_ns * alloc_ns (const char *prefix , const char *name );

πŸŽ€ ARGUMENTS πŸŽ€

  • prefix β€” parent namespace name (MAYBE NULL). so yeah, it's allowed to be NULL, but only maybe. πŸ‘€
  • name β€” a preallocated name (NOT NULL). this one is not optional, bestie β€” no sneaky NULL name energy here. 🫢

πŸ”₯ RETURN πŸ”₯

Hands you back a refcounted namespace, or NULL on failure. slay when it works, NULL when it doesn't. πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./security/apparmor/policy_ns.c, plus the whole SEE ALSO friend group:


mwah πŸ’‹ that's the whole page, bestie. It comes from ./security/apparmor, dated October 2026, and the manual page is alloc_ns(9). 🌸

πŸ“¦ where this page comes from