mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Make File::{chown,chmod} take credentials as input
...instead of getting them from Process::current(). :^)
This commit is contained in:
parent
c3351d4b9f
commit
006f753647
Notes:
sideshowbarker
2024-07-17 08:05:49 +09:00
Author: https://github.com/awesomekling
Commit: 006f753647
10 changed files with 26 additions and 23 deletions
|
@ -115,18 +115,18 @@ ErrorOr<void> InodeFile::sync()
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> InodeFile::chown(OpenFileDescription& description, UserID uid, GroupID gid)
|
||||
ErrorOr<void> InodeFile::chown(Credentials const& credentials, OpenFileDescription& description, UserID uid, GroupID gid)
|
||||
{
|
||||
VERIFY(description.inode() == m_inode);
|
||||
VERIFY(description.custody());
|
||||
return VirtualFileSystem::the().chown(Process::current().credentials(), *description.custody(), uid, gid);
|
||||
return VirtualFileSystem::the().chown(credentials, *description.custody(), uid, gid);
|
||||
}
|
||||
|
||||
ErrorOr<void> InodeFile::chmod(OpenFileDescription& description, mode_t mode)
|
||||
ErrorOr<void> InodeFile::chmod(Credentials const& credentials, OpenFileDescription& description, mode_t mode)
|
||||
{
|
||||
VERIFY(description.inode() == m_inode);
|
||||
VERIFY(description.custody());
|
||||
return VirtualFileSystem::the().chmod(Process::current().credentials(), *description.custody(), mode);
|
||||
return VirtualFileSystem::the().chmod(credentials, *description.custody(), mode);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue