xiaoxiang781216 commented on code in PR #19578:
URL: https://github.com/apache/nuttx/pull/19578#discussion_r3676043471
##########
fs/inode/fs_inode.c:
##########
@@ -229,6 +229,33 @@ void inode_runlock(void)
*
****************************************************************************/
+#if defined(CONFIG_PSEUDOFS_ATTRIBUTES) && defined(CONFIG_SCHED_USER_IDENTITY)
+/****************************************************************************
+ * Name: inode_set_caller_identity
+ ****************************************************************************/
+
+void inode_set_caller_identity(FAR struct inode *inode)
+{
+ FAR struct tcb_s *rtcb;
+
+ if (inode == NULL)
+ {
+ return;
+ }
+
+ rtcb = nxsched_self();
Review Comment:
merge to inode_alloc
##########
include/unistd.h:
##########
@@ -494,6 +494,9 @@ gid_t getegid(void);
int setreuid(uid_t ruid, uid_t euid);
int setregid(gid_t rgid, gid_t egid);
+int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
Review Comment:
add FAR
##########
fs/inode/fs_inodereserve.c:
##########
@@ -230,6 +230,10 @@ int inode_reserve(FAR const char *path,
node = inode_alloc(name, 0777);
if (node != NULL)
{
+#if defined(CONFIG_PSEUDOFS_ATTRIBUTES) && \
+ defined(CONFIG_SCHED_USER_IDENTITY)
+ inode_set_caller_identity(node);
Review Comment:
why not move to inode_alloc
--
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]