mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Kernel: Make File::{chown,chmod} take credentials as input
...instead of getting them from Process::current(). :^)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user