mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Kernel+LibC+LibCore+UserspaceEmulator: Implement faccessat(2)
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
This commit is contained in:
parent
fa692e13f9
commit
2a502fe232
13 changed files with 89 additions and 39 deletions
|
@ -34,6 +34,14 @@ struct UidAndGid {
|
|||
GroupID gid;
|
||||
};
|
||||
|
||||
enum class AccessFlags {
|
||||
None = 0,
|
||||
EffectiveAccess = 1 << 0,
|
||||
DoNotFollowSymlinks = 1 << 1,
|
||||
};
|
||||
|
||||
AK_ENUM_BITWISE_OPERATORS(AccessFlags);
|
||||
|
||||
class VirtualFileSystem {
|
||||
public:
|
||||
// Required to be at least 8 by POSIX
|
||||
|
@ -63,7 +71,7 @@ public:
|
|||
ErrorOr<void> chmod(Credentials const&, Custody&, mode_t);
|
||||
ErrorOr<void> chown(Credentials const&, StringView path, UserID, GroupID, Custody& base, int options);
|
||||
ErrorOr<void> chown(Credentials const&, Custody&, UserID, GroupID);
|
||||
ErrorOr<void> access(Credentials const&, StringView path, int mode, Custody& base);
|
||||
ErrorOr<void> access(Credentials const&, StringView path, int mode, Custody& base, AccessFlags);
|
||||
ErrorOr<InodeMetadata> lookup_metadata(Credentials const&, StringView path, Custody& base, int options = 0);
|
||||
ErrorOr<void> utime(Credentials const&, StringView path, Custody& base, time_t atime, time_t mtime);
|
||||
ErrorOr<void> utimensat(Credentials const&, StringView path, Custody& base, timespec const& atime, timespec const& mtime, int options = 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue