Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2020 15:59:46 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        Kyle Evans <kevans@freebsd.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>,  "Julian H. Stacey" <jhs@berklix.com>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>,  "freebsd-hackers@freebsd.org" <hackers@freebsd.org>
Subject:   Re: [HEADSUP] Disallowing read() of a directory fd
Message-ID:  <CAOtMX2g9hb=tFw3BqiwYmc%2BVRvs12FC=U7pQrWrSUdF7vhcOyg@mail.gmail.com>
In-Reply-To: <202005152108.04FL8WeJ007130@slippy.cwsent.com>
References:  <CACNAnaFszg%2BQWPRS0kghsnQMxXc%2B5niPTTNiUPSmK60YyBGCzA@mail.gmail.com> <202005142017.04EKH0aA093503@fire.js.berklix.net> <CAOtMX2i2Z-KX=3rYR2nZ1g1Lb_tF==H3xPKcQMBxJs1Kqr-meQ@mail.gmail.com> <33549.1589488226@critter.freebsd.dk> <CACNAnaFDHMkConkBLY-2BMAudueDA8-HTJ5_FNpt4WrB=gg_HA@mail.gmail.com> <202005152108.04FL8WeJ007130@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 15, 2020 at 3:08 PM Cy Schubert <Cy.Schubert@cschubert.com>
wrote:

> In message
> <CACNAnaFDHMkConkBLY-2BMAudueDA8-HTJ5_FNpt4WrB=gg_HA@mail.gmail.c
> om>
> , Kyle Evans writes:
> > On Thu, May 14, 2020 at 3:30 PM Poul-Henning Kamp <phk@phk.freebsd.dk>
> wrote:
> > >
> > > --------
> > > In message
> <CAOtMX2i2Z-KX=3rYR2nZ1g1Lb_tF==H3xPKcQMBxJs1Kqr-meQ@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2g9hb=tFw3BqiwYmc%2BVRvs12FC=U7pQrWrSUdF7vhcOyg>