audit_get_sk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– audit_get_sk(9) β€” a Kernel API Manual moment πŸ’–

okay so bestie, welcome to audit_get_sk(9), straight out of the Kernel API Manual ✨ this one's short and sweet and honestly it's giving "small function, big responsibility" energy πŸŽ€


🌸 NAME 🌸

audit_get_sk β€” returns the audit socket for the network namespace you handed it πŸ¦‹


⭐ SYNOPSIS ⭐

struct sock * audit_get_sk (const struct net *net );

like, that's the whole thing. one call, one arg, one pointer back πŸ’…


🧚 ARGUMENTS 🧚

  • net β€” the destination network namespace, aka the place you want the audit socket for 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the vibe check: it returns the sock pointer if valid, and NULL otherwise 🫢 no cap, that's it.

but β€” and this is the part you cannot skip, bestie β€” the caller must ensure that a reference is held for the network namespace while the sock is in use 😭 like, you have to keep that namespace alive the whole time the sock is out here living its life. that's on you, not on the function. iykyk πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

kernel file ./kernel/audit.c, plus the whole audit friend group, every single one of them, no skipped members periodt πŸ‘‘


and that's the whole page, bestie, you ate that πŸ“ before you go β€” this lil masterpiece lives in ./kernel, it's dated October 2026, and it goes by audit_get_sk(9) πŸ’œ mwah, see you in the next manpage πŸ’…βœ¨

πŸ“¦ where this page comes from