[HEADSUP] Disallowing read() of a directory fd

Chris bsd-lists at BSDforge.com
Thu May 14 22:19:24 UTC 2020


On Thu, 14 May 2020 22:17:00 +0200 Julian H. Stacey jhs at berklix.com said

> 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.
Completely different file systems. This is a non-reason/excuse to impose
such a change.
> > 
> > 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 !
+2!
> 
> "cat ." as been supported since Unix V6 1978 or earlier, 
> no problem, even occasionaly useful.
> 
> Most FreeBSD users wont have heard of https://reviews.freebsd.org/D24596
> (& there's only 5 other people's opinions there, apart from proposer,
> & skimming through the impression is far from un-qualified approval.
> 
> 
> Do not force all FreeBSD users towards gratuitous change for personal
> preference for Linux behaviour.  Switch to Linux, Or hack a
> personalised shell on BSD that does what you want when you type
> "cat ." If it's later widely popular, use it as proof to re-propose.  No
> Rush.
This bikeshed is already the correct color. Please leave it as is.

> 
> A bigger issue is due notice procedure, & respect to FreeBSD stability of
> code
> & users expectations of predictability.
> Unwarned playing about would detract from FreeBSD's business image.
Amen to that.

> 
> Cheers
> --
> Julian Stacey, Consultant Systems Engineer, BSD Linux
> http://berklix.com/jhs/
> http://www.berklix.org/corona/#masks  Tie 2 handkerchiefs or 1 pillow case. 
> Jobs & economy hit by Corona to be hit again by Crash Brexit 31st Dec. 2020

--Chris




More information about the freebsd-arch mailing list