calipso_sock_getattr(9)
π 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:
netlbl_calipso_ops_register(9)netlbl_calipso_add_pass(9)netlbl_calipso_add(9)netlbl_calipso_list(9)netlbl_calipso_listall_cb(9)netlbl_calipso_listall(9)netlbl_calipso_remove_cb(9)netlbl_calipso_remove(9)netlbl_calipso_genl_init(9)calipso_doi_add(9)calipso_doi_free(9)calipso_doi_remove(9)calipso_doi_getdef(9)calipso_doi_putdef(9)calipso_doi_walk(9)calipso_sock_setattr(9)calipso_sock_delattr(9)calipso_req_setattr(9)calipso_req_delattr(9)calipso_optptr(9)calipso_getattr(9)calipso_skbuff_setattr(9)calipso_skbuff_delattr(9)calipso_cache_invalidate(9)calipso_cache_add(9)
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
- 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