Re: open()ing a directory without O_DIRECTORY

Takashi YAMAMOTO <[email protected]> Thu, 28 Mar 2019 18:04:22 +0900
Newsgroups gmane.os.netbsd.devel.security
Message-ID <CAKDaYtDW=B9bUshecHJnatcrGxQWDo1e=0SKyC-NBonbuVFPdw@mail.gmail.com>
2019年3月4日(月) 6:47 matthew green <[email protected]>:

> >  - zero out on unlink() so that the data is no longer on the disk
> >    (Everybody seems to have expressed preference for this solution but I
> >    think this requires changing all the affected filesystems)
>
> actually, i don't like this idea at all.  it requires additional
> writes and it makes crash handling much harder later.  eg, fsdb
> will have much less useful data to work from.
>
> i really don't think it is worth making hard times harder.
>

i agree.

it's simpler to prevent VOP_READ on directories.