mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 19:50:47 +08:00
Adds tg_suid and tg_sgid fields to task_group_s to complete the POSIX three-field identity model (real, effective, saved-set). Updates group_inherit_identity() to propagate the new fields from parent to child task group on task creation. Fixes setuid(), setgid(), seteuid(), and setegid() to implement correct POSIX privilege transition logic: - Root (euid==0): may set any value; all three IDs updated by setuid/setgid - Non-root: may only set effective ID to real or saved value; else EPERM Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>