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: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost,
"martin%netbsd.org@localhost" <martin%NetBSD.org@localhost>
Subject: Re: bin/55815: tar opens device files
Date: Sat, 5 Jun 2021 10:47:43 -0400
--Apple-Mail=_89CA94F4-40E4-4AE1-8664-FC96ABBC5697
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
> On Jun 5, 2021, at 10:30 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
>=20
> Sorry, I was looking at your example of:
>=20
> fd =3D3D open(...);
> fstat(...);
> if (device)
> bail;
>=20
> What's the point if stat'ing the path if opening with O_REGULAR fails? =
=3D
> Isn't the point here to prevent tar from opening device files?
>=20
> -- thorpej
>=20
That has no issue. The problem is that if it is a device you need a =
separate
stat(2). But even if we solve that, we still need to really open the =
file to get
extended attributes (ACLs). There is always the dump(8) solution (go =
under
the hood) :-)
christos
--Apple-Mail=_89CA94F4-40E4-4AE1-8664-FC96ABBC5697
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCYLuOjwAKCRBxESqxbLM7
OjJPAKCV9rcVLQI9Wo0GFz5jUFpGaQQL/ACffpAyJ7WxeBFyECl/LGqW5OcB40g=
=Aq9r
-----END PGP SIGNATURE-----
--Apple-Mail=_89CA94F4-40E4-4AE1-8664-FC96ABBC5697--
Home |
Main Index |
Thread Index |
Old Index