sel_netport_sid_slow(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sel_netport_sid_slow β€” like, the slow one, but make it slay

okay bestie, welcome to section 9 of the Kernel API Manual, and yes we're talking about sel_netport_sid_slow today. it's a kernel function, it's got the word "slow" in the name, and honestly? she owns it. 🐌✨


🌸 NAME 🌸

sel_netport_sid_slow β€” literally looks up the SID of a network address by asking the policy. that's the whole gig. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int sel_netport_sid_slow (u8 protocol , u16 pnum , u32 *sid );

like, three args, one return value, and she's int. iconic behavior tbh.


πŸŽ€ ARGUMENTS πŸŽ€

  • protocol β€” the protocol. yeah. that's the description. it's a u8, it's a protocol, we move. πŸ’…
  • pnum β€” the port. (pnum = port number, iykyk 🧚)
  • sid β€” the port SID. this one's a pointer (u32 *), so she's writing back to you, not just chatting. 🫢

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: this function figures out the SID of a network port by querying the security policy. that's the main character moment right there. πŸ”₯

and then β€” because future-you deserves nice things β€” the result gets added to the network port table so upcoming queries are speedier. caching! we love her! ⭐

return value tea: it returns zero on success, and negative values on failure. so if you see a negative number, something went sideways, no cap. 😭

lowkey important: sel_netport_sid_slow is the slow path. the whole point of that table insert is so you don't have to keep coming back here. respect the cache, bestie. πŸ’€

🌈 SEE ALSO 🌈

this whole thing lives in the kernel file ./security/selinux/netport.c, and honestly the friend group is:

go say hi. they're all in the same file, it's giving family reunion. πŸ‘‘


and that's the page, pookie! πŸ“ this lil number comes to you from ./security/selinux, dated October 2026, and it's filed under sel_netport_sid_slow(9) β€” go forth and query that policy responsibly. πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from