Kernel: Allow sys$chmod() to change the sticky bit

We were incorrectly masking off the sticky bit when setting file modes.
This commit is contained in:
Andreas Kling 2021-01-19 18:21:43 +01:00
parent 8601108e21
commit b7248be251

View file

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