瀏覽代碼

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

We were incorrectly masking off the set-gid bit.

Fixes #4060.
Andreas Kling 4 年之前
父節點
當前提交
b452dd13b6
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
         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);
 }
 }