mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
Kernel: Add fchown() syscall.
This commit is contained in:
parent
51581c21fc
commit
93d3d1ede1
8 changed files with 30 additions and 2 deletions
|
@ -1991,6 +1991,14 @@ int Process::sys$fchmod(int fd, mode_t mode)
|
|||
return descriptor->fchmod(mode);
|
||||
}
|
||||
|
||||
int Process::sys$fchown(int fd, uid_t uid, gid_t gid)
|
||||
{
|
||||
auto* descriptor = file_descriptor(fd);
|
||||
if (!descriptor)
|
||||
return -EBADF;
|
||||
return descriptor->chown(uid, gid);
|
||||
}
|
||||
|
||||
int Process::sys$chown(const char* pathname, uid_t uid, gid_t gid)
|
||||
{
|
||||
if (!validate_read_str(pathname))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue