apparmor_socket_post_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ apparmor_socket_post_create(9) ✨

okay so bestie, welcome to the kernel API manual for apparmor_socket_post_create(9) β€” yes it's a whole function AND a whole page name, we contain multitudes πŸ’…

🌸 NAME 🌸

apparmor_socket_post_create β€” literally just setup the per-socket security struct πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

int apparmor_socket_post_create (struct socket *sock , int family , int
type , int protocol , int kern );

πŸ’– ARGUMENTS πŸ’–

  • sock β€” the socket that is being setup, she's the main character here πŸ‘‘
  • family β€” the family of the socket being created, like her whole ancestry
  • type β€” the type of the socket, iykyk
  • protocol β€” the protocol of the socket, it's giving specifics
  • kern β€” this flag means the socket is a special kernel socket, highkey important 🫢

πŸ’€ NOTE πŸ’€

  • kernel sockets labeled kernel_t used to use unconfined β€” that's the lore, fr fr
  • the socket may not have sk here if it was created with sock_create_lite or sock_alloc 😭 those should be accept cases, and they'll be handled in sock_graft. so like… don't panic when sk is missing, it's not a bug, it's a vibe check you have to pass 🌈
ngl, that second one is the important one β€” no sk does not mean something broke, it means somebody used sock_create_lite or sock_alloc, and sock_graft is gonna pick it up later 🧚

πŸ”₯ SEE ALSO πŸ”₯

if you're obsessed with this one (and why wouldn't you be), the kernel file is ./security/apparmor/lsm.c β€” go read it, it ate πŸ’…

and here's the whole friend group, no cap:


⭐ and that's the whole page!! this one lives in ./security/apparmor and it's dated October 2026 β€” so yeah, mark your calendars bestie, she's from the future πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from