Date: Thu, 14 May 2020 19:43:06 -0600 From: Warner Losh <imp@bsdimp.com> To: arne@steinkamm.com Cc: freebsd-arch@freebsd.org, Alan Somers <asomers@freebsd.org>, "Julian H. Stacey" <jhs@berklix.com>, Kyle Evans <kevans@freebsd.org> Subject: Re: [HEADSUP] Disallowing read() of a directory fd Message-ID: <CANCZdfpgiapUd8tA89Atp_E5d%2BijLekH6ysSbtPSzKvJ18WB1A@mail.gmail.com> In-Reply-To: <20200515011258.GW82984@trajan.stk.cx> References: <CACNAnaFszg%2BQWPRS0kghsnQMxXc%2B5niPTTNiUPSmK60YyBGCzA@mail.gmail.com> <202005142017.04EKH0aA093503@fire.js.berklix.net> <CAOtMX2i2Z-KX=3rYR2nZ1g1Lb_tF==H3xPKcQMBxJs1Kqr-meQ@mail.gmail.com> <20200514203030.GT82984@trajan.stk.cx> <20200515011258.GW82984@trajan.stk.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 14, 2020, 7:14 PM Arne Steinkamm <freebsd-arch@steinkamm.com> wrote: > On Thu, May 14, 2020 at 02:20:45PM -0600, Alan Somers wrote: > > On Thu, May 14, 2020 at 2:17 PM Julian H. Stacey <jhs@berklix.com> > wrote: > > > > > Kyle Evans wrote: > > > > Hi, > > > > > > > > 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 > > > > > > > > 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. > > > > > > > > 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. > > > > > > > > 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. > > > > > > > > This change also simplifies filesystem implementations to some > extent. > > > > > > > > Thanks, > > > > > > > > Kyle Evans > > > > > > There is ZERO need for a spurious change at 2 days notice after 42+ > years ! > > > > > > "cat ." as been supported since Unix V6 1978 or earlier, > > > no problem, even occasionaly useful. > > > > > > > Really? When is that occasionally useful? I've never seen anything > useful > > come out of reading a directory. > > It's all about files in Unix... > > This is true since 1972. > > And files can be read! > > How many (bad programmed) shell scripts will break when directory files > can't > be read anymore? I have no idea. > > But I know for sure that there is no need to make this change. > Not 1976, not 2020 nor in the future Why do you need this to work? It can disclose unwanted data... Warner .//. Arne > > -- > Arne Steinkamm | Home: Mail: arne<at>steinkamm<dot>com > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpgiapUd8tA89Atp_E5d%2BijLekH6ysSbtPSzKvJ18WB1A>