From 23a716926c2b5ac9a87fcec0fc0c464433b1d5ae Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 29 Jan 2021 19:39:06 +0200 Subject: [PATCH] lib/posix-user: Register `getgroups` to syscall_shim Register `getgroups` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Mocanu Viorel Gabriel Tested-by: Unikraft CI GitHub-Pull-Request: #116 --- lib/posix-user/Makefile.uk | 1 + lib/posix-user/exportsyms.uk | 3 +++ lib/posix-user/user.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/posix-user/Makefile.uk b/lib/posix-user/Makefile.uk index aa43abd79..98574e8da 100644 --- a/lib/posix-user/Makefile.uk +++ b/lib/posix-user/Makefile.uk @@ -13,3 +13,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setuid-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += capset-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setfsgid-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setfsuid-1 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getgroups-2 diff --git a/lib/posix-user/exportsyms.uk b/lib/posix-user/exportsyms.uk index 3fc196389..da8ed1cd6 100644 --- a/lib/posix-user/exportsyms.uk +++ b/lib/posix-user/exportsyms.uk @@ -75,3 +75,6 @@ getgrnam_r setgrent endgrent getgrent +getgroups +uk_syscall_e_getgroups +uk_syscall_r_getgroups diff --git a/lib/posix-user/user.c b/lib/posix-user/user.c index 6aff7e7a6..a6dcc5118 100644 --- a/lib/posix-user/user.c +++ b/lib/posix-user/user.c @@ -263,7 +263,7 @@ int initgroups(const char *user __unused, gid_t group __unused) return 0; } -int getgroups(int size __unused, gid_t list[] __unused) +UK_SYSCALL_R_DEFINE(int, getgroups, int, size, gid_t*, list) { return 0; } -- 2.39.5