selinux_net...cket_connect(9)
okay so bestie, weβre looking at selinux_netlbl_socket_connect(9) from the Kernel API Manual, and itβs literally the function for labeling a client-side socket on connect. Itβs giving kernel-security main character energy, and weβre gonna read it together. π«Ά
π NAME π
selinux_netlbl_socket_connect β Label a client-side socket on connect
β¨ SYNOPSIS β¨
int selinux_netlbl_socket_connect (struct sock *sk , struct sockaddr
*addr );
π ARGUMENTS π
skβ the socket to label. Thatβs the one weβre putting a label on, bestie. πaddrβ the destination address. The address weβre working with, no cap. πΈ
π DESCRIPTION π
Okay so the move here is: attempt to label a connected socket with NetLabel using the given address. Thatβs it, thatβs the vibe. β¨
It returns zero values on success, and negative values on failure. So zero = slay, negative = something went sideways. Periodt. π
π¦ SEE ALSO π¦
Kernel file: ./security/selinux/netlabel.c
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_socket_post_create(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)
thatβs the whole page, mwah π β source/version: ./security/selinux, date: October 2026. periodt.
π¦ 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