bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling case modification the Volume Descriptor fields...


From: Thomas Schmitt
Subject: Re: Disabling case modification the Volume Descriptor fields...
Date: Tue, 27 Apr 2021 16:19:09 +0200

Hi,

> I was hoping the [...] -ecma119 and -compliance rules might change
> the case folding behavior: [...]
> -ecma119_map unmapped -compliance untranslated_names

Both don't apply to writing of volume descriptor fields.
-ecma119_map is for reading of file names from existing ISO 9660 filesystems.
-compliance rule "untranslated_names" is for ECMA-119 file names during
writing.


> the Publisher Identifier field is supposed to be a strA that allows mixed
> case

ECMA-119 does not allow mixed case with its a-characters.

It says in 7.4.1 that a-characters are ECMA-6 characters
"2/0 to 2/2 , 2/5 to 2/15 , 3/0 to 3/15 , 4/1 to 4/15 , 5/0 to 5/10 , 5/15".
The 2-dimensional coordinates refer to horizontal and vertical positions
in Appendix A.
The second table in Appendix A is so nice to highlight the a-characters
and to shade the lower case letters a to z (6/1 to 7/10).

This matches what i see at https://wiki.osdev.org/ISO_9660 .

----------------------------------------------------------------------

This raises the question why xorriso and libisofs tolerate deviations
of the specs with at least Volume Id. After some grepping i see in
libisofs/ecma119.c function ecma119_writer_write_vol_desc() that
only two fields get an exemption from the rule:

    if (t->opts->relaxed_vol_atts) {
        vol_id = get_relaxed_vol_id(t, image->volume_id);
        volset_id = get_relaxed_vol_id(t, image->volset_id);
    } else {
        str2d_char(t->input_charset, image->volume_id, &vol_id);
        str2d_char(t->input_charset, image->volset_id, &volset_id);
    }
    str2a_char(t->input_charset, image->publisher_id, &pub_id);

Option relaxed_vol_atts gets set by iso_write_opts_set_relaxed_vol_atts()
which libisoburn sets to 1 unconditionally.

So:

> Is there a way to completely disable case modification in the Volume
> Descriptor fields?

Currently not.
There is no libisofs setting to lift the restrictions like with the two
exempted fields.

You could hack your local copy of libisofs, which is part of GNU xorriso.
(To hack your local libisofs.so might be more administrative effort.)
The function get_relaxed_vol_id() does not check for oversize and thus
would not block your case. So it would work if you change above code snippet
to become:

    if (t->opts->relaxed_vol_atts) {
        vol_id = get_relaxed_vol_id(t, image->volume_id);
        volset_id = get_relaxed_vol_id(t, image->volset_id);
        pub_id = get_relaxed_vol_id(t, image->publisher_id);
    } else {
        str2d_char(t->input_charset, image->volume_id, &vol_id);
        str2d_char(t->input_charset, image->volset_id, &volset_id);
        str2a_char(t->input_charset, image->publisher_id, &pub_id);
    }


I will have to consider whether -compliance should get rules to relax fields
other than volid and volset, and whether there should be a rule to avoid
any relaxation of PVD fields.
The reason for the existing exemption is probably a legacy from mkisofs,
which i had to carry on because distro ISOs depended on this tolerance.

I just tested with genisoimage that it lets pass mixed case strings
from -publisher into the PVD of the resulting ISO.
Now i have someting to think on ...


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]