Jelajahi Sumber

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

We were incorrectly masking off the set-gid bit.

Fixes #4060.
Andreas Kling 4 tahun lalu
induk
melakukan
b452dd13b6
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Kernel/FileSystem/VirtualFileSystem.cpp

+ 1 - 1
Kernel/FileSystem/VirtualFileSystem.cpp

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