Abhishekmishra2808 opened a new pull request, #19767:
URL: https://github.com/apache/nuttx/pull/19767

   ## Summary
   
   - Add per-task-group supplementary GIDs (setgroups / getgroups / initgroups) 
and honor them in DAC checks.
   - Add setresuid / setresgid for hard and soft credential drop.
   - Add PR_NSHCRED_ENABLE and atomic PR_NSHCRED_AUTHSETEID (passwd verify + 
raise euid/egid in one prctl).
   - Document the identity model and NSH login / su / sudo behavior.
   
   ## Impact
   
   This extends NuttX process credentials with supplementary groups and full 
setres* support, and adds an in-kernel password-authenticated path to raise 
effective IDs for hard-dropped NSH sessions. Boards that enable 
CONFIG_SCHED_USER_IDENTITY (and related passwd/crypto options for AUTHSETEID) 
get the new syscalls and prctl commands; default configs that leave user 
identity disabled are unchanged.
   
   ## Testing
   
   ```
   nsh# useradd testuser UserPass1!
   nsh# cat /tmp/passwd
   
root:$pbkdf2-sha256$10000$uwK3GNfobksYkqa5H9-Rcw$kNsxMZi26PeLxdWKgFjNvZpOoouP_DcHyO2mwyACVc0:0:0:/
   
testuser:$pbkdf2-sha256$10000$LCsDACzp0RA26xvaHPsY2g$gfCJXfLINNOKNIpVqepoUaYJiMbB8ojezAlosZJnrXY:1000:1000:/
   nsh# su testuser
   nsh$ id
   uid=1000(testuser) suid=0(root) gid=1000 sgid=0(root) groups=1000
   nsh$ su root
   password: 
   nsh# id
   uid=0(root) gid=0(root) groups=0(root)
   nsh# 
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to