tomoyo_transition_type(9)
π tomoyo_transition_type(9) π
okay so this is a page from the Kernel API Manual β yes that Kernel API Manual, the big serious one β and today's main character is a little function called tomoyo_transition_type. buckle up bestie, it's a short one but it matters β¨
πΈ NAME πΈ
tomoyo_transition_type β get domain transition type. that's it, that's the whole job, and she does it flawlessly π
π SYNOPSIS π
enum tomoyo_transition_type tomoyo_transition_type (const struct
tomoyo_policy_namespace *ns , const struct tomoyo_path_info *domainname
, const struct tomoyo_path_info *program );
like, look at that signature. three args, one enum out. lowkey gorgeous π¦
β¨ ARGUMENTS β¨
nsβ pointer tostruct tomoyo_policy_namespace. it's giving "which namespace are we even in rn" energy π«Άdomainnameβ the name of the current domain. where you're at right now, no cap.programβ the name of the requested program. the one you're thinking about running π
π DESCRIPTION π
so this function looks at the current domain (domainname), looks at the program you wanna exec (program), and tells you what kind of domain transition is about to go down. the vibes are, in order:
- returns
TOMOYO_TRANSITION_CONTROL_TRANSITif executingprogramcauses domain transition across namespaces β like, she's leaving the whole namespace, main character move π - returns
TOMOYO_TRANSITION_CONTROL_INITIALIZEif executingprogramreinitializes domain transition within that namespace β same namespace, fresh start, it's giving reset era π₯ - returns
TOMOYO_TRANSITION_CONTROL_KEEPif executingprogramstays atdomainnameβ no movement, we stay cozy, periodt π - and others otherwise β like, if none of the above hit, you get whatever else comes out of that enum π
β οΈ important bestie note: caller holds tomoyo_read_lock. that's not optional, that's the whole contract. don't come for this function without the lock, fr fr π
π SEE ALSO π
kernel file ./security/tomoyo/domain.c and honestly the whole friend group:
tomoyo_update_policy(9)tomoyo_same_acl_head(9)tomoyo_update_domain(9)tomoyo_check_acl(9)tomoyo_last_word(9)tomoyo_same_transition_control(9)tomoyo_write_transition_control(9)tomoyo_scan_transition(9)tomoyo_same_aggregator(9)tomoyo_write_aggregator(9)tomoyo_find_namespace(9)tomoyo_assign_namespace(9)tomoyo_namespace_jump(9)tomoyo_assign_domain(9)tomoyo_environ(9)tomoyo_find_next_domain(9)tomoyo_dump_page(9)
like, that's the whole squad right there. go read them too, iykyk ππ
and that's the page!! tysm for reading, mwah π«Ά this one came straight outta ./security/tomoyo, dated October 2026, and it lives in the Kernel API Manual β iconic, no notes, bye 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