Skip to content

Fix TOCTOU in create_dirs_impl - #73

Open
nextsilicon-itay-bookstein wants to merge 1 commit into
guangie88:masterfrom
nextsilicon-itay-bookstein:fix_create_dir_toctou
Open

Fix TOCTOU in create_dirs_impl#73
nextsilicon-itay-bookstein wants to merge 1 commit into
guangie88:masterfrom
nextsilicon-itay-bookstein:fix_create_dir_toctou

Conversation

@nextsilicon-itay-bookstein

Copy link
Copy Markdown
Contributor

Replace the check whether a directory exists before trying to
create it with handling for already-exists cases. This addresses
a race where the directory is created by another process, leading
to a failure.

This happened when multiple processes were started up simultaneously with configurations that lead to the creation of the same parent directory.

Replace the check whether a directory exists before trying to
create it with handling for already-exists cases. This addresses
a race where the directory is created by another process, leading
to a failure.

Signed-off-by: Itay Bookstein <itay.bookstein@nextsilicon.com>
@codecov

codecov Bot commented Feb 9, 2021

Copy link
Copy Markdown

Codecov Report

Merging #73 (0162cc0) into master (a991861) will decrease coverage by 0.35%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   88.16%   87.80%   -0.36%     
==========================================
  Files           4        4              
  Lines         566      566              
==========================================
- Hits          499      497       -2     
- Misses         67       69       +2     
Impacted Files Coverage Δ
include/spdlog_setup/details/conf_impl.h 89.63% <62.50%> (-0.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a991861...0162cc0. Read the comment docs.

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.

1 participant