You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not exactly sure if the root of the problem lies in the file we got or in the way debugfs is implemented, but we end up with a directory that looks like this after debugfs stopped shouting at us that it failed changing ownership.
The -p parameter in dump_inode corresponds to preserve, a mode in which debugfs will do its best to preserve permissions and ownership of the files.
The problem is that rdump does not expose such a flag and implicitly considers the preserve flag to be set to 1. In rdump_inode, the following call is made:
if (dump_file("rdump", ino, fd, 1, fullname) !=0) {
we don't want to preserve permissions with unblob, because it leads to all kinds of noise with corrupted file systems or filesystems where all the files are owned by root
the call to dump_file done by rdump_inode with an implicit preserve flag is really bad design
This can happen if we have r, but not x permission for a directory: its content can be enumerated (read) as names, but access to details (inode) is restricted.
The Origins
I'm not exactly sure if the root of the problem lies in the file we got or in the way
debugfs
is implemented, but we end up with a directory that looks like this afterdebugfs
stopped shouting at us that it failed changing ownership.Command "Design"
debugfs
implements two dumping commands:dump
ordump_inode
: works on filesrdump
: works on directoriesThe two interfaces differ:
The
-p
parameter indump_inode
corresponds topreserve
, a mode in whichdebugfs
will do its best to preserve permissions and ownership of the files.The problem is that
rdump
does not expose such a flag and implicitly considers thepreserve
flag to be set to 1. Inrdump_inode
, the following call is made:With the definition of being:
So we have two problems here:
dump_file
done byrdump_inode
with an implicitpreserve
flag is really bad designFix ?
A naive fix is this one:
But the
rdump
interface must be modified to accept apreserve
flag so that we can explicitly tell it not to preserve with unblob.The text was updated successfully, but these errors were encountered: