diff options
Diffstat (limited to 'Kernel/VirtualFileSystem.cpp')
-rw-r--r-- | Kernel/VirtualFileSystem.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/VirtualFileSystem.cpp b/Kernel/VirtualFileSystem.cpp index 21b604159a..45acec8e89 100644 --- a/Kernel/VirtualFileSystem.cpp +++ b/Kernel/VirtualFileSystem.cpp @@ -300,8 +300,7 @@ KResult VFS::chmod(const String& path, mode_t mode, Inode& base) if (inode->fs().is_readonly()) return KResult(-EROFS); - // FIXME: Superuser should always be allowed to chmod. - if (current->euid() != inode->metadata().uid) + if (current->euid() != inode->metadata().uid && !current->is_superuser()) return KResult(-EPERM); // Only change the permission bits. |