1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Kernel/SysFS: Make it possible to have custom permissions for nodes

This commit is contained in:
Liav A 2021-09-11 12:03:44 +03:00 committed by Andreas Kling
parent 33f033066c
commit 06e95d0fd7
3 changed files with 7 additions and 1 deletions

View file

@ -140,7 +140,7 @@ InodeMetadata SysFSInode::metadata() const
// NOTE: No locking required as m_associated_component or its component index will never change during our lifetime.
InodeMetadata metadata;
metadata.inode = { fsid(), m_associated_component->component_index() };
metadata.mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
metadata.mode = S_IFREG | m_associated_component->permissions();
metadata.uid = 0;
metadata.gid = 0;
metadata.size = 0;