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-04-15 14:47:19 +08:00 • committed by Xiang Xiao
parent 13f071baa8
commit 896f34fde9
14 changed files with 307 additions and 38 deletions

View file

@ -427,6 +427,8 @@ struct task_group_s
#ifdef CONFIG_SCHED_USER_IDENTITY
uid_t tg_uid; /* User identity */
gid_t tg_gid; /* User group identity */
uid_t tg_euid; /* Effective user identity */
gid_t tg_egid; /* Effective user group identity */
#endif
/* Group membership *******************************************************/