How is mkdir subject to a TOCTOU attack?
My answer here, resulted in this comment:
This could be subject to a TOCTOU1 attack and needs to be developed to be correct.
The answer is in Rust, but here’s some equivalent bash:
p=/home/roger/foo/bar/baz.txt
d=$(dir… Continue reading How is mkdir subject to a TOCTOU attack?