dfvfs icon indicating copy to clipboard operation
dfvfs copied to clipboard

Add support for "container file systems"

Open rgayon opened this issue 4 years ago • 4 comments

Ie: the case of Docker containers

Some pre-work exploring these in docker-explorer

rgayon avatar Aug 28 '19 13:08 rgayon

@rgayon @joachimmetz As discussed oob, i can take a look at this (re-using docker explorer to add support in dfVFS)

sydp avatar Apr 12 '22 02:04 sydp

When a file is "deleted" in a layer of the overlay, the driver sets the character device bit and the device number (st_dev) to 0,0.

"A whiteout is created as a character device with 0/0 device number" ref: https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html

In the ExtFileEntry class, this bit looks to be masked out:

https://github.com/log2timeline/dfvfs/blob/4a84328e889a75612658d0a1217220f1187154ef/dfvfs/vfs/ext_file_entry.py#L134

In the StatAttribute class, support for the device number is under consideration:

https://github.com/log2timeline/dfvfs/blob/4a84328e889a75612658d0a1217220f1187154ef/dfvfs/vfs/attribute.py#L49

sydp avatar Apr 19 '22 06:04 sydp

@sydp you likely want to add it to https://github.com/log2timeline/dfvfs/blob/4a84328e889a75612658d0a1217220f1187154ef/dfvfs/vfs/ext_file_entry.py#L22

But you would need to check what the behavior on other file systems is and what functionality we would need

joachimmetz avatar Apr 19 '22 06:04 joachimmetz

@sydp you likely want to add it to

https://github.com/log2timeline/dfvfs/blob/4a84328e889a75612658d0a1217220f1187154ef/dfvfs/vfs/ext_file_entry.py#L22

But you would need to check what the behavior on other file systems is and what functionality we would need

Ah great, thanks @joachimmetz.

I'll look into it - currently only have test data for EXT4.

sydp avatar Apr 19 '22 06:04 sydp