Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chown scripts #287

Merged
merged 2 commits into from Feb 25, 2022
Merged

Fix chown scripts #287

merged 2 commits into from Feb 25, 2022

Conversation

didrocks
Copy link
Member

Fix potential security race with user/gid reset

Only chown to uid and gid when creating directories and any fd before closing we are in control of.
This impacted the API for passing desired uid and gid.
Remove the final recursive reset.
Rework chowning when needed. Set -1 to be API compliant for no change.

Only chown to uid and gid when creating directories and any fd before
closing we are in control of.
This impacted the API for passing desired uid and gid.
Remove the final recursive reset.

Adapt tests to it.
Copy link
Collaborator

@jibel jibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix. Thanks!

@jibel jibel merged commit e8babcb into main Feb 25, 2022
@jibel jibel deleted the fix_chown_scripts branch February 25, 2022 10:42
@setharnold
Copy link

Nice fix indeed :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants