security_pol...ap_supported(9)
π security_policycap_supported β the Kernel API Manual, but make it cute π
okay so bestie, welcome to the <pink>Kernel API Manual</pink> β¨ this one's a lil function called security_policycap_supported and honestly? it's giving "does the policy support this or not" energy. that's literally the whole vibe. let's get into it π
πΈ NAME πΈ
security_policycap_supported β check for a specific policy capability π
like, you hand it a capability, it tells you if the currently loaded policy is down with it. simple. iconic. no cap.
β¨ SYNOPSIS β¨
int security_policycap_supported (unsigned int req_cap );
yup, that's the whole signature. it returns an int, and it takes one unsigned int called req_cap. that's it. that's the function π«Ά
π¦ ARGUMENTS π¦
req_capβ the capability, bestie π this is the specific policy capability you're asking about. it's anunsigned int. that's the whole argument. one job.
π DESCRIPTION π
okay so here's the tea β β this function queries the currently loaded policy to see if it supports the capability you specified in req_cap.
and the answer comes back as:
- true (
1) β if the capability is supported π₯ slay - false (
0) β if it isn't supported π
that's the entire deal. it's a vibe check for policy capabilities. iykyk π
π§ SEE ALSO π§
the kernel file lives at ./security/selinux/ss/services.c β go look at it if you're feeling main character energy β
and here's the whole friend group of related functions, all (9) section, all iconic in their own way:
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_net_peersid_resolve(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)
lowkey obsessed with how many of these there are. go read them. bestie homework ππ
and that's a wrap, babe π this lil page lives in ./security/selinux/ss, and it's dated October 2026 β so jot that down, put it in your calendar, whatever you gotta do. mwah πβ¨
π¦ 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