tomoyo_get_absolute_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ tomoyo_get_absolute_path(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual β€” yes that's the manual name, it's giving official πŸ’… β€” and today's main character is tomoyo_get_absolute_path. she's a little function with one very specific job and honestly? she ate.


✨ NAME ✨

tomoyo_get_absolute_path β€” Get the path of a dentry but ignores chroot'ed root.

like, she'll give you the path, but she is literally not interested in your chroot'ed root. not her problem. not her business. πŸ™ˆ


πŸŽ€ SYNOPSIS πŸŽ€

char * tomoyo_get_absolute_path (const struct path *path , char * const buffer , const int buflen );

that's the whole vibe. three arguments, one char * coming back at you. no cap. ✨


🌸 ARGUMENTS 🌸

  • path β€” Pointer to "struct path". this is the dentry situation you're asking about, bestie. 🫢
  • buffer β€” Pointer to buffer to return value in. she's gonna write the answer in here, so pls actually give her somewhere to live.
  • buflen β€” Sizeof buffer. literally just how big your buffer is. she needs to know. don't lie to her. πŸ’€

πŸ’– DESCRIPTION πŸ’–

Returns the buffer on success, an error code otherwise.

so like β€” slay, you get your buffer back and everything is iconic. but if something goes wrong? you get an error code instead. that's the vibe check and you did not pass it. 😭

If dentry is a directory, trailing / is appended.

yup, she adds the little slash at the end when it's a directory, because she's thoughtful like that. πŸŽ€ a tiny finishing touch. the ribbon on the gift. obsessed.


⭐ SEE ALSO ⭐

Kernel file ./security/tomoyo/realpath.c β€” go read the source, it's right there, iykyk πŸ‘‘

the whole friend group fr fr. go say hi. 🌈


lowkey reminder bestie: this page lives in ./security/tomoyo, and it's dated October 2026, and yeah the page itself is tomoyo_get_absolute_path(9) β€” she's booked and busy in the Kernel API Manual. πŸ’œβœ¨ no cap, that's the whole thing. mwah. 🫢
πŸ“¦ where this page comes from