sel_netport_sid_slow(9)
π 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 au8, 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:
sel_netport_hashfn(9)sel_netport_find(9)sel_netport_insert(9)sel_netport_sid(9)sel_netport_flush(9)
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
- 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