mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00
Kernel: Allow fchmod() and fchown() on pre-bind() local sockets
In order to ensure a specific owner and mode when the local socket filesystem endpoint is instantiated, we need to be able to call fchmod() and fchown() on a socket fd between socket() and bind(). This is because until we call bind(), there is no filesystem inode for the socket yet.
This commit is contained in:
parent
4abbedb6e4
commit
d84299c7be
8 changed files with 57 additions and 13 deletions
|
@ -2524,7 +2524,7 @@ int Process::sys$fchmod(int fd, mode_t mode)
|
|||
auto* description = file_description(fd);
|
||||
if (!description)
|
||||
return -EBADF;
|
||||
return description->fchmod(mode);
|
||||
return description->chmod(mode);
|
||||
}
|
||||
|
||||
int Process::sys$fchown(int fd, uid_t uid, gid_t gid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue