xiaoxiang781216 commented on code in PR #19162:
URL: https://github.com/apache/nuttx/pull/19162#discussion_r3430329456


##########
fs/inode/fs_inode.c:
##########
@@ -223,7 +251,7 @@ int inode_checkperm(FAR struct inode *inode, int oflags)
 
   if (INODE_IS_PSEUDODIR(inode))
     {
-#if defined(CONFIG_PSEUDOFS_ATTRIBUTES) && defined(CONFIG_SCHED_USER_IDENTITY)
+#ifdef CONFIG_FS_PERMISSION
       return _inode_checkmode(inode, amode);

Review Comment:
   why not call fs_checkmode and remove line 240-250



##########
fs/inode/fs_inode.c:
##########
@@ -244,16 +272,29 @@ int inode_checkperm(FAR struct inode *inode, int oflags)
       return -EACCES;
     }
 
-#if defined(CONFIG_PSEUDOFS_ATTRIBUTES) && defined(CONFIG_SCHED_USER_IDENTITY)
+#ifdef CONFIG_FS_PERMISSION
 
   if (INODE_IS_MOUNTPT(inode))
     {
       return OK;
     }
 
+  /* /etc/passwd and /etc/group must be world-readable so that getpwnam()

Review Comment:
   should user provide the right permission instead adding special handle here.



-- 
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