NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/55815: tar opens device files
The following reply was made to PR bin/55815; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/55815: tar opens device files
Date: Sat, 5 Jun 2021 05:08:17 -0000 (UTC)
joerg%bec.de@localhost (Joerg Sonnenberger) writes:
>Which part of TOCTOA wasn't clear?
That the "solution" has to be worse than the problem.
You can lstat() to handle devices and also need it for symlinks.
You can re-check like now for things you have to open() and ignore
the lstat test.
Then your tapes only rewind when someone sneaks in the device
node while you are archiving the files and the race condition is hit.
Home |
Main Index |
Thread Index |
Old Index