summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/File.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-03 20:14:56 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-03 20:14:56 +0100
commitd84299c7be8ba887288e63f5bd9447131c66c882 (patch)
treee94e6d54fb4b2974489669ebda2e77fa721c3f89 /Kernel/FileSystem/File.h
parent4abbedb6e4bbe78d897b1009136045a4098efddd (diff)
downloadserenity-d84299c7be8ba887288e63f5bd9447131c66c882.zip
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.
Diffstat (limited to 'Kernel/FileSystem/File.h')
-rw-r--r--Kernel/FileSystem/File.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/FileSystem/File.h b/Kernel/FileSystem/File.h
index f21ffc2d60..43d10e60be 100644
--- a/Kernel/FileSystem/File.h
+++ b/Kernel/FileSystem/File.h
@@ -57,6 +57,8 @@ public:
virtual String absolute_path(const FileDescription&) const = 0;
virtual KResult truncate(off_t) { return KResult(-EINVAL); }
+ virtual KResult chown(uid_t, gid_t) { return KResult(-EBADF); }
+ virtual KResult chmod(mode_t) { return KResult(-EBADF); }
virtual const char* class_name() const = 0;