[Pkg-libburnia-devel] Bug#1010098: xorriso: please allow -cut-out directly from block devices

Thomas Schmitt scdbackup at gmx.net
Thu May 26 13:49:06 BST 2022


Hi,

Ivan Shmakov wrote:
> An alternative would be to check if it’s possible to seek to
> specified positions rather than to the end of file; e. g.:

I see at least the problem that the end position of -cut_out
(byte_offset + byte_count + 1) is allowed to be unrealisticly high in
order to simply address the end of the file.
This means that xorriso and libisofs need to know this end.

I will have to think whether a file is usable which does not return
success on lseek(,,SEEK_END) but on lseek(,desired_size,SEEK_SET)
... and whether all size inquirers can know the desired_size ...


> > Please give the code a thorough test, especially with weird
 > -cut_out arguments.

> This looks like a job for a test suite.  I gather there’s
> none as of yet?

There were visits by the American Fuzzy Lop.
It is an art of its own to design tests which catch unexpected bugs.


> Meanwhile, I’ve noticed that the files created via -cut-out
> inherit the permissions and m-time of the original file.
> The former might be reasonable, but the latter doesn’t seem
> to make much sense, at least for device files (whose m-times
> tend to have no relation to their content proper.)

It's for backup fidelity. osirrox command -paste_in can be used to restore
a file that was stored as several -cut_out pieces.

(This raises the question whether -paste_in works with devices ...
... No, it insists in regular files. Another thing to think about.)

If you want other timestamps, use command -alter_date (+0 = right now).


> Worse still, if the target file is created in a yet-nonexistent
> directory, the directory created inherits the permissions
> of the source file as well (only adding +x where there’s r.)

This looks like a bug. Actually it should copy the permissions from the
parent directories in the -cut_out disk_path, like command -map does.
But indeed the non-x permissions are taken from the data file itself.
I will investigate (and try to remember what i did 14 years ago, as
i suspect command -split_size to be the regular customer of this surprise
feature).


Have a nice day :)

Thomas



More information about the Pkg-libburnia-devel mailing list