Abhishekmishra2808 opened a new pull request, #18891: URL: https://github.com/apache/nuttx/pull/18891
## Summary This patch adds centralized UNIX-style permission enforcement for pseudo-filesystem inodes during open() operations. It introduces inode_checkperm() and integrates it into file_vopen() after inode_checkflags() to validate read and write access using inode ownership, permission bits, and the effective uid/gid of the calling task. The implementation supports owner/group/other permission evaluation, bypasses permission checks for kernel threads, and skips mountpoint inodes to avoid affecting mounted filesystems such as FAT, ROMFS, and procfs. ## Impact This change introduces the active runtime permission enforcement layer for pseudoFS instead of storing permission metadata. Read-only, write-only, and inaccessible inode modes are now properly enforced during file open operations, returning -EACCES when access is denied. ## Testing NSH <img width="460" height="754" alt="image" src="https://github.com/user-attachments/assets/6819258f-e7da-4441-8961-b8172444f04e" /> <img width="530" height="560" alt="image" src="https://github.com/user-attachments/assets/ef882bb1-afc1-4fb6-8113-e780452ee1ca" /> Ostest and checkpatch tests also passed. -- 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]
