From 4418c98f43cbfba6e3b5d6579cddcfbcaa028a34 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 29 Jan 2021 18:19:31 +0200 Subject: [PATCH] lib/posix-user: Register `getuid` to syscall_shim Register `getuid` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Alexander Jung Tested-by: Unikraft CI GitHub-Pull-Request: #98 --- lib/posix-user/Makefile.uk | 1 + lib/posix-user/exportsyms.uk | 2 ++ lib/posix-user/user.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/posix-user/Makefile.uk b/lib/posix-user/Makefile.uk index b2741e271..624d27f48 100644 --- a/lib/posix-user/Makefile.uk +++ b/lib/posix-user/Makefile.uk @@ -8,3 +8,4 @@ LIBPOSIX_USER_SRCS-$(CONFIG_LIBPOSIX_USER) += $(LIBPOSIX_USER_BASE)/user.c UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getegid-0 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += geteuid-0 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getgid-0 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getuid-0 diff --git a/lib/posix-user/exportsyms.uk b/lib/posix-user/exportsyms.uk index c05d2da33..167a5abf5 100644 --- a/lib/posix-user/exportsyms.uk +++ b/lib/posix-user/exportsyms.uk @@ -6,6 +6,8 @@ geteuid uk_syscall_e_geteuid uk_syscall_r_geteuid getuid +uk_syscall_e_getuid +uk_syscall_r_getuid getpwuid getpwnam getgrnam diff --git a/lib/posix-user/user.c b/lib/posix-user/user.c index 2ff940778..e7c60dadc 100644 --- a/lib/posix-user/user.c +++ b/lib/posix-user/user.c @@ -90,7 +90,7 @@ static void init_posix_user(void) } UK_CTOR_FUNC(2, init_posix_user); -uid_t getuid(void) +UK_SYSCALL_R_DEFINE(uid_t, getuid) { return 0; } -- 2.39.5