mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
Kernel: Make VirtualFileSystem functions take credentials as input
Instead of getting credentials from Process::current(), we now require that they be provided as input to the various VFS functions. This ensures that an atomic set of credentials is used throughout an entire VFS operation.
This commit is contained in:
parent
9744dedb50
commit
c3351d4b9f
Notes:
sideshowbarker
2024-07-17 23:02:37 +09:00
Author: https://github.com/awesomekling
Commit: c3351d4b9f
33 changed files with 159 additions and 165 deletions
|
@ -119,14 +119,14 @@ ErrorOr<void> InodeFile::chown(OpenFileDescription& description, UserID uid, Gro
|
|||
{
|
||||
VERIFY(description.inode() == m_inode);
|
||||
VERIFY(description.custody());
|
||||
return VirtualFileSystem::the().chown(*description.custody(), uid, gid);
|
||||
return VirtualFileSystem::the().chown(Process::current().credentials(), *description.custody(), uid, gid);
|
||||
}
|
||||
|
||||
ErrorOr<void> InodeFile::chmod(OpenFileDescription& description, mode_t mode)
|
||||
{
|
||||
VERIFY(description.inode() == m_inode);
|
||||
VERIFY(description.custody());
|
||||
return VirtualFileSystem::the().chmod(*description.custody(), mode);
|
||||
return VirtualFileSystem::the().chmod(Process::current().credentials(), *description.custody(), mode);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue