tomoyo_realpath_from_path(9)
β¨ tomoyo_realpath_from_path(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one lives in the TOMOYO security module and honestly it's giving path resolver but make it security-flavoured π
πΈ NAME πΈ
tomoyo_realpath_from_path β returns realpath(3) of the given pathname, but ignores chroot'ed root π
lowkey important: the chroot part means it does not get fooled by a chroot jail, iykyk. Not me adding meaning β that's literally what it says π«Ά
π¦ SYNOPSIS π¦
char * tomoyo_realpath_from_path (const struct path *path );
one function, one pointer in, one char * out. slay β¨
π ARGUMENTS π
pathβ pointer to"struct path"π§ that's it, that's the whole input, she's simple like that
π DESCRIPTION π
Returns the realpath of the given path on success, NULL otherwise π₯
If the dentry is a directory, a trailing '/' is appended. periodt π
Characters out of the 0x20 < c < 0x7F range get converted to a style octal string. Characters that are \ get converted to a \ string. (yes bestie, the escaping is real, it's giving escape room but for filenames π)
π technically important: these functions usekzalloc, so the caller must callkfreeif these functions didn't returnNULL. Not me reminding you to free your memory β memory leaks are NOT the vibe π
π SEE ALSO π
- Kernel file
./security/tomoyo/realpath.cπ tomoyo_encode2(9)tomoyo_encode(9)tomoyo_get_absolute_path(9)tomoyo_get_dentry_path(9)tomoyo_get_local_path(9)tomoyo_realpath_nofollow(9)
like, the whole tomoyo path family, go read them all, they're iconic π
β the sign-off β
so this page comes from the source path ./security/tomoyo π and the date on it is October 2026 ποΈ and yes the version/date footer thing is here in spirit β the manual name up top is tomoyo_realpath_from_path(9) and that's her full government name π
go forth and resolve those paths, 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