1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +00:00

Kernel: Pass a Custody instead of Inode to VFS methods

VFS no longer deals with inodes in public API, only with custodies and file
descriptions. Talk directly to the file system if you need to operate on a
inode. In most cases you actually want to go though VFS, to get proper
permission check and other niceties. For this to work, you have to provide a
custody, which describes *how* you have opened the inode, not just what the
inode is.
This commit is contained in:
Sergey Bugaev 2020-05-28 17:41:04 +03:00 committed by Andreas Kling
parent a9946a99f2
commit 6af2418de7
3 changed files with 12 additions and 10 deletions

View file

@ -118,9 +118,9 @@ public:
KResult symlink(StringView target, StringView linkpath, Custody& base);
KResult rmdir(StringView path, Custody& base);
KResult chmod(StringView path, mode_t, Custody& base);
KResult chmod(Inode&, mode_t);
KResult chmod(Custody&, mode_t);
KResult chown(StringView path, uid_t, gid_t, Custody& base);
KResult chown(Inode&, uid_t, gid_t);
KResult chown(Custody&, uid_t, gid_t);
KResult access(StringView path, int mode, Custody& base);
KResultOr<InodeMetadata> lookup_metadata(StringView path, Custody& base, int options = 0);
KResult utime(StringView path, Custody& base, time_t atime, time_t mtime);