|
In xa.c const char *
iso9660_get_xa_attr_str (uint16_t xa_attr)
{
// snip..
/* Hack alert: wonder if this should be ROTH and XOTH? */
result[ 9] = (xa_attr & XA_PERM_XSYS) ? 'x' : '-';
result[10] = (xa_attr & XA_PERM_RSYS) ? 'r' : '-';
// ..snip
}
posix_mode_t
iso9660_get_posix_filemode_from_xa(uint16_t i_perms)
{
// snip..
#ifdef S_IROTH
if (i_perms & XA_PERM_ROTH) mode |= S_IROTH;
#endif
#ifdef S_IXOTH
if (i_perms & XA_PERM_XOTH) mode |= S_IXOTH;
#endif
// ..snip
}The bitflags used for determining the mode bits for the "other" user is inconsistent between these two functions. Here's some documentation I could find on this: cdrom-xa It seems there are four levels of a user, and I'm not sure which should be used for interpreting these in a POSIX manner not just for the "other" user, but in general. I've tried making a few ISO files with XA using # Create a test file
touch foo
# create an iso file with xa and r+x mode bits for owner
mkisofs -file-mode 0500 -xa -o xa.iso foo
# view it with iso-info
iso-info -l xa.iso
# Output shows r+x set for others, instead of owner:
# ----1----xr 0 0 [fn 00] [LSN 25] 0 Jun 05 2026 10:14:10 foo
# do the same, but change the mode bits, set r+x for group
mkisofs -file-mode 0050 -xa -o xa.iso foo
# view it with iso-info
iso-info -l xa.iso
# Output shows r+x set for owner, instead of group:
# ----1xr---- 0 0 [fn 00] [LSN 25] 0 Jun 05 2026 10:14:10 fooI'm not sure if |
Replies: 2 comments 3 replies
|
According to this source: The file attributes must be interpreted as: However, in xa.h: typedef enum {
ISO_XA_MARKER_OFFSET = 1024,
XA_PERM_RSYS = 0x0001, /**< System Group Read */
XA_PERM_XSYS = 0x0004, /**< System Group Execute */
XA_PERM_RUSR = 0x0010, /**< User (owner) Read */
XA_PERM_XUSR = 0x0040, /**< User (owner) Execute */
XA_PERM_RGRP = 0x0100, /**< Group Read */
XA_PERM_XGRP = 0x0400, /**< Group Execute */
XA_PERM_ROTH = 0x1000, /**< Other (world) Read */
XA_PERM_XOTH = 0x4000, /**< Other (world) Execute */
// ..snip..
} xa_misc_enum_t;This does not match with the documentation.
This interpretation is also consistent with the output of |
Fixed in #56