tomoyo_path_chroot(9)
π tomoyo_path_chroot(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, section 9 of the manual, and you've stumbled onto tomoyo_path_chroot. hi. hello. welcome. this is the hook that the kernel calls when it wants a TOMOYO opinion about somebody trying to chroot. it's tiny. it's iconic. let's get into it π
β¨ NAME β¨
tomoyo_path_chroot β literally the target for security_path_chroot(). that's the whole gig. that's the job description. she's the callback the LSM framework points at when a process attempts a chroot and the security layer needs to weigh in π¦
πΈ SYNOPSIS πΈ
int tomoyo_path_chroot (const struct path *path );
that's it. one argument. one int coming back at you. no cap β¨
π ARGUMENTS π
pathβ pointer to a"struct path". yep, the quotes are hers, not mine β she's very particular about the type. this is the path struct describing whatever directory someone's trying to make their new root π
π₯ DESCRIPTION π₯
so what does she actually do? she returns 0 on success. that's it, that's the win condition π
and if things don't go great? she comes back with a negative value. negative = not it. negative = the vibe check failed. no further detail given, bestie β the manpage said negative and negative is what you get π
ngl this is a very short description for a very important job. but she doesn't over-explain. main character energy fr fr.
π SEE ALSO π
okay bestie this is the part where she introduces you to her entire extended family. sit down. hydrate. there are 30 of them π«Ά
kernel file: ./security/tomoyo/tomoyo.c
tomoyo_domain(9)tomoyo_cred_prepare(9)tomoyo_bprm_committed_creds(9)tomoyo_bprm_creds_for_exec(9)tomoyo_bprm_check_security(9)tomoyo_inode_getattr(9)tomoyo_path_truncate(9)tomoyo_file_truncate(9)tomoyo_path_unlink(9)tomoyo_path_mkdir(9)tomoyo_path_rmdir(9)tomoyo_path_symlink(9)tomoyo_path_mknod(9)tomoyo_path_link(9)tomoyo_path_rename(9)tomoyo_file_fcntl(9)tomoyo_file_open(9)tomoyo_file_ioctl(9)tomoyo_path_chmod(9)tomoyo_path_chown(9)tomoyo_sb_mount(9)tomoyo_sb_umount(9)tomoyo_sb_pivotroot(9)tomoyo_socket_listen(9)tomoyo_socket_connect(9)tomoyo_socket_bind(9)tomoyo_socket_sendmsg(9)tomoyo_task_alloc(9)tomoyo_task_free(9)tomoyo_init(9)
like, she has a hook for everything. files, sockets, mounts, tasks, the whole lineup. obsessed π
iykyk β if you're chasing a chroot permission mystery, this is your girl π
and that's the page!! π mwah π this came out of ./security/tomoyo in October 2026, so if it's giving vintage, that's why. go forth and chroot responsibly, 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