nuttx/fs/tmpfs
Abhishek Mishra 08afc5f2cf fs: enforce path search and unify inode permission helpers
Require X_OK on path ancestors and mountpoint gates via
inode_checkpathperm(), and use inode_checkperm() for inode mode checks.
inode_checkpathperm() takes the inode tree read lock (or INODE_CHECK_LOCKED
when the caller already holds it) and can fold a non-zero amode check onto
the target inode in the same call.

When CONFIG_FS_PERMISSION is disabled, inode_checkperm/inode_checkpathperm
are empty macros returning 0 so there is no stub .text cost.

Skip mountpoint R/W open-mode checks in inode_checkopenperm(); keep
traversal separate from open.  Add an optional mountpt_operations.permission
hook (tmpfs when CONFIG_FS_PERMISSION) for in-volume DAC without making the
VFS mount-crossing path depend on it.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-08-02 18:48:40 -03:00
..
CMakeLists.txt fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_tmpfs.c fs: enforce path search and unify inode permission helpers 2026-08-02 18:48:40 -03:00
fs_tmpfs.h fs/tmpfs: Add user identity and permission enforcement 2026-06-20 16:00:58 -03:00
Kconfig Fix typos in comments and documentation (#750) 2020-04-08 06:45:35 -06:00
Make.defs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00