tomoyo_transition_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to struct 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_TRANSIT if executing program causes domain transition across namespaces β€” like, she's leaving the whole namespace, main character move 🌈
  • returns TOMOYO_TRANSITION_CONTROL_INITIALIZE if executing program reinitializes domain transition within that namespace β€” same namespace, fresh start, it's giving reset era πŸ”₯
  • returns TOMOYO_TRANSITION_CONTROL_KEEP if executing program stays at domainname β€” 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:

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