]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: silence TOCTOU warning when creating a directory
authorRonny Chevalier <chevalier.ronny@gmail.com>
Sun, 9 Nov 2014 14:42:23 +0000 (15:42 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sun, 16 Nov 2014 18:38:08 +0000 (19:38 +0100)
commitc9732bae8f29be644e7b4b1cc4f738ef85477c72
tree5e2efdff4f2af5143fc284dd923eb5a63ba21282
parent8e24a4f8b6f53883ea515ae8f27fb6b1795973b4
udev: silence TOCTOU warning when creating a directory

CID#979416. There is no real race here to fix, but lets make coverity
happy and rework the code.

Note that we still fail if the directory is removed _after_ we ran
mkdir(), so the same race is still there. Coverity is complaining, though.
Rewrite the code to make it happy.

(David: rewrote the commit-message to note that this is not a race. If I'm
        wrong, blame me, not Ronny!)
src/udev/collect/collect.c