sched: implement effective uid and gid interfaces

Implement 'effective' setuid, getuid, setgid, and getgid interfaces.
These will be inheritance by all child task groups. These definitons
are explicitly specified here:
https://pubs.opengroup.org/onlinepubs/000095399/functions/geteuid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/getegid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/seteuid.html
https://pubs.opengroup.org/onlinepubs/000095399/functions/setegid.html

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong
2023-08-09 17:07:58 +08:00
committed by Xiang Xiao
parent 13f071baa8
commit 896f34fde9
14 changed files with 307 additions and 38 deletions
+4
View File
@@ -67,6 +67,10 @@ SYSCALL_LOOKUP(sethostname, 2)
SYSCALL_LOOKUP(getuid, 0)
SYSCALL_LOOKUP(setgid, 1)
SYSCALL_LOOKUP(getgid, 0)
SYSCALL_LOOKUP(seteuid, 1)
SYSCALL_LOOKUP(geteuid, 0)
SYSCALL_LOOKUP(setegid, 1)
SYSCALL_LOOKUP(getegid, 0)
#endif
/* Semaphores */