previous: >>108361692
#define __NR_readlink 89
#define __NR_readlinkat 267
https://man7.org/linux/man-pages/man2/readlink.2.html
tl;dr:
read the contents of a symbolic link
what a disgusting syscall LMFAO
>readlink() does not append a terminating null byte to buf.
>The required size for the buffer can be obtained from the stat.st_size value returned by a call to lstat(2) on the link. However, the number of bytes written by readlink() and readlinkat() should be checked to make sure that the size of the symbolic link did not increase between the calls.
genuinely horrifying...
i don't have much else to say about this one. it's just bad
relevant resources:
man man
man syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/