tomoyo_realpath_from_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 use kzalloc, so the caller must call kfree if these functions didn't return NULL. Not me reminding you to free your memory β€” memory leaks are NOT the vibe πŸ™ˆ

🌈 SEE ALSO 🌈

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