mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
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:
Notes:
sideshowbarker
2024-07-18 23:03:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b7248be251d
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user