security_genfs_sid(9)
β¨ security_genfs_sid(9) β¨
okay so welcome to the Kernel API Manual corner of the group chat, bestie π this little icon is literally about obtaining a SID for a file in a filesystem, and we're keeping every detail cute but intact. no cap.
πΈ NAME πΈ
security_genfs_sid β Obtain a SID for a file in a filesystem π
β¨ SYNOPSIS β¨
int security_genfs_sid (const char *fstype , const char *path , u16
orig_sclass , u32 *sid );
π ARGUMENTS π
fstypeβ filesystem type, aka which filesystem bestie we're talking about πpathβ path from root of mount, bestie πΈorig_sclassβ file security class, the class vibe fr frsidβ SID for path, the actual SID we're pointing at β¨
π DESCRIPTION π
Here's the whole tea: acquire policy_rwlock before calling __security_genfs_sid, and release it afterward. That's it, that's the description, and the lock choreography is giving main character energy π₯
π¦ SEE ALSO π¦
The Kernel file ./security/selinux/ss/services.c is serving looks in this list, and these refs are all invited to the party:
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_fs_use(9)security_net_peersid_resolve(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)
mwah π this page's source/version is ./security/selinux/ss, dated October 2026, for security_genfs_sid(9) β footer tea delivered, periodt π«Ά
π¦ 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