1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

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
parent 72ce4abb99
commit b452dd13b6

View file

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