1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38: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:
Andreas Kling 2020-01-03 20:14:56 +01:00
parent 4abbedb6e4
commit d84299c7be
8 changed files with 57 additions and 13 deletions

View file

@ -26,6 +26,8 @@ public:
virtual String absolute_path(const FileDescription&) const override;
virtual KResult truncate(off_t) override;
virtual KResult chown(uid_t, gid_t) override;
virtual KResult chmod(mode_t) override;
virtual const char* class_name() const override { return "InodeFile"; }