Quellcode durchsuchen

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

We were incorrectly masking off the sticky bit when setting file modes.
Andreas Kling vor 4 Jahren
Ursprung
Commit
b7248be251
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      Kernel/FileSystem/VirtualFileSystem.cpp

+ 1 - 1
Kernel/FileSystem/VirtualFileSystem.cpp

@@ -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);
 }