selinux_net...cket_connect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

that’s the whole page, mwah πŸ’‹ β€” source/version: ./security/selinux, date: October 2026. periodt.

πŸ“¦ where this page comes from