Kernel: Allow sys$chmod() to modify the set-gid bit

We were incorrectly masking off the set-gid bit.

Fixes #4060.
This commit is contained in:
Andreas Kling 2020-12-22 11:33:28 +01:00
commit b452dd13b6
Notes: sideshowbarker 2024-07-19 00:40:50 +09:00

View file

@ -487,7 +487,7 @@ KResult VFS::chmod(Custody& custody, mode_t mode)
return KResult(-EROFS);
// Only change the permission bits.
mode = (inode.mode() & ~04777u) | (mode & 04777u);
mode = (inode.mode() & ~06777u) | (mode & 06777u);
return inode.chmod(mode);
}