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

Use umask() to Constrain Created File Permissions #2495

Merged
merged 1 commit into from
Feb 17, 2021

Commits on Feb 17, 2021

  1. Use umask() to Constrain Created File Permissions

    This commit addresses facebook#2491.
    
    Note that a downside of this solution is that it is global: `umask()` affects
    all file creation calls in the process. I believe this is safe since
    `fileio.c` functions should only ever be used in the zstd binary, and these
    are (almost) the only files ever created by zstd, and AIUI they're only
    created in a single thread. So we can get away with messing with global state.
    
    Note that this doesn't change the permissions of files created by `dibio.c`.
    I'm not sure what those should be...
    felixhandte committed Feb 17, 2021
    Configuration menu
    Copy the full SHA
    a774c57 View commit details
    Browse the repository at this point in the history