-
Notifications
You must be signed in to change notification settings - Fork 4
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
Respect umask #65
Respect umask #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add an option to set the umask in the TarFile subclass' constructor to be completely general, for mad programs that want to change the umask while calling us multiple times. I would add a unit test.
@awwad Do you have opinions on the way this was solved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor edit
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
Does this affect the umask on implictly-created directories? (When we see an |
Description
This extends tarfile to apply umask (before ever creating the file with tar's default chown).
This should work if the program does not change its own umask. It is probably necessary to check umask with a global lock such as the one used by module level globals in the import system for thread safety.
Resolves conda/conda#12829