mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
Kernel/ProcFS: Tighten permissions on the exposed objects
This is needed so we properly set the limits for different objects in the filesystem.
This commit is contained in:
parent
47149e625f
commit
d79d9e833e
Notes:
sideshowbarker
2024-07-18 11:16:24 +09:00
Author: https://github.com/supercomputer7
Commit: d79d9e833e
Pull-request: https://github.com/SerenityOS/serenity/pull/7509
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/awesomekling
1 changed files with 7 additions and 7 deletions
|
@ -142,8 +142,8 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
InodeMetadata metadata;
|
||||
metadata.inode = { fsid(), m_associated_component->component_index() };
|
||||
metadata.mode = m_associated_component->required_mode();
|
||||
metadata.uid = 0;
|
||||
metadata.gid = 0;
|
||||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = m_associated_component->size();
|
||||
metadata.mtime = mepoch;
|
||||
return metadata;
|
||||
|
@ -212,9 +212,9 @@ InodeMetadata ProcFSDirectoryInode::metadata() const
|
|||
Locker locker(m_lock);
|
||||
InodeMetadata metadata;
|
||||
metadata.inode = { fsid(), m_associated_component->component_index() };
|
||||
metadata.mode = S_IFDIR | S_IRUSR | S_IRGRP | S_IROTH | S_IXOTH;
|
||||
metadata.uid = 0;
|
||||
metadata.gid = 0;
|
||||
metadata.mode = S_IFDIR | m_associated_component->required_mode();
|
||||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = mepoch;
|
||||
return metadata;
|
||||
|
@ -255,8 +255,8 @@ InodeMetadata ProcFSLinkInode::metadata() const
|
|||
InodeMetadata metadata;
|
||||
metadata.inode = { fsid(), m_associated_component->component_index() };
|
||||
metadata.mode = S_IFLNK | m_associated_component->required_mode();
|
||||
metadata.uid = 0;
|
||||
metadata.gid = 0;
|
||||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = mepoch;
|
||||
return metadata;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue