Kernel/LibC/Userspace: Implement chown and set tty owner on login

This commit is contained in:
2024-01-02 22:19:38 +02:00
parent 07d5d3f936
commit 96d831c31a
12 changed files with 62 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ __BEGIN_DECLS
#define SYS_READLINKAT 60
#define SYS_MSYNC 61
#define SYS_PREAD 62
#define SYS_CHOWN 63
__END_DECLS

View File

@@ -270,6 +270,11 @@ int chdir(const char* path)
return syscall(SYS_SET_PWD, path);
}
int chown(const char* path, uid_t owner, gid_t group)
{
return syscall(SYS_CHOWN, path, owner, group);
}
void sync(void)
{
syscall(SYS_SYNC, false);