previous: >>108370984
#define __NR_chmod 90
#define __NR_fchmod 91
#define __NR_fchmodat 268
#define __NR_fchmodat2 452
https://man7.org/linux/man-pages/man2/chmod.2.html
tl;dr:
change file "mode" (permissions)
looks like there's no manpage up yet for fchmodat2. interesting. but it does exist in the linux kernel (https://elixir.bootlin.com/linux/v6.19.8/source/fs/open.c#L704) and it lets you set the AT_SYMLINK_NOFOLLOW and AT_EMPTY_PATH flags.
there's a lot to say about this topic. DAC in general is pretty handy, and used extremely widely. i am personally a bit more fond of MAC, but both have their place in any secure system. the sticky and suid bits are a bit bizarre in the way they're glommed on with the access permissions, but i guess it's as good a place as any for them
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/