Abhishekmishra2808 commented on code in PR #19049:
URL: https://github.com/apache/nuttx/pull/19049#discussion_r3396866469
##########
fs/vfs/fs_pseudofile.c:
##########
@@ -493,6 +497,18 @@ int pseudofile_create(FAR struct inode **node, FAR const
char *path,
(*node)->i_flags = 1;
(*node)->u.i_ops = &g_pseudofile_ops;
(*node)->i_private = pf;
+
+#if defined(CONFIG_PSEUDOFS_ATTRIBUTES) && \
+ defined(CONFIG_SCHED_USER_IDENTITY)
+
+ rtcb = nxsched_self();
+ if (rtcb != NULL && rtcb->group != NULL)
+ {
+ (*node)->i_owner = rtcb->group->tg_euid;
Review Comment:
I kept the ownership initialization in `pseudofile_create()` because the
issue is specific to pseudo-files created through the `O_CREAT path`.
`inode_reserve()` is a generic inode allocation helper, and changing it would
affect all callers. Keeping the change in `pseudofile_create()` localizes the
behavior change to the affected path.
--
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]