From 379475366261293de86ea29b4b0a3ca0eff40c4d Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 15 Nov 2017 11:10:33 +0100 Subject: [PATCH] Enabling non-user xattr namespaces with -getfattr and -setfattr --- xorriso/iso_manip.c | 63 ++++++++- xorriso/iso_tree.c | 16 ++- xorriso/text_io.c | 2 +- xorriso/xorriso.1 | 37 ++++-- xorriso/xorriso.info | 253 +++++++++++++++++++----------------- xorriso/xorriso.texi | 37 ++++-- xorriso/xorriso_timestamp.h | 2 +- 7 files changed, 253 insertions(+), 157 deletions(-) diff --git a/xorriso/iso_manip.c b/xorriso/iso_manip.c index 2f48f6f5..e33ecb92 100644 --- a/xorriso/iso_manip.c +++ b/xorriso/iso_manip.c @@ -1,7 +1,7 @@ /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. - Copyright 2007-2016 Thomas Schmitt, + Copyright 2007-2017 Thomas Schmitt, Provided under GPL version 2 or later. @@ -2127,11 +2127,19 @@ ex:; @return >0 success , <=0 failure */ int Xorriso_setfattr(struct XorrisO *xorriso, void *in_node, char *path, - size_t num_attrs, char **names, - size_t *value_lengths, char **values, int flag) + size_t in_num_attrs, char **in_names, + size_t *in_value_lengths, char **in_values, int flag) { - int ret; + int ret, block_isofs= 0, in_original= 1; + size_t i, j, num_attrs; IsoNode *node; + char **names, **values; + size_t *value_lengths; + + num_attrs= in_num_attrs; + names= in_names; + value_lengths= in_value_lengths; + values= in_values; node= (IsoNode *) in_node; if(node == NULL) { @@ -2139,8 +2147,46 @@ int Xorriso_setfattr(struct XorrisO *xorriso, void *in_node, char *path, if(ret<=0) goto ex; } + if((xorriso->do_aaip & 1024) && !(flag & 8)) { + flag|= 8; + block_isofs= 1; + for(i= 0; i < in_num_attrs; i++) { + if(strncmp(in_names[i], "isofs.", 6) == 0) { + if(in_original) { + strcpy(xorriso->info_text, + "Attempt to set xattr from namespace \"isofs\" to "); + Text_shellsafe(path, xorriso->info_text, 1); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + ret= Xorriso_eval_problem_status(xorriso, 0, 0); + if(ret < 0) { + ret= 0; goto ex; + } + /* Switch to copy mode and omit isofs names */ + Xorriso_alloc_meM(names, char *, num_attrs); + Xorriso_alloc_meM(value_lengths, size_t, num_attrs); + Xorriso_alloc_meM(values, char *, num_attrs); + in_original= 0; + for(j= 0; j < i; j++) { + names[j]= in_names[j]; + value_lengths[j]= in_value_lengths[j]; + values[j]= in_values[j]; + } + num_attrs= i; + } + } else if(!in_original) { + names[num_attrs]= in_names[i]; + value_lengths[num_attrs]= in_value_lengths[i]; + values[num_attrs]= in_values[i]; + num_attrs++; + } + } + } + if(num_attrs <= 0) { + ret= 1; goto ex; + } + ret= iso_node_set_attrs(node, num_attrs, names, value_lengths, values, - flag & (1 | 2 | 4 | 8)); + (flag & (1 | 2 | 4 | 8)) | (block_isofs << 4)); Xorriso_process_msg_queues(xorriso,0); if(ret <= 0) { Xorriso_report_iso_error(xorriso, "", ret, @@ -2156,7 +2202,12 @@ int Xorriso_setfattr(struct XorrisO *xorriso, void *in_node, char *path, Xorriso_set_change_pending(xorriso, 0); ret= 1; ex:; - Xorriso_process_msg_queues(xorriso,0); + Xorriso_process_msg_queues(xorriso, 0); + if(!in_original) { + Xorriso_free_meM(names); + Xorriso_free_meM(value_lengths); + Xorriso_free_meM(values); + } return(ret); } diff --git a/xorriso/iso_tree.c b/xorriso/iso_tree.c index 2aafca5c..2059c786 100644 --- a/xorriso/iso_tree.c +++ b/xorriso/iso_tree.c @@ -813,7 +813,8 @@ too_long: /* @param flag bit0= do not report to result but only retrieve attr text bit1= path is disk_path - bit3= do not ignore eventual non-user attributes. + bit3= do not ignore non-user attributes + bit4= ignore isofs. attributes despite bit3 bit5= in case of symbolic link on disk: inquire link target bit6= check for existence of xattr, return 0 or 1 (depends also on bit3) @@ -827,6 +828,8 @@ int Xorriso_getfattr(struct XorrisO *xorriso, void *in_node, char *path, if(attr_text != NULL) *attr_text= NULL; + if((xorriso->do_aaip & 1024) && !(flag & 8)) + flag|= 8 | 16; ret= Xorriso_get_attrs(xorriso, in_node, path, &num_attrs, &names, &value_lengths, &values, flag & (2 | 8 | 32)); if(ret <= 0) @@ -852,6 +855,9 @@ int Xorriso_getfattr(struct XorrisO *xorriso, void *in_node, char *path, } } for(i= 0; i < (int) num_attrs; i++) { + if(flag & 16) + if(strncmp(names[i], "isofs.", 6) == 0) + continue; if(strlen(names[i]) + value_lengths[i] >= SfileadrL) { sprintf(xorriso->result_line, "# oversized: name %d , value %d bytes\n", (int) strlen(names[i]), (int) value_lengths[i]); @@ -880,6 +886,14 @@ int Xorriso_getfattr(struct XorrisO *xorriso, void *in_node, char *path, } } } + if((flag & 16) && attr_text != NULL) + if(*attr_text != NULL) + if((*attr_text)[0] == 0) { + free(*attr_text); + *attr_text= NULL; + ret= 2; + goto ex; + } if(!(flag & 1)) { strcpy(xorriso->result_line, "\n"); Xorriso_result(xorriso, 0); diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 49893bb2..414d2871 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -3697,7 +3697,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) Xorriso_status_result(xorriso,filter,fp,flag&2); is_default= ((xorriso->do_aaip & (2 | 8)) == 0); sprintf(line,"-xattr %s\n", (xorriso->do_aaip & 4 ? - xorriso->do_aaip & 1024 ? "any" : "on" + xorriso->do_aaip & 1024 ? "any" : "user" : "off")); if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 306a5531..7f171708 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -9,7 +9,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH XORRISO 1 "Version 1.4.9, Oct 10, 2017" +.TH XORRISO 1 "Version 1.4.9, Nov 12, 2017" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -468,7 +468,7 @@ able to represent them and \fBxorriso\fR can record and restore them. .br But be aware that pairs with names of non\-user namespaces are not necessarily portable between operating systems and not even between filesystems. -I.e. only those which begin with "user.", like "user.x" or "user.whatever", +Only those which begin with "user.", like "user.x" or "user.whatever", can unconditionally be expected to be appropriate on other machines and disks. Processing of other xattr may need administrator privileges. .br @@ -947,7 +947,9 @@ Mode "any" processes attributes of all namespaces. This might need adminstrator privileges, even if the owner of the disk file tries to read or write the attributes. .br -Note that xattr from namespace "isofs." are never restored to disk. +Note that xattr from namespace "isofs." are never read from disk or restored +to disk. Further it is not possible to set them via xorriso xattr manipulation +commands. .TP \fB\-md5\fR "on"|"all"|"off"|"load_check_off" Enable or disable processing of MD5 checksums for the overall session and for @@ -1748,8 +1750,11 @@ then all user namespace xattr of the given iso_rr_paths get deleted. In case of deletion, value must be an empty text. .br -Only names from the user namespace are allowed. I.e. a name has to begin with -"user.", like "user.x" or "user.whatever". +Which names are permissible depends on the setting of command \-xattr. +"on" or "user" restricts them to namespace "user". I.e. a name has to look +like "user.x" or "user.whatever". +.br +\-xattr setting "any" enables names from all namespaces except "isofs". .br Values and names undergo the normal input processing of \fBxorriso\fR. See also command \-backslash_codes. Other than with command \-setfattr_list, @@ -1759,9 +1764,12 @@ the byte value 0 cannot be expressed via \-setfattr. Like \-setfattr but affecting all files below eventual directories. .TP \fB\-setfattr_list\fR disk_path -Read the output of \-getfattr_r or shell command getfattr \-Rd and apply it to -the iso_rr_paths as given in lines beginning with "# file:". All previously -existing user space xattr of the given iso_rr_paths will be deleted. +Read the output format of \-getfattr_r or shell command getfattr \-Rd and apply +it to the iso_rr_paths as given in lines beginning with "# file:". +All previously existing xattr of the acceptable namespaces will be deleted +before the new xattr get attached. The set of acceptable names depends on the +setting of command \-xattr. +.br If disk_path is "\-" then lines are read from standard input. .br Since \-getfattr and getfattr \-Rd strip leading "/" from file paths, the setting @@ -1773,8 +1781,7 @@ the pending iso_rr_path. Other input lines must have the form .br name="value" .br -Name must be from user namespace. I.e. user.xyz where xyz should consist of -printable characters only. The separator "=" is not allowed in names. +The separator "=" is not allowed in names. Value may contain any kind of bytes. It must be in quotes. Trailing whitespace after the end quote will be ignored. Non\-printables bytes and quotes must be represented as \\XYZ by their octal 8\-bit code XYZ. @@ -2150,8 +2157,9 @@ ACL is given in text form as defined with command \-setfacl. E.g.: \-exec setfacl u:lisa:rw,u::rw,g::r,o::\-,m::rw \-\- .br \fBgetfattr\fR -prints xattr name\-value pairs from user namespace -to the result channel. +prints xattr name\-value pairs to the result channel. The choice of namespaces +depends on the setting of command \-xattr: "on" or "user" restricts it to the +namespace "user", "any" only omits namespace "isofs". .br \fBget_any_xattr\fR prints xattr name\-value pairs from any namespace @@ -4351,9 +4359,12 @@ directories. \fB\-getfattr\fR iso_rr_pattern [***] Print the xattr of the given files in the ISO image. If a file has no such xattr then noting is printed for it. +The choice of namespaces +depends on the setting of command \-xattr: "on" or "user" restricts it to +namespace "user", "any" only omits namespace "isofs". .TP \fB\-getfattr_r\fR iso_rr_pattern [***] -Like \-gefattr but listing recursively the whole file trees underneath eventual +Like \-gefattr but listing recursively the whole file trees underneath of directories. .TP \fB\-du\fR iso_rr_pattern [***] diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index 6cfc85e3..2da1c79f 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -408,8 +408,8 @@ attached to file objects. AAIP is able to represent them and 'xorriso' can record and restore them. But be aware that pairs with names of non-user namespaces are not necessarily portable between operating systems and not even between -filesystems. I.e. only those which begin with "user.", like "user.x" -or "user.whatever", can unconditionally be expected to be appropriate on +filesystems. Only those which begin with "user.", like "user.x" or +"user.whatever", can unconditionally be expected to be appropriate on other machines and disks. Processing of other xattr may need administrator privileges. Name has to be a 0 terminated string. Value may be any array of bytes @@ -856,8 +856,9 @@ activate them only after image loading. Mode "any" processes attributes of all namespaces. This might need adminstrator privileges, even if the owner of the disk file tries to read or write the attributes. - Note that xattr from namespace "isofs." are never restored to - disk. + Note that xattr from namespace "isofs." are never read from disk + or restored to disk. Further it is not possible to set them via + xorriso xattr manipulation commands. -md5 "on"|"all"|"off"|"load_check_off" Enable or disable processing of MD5 checksums for the overall session and for each single data file. If enabled then images with @@ -1522,19 +1523,23 @@ whether they stem from the loaded image or were newly inserted. "--remove-all" then all user namespace xattr of the given iso_rr_paths get deleted. In case of deletion, value must be an empty text. - Only names from the user namespace are allowed. I.e. a name has - to begin with "user.", like "user.x" or "user.whatever". + Which names are permissible depends on the setting of command + -xattr. "on" or "user" restricts them to namespace "user". I.e. + a name has to look like "user.x" or "user.whatever". + -xattr setting "any" enables names from all namespaces except + "isofs". Values and names undergo the normal input processing of 'xorriso'. See also command -backslash_codes. Other than with command -setfattr_list, the byte value 0 cannot be expressed via -setfattr. -setfattr_r [-]name value iso_rr_path [***] Like -setfattr but affecting all files below eventual directories. -setfattr_list disk_path - Read the output of -getfattr_r or shell command getfattr -Rd and - apply it to the iso_rr_paths as given in lines beginning with "# - file:". All previously existing user space xattr of the given - iso_rr_paths will be deleted. If disk_path is "-" then lines are - read from standard input. + Read the output format of -getfattr_r or shell command getfattr -Rd + and apply it to the iso_rr_paths as given in lines beginning with + "# file:". All previously existing xattr of the acceptable + namespaces will be deleted before the new xattr get attached. The + set of acceptable names depends on the setting of command -xattr. + If disk_path is "-" then lines are read from standard input. Since -getfattr and getfattr -Rd strip leading "/" from file paths, the setting of -cd does always matter. Empty input lines and lines which begin by "#" will be ignored @@ -1542,12 +1547,11 @@ whether they stem from the loaded image or were newly inserted. changing the pending iso_rr_path. Other input lines must have the form name="value" - Name must be from user namespace. I.e. user.xyz where xyz should - consist of printable characters only. The separator "=" is not - allowed in names. Value may contain any kind of bytes. It must be - in quotes. Trailing whitespace after the end quote will be - ignored. Non-printables bytes and quotes must be represented as - \XYZ by their octal 8-bit code XYZ. Use code \000 for 0-bytes. + The separator "=" is not allowed in names. Value may contain any + kind of bytes. It must be in quotes. Trailing whitespace after + the end quote will be ignored. Non-printables bytes and quotes + must be represented as \XYZ by their octal 8-bit code XYZ. Use code + \000 for 0-bytes. -alter_date type timestring iso_rr_path [***] Alter the date entries of files in the ISO image. type may be one of the following: @@ -1849,8 +1853,10 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands given in text form as defined with command -setfacl. E.g.: -exec setfacl u:lisa:rw,u::rw,g::r,o::-,m::rw -- getfattr - prints xattr name-value pairs from user namespace to the - result channel. + prints xattr name-value pairs to the result channel. The + choice of namespaces depends on the setting of command -xattr: + "on" or "user" restricts it to the namespace "user", "any" + only omits namespace "isofs". get_any_xattr prints xattr name-value pairs from any namespace except ACL to the result channel. This is mostly for debugging of namespace @@ -3653,10 +3659,13 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Command underneath eventual directories. -getfattr iso_rr_pattern [***] Print the xattr of the given files in the ISO image. If a file has - no such xattr then noting is printed for it. + no such xattr then noting is printed for it. The choice of + namespaces depends on the setting of command -xattr: "on" or "user" + restricts it to namespace "user", "any" only omits namespace + "isofs". -getfattr_r iso_rr_pattern [***] Like -gefattr but listing recursively the whole file trees - underneath eventual directories. + underneath of directories. -du iso_rr_pattern [***] Recursively list size of directories and files in the ISO image which match one of the patterns. similar to shell command du -k. @@ -5236,8 +5245,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -acl controls handling of ACLs: Loading. (line 171) * -add inserts one or more paths: Insert. (line 44) * -add_plainly inserts one or more paths: Insert. (line 68) -* -alter_date sets timestamps in ISO image: Manip. (line 136) -* -alter_date_r sets timestamps in ISO image: Manip. (line 171) +* -alter_date sets timestamps in ISO image: Manip. (line 139) +* -alter_date_r sets timestamps in ISO image: Manip. (line 174) * -append_partition adds arbitrary file after image end: Bootable. (line 415) * -application_id sets application id: SetWrite. (line 191) @@ -5246,11 +5255,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -assert_volid rejects undesired images: Loading. (line 111) * -auto_charset learns character set from image: Loading. (line 123) * -backslash_codes enables backslash conversion: Scripting. (line 71) -* -ban_stdio_write demands real drive: Loading. (line 333) +* -ban_stdio_write demands real drive: Loading. (line 334) * -biblio_file sets biblio file name: SetWrite. (line 250) * -blank erases media: Writing. (line 57) * -boot_image controls bootability: Bootable. (line 75) -* -calm_drive reduces drive activity: Loading. (line 323) +* -calm_drive reduces drive activity: Loading. (line 324) * -cd sets working directory in ISO: Navigate. (line 7) * -cdx sets working directory on disk: Navigate. (line 15) * -changes_pending overrides change status: Writing. (line 12) @@ -5271,9 +5280,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -close_filter_list bans filter registration: Filter. (line 50) * -commit writes pending ISO image: Writing. (line 27) * -commit_eject writes and ejects: Writing. (line 53) -* -compare reports ISO/disk differences: Navigate. (line 128) -* -compare_l reports ISO/disk differences: Navigate. (line 144) -* -compare_r reports ISO/disk differences: Navigate. (line 140) +* -compare reports ISO/disk differences: Navigate. (line 131) +* -compare_l reports ISO/disk differences: Navigate. (line 147) +* -compare_r reports ISO/disk differences: Navigate. (line 143) * -compliance controls standard compliance: SetWrite. (line 56) * -concat copies ISO file content: Restore. (line 118) * -copyright_file sets copyright file name: SetWrite. (line 239) @@ -5284,24 +5293,24 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -cp_rx copies file trees to disk: Restore. (line 103) * -cp_rx copies file trees to disk <1>: Restore. (line 111) * -cut_out inserts piece of data file: Insert. (line 139) -* -data_cache_size adjusts read cache size: Loading. (line 349) +* -data_cache_size adjusts read cache size: Loading. (line 350) * -dev acquires one drive for input and output: AqDrive. (line 12) * -devices gets list of drives: Inquiry. (line 7) * -device_links gets list of drives: Inquiry. (line 17) * -dialog enables dialog mode: DialogCtl. (line 7) -* -disk_dev_ino fast incremental backup: Loading. (line 243) +* -disk_dev_ino fast incremental backup: Loading. (line 244) * -disk_pattern controls pattern expansion: Insert. (line 34) * -displacement compensate altered image start address: Loading. (line 57) * -drive_class controls drive accessability: Loading. (line 73) -* -du show directory size in ISO image: Navigate. (line 75) +* -du show directory size in ISO image: Navigate. (line 78) * -dummy controls write simulation: SetWrite. (line 393) -* -dus show directory size in ISO image: Navigate. (line 78) -* -dusx show directory size on disk: Navigate. (line 85) -* -dux show directory size on disk: Navigate. (line 81) +* -dus show directory size in ISO image: Navigate. (line 81) +* -dusx show directory size on disk: Navigate. (line 88) +* -dux show directory size on disk: Navigate. (line 84) * -dvd_obs set write block size: SetWrite. (line 330) -* -early_stdio_test classifies stdio drives: Loading. (line 337) -* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 231) +* -early_stdio_test classifies stdio drives: Loading. (line 338) +* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 232) * -eject ejects drive tray: Writing. (line 50) * -end writes pending session and ends program: Scripting. (line 151) * -errfile_log logs problematic disk files: Scripting. (line 116) @@ -5312,24 +5321,24 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -extract_cut copies file piece to disk: Restore. (line 80) * -extract_l copies files to disk: Restore. (line 76) * -extract_single copies file to disk: Restore. (line 73) -* -file_name_limit curbs length of file names: Loading. (line 263) +* -file_name_limit curbs length of file names: Loading. (line 264) * -file_size_limit limits data file size: SetInsert. (line 7) * -find traverses and alters ISO tree: CmdFind. (line 7) -* -findx traverses disk tree: Navigate. (line 88) +* -findx traverses disk tree: Navigate. (line 91) * -follow softlinks and mount points: SetInsert. (line 69) * -format formats media: Writing. (line 87) -* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 217) +* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 218) * -fs sets size of fifo: SetWrite. (line 396) * -getfacl shows ACL in ISO image: Navigate. (line 60) * -getfacl_r shows ACL in ISO image: Navigate. (line 66) * -getfattr shows xattr in ISO image: Navigate. (line 69) -* -getfattr_r shows xattr in ISO image: Navigate. (line 72) +* -getfattr_r shows xattr in ISO image: Navigate. (line 75) * -gid sets global ownership: SetWrite. (line 287) * -grow_blindly overides next writeable address: AqDrive. (line 60) * -hardlinks controls handling of hard links: Loading. (line 134) * -help prints help text: Scripting. (line 19) * -hfsplus enables production of HFS+ partition: SetWrite. (line 14) -* -hide excludes file names from directory trees: Manip. (line 174) +* -hide excludes file names from directory trees: Manip. (line 177) * -history brings text into readline history: Scripting. (line 42) * -indev acquires a drive for input: AqDrive. (line 23) * -in_charset sets input character set: Loading. (line 118) @@ -5360,7 +5369,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -map_l inserts paths from disk file: Insert. (line 96) * -map_single inserts path: Insert. (line 93) * -mark sets synchronizing message: Frontend. (line 23) -* -md5 controls handling of MD5 sums: Loading. (line 189) +* -md5 controls handling of MD5 sums: Loading. (line 190) * -mkdir creates ISO directory: Insert. (line 177) * -modesty_on_drive keep drive buffer hungry: SetWrite. (line 336) * -mount issues mount command for ISO session: Restore. (line 146) @@ -5417,7 +5426,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top (line 51) * -rollback discards pending changes: Writing. (line 9) * -rollback_end ends program without writing: Scripting. (line 154) -* -rom_toc_scan searches for sessions: Loading. (line 295) +* -rom_toc_scan searches for sessions: Loading. (line 296) * -rr_reloc_dir sets name of relocation directory: SetWrite. (line 144) * -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 179) * -scsi_dev_family choose Linux device file type: AqDrive. (line 43) @@ -5428,12 +5437,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -setfacl_list sets ACL in ISO image: Manip. (line 94) * -setfacl_r sets ACL in ISO image: Manip. (line 92) * -setfattr sets xattr in ISO image: Manip. (line 103) -* -setfattr_list sets xattr in ISO image: Manip. (line 117) -* -setfattr_r sets xattr in ISO image: Manip. (line 115) +* -setfattr_list sets xattr in ISO image: Manip. (line 120) +* -setfattr_r sets xattr in ISO image: Manip. (line 118) * -set_filter applies filter to file: Filter. (line 58) * -set_filter_r applies filter to file tree: Filter. (line 84) -* -show_stream shows data source and filters: Navigate. (line 148) -* -show_stream_r shows data source and filters: Navigate. (line 161) +* -show_stream shows data source and filters: Navigate. (line 151) +* -show_stream_r shows data source and filters: Navigate. (line 164) * -sh_style_result makes results look more like shell: Scripting. (line 61) * -signal_handling controls handling of system signals: Exception. @@ -5491,8 +5500,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Appended partition, in MBR or GPT: Bootable. (line 276) * Automatic execution order, of arguments, -x: ArgSort. (line 16) * Backslash Interpretation, _definition: Processing. (line 53) -* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 243) -* Backup, enable features, -for_backup: Loading. (line 217) +* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 244) +* Backup, enable features, -for_backup: Loading. (line 218) * Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 179) * Blank media, _definition: Media. (line 29) * Blank, format, Immed bit, -use_immed_bit: SetWrite. (line 374) @@ -5530,8 +5539,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Directory, delete, -rmdir: Manip. (line 29) * disk_path, _definition: Insert. (line 6) * Drive, accessability, -drive_class: Loading. (line 73) -* Drive, classify stdio, -early_stdio_test: Loading. (line 337) -* Drive, demand real MMC, -ban_stdio_write: Loading. (line 333) +* Drive, classify stdio, -early_stdio_test: Loading. (line 338) +* Drive, demand real MMC, -ban_stdio_write: Loading. (line 334) * Drive, eject tray, -eject: Writing. (line 50) * Drive, for input and output, -dev: AqDrive. (line 12) * Drive, for input, -indev: AqDrive. (line 23) @@ -5539,7 +5548,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Drive, get drive list, -devices: Inquiry. (line 7) * Drive, get drive list, -device_links: Inquiry. (line 17) * Drive, list supported media, -list_profiles: Writing. (line 177) -* Drive, reduce activity, -calm_drive: Loading. (line 323) +* Drive, reduce activity, -calm_drive: Loading. (line 324) * Drive, report SCSI commands, -scsi_log: Scripting. (line 143) * Drive, write and eject, -commit_eject: Writing. (line 53) * Drive, _definition: Drives. (line 6) @@ -5555,14 +5564,14 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Examples: Examples. (line 6) * extattr, _definition: Extras. (line 66) * File content, copy, -concat: Restore. (line 118) -* File names, curb length, -file_name_limit: Loading. (line 263) -* File names, if neither Rock Ridge nor Joliet: Loading. (line 231) +* File names, curb length, -file_name_limit: Loading. (line 264) +* File names, if neither Rock Ridge nor Joliet: Loading. (line 232) * Filter, apply to file tree, -set_filter_r: Filter. (line 84) * Filter, apply to file, -set_filter: Filter. (line 58) * Filter, ban registration, -close_filter_list: Filter. (line 50) * Filter, register, -external_filter: Filter. (line 20) -* Filter, show chain, -show_stream: Navigate. (line 148) -* Filter, show chains of tree, -show_stream_r: Navigate. (line 161) +* Filter, show chain, -show_stream: Navigate. (line 151) +* Filter, show chains of tree, -show_stream_r: Navigate. (line 164) * Filter, unregister, -unregister_filter: Filter. (line 47) * Filter, zisofs parameters, -zisofs: SetWrite. (line 290) * Filter, _definition: Filter. (line 6) @@ -5577,9 +5586,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Hard links, control handling, -hardlinks: Loading. (line 134) * HFS+ allocation block size: Bootable. (line 403) * HFS+ serial number: Bootable. (line 400) -* hidden, set in ISO image, -hide: Manip. (line 174) +* hidden, set in ISO image, -hide: Manip. (line 177) * HP-PA boot sector, production: Bootable. (line 375) -* Image reading, cache size, -data_cache_size: Loading. (line 349) +* Image reading, cache size, -data_cache_size: Loading. (line 350) * Image, demand volume ID, -assert_volid: Loading. (line 111) * Image, discard pending changes, -rollback: Writing. (line 9) * Image, filesystem to load, -read_fs: Loading. (line 102) @@ -5637,7 +5646,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * MBR bootable/active flag, enforce: Bootable. (line 343) * MBR, set, -boot_image system_area=: Bootable. (line 200) * MBR, _definition: Extras. (line 27) -* MD5, control handling, -md5: Loading. (line 189) +* MD5, control handling, -md5: Loading. (line 190) * Media, erase, -blank: Writing. (line 57) * Media, format, -format: Writing. (line 87) * Media, list formats, -list_formats: Writing. (line 129) @@ -5647,10 +5656,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Modifying, _definition: Methods. (line 28) * Multi-session media, _definition: Media. (line 7) * Multi-session, _definition: Model. (line 18) -* Navigate, directory size in ISO image, -du: Navigate. (line 75) -* Navigate, directory size in ISO image, -dus: Navigate. (line 78) -* Navigate, directory size in on disk, -dusx: Navigate. (line 85) -* Navigate, directory size in on disk, -dux: Navigate. (line 81) +* Navigate, directory size in ISO image, -du: Navigate. (line 78) +* Navigate, directory size in ISO image, -dus: Navigate. (line 81) +* Navigate, directory size in on disk, -dusx: Navigate. (line 88) +* Navigate, directory size in on disk, -dux: Navigate. (line 84) * Navigate, list disk files, -lsdlx: Navigate. (line 57) * Navigate, list disk files, -lsdx: Navigate. (line 51) * Navigate, list disk files, -lslx: Navigate. (line 54) @@ -5741,17 +5750,17 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * SUN SPARC boot images, activation: Bootable. (line 438) * Symbolic link, create, -lns: Insert. (line 181) * System area, _definition: Bootable. (line 200) -* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 295) +* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 296) * Table-of-content, show, -toc: Inquiry. (line 27) -* Timestamps, set in ISO image, -alter_date: Manip. (line 136) -* Timestamps, set in ISO image, -alter_date_r: Manip. (line 171) -* Tree, disk, traverse, -findx: Navigate. (line 88) +* Timestamps, set in ISO image, -alter_date: Manip. (line 139) +* Timestamps, set in ISO image, -alter_date_r: Manip. (line 174) +* Tree, disk, traverse, -findx: Navigate. (line 91) * Tree, ISO, traverse and alter, -find: CmdFind. (line 7) * UTF-16, for Joliet paths, -compliance: SetWrite. (line 108) * Verify, check blocks, -check_media: Verify. (line 21) -* Verify, compare ISO and disk file, -compare: Navigate. (line 128) -* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 140) -* Verify, compare ISO and disk, -compare_l: Navigate. (line 144) +* Verify, compare ISO and disk file, -compare: Navigate. (line 131) +* Verify, compare ISO and disk tree, -compare_r: Navigate. (line 143) +* Verify, compare ISO and disk, -compare_l: Navigate. (line 147) * Verify, file checksum, -check_md5: Verify. (line 164) * Verify, file tree checksums, -check_md5_r: Verify. (line 178) * Verify, preset -check_media, -check_media_defaults: Verify. (line 40) @@ -5777,10 +5786,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Write, TAO or SAO/DAO, -write_type: SetWrite. (line 417) * xattr, control handling, -xattr: Loading. (line 178) * xattr, set in ISO image, -setfattr: Manip. (line 103) -* xattr, set in ISO image, -setfattr_list: Manip. (line 117) -* xattr, set in ISO image, -setfattr_r: Manip. (line 115) +* xattr, set in ISO image, -setfattr_list: Manip. (line 120) +* xattr, set in ISO image, -setfattr_r: Manip. (line 118) * xattr, show in ISO image, -getfattr: Navigate. (line 69) -* xattr, show in ISO image, -getfattr_r: Navigate. (line 72) +* xattr, show in ISO image, -getfattr_r: Navigate. (line 75) * xattr, _definition: Extras. (line 66) @@ -5793,54 +5802,54 @@ Node: Media6346 Node: Methods9033 Node: Drives11619 Node: Extras15561 -Node: Processing20280 -Node: Dialog23915 -Node: Commands25604 -Node: ArgSort27281 -Node: AqDrive28775 -Node: Loading32889 -Node: Insert53913 -Node: SetInsert65416 -Node: Manip74848 -Node: CmdFind84807 -Node: Filter103579 -Node: Writing108201 -Node: SetWrite118357 -Node: Bootable143116 -Node: Jigdo169288 -Node: Charset173547 -Node: Exception176876 -Node: DialogCtl183005 -Node: Inquiry185607 -Node: Navigate194491 -Node: Verify202786 -Node: Restore212664 -Node: Emulation221277 -Node: Scripting231736 -Node: Frontend239519 -Node: Examples249145 -Node: ExDevices250323 -Node: ExCreate250984 -Node: ExDialog252284 -Node: ExGrowing253555 -Node: ExModifying254364 -Node: ExBootable254874 -Node: ExCharset255429 -Node: ExPseudo256325 -Node: ExCdrecord257252 -Node: ExMkisofs257572 -Node: ExGrowisofs258929 -Node: ExException260083 -Node: ExTime260541 -Node: ExIncBackup260999 -Node: ExRestore265025 -Node: ExRecovery265971 -Node: Files266543 -Node: Environ267877 -Node: Seealso268586 -Node: Bugreport269303 -Node: Legal269894 -Node: CommandIdx270906 -Node: ConceptIdx288240 +Node: Processing20274 +Node: Dialog23909 +Node: Commands25598 +Node: ArgSort27275 +Node: AqDrive28769 +Node: Loading32883 +Node: Insert54011 +Node: SetInsert65514 +Node: Manip74946 +Node: CmdFind85046 +Node: Filter103975 +Node: Writing108597 +Node: SetWrite118753 +Node: Bootable143512 +Node: Jigdo169684 +Node: Charset173943 +Node: Exception177272 +Node: DialogCtl183401 +Node: Inquiry186003 +Node: Navigate194887 +Node: Verify203344 +Node: Restore213222 +Node: Emulation221835 +Node: Scripting232294 +Node: Frontend240077 +Node: Examples249703 +Node: ExDevices250881 +Node: ExCreate251542 +Node: ExDialog252842 +Node: ExGrowing254113 +Node: ExModifying254922 +Node: ExBootable255432 +Node: ExCharset255987 +Node: ExPseudo256883 +Node: ExCdrecord257810 +Node: ExMkisofs258130 +Node: ExGrowisofs259487 +Node: ExException260641 +Node: ExTime261099 +Node: ExIncBackup261557 +Node: ExRestore265583 +Node: ExRecovery266529 +Node: Files267101 +Node: Environ268435 +Node: Seealso269144 +Node: Bugreport269861 +Node: Legal270452 +Node: CommandIdx271464 +Node: ConceptIdx288798  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index 20c6fc7e..35b1e62a 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.texi @@ -50,7 +50,7 @@ @c man .\" First parameter, NAME, should be all caps @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" other parameters are allowed: see man(7), man(1) -@c man .TH XORRISO 1 "Version 1.4.9, Oct 10, 2017" +@c man .TH XORRISO 1 "Version 1.4.9, Nov 12, 2017" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -617,7 +617,7 @@ able to represent them and @command{xorriso} can record and restore them. @* But be aware that pairs with names of non-user namespaces are not necessarily portable between operating systems and not even between filesystems. -I.e. only those which begin with "user.", like "user.x" or "user.whatever", +Only those which begin with "user.", like "user.x" or "user.whatever", can unconditionally be expected to be appropriate on other machines and disks. Processing of other xattr may need administrator privileges. @* @@ -1191,7 +1191,9 @@ Mode "any" processes attributes of all namespaces. This might need adminstrator privileges, even if the owner of the disk file tries to read or write the attributes. @* -Note that xattr from namespace "isofs." are never restored to disk. +Note that xattr from namespace "isofs." are never read from disk or restored +to disk. Further it is not possible to set them via xorriso xattr manipulation +commands. @c man .TP @item -md5 "on"|"all"|"off"|"load_check_off" @kindex -md5 controls handling of MD5 sums @@ -2124,8 +2126,11 @@ then all user namespace xattr of the given iso_rr_paths get deleted. In case of deletion, value must be an empty text. @* -Only names from the user namespace are allowed. I.e. a name has to begin with -"user.", like "user.x" or "user.whatever". +Which names are permissible depends on the setting of command -xattr. +"on" or "user" restricts them to namespace "user". I.e. a name has to look +like "user.x" or "user.whatever". +@* +-xattr setting "any" enables names from all namespaces except "isofs". @* Values and names undergo the normal input processing of @command{xorriso}. See also command -backslash_codes. Other than with command -setfattr_list, @@ -2139,9 +2144,12 @@ Like -setfattr but affecting all files below eventual directories. @item -setfattr_list disk_path @kindex -setfattr_list sets xattr in ISO image @cindex xattr, set in ISO image, -setfattr_list -Read the output of -getfattr_r or shell command getfattr -Rd and apply it to -the iso_rr_paths as given in lines beginning with "# file:". All previously -existing user space xattr of the given iso_rr_paths will be deleted. +Read the output format of -getfattr_r or shell command getfattr -Rd and apply +it to the iso_rr_paths as given in lines beginning with "# file:". +All previously existing xattr of the acceptable namespaces will be deleted +before the new xattr get attached. The set of acceptable names depends on the +setting of command -xattr. +@* If disk_path is "-" then lines are read from standard input. @* Since -getfattr and getfattr -Rd strip leading "/" from file paths, the setting @@ -2153,8 +2161,7 @@ the pending iso_rr_path. Other input lines must have the form @* name="value" @* -Name must be from user namespace. I.e. user.xyz where xyz should consist of -printable characters only. The separator "=" is not allowed in names. +The separator "=" is not allowed in names. Value may contain any kind of bytes. It must be in quotes. Trailing whitespace after the end quote will be ignored. Non-printables bytes and quotes must be represented as \XYZ by their octal 8-bit code XYZ. @@ -2564,8 +2571,9 @@ ACL is given in text form as defined with command -setfacl. E.g.: -exec setfacl u:lisa:rw,u::rw,g::r,o::@minus{},m::rw @minus{}@minus{} @* @item getfattr -prints xattr name-value pairs from user namespace -to the result channel. +prints xattr name-value pairs to the result channel. The choice of namespaces +depends on the setting of command -xattr: "on" or "user" restricts it to the +namespace "user", "any" only omits namespace "isofs". @* @item get_any_xattr prints xattr name-value pairs from any namespace @@ -5031,11 +5039,14 @@ directories. @cindex xattr, show in ISO image, -getfattr Print the xattr of the given files in the ISO image. If a file has no such xattr then noting is printed for it. +The choice of namespaces +depends on the setting of command -xattr: "on" or "user" restricts it to +namespace "user", "any" only omits namespace "isofs". @c man .TP @item -getfattr_r iso_rr_pattern [***] @kindex -getfattr_r shows xattr in ISO image @cindex xattr, show in ISO image, -getfattr_r -Like -gefattr but listing recursively the whole file trees underneath eventual +Like -gefattr but listing recursively the whole file trees underneath of directories. @c man .TP @item -du iso_rr_pattern [***] diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 149f2de5..d33cd04b 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2017.10.30.122625" +#define Xorriso_timestamP "2017.11.15.100856"