1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +00:00

Kernel: Allow passing initial UID and GID when creating new inodes

If we're creating something that should have a different owner than the
current process's UID/GID, we need to plumb that all the way through
VFS down to the FS functions.
This commit is contained in:
Andreas Kling 2020-01-03 20:13:21 +01:00
parent 82760998a9
commit 4abbedb6e4
11 changed files with 41 additions and 33 deletions

View file

@ -51,13 +51,13 @@ InodeIdentifier DevPtsFS::root_inode() const
return { fsid(), 1 };
}
RefPtr<Inode> DevPtsFS::create_inode(InodeIdentifier, const String&, mode_t, off_t, dev_t, int& error)
RefPtr<Inode> DevPtsFS::create_inode(InodeIdentifier, const String&, mode_t, off_t, dev_t, uid_t, gid_t, int& error)
{
error = -EROFS;
return nullptr;
}
RefPtr<Inode> DevPtsFS::create_directory(InodeIdentifier, const String&, mode_t, int& error)
RefPtr<Inode> DevPtsFS::create_directory(InodeIdentifier, const String&, mode_t, uid_t, gid_t, int& error)
{
error = -EROFS;
return nullptr;