security_net...rsid_resolve(9)
πΈ 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 flavorxfrm_sidβ the XFRM SID, the other half of this little meet-cutepeer_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:
security_compute_av(9)security_sid_to_context(9)security_sid_to_context_inval(9)security_context_to_sid(9)security_context_to_sid_default(9)security_transition_sid(9)security_member_sid(9)security_change_sid(9)services_convert_context(9)security_load_policy(9)ocontext_to_sid(9)security_port_sid(9)security_ib_pkey_sid(9)security_ib_endport_sid(9)security_netif_sid(9)security_node_sid(9)__security_genfs_sid(9)security_genfs_sid(9)security_fs_use(9)security_policycap_supported(9)security_netlbl_cache_add(9)security_netlbl_secattr_to_sid(9)security_netlbl_sid_to_secattr(9)__security_read_policy(9)security_read_policy(9)security_read_state_kernel(9)
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
- 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