fs/vfs: inherit ownership in pseudofile_create#19049
Open
Abhishekmishra2808 wants to merge 1 commit into
Open
Conversation
ac186d5 to
1600ac6
Compare
acassis
reviewed
Jun 6, 2026
Initialize i_owner and i_group from the creating task's effective uid/gid when a pseudo-file is created via O_CREAT. This aligns pseudo-file ownership with the creator's effective credentials instead of leaving new files root-owned by default. Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
1600ac6 to
c2bbee1
Compare
xiaoxiang781216
approved these changes
Jun 7, 2026
| rtcb = nxsched_self(); | ||
| if (rtcb != NULL && rtcb->group != NULL) | ||
| { | ||
| (*node)->i_owner = rtcb->group->tg_euid; |
Contributor
There was a problem hiding this comment.
it's better to move the initialize into inode_reserve
acassis
approved these changes
Jun 7, 2026
jerpelea
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please adhere to Contributing Guidelines.
Summary
Initialize pseudo-file ownership from the creating task's effective credentials when a new pseudo-file is created through the O_CREAT path.
Part of GSoC #18458
Impact
When both CONFIG_PSEUDOFS_ATTRIBUTES and CONFIG_SCHED_USER_IDENTITY are enabled, newly created pseudo-files now inherit:
instead of remaining owned by the default root credentials.
Testing
Tested with a custom test file.
