]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/posix-user: Register `getresgid` to syscall_shim
authorSergiu Moga <sergiu.moga@protonmail.com>
Fri, 29 Jan 2021 18:06:38 +0000 (20:06 +0200)
committerUnikraft <monkey@unikraft.io>
Sat, 15 May 2021 11:06:20 +0000 (11:06 +0000)
Register `getresgid` system call to syscall_shim library.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Mocanu Viorel Gabriel <gabi.mocanu98@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #111

lib/posix-user/Makefile.uk
lib/posix-user/exportsyms.uk
lib/posix-user/user.c

index 98574e8da5816921bdc364679e0232e64a26fa5d..c78705fa3a79dd7a1e394de821a038612e70f337 100644 (file)
@@ -14,3 +14,4 @@ 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
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_USER) += getresgid-3
index da8ed1cd65ff3d4fe134a976927bbea907620f2f..e87ec545e146fc7c050f669ad7bf3f98ecac91d0 100644 (file)
@@ -66,7 +66,6 @@ getpwnam_r
 getpwuid_r
 getpwent
 setegid
-getresgid
 setresgid
 setregid
 getgroups
@@ -78,3 +77,6 @@ getgrent
 getgroups
 uk_syscall_e_getgroups
 uk_syscall_r_getgroups
+getresgid
+uk_syscall_e_getresgid
+uk_syscall_r_getresgid
index a6dcc51181347ce2944cf9fc6038719b405123e7..9b5b1c43efadb6395eeb9abc31ec571534d2e688 100644 (file)
@@ -229,11 +229,10 @@ int setegid(gid_t egid __unused)
        return 0;
 }
 
-int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid)
+UK_SYSCALL_R_DEFINE(int, getresgid, gid_t*, rgid, gid_t*, egid, gid_t*, sgid)
 {
        if (!rgid || !egid || !sgid) {
-               errno = EFAULT;
-               return -1;
+               return -EFAULT;
        }
 
        *rgid = *egid = *sgid = UK_DEFAULT_GID;