-
Notifications
You must be signed in to change notification settings - Fork 118
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
Cleanup test File utilities #1989
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1989 +/- ##
==========================================
+ Coverage 78.86% 78.88% +0.02%
==========================================
Files 593 593
Lines 101934 101935 +1
Branches 14450 14450
==========================================
+ Hits 80386 80408 +22
+ Misses 20904 20881 -23
- Partials 644 646 +2 ☔ View full report in Codecov by Sentry. |
721c497
to
d70832d
Compare
@@ -122,7 +122,9 @@ bool TemporaryFile::Init(bssl::Span<const uint8_t> content) { | |||
#else | |||
std::string path = temp_dir + "bssl_tmp_file.XXXXXX"; | |||
// TODO(davidben): Use |path.data()| when we require C++17. | |||
mode_t prev_umask = umask(S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); |
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.
Where did this mask come from?
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.
This particular just ensures that Read/Write permissions for "group" and "others" will not be granted when the file is created. (Typically, created files allow others to read.) https://man7.org/linux/man-pages/man2/umask.2.html
Issues:
Addresses: P168988559
Description of changes:
TemporaryFile
andScopedFD
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.