1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

Add chown() syscall and a simple /bin/chown program.

This commit is contained in:
Andreas Kling 2019-02-27 12:32:53 +01:00
parent 711e2b2651
commit 1d2529b4a1
19 changed files with 130 additions and 5 deletions

View file

@ -14,12 +14,10 @@
extern "C" {
int chown(const char* pathname, uid_t owner, gid_t group)
int chown(const char* pathname, uid_t uid, gid_t gid)
{
(void)pathname;
(void)owner;
(void)group;
assert(false);
int rc = syscall(SC_chown, pathname, uid, gid);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
pid_t fork()

View file

@ -74,6 +74,7 @@ int mknod(const char* pathname, mode_t, dev_t);
long fpathconf(int fd, int name);
long pathconf(const char *path, int name);
char* getlogin();
int chown(const char* pathname, uid_t, gid_t);
enum {
_PC_NAME_MAX,