apparmor_uni...ream_connect(9)
πΈ 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β theskthat's attempting to connect. main character energy fr, she's the one reaching out π«Άpeer_skβ theskthat is accepting the connection. the one being slid into, respectfully πnewskβ the newskcreated 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:
common_perm(9)common_perm_cond(9)common_perm_dir_dentry(9)common_perm_rm(9)common_perm_create(9)apparmor_uring_override_creds(9)apparmor_uring_sqpoll(9)apparmor_bprm_committing_creds(9)apparmor_bprm_committed_creds(9)apparmor_sk_clone_security(9)apparmor_unix_may_send(9)apparmor_socket_post_create(9)apparmor_socket_bind(9)apparmor_socket_getpeersec_stream(9)apparmor_socket_getpeersec_dgram(9)apparmor_sock_graft(9)apparmor_socket_sock_rcv_skb(9)set_init_ctx(9)
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
- 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