From 7354559823df2994e5a23cdea6f49dbf26b00897 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Tue, 16 Mar 2021 23:13:52 +0200 Subject: [PATCH] lib/vfscore: Register `fchown` to syscall_shim Register `fchown` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Catalin Puscoci Tested-by: Unikraft CI GitHub-Pull-Request: #156 --- lib/vfscore/Makefile.uk | 1 + lib/vfscore/exportsyms.uk | 2 ++ lib/vfscore/main.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index d78c13f1c..f317270f0 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -62,3 +62,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mount-5 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += ioctl-3 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += statfs-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fstatfs-2 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fchown-3 diff --git a/lib/vfscore/exportsyms.uk b/lib/vfscore/exportsyms.uk index 49b0760dc..6952056af 100644 --- a/lib/vfscore/exportsyms.uk +++ b/lib/vfscore/exportsyms.uk @@ -49,6 +49,8 @@ fchmod uk_syscall_e_fchmod uk_syscall_r_fchmod fchown +uk_syscall_e_fchown +uk_syscall_r_fchown dup dup2 uk_syscall_e_dup2 diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c index 0ecad74ee..a57cc1254 100644 --- a/lib/vfscore/main.c +++ b/lib/vfscore/main.c @@ -2230,7 +2230,7 @@ UK_SYSCALL_R_DEFINE(int, fchmod, int, fd, mode_t, mode) UK_TRACEPOINT(trace_vfs_fchown, "\"%d\" %d %d", int, uid_t, gid_t); UK_TRACEPOINT(trace_vfs_fchown_ret, ""); -int fchown(int fd __unused, uid_t owner __unused, gid_t group __unused) +UK_SYSCALL_R_DEFINE(int, fchown, int, fd, uid_t, owner, gid_t, group) { trace_vfs_fchown(fd, owner, group); UK_WARN_STUBBED(); -- 2.39.5