awslabs / aws-c-common

Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.
Apache License 2.0
262 stars 159 forks source link

Fixed directory creation to ignore umask, and allow cross process loc… #1078

Closed JonathanHenson closed 1 year ago

JonathanHenson commented 1 year ago

…k to fall back to read only if it can't open the file in rw mode.

testing on this one is hard to automate. Here's how I verified:

create lock directory as user, create lock as user, make sure it works create lock dir as user, create lock as root, make sure it works for user create lock dir as root, create lock as root, make sure it works for user create lock dir as root, try to create lock as user, make sure it works for user.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov-commenter commented 1 year ago

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (fefbf4b) 83.40% compared to head (c137a09) 83.30%.

Files Patch % Lines
source/posix/cross_process_lock.c 26.66% 11 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1078 +/- ## ========================================== - Coverage 83.40% 83.30% -0.11% ========================================== Files 56 56 Lines 5792 5804 +12 ========================================== + Hits 4831 4835 +4 - Misses 961 969 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.