previous: >>108458443
#define __NR_setfsuid 122
#define __NR_setfsgid 123
https://man7.org/linux/man-pages/man2/setfsuid.2.html
https://man7.org/linux/man-pages/man2/setfsgid.2.html
tl;dr:
set uid/gid for the purposes of interacting with the filesystem
wow, this is pretty interesting
>At the time when this system call was introduced, one process could send a signal to another process with the same effective user ID. This meant that if a privileged process changed its effective user ID for the purpose of file permission checking, then it could become vulnerable to receiving signals sent by another (unprivileged) process with the same user ID.
strange that they kept it around, instead of removing it now that it isn't needed. but that's linux for you
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/