apparmor_uni...ream_connect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 apparmor_unix_stream_connect β€” Kernel API Manual (section 9, bestie) 🌸

okay so real talk, this is a page from the Kernel API Manual, section 9, and it's all about apparmor_unix_stream_connect. yes the header's doing that little apparmor_uni...ream_connect(9) truncation thing, she's shy, we love her anyway πŸ’…


✨ NAME ✨

apparmor_unix_stream_connect β€” check perms before making unix domain conn

like literally, it's the vibe check that happens before a unix domain connection is allowed to happen πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

int apparmor_unix_stream_connect (struct sock *sk , struct sock *peer_sk , struct sock *newsk );

three pointers, one int, one moment of truth. slay.


πŸ’– ARGUMENTS πŸ’–

  • sk β€” the sk that's attempting to connect. main character energy fr, she's the one reaching out 🫢
  • peer_sk β€” the sk that is accepting the connection. the one being slid into, respectfully πŸ’Œ
  • newsk β€” the new sk created for this connection. also, heads up: peer is locked when this hook is called πŸ”’ no cap, that lock is already held when you get here

πŸ¦‹ RETURN πŸ¦‹

0 if connection is permitted β€” yay, go off πŸ‘‘

error code on denial or failure β€” tragedy, but honest 😭


⭐ SEE ALSO ⭐

Kernel file ./security/apparmor/lsm.c, plus this whole friend group of hooks:


ok that's the whole page, no filler, no gatekeeping. iykyk πŸ’œ

kisses, this page lives in ./security/apparmor and it's dated October 2026 β€” apparmor_uni...ream_connect(9) out, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from