calipso_sock_getattr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

calipso_sock_getattr β€” get the security attributes from a sock

okay so bestie, real talk: this is a page from the Kernel API Manual, section 9 of the kernel API docs, and it's literally just one function that fishes CALIPSO security attributes out of a socket. tiny page, big vibes. let's get into it ✨


🌸 SYNOPSIS 🌸

int calipso_sock_getattr (struct sock *sk , struct netlbl_lsm_secattr *secattr );

(no cap, that spacing before the comma is exactly how the original rolls, we don't touch it πŸ’…)


πŸŽ€ ARGUMENTS πŸŽ€

  • sk β€” the sock. the actual socket we're snooping on 🧚
  • secattr β€” the security attributes. this is where the good stuff gets dropped off 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it do? Okay so: it queries sk to see if there's a CALIPSO option attached to that sock, and if there is, it returns the CALIPSO security attributes in secattr. that's it, that's the whole job. iconic, lowkey efficient πŸ‘‘

⚠️ but listen β€” this function requires that sk be locked, or privately held. it does not do any locking itself. not me showing up to the function and doing zero of my own locking 😭 that's on you, bestie.

Returns zero on success and negative values on failure. so like, 0 = slay, anything negative = vibe check failed πŸ’€


πŸ’œ SEE ALSO πŸ’œ

Kernel file:

./net/netlabel/netlabel_calipso.c

and the whole friend group, fr fr:


and that's the whole page, bestie πŸŽ€βœ¨ sourced from ./net/netlabel, dated October 2026, filed under calipso_sock_getattr(9) β€” catch you in the group chat πŸ«ΆπŸ’–

πŸ“¦ where this page comes from