apparmor_so...ersec_stream(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ apparmor_socket_getpeersec_stream(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's a whole little function page from the AppArmor fam and it's lowkey adorable. Sit down, grab a strawberry πŸ“, let's get into it.


🌸 NAME 🌸

apparmor_socket_getpeersec_stream β€” literally just "get security context of peer" 🫢 that's the whole vibe. you wanna know who's on the other end of your socket? this is the girl for the job.


πŸŽ€ SYNOPSIS πŸŽ€

int apparmor_socket_getpeersec_stream (struct socket *sock , sockptr_t
optval , sockptr_t optlen , unsigned int len );

no cap, that's the signature, character for character, do not touch it πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sock β€” the socket we're trying to get the peer context of πŸ‘€ like, "who is that girl on the other side"
  • optval β€” output 🫢 this is the buffer you copy the peer name into
  • optlen β€” output 🫢 how big the copied name in optval ended up being
  • len β€” the size of the optval buffer, i.e. how much room you actually gave her to work with

⭐ RETURN ⭐

0 on success ✨ and -errno if it fails 😭 (yes, negative errno, that's the kernel's whole thing, we stan).


πŸ’œ NOTE πŸ’œ

for tcp, it's only valid if you're using ipsec or cipso on lan 🧚 like, that's the vibe check it has to pass. no ipsec, no cipso, no stream peer context, periodt.


🌈 SEE ALSO 🌈

the whole friend group, in order, exactly as listed πŸ‘‘:


and that's the page, bestie πŸ’– it lives in ./security/apparmor and it's stamped October 2026, and the manual page name is apparmor_so...ersec_stream(9) β€” yes the truncation is canon, we don't question the icon 🌸 mwah, go read some more kernel docs, ily 🫢✨

πŸ“¦ where this page comes from