mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:54:57 +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
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