[HEADSUP] Disallowing read() of a directory fd
Alan Somers
asomers at freebsd.org
Fri May 15 22:00:00 UTC 2020
On Fri, May 15, 2020 at 3:08 PM Cy Schubert <Cy.Schubert at cschubert.com>
wrote:
> In message
> <CACNAnaFDHMkConkBLY-2BMAudueDA8-HTJ5_FNpt4WrB=gg_HA at mail.gmail.c
> om>
> , Kyle Evans writes:
> > On Thu, May 14, 2020 at 3:30 PM Poul-Henning Kamp <phk at phk.freebsd.dk>
> wrote:
> > >
> > > --------
> > > 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
> usefu
> > l
> > > >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.
> > >
> >
> > Can we explore the possibility of using fsdb(8) to fulfill these needs
> > in a way that you'd be comfortable with? I am thoroughly motivated and
> > willing to do what I can to find a good path forward. We could add a
>
> I'd like to see a good business case before a developer spends their
> valuable time to fulfill a some function few if any people might use.
> Those
> objecting to this should demonstrate how they currently use read()ing
> directories. Otherwise IMO it's a waste of your time.
>
+1. The suggested use cases are marginal, and would be better served by
fsdb. Disallowing reads on directories makes sense. Kyle ought to
unconditionally disable until a real need is proven.
-Alan
More information about the freebsd-arch
mailing list