security_net...rsid_resolve(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 security_net...rsid_resolve(9) β€” the Kernel API Manual, bestie edition 🌸

okay so you found yourself in the Kernel API Manual (yes, the security_net...rsid_resolve(9) one) and honestly? iconic of you. let's get into it πŸ’…


✨ NAME ✨

security_net_peersid_resolve β€” literally just compares two network peer SIDs and resolves them, that's the whole vibe 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int security_net_peersid_resolve (u32 nlbl_sid , u32 nlbl_type , u32
xfrm_sid , u32 *peer_sid );

πŸŽ€ ARGUMENTS πŸŽ€

  • nlbl_sid β€” the NetLabel SID, she's the first one up πŸ’–
  • nlbl_type β€” the NetLabel labeling protocol type, aka her whole flavor
  • xfrm_sid β€” the XFRM SID, the other half of this little meet-cute
  • peer_sid β€” the network peer sid, our output girlie ✨

πŸ’œ DESCRIPTION πŸ’œ

so the whole plot: you compare the nlbl_sid and xfrm_sid values, and if those two SIDs can be resolved into a single SID, that merged SID gets handed back to you through peer_sid and the function returns zero. slay. πŸŽ‰

but if they can't be resolved? then peer_sid gets set to SECSID_NULL and the function returns a negative value. it's giving rejection arc 😭

here's the table summarizing the behavior, because we love a visual aid:

  • no peer labels β†’ function return: 0 | sid: SECSID_NULL
  • single peer label β†’ function return: 0 | sid: <peer_label>
  • multiple, consistent labels β†’ function return: 0 | sid: <peer_label>
  • multiple, inconsistent labels β†’ function return: -<errno> | sid: SECSID_NULL

(the columns are function return and sid, for the record πŸ‘‘)


πŸ”₯ SEE ALSO πŸ”₯

kernel file ./security/selinux/ss/services.c, plus the whole friend group:


okay that's the whole page, no cap πŸ’€ this lil gem lives in ./security/selinux/ss, dated October 2026, and it's filed under security_net...rsid_resolve(9) β€” go forth and resolve those peers, bestie πŸŒˆβ­πŸ’…

πŸ“¦ where this page comes from