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

Document default permissions for tempdirs #296

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

Imberflur
Copy link
Contributor

fixes #284

src/lib.rs Outdated
@@ -347,6 +346,8 @@ impl<'a, 'b> Builder<'a, 'b> {
/// # Platform Notes
/// ## Unix
///
/// Tempfiles default to `0o600` and temdirs default to `0o777`.
Copy link
Owner

Choose a reason for hiding this comment

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

This should be combined with the next sentence for clarity and should explain how the umask is combined. The reader needs to walk away understanding that, by default, the permissions on a directory are 0o755 given the standard 0o022 umask, etc.

Also, it should mention Builder::permissions.

Copy link
Owner

Choose a reason for hiding this comment

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

Oh, wait. This is Builder::permissions(). Never mind that part.

But I still want the reader to come away with an understanding that their temporary directory is probably not going to be world-writable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to incorporate this, but further notes on it would be welcome.

Copy link
Owner

Choose a reason for hiding this comment

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

That's plenty good enough.

Fixes implying that the default is the same as the one for tempfiles
Copy link
Owner

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Thank you!

@Stebalien Stebalien merged commit 19280c5 into Stebalien:master Aug 11, 2024
13 checks passed
@Imberflur Imberflur deleted the default-permissions-docs branch August 11, 2024 17:23
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.

Clarify Builder::permissions documentation on defaults for temporary directories
2 participants