selinux_net..._post_create(9)
π selinux_netlbl_socket_post_create(9) π
okay so first thing bestie: this page lives in the Kernel API Manual, and the actual header up top literally prints it all squished like selinux_net..._post_create(9) β three whole times, in fact β because manpage name columns have β¨limitsβ¨ and the kernel is not gonna fight that battle. the full name is selinux_netlbl_socket_post_create, iykyk, and it's section 9. let's get into it π«Ά
π NAME π
selinux_netlbl_socket_post_create β Label a socket using NetLabel
it's giving "one small job, done with love" π
β¨ SYNOPSIS β¨
int selinux_netlbl_socket_post_create (struct sock *sk , u16 family );
like, that's literally it. one function, two args, returns an int. clean. minimal. main character energy π
πΈ ARGUMENTS πΈ
skβ the sock to label 𧦠(yes, the socket. it's the thing getting labeled, that's the whole vibe)familyβ protocol family π
π¦ DESCRIPTION π¦
so what it does is: it attempts to label a socket using the NetLabel mechanism using the given SID. that's the move. that's the whole move. π«
and then the returns, because we care about the returns:
- zero values on success β slay, we ate, no notes β
- negative values on failure β π not the negative values
no cap, that's the entire description. short and iconic. periodt.
π₯ SEE ALSO π₯
Kernel file: ./security/selinux/netlabel.c β go read the source bestie, it's right there π
and now the whole friend group, everybody say hi π:
selinux_netlbl_sidlookup_cached(9)selinux_netlbl_sock_genattr(9)selinux_netlbl_sock_getattr(9)selinux_netlbl_cache_invalidate(9)selinux_netlbl_err(9)selinux_netlbl_sk_security_free(9)selinux_netlbl_sk_security_reset(9)selinux_netlbl_skbuff_getsid(9)selinux_netlbl_skbuff_setsid(9)selinux_netlbl_sctp_assoc_request(9)selinux_netlbl_inet_conn_request(9)selinux_netlbl_inet_csk_clone(9)selinux_netlbl_sctp_sk_clone(9)selinux_netlbl_sock_rcv_skb(9)selinux_netlbl_option(9)selinux_netlbl_socket_setsockopt(9)selinux_netlbl_socket_connect_helper(9)selinux_netlbl_socket_connect_locked(9)selinux_netlbl_socket_connect(9)
look at that roster π every single one of them, we didn't skip a single bestie π
π friendly reminder that this socket_post_create one is the post create one β the labeling happens after the create, and the success/failure return values are zero/negative respectively. remember the vibes and you'll remember the function β¨
and that's the page!! footer cuteness for the record books: this one comes from ./security/selinux, dated October 2026, and it signs off as selinux_net..._post_create(9) one last time because consistency is keys ππ
bye bestie, go label some sockets ππΈ
π¦ 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