mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 10:34:58 +00:00
Kernel+LibC+LibCore: Add lchown and fchownat functions
This modifies sys$chown to allow specifying whether or not to follow symlinks and in which directory. This was then used to implement lchown and fchownat in LibC and LibCore.
This commit is contained in:
parent
344cfa0db4
commit
63760603f3
8 changed files with 64 additions and 7 deletions
|
@ -564,9 +564,9 @@ ErrorOr<void> VirtualFileSystem::chown(Custody& custody, UserID a_uid, GroupID a
|
|||
return inode.chown(new_uid, new_gid);
|
||||
}
|
||||
|
||||
ErrorOr<void> VirtualFileSystem::chown(StringView path, UserID a_uid, GroupID a_gid, Custody& base)
|
||||
ErrorOr<void> VirtualFileSystem::chown(StringView path, UserID a_uid, GroupID a_gid, Custody& base, int options)
|
||||
{
|
||||
auto custody = TRY(resolve_path(path, base));
|
||||
auto custody = TRY(resolve_path(path, base, nullptr, options));
|
||||
return chown(custody, a_uid, a_gid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue