mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
Kernel: Pass a FileDescription to File::chmod() and File::chown()
We're going to make use of it in the next commit. But the idea is we want to know how this File (more specifically, InodeFile) was opened in order to decide how chown()/chmod() should behave, in particular whether it should be allowed or not. Note that many other File operations, such as read(), write(), and ioctl(), already require the caller to pass a FileDescription.
This commit is contained in:
committed by
Andreas Kling
parent
67cbc015d5
commit
a9946a99f2
@@ -54,8 +54,8 @@ public:
|
||||
virtual String absolute_path(const FileDescription&) const override;
|
||||
|
||||
virtual KResult truncate(u64) override;
|
||||
virtual KResult chown(uid_t, gid_t) override;
|
||||
virtual KResult chmod(mode_t) override;
|
||||
virtual KResult chown(FileDescription&, uid_t, gid_t) override;
|
||||
virtual KResult chmod(FileDescription&, mode_t) override;
|
||||
|
||||
virtual const char* class_name() const override { return "InodeFile"; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user