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: Joerg Sonnenberger <>
Subject: Re: bin/55815: tar opens device files
Date: Tue, 24 Nov 2020 21:12:19 +0100

 On Sun, Nov 22, 2020 at 01:25:00PM +0000, wrote:
 > Tar does open device files, which is a *very* bad idea.
 As discussed on IRC, this is a side effect of enabling ACL and extattr
 support OOB. It is avoided when using --no-acls --no-extattr. Using only
 the fd-based API variants is established practise, e.g. GNU tar has the
 same behavior. Other options would be racy, which is especially bad when
 dealing with file permissions.
 Most systems consider device open with side effect a bug. I can remember
 two cases in NetBSD off the top of my head. Tapes and IOPL device on
 x86. The former is harmless as side effect as far as archiving is
 concerned. The former has the rewind on open. IMO that should either be
 completely removed or deferred to the first actual IO operation.

Home | Main Index | Thread Index | Old Index