Re: open()ing a directory without O_DIRECTORY
Christos Zoulas <[email protected]> Sun, 3 Mar 2019 17:20:19 -0500
| Newsgroups | gmane.os.netbsd.devel.security |
|---|---|
| Message-ID | <[email protected]> |
> On Mar 3, 2019, at 4:47 PM, matthew green <[email protected]> wrote: > >> - 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. Weil, the new behavior is going to be optional. It barely costs anything to zero since you need to write the block to disk anyway, and filenames are < 256 bytes. As for the usefulness during debugging, I've never used fsdb to reconnect a file to the filesystem by altering the directory. It is a lot simpler to I use fsck to put it in lost+found, then examine the data to figure out what the file contains, and then move it from lost+found to the right place. What is the fsdb use case scenario you have in mind? christos