diff --git a/src/kernel/emulation/linux/unistd/fchmod_extended.c b/src/kernel/emulation/linux/unistd/fchmod_extended.c index e1a43ae7e..828d75976 100644 --- a/src/kernel/emulation/linux/unistd/fchmod_extended.c +++ b/src/kernel/emulation/linux/unistd/fchmod_extended.c @@ -3,10 +3,18 @@ #include "../errno.h" #include +#include +#include + long sys_fchmod_extended(int fd, int uid, int gid, int mode, void* xsec) { int ret; + // apparently, these are supposed to go through successfully + if (uid == KAUTH_UID_NONE || gid == KAUTH_GID_NONE || mode == -1) { + return 0; + } + ret = LINUX_SYSCALL2(__NR_fchmod, fd, mode); if (ret < 0) return errno_linux_to_bsd(ret);