Date: Thu, 14 May 2020 20:28:37 +0000 From: Brooks Davis <brooks@freebsd.org> To: Kyle Evans <kevans@freebsd.org> Cc: "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: [HEADSUP] Disallowing read() of a directory fd Message-ID: <20200514202837.GD60902@spindle.one-eyed-alien.net> In-Reply-To: <CACNAnaFszg%2BQWPRS0kghsnQMxXc%2B5niPTTNiUPSmK60YyBGCzA@mail.gmail.com> References: <CACNAnaFszg%2BQWPRS0kghsnQMxXc%2B5niPTTNiUPSmK60YyBGCzA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--GpGaEY17fSl8rd50 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 14, 2020 at 01:26:46PM -0500, Kyle Evans wrote: > Hi, >=20 > This is a heads up, given that I'm completely flipping our historical > behavior- I intend to commit this review in a couple days' time > without substantial objection: https://reviews.freebsd.org/D24596 >=20 > With this, FreeBSD 13 will not allow read() of a directory fd, which > could have previously returned some data from the underlying > filesystem in no particular standardized format. >=20 > This is a still-standards-compliant switch from one > implementation-defined behavior to another that's already been adopted > in various other popular kernels, to include OpenBSD, MacOS, and > Linux. >=20 > Worth noting is that there's not really one largely-compelling reasons > to switch this after so many years (unless you find yourself that > irate when you accidentally `cat` a directory), but there are some > benefits which are briefly discussed in the commentary around the > review along with the history of the current behavior. >=20 > This change also simplifies filesystem implementations to some extent. I'm sure this made sense in v7, but I've never opened a directory with vi or cat and thought "that's what I wanted to do". In theory can use it as a terrible ls I've you've totally foobar'd your system, but we have /rescue these days. -- Brooks --GpGaEY17fSl8rd50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJevan1AAoJEKzQXbSebgfAunsIAJC2zN3PESn0dHZPpzSQ3sTE 9V2qKuFYi4IRn9bGoq8VOsumcJFQs0zPawS9iPhHqgoBuZEyu9Gn/p3KHA4/1/Yu 90Mc/qxlMzipovPDh5hQ0PKFzfNhyXCoZnxXnpdsLiwbioAMxfnzEQfoLzYY33ri NgY9PgWx7mhcq9qh9s1b/98RYspND6XzBiYuiY9fAT2HSRf1mWGi8ooANvunES2s k5aPX5IrbVSQRQ34TzQ6LZjqd7ju0gKBaTYwH1NHS7j/8BllomvIldJbgZdOf/2p 6sH0usPfRwZLLVuoTPFkSSgRbCf5zQgW6ykkJwxVyJngJ6Rbp/RXnLcylPOku6M= =jkmr -----END PGP SIGNATURE----- --GpGaEY17fSl8rd50--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200514202837.GD60902>