diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 20:31:36 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 20:31:36 +0200 |
commit | 93d3d1ede148156a2f3eedae45a4642dd27520a5 (patch) | |
tree | 1b21d59fa4419eb17966b94c8b9358defa882252 /LibC | |
parent | 51581c21fca245be7677d61282fe6fc7b6e69ca1 (diff) | |
download | serenity-93d3d1ede148156a2f3eedae45a4642dd27520a5.zip |
Kernel: Add fchown() syscall.
Diffstat (limited to 'LibC')
-rw-r--r-- | LibC/unistd.cpp | 6 | ||||
-rw-r--r-- | LibC/unistd.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp index 22a4204b8f..6c02793aa1 100644 --- a/LibC/unistd.cpp +++ b/LibC/unistd.cpp @@ -28,6 +28,12 @@ int chown(const char* pathname, uid_t uid, gid_t gid) __RETURN_WITH_ERRNO(rc, rc, -1); } +int fchown(int fd, uid_t uid, gid_t gid) +{ + int rc = syscall(SC_fchown, fd, uid, gid); + __RETURN_WITH_ERRNO(rc, rc, -1); +} + pid_t fork() { int rc = syscall(SC_fork); diff --git a/LibC/unistd.h b/LibC/unistd.h index a935330a6d..4dd3a7f1b1 100644 --- a/LibC/unistd.h +++ b/LibC/unistd.h @@ -88,6 +88,7 @@ long fpathconf(int fd, int name); long pathconf(const char* path, int name); char* getlogin(); int chown(const char* pathname, uid_t, gid_t); +int fchown(int fd, uid_t, gid_t); int ftruncate(int fd, off_t length); enum |