apparmor_unix_may_send(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… apparmor_unix_may_send(9) β€” the kernel API manual page, bestie edition

okay so you've wandered into apparmor_unix_may_send(9), part of the Kernel API Manual (yes, kernel 9th-section, we're fancy like that). sit down, hydrate, and let's talk about who's allowed to yeet a unix datagram at whom 🫢


✨ NAME ✨

apparmor_unix_may_send β€” the vibe-check-before-you-send function: it checks perms before a conn or before sending unix dgrams πŸ’Œ


πŸŽ€ SYNOPSIS πŸŽ€

int apparmor_unix_may_send (struct socket *sock , struct socket *peer );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sock β€” the socket that's doing the sending, i.e. the one holding the message and the audacity πŸ’…
  • peer β€” the socket the message is being send to (yes, send, the original said it, we respect the original) 🎯

🌸 DESCRIPTION 🌸

so what it actually does: it performs bidirectional permission checks for Unix domain socket communication. both directions, no skipping, no shortcuts. it's giving thorough πŸ‘‘

  1. Verifies the sender has AA_MAY_SEND to the target socket βœ…
  2. Verifies the receiver has AA_MAY_RECEIVE from the source socket βœ…

and like, important detail: sock and peer are locked when this hook is called, called by:

dgram_connect peer setup but path not copied to newsk

(that's the whole note, don't ask me for more, that's what the page says πŸ™ˆ)


πŸ”₯ RETURN πŸ”₯

  • 0 β€” transmission is permitted, go off, slay, the datagram may fly 🌈
  • error code β€” on denial or failure 😭 no send for you

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/apparmor/lsm.c and honestly the whole friend group:


ngl bestie, if you're reading a section-9 kernel page for fun, you're literally the main character of the group chat πŸ§šπŸ’œ

and that's the whole thing! brought to you by ./security/apparmor, dated October 2026, filed under apparmor_unix_may_send(9). periodt. πŸ’–β­

πŸ“¦ where this page comes from