services_convert_context(9)
π NAME π
Okay bestie, this is services_convert_context from the Kernel API Manual β and it converts a security context across policies. That's the whole assignment. π
β¨ SYNOPSIS β¨
int services_convert_context (struct convert_context_args *args , struct
context *oldc , struct context *newc , gfp_t gfp_flags );
π«Ά ARGUMENTS π«Ά
argsβ a populatedconvert_context_argsstruct. Like, it's already got its little fields filled in.oldcβ the original context.newcβ the converted context.gfp_flagsβ allocation flags.
π DESCRIPTION π
So here's the tea: services_convert_context converts the values in the security context structure oldc from the values specified in the policy args->oldp to the values specified in the policy args->newp. It stores the new context in newc, and it verifies that the context is valid under the new policy. No cap, that's literally the whole flow. π
π₯ SEE ALSO π₯
Kernel file ./security/selinux/ss/services.c β and the rest of the 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)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_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)
That's a wrap, bestie π«Ά β services_convert_context(9) from the Kernel API Manual, source/version ./security/selinux/ss, dated October 2026. Slay and stay valid under the new policy. π
π¦ 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