From: Sergiu Moga Date: Fri, 29 Jan 2021 17:17:01 +0000 (+0200) Subject: lib/posix-user: Register `setreuid` to syscall_shim X-Git-Tag: RELEASE-0.6~205 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=adc5457e3a0d4c749e19df6c4bac5ae34e83beca;p=unikraft%2Funikraft.git lib/posix-user: Register `setreuid` to syscall_shim Register `setreuid` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Mocanu Viorel Gabriel Tested-by: Unikraft CI GitHub-Pull-Request: #114 --- diff --git a/lib/posix-user/Makefile.uk b/lib/posix-user/Makefile.uk index 69146ad55..493fb159d 100644 --- a/lib/posix-user/Makefile.uk +++ b/lib/posix-user/Makefile.uk @@ -16,3 +16,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setfsuid-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getgroups-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getresgid-3 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setgid-1 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += setreuid-2 diff --git a/lib/posix-user/exportsyms.uk b/lib/posix-user/exportsyms.uk index ee5b6359e..6d9986b07 100644 --- a/lib/posix-user/exportsyms.uk +++ b/lib/posix-user/exportsyms.uk @@ -61,7 +61,6 @@ uk_syscall_r_getpgrp seteuid getresuid setresuid -setreuid setpwent endpwent getpwnam_r @@ -82,3 +81,6 @@ uk_syscall_r_getgroups getresgid uk_syscall_e_getresgid uk_syscall_r_getresgid +setreuid +uk_syscall_e_setreuid +uk_syscall_r_setreuid diff --git a/lib/posix-user/user.c b/lib/posix-user/user.c index dd913f3b4..4d3983995 100644 --- a/lib/posix-user/user.c +++ b/lib/posix-user/user.c @@ -118,7 +118,7 @@ int setresuid(uid_t ruid __unused, uid_t euid __unused, uid_t suid __unused) return 0; } -int setreuid(uid_t ruid __unused, uid_t euid __unused) +UK_SYSCALL_R_DEFINE(int, setreuid, uid_t, ruid, uid_t, euid) { return 0; }