[HEADSUP] Disallowing read() of a directory fd

Poul-Henning Kamp phk at phk.freebsd.dk
Thu May 14 20:30:30 UTC 2020


--------
In message <CAOtMX2i2Z-KX=3rYR2nZ1g1Lb_tF==H3xPKcQMBxJs1Kqr-meQ at mail.gmail.com>
, Alan Somers writes:

>Really?  When is that occasionally useful?  I've never seen anything useful
>come out of reading a directory.

Two things I have done over the years:

Figure out which filenames prevent a enormous but sparse directory
from being compacted.

Figure out which control characters were in a filename.


It might be a good idea to add a override flag on this feature,
along the lines of:

	kern.geom.debugflags=0x10


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list