From 5aac3dd80f5a36d33e9a375ac0bb655bfb93dcd3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 2 Jun 2022 16:10:21 +0200 Subject: [PATCH] Bug fix: Split file directories (-split_size) were created with wrong permissions --- xorriso/iso_manip.c | 3 + xorriso/xorriso.1 | 9 ++- xorriso/xorriso.info | 110 +++++++++++++++++++----------------- xorriso/xorriso.texi | 9 ++- xorriso/xorriso_timestamp.h | 2 +- 5 files changed, 78 insertions(+), 55 deletions(-) diff --git a/xorriso/iso_manip.c b/xorriso/iso_manip.c index fe171405..479a784d 100644 --- a/xorriso/iso_manip.c +++ b/xorriso/iso_manip.c @@ -126,6 +126,7 @@ int Xorriso_graft_split(struct XorrisO *xorriso, IsoImage *volume, int partno, total_parts; off_t offset; char *part_name= NULL; + struct stat stbuf; Xorriso_alloc_meM(part_name, char, SfileadrL); @@ -133,6 +134,8 @@ int Xorriso_graft_split(struct XorrisO *xorriso, IsoImage *volume, if(ret < 0) goto ex; *node= (IsoNode *) new_dir; + if(lstat(disk_path, &stbuf) != -1) + Xorriso_transfer_properties(xorriso, &stbuf, disk_path, *node, 1 | 8); if(xorriso->update_flags & 1) { ret= Xorriso_mark_update_merge(xorriso, img_name, node, 1); if(ret <= 0) diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 0a1c3a05..c67babd5 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.5.5, May 30, 2022" +.TH XORRISO 1 "Version 1.5.5, Jun 02, 2022" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1422,6 +1422,10 @@ E.g: .br /file/part_3_of_3_at_4094m_with_2047m_of_5753194821 .br +If the directory /file does no yet exist, then its permissions are not taken +from directory /my/disk but rather from /my/disk/file with additional +x\-permission for those who have r\-permission. +.br While command \-split_size is set larger than 0, and if all pieces of a file reside in the same ISO directory with no other files, and if the names look like above, then their ISO directory will be recognized and handled like a @@ -1691,6 +1695,9 @@ FAILURE event. A well tested \-split_size is 2047m. Sizes above \-file_size_limit are not permissible. .br +The newly created ISO directory inherits its permissions from the data file +with additional x\-permission for those who have r\-permission. +.br While command \-split_size is set larger than 0 such a directory with split file pieces will be recognized and handled like a regular file by commands \-compare* , \-update*, and in overwrite situations. There are \-osirrox diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index 54e072a1..ede2591b 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -1266,6 +1266,9 @@ filesystem. /file/part_2_of_3_at_2047m_with_2047m_of_5753194821 \ -cut_out /my/disk/file 4094m 2047m \ /file/part_3_of_3_at_4094m_with_2047m_of_5753194821 + If the directory /file does no yet exist, then its permissions are + not taken from directory /my/disk but rather from /my/disk/file + with additional x-permission for those who have r-permission. While command -split_size is set larger than 0, and if all pieces of a file reside in the same ISO directory with no other files, and if the names look like above, then their ISO directory will be @@ -1482,6 +1485,9 @@ File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Commands Default is 0 which will exclude files larger than -file_size_limit by a FAILURE event. A well tested -split_size is 2047m. Sizes above -file_size_limit are not permissible. + The newly created ISO directory inherits its permissions from the + data file with additional x-permission for those who have + r-permission. While command -split_size is set larger than 0 such a directory with split file pieces will be recognized and handled like a regular file by commands -compare* , -update*, and in overwrite @@ -5618,7 +5624,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -chmod_r sets permissions in ISO image: Manip. (line 66) * -chown sets ownership in ISO image: Manip. (line 43) * -chown_r sets ownership in ISO image: Manip. (line 47) -* -clone copies ISO directory tree: Insert. (line 192) +* -clone copies ISO directory tree: Insert. (line 195) * -close controls media closing: SetWrite. (line 484) * -close_damaged closes damaged track and session: Writing. (line 205) * -close_filter_list bans filter registration: Filter. (line 50) @@ -5631,9 +5637,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -concat copies ISO file content: Restore. (line 148) * -copyright_file sets copyright file name: SetWrite. (line 245) * -cpax copies files to disk: Restore. (line 128) -* -cpr inserts like with cp -r: Insert. (line 171) +* -cpr inserts like with cp -r: Insert. (line 174) * -cpx copies files to disk: Restore. (line 117) -* -cp_clone copies ISO directory tree: Insert. (line 203) +* -cp_clone copies ISO directory tree: Insert. (line 206) * -cp_rx copies file trees to disk: Restore. (line 131) * -cp_rx copies file trees to disk <1>: Restore. (line 139) * -cut_out inserts piece of data file or device: Insert. (line 139) @@ -5703,7 +5709,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -list_formats lists available formats: Writing. (line 128) * -list_profiles lists supported media: Writing. (line 163) * -list_speeds lists available write speeds: Writing. (line 139) -* -lns creates ISO symbolic link: Insert. (line 188) +* -lns creates ISO symbolic link: Insert. (line 191) * -load addresses a particular session as input: Loading. (line 54) * -local_charset sets terminal character set: Charset. (line 57) * -logfile logs output channels to file: Frontend. (line 19) @@ -5720,7 +5726,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -map_single inserts path: Insert. (line 93) * -mark sets synchronizing message: Frontend. (line 23) * -md5 controls handling of MD5 sums: Loading. (line 184) -* -mkdir creates ISO directory: Insert. (line 184) +* -mkdir creates ISO directory: Insert. (line 187) * -modesty_on_drive keep drive buffer hungry: SetWrite. (line 419) * -mount issues mount command for ISO session: Restore. (line 204) * -mount_cmd composes mount command line: Inquiry. (line 49) @@ -5885,9 +5891,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Dialog, EOF resistant, -named_pipe_loop: Frontend. (line 119) * Dialog, line editing, -use_readline: DialogCtl. (line 26) * Dialog, terminal geometry, -page: DialogCtl. (line 18) -* Directories, copy, -cp_clone: Insert. (line 203) -* Directory, copy, -clone: Insert. (line 192) -* Directory, create, -mkdir: Insert. (line 184) +* Directories, copy, -cp_clone: Insert. (line 206) +* Directory, copy, -clone: Insert. (line 195) +* Directory, create, -mkdir: Insert. (line 187) * Directory, delete, -rmdir: Manip. (line 29) * disk_path, _definition: Insert. (line 6) * Drive, accessability, -drive_class: AqDrive. (line 43) @@ -5986,7 +5992,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Insert, paths from disk file, -map_l: Insert. (line 96) * Insert, paths from disk file, -path_list: Insert. (line 81) * Insert, paths from disk file, -quoted_path_list: Insert. (line 85) -* Insert, paths, -cpr: Insert. (line 171) +* Insert, paths, -cpr: Insert. (line 174) * Insert, pathspecs, -add: Insert. (line 44) * Insert, piece of data file or device, -cut_out: Insert. (line 139) * Interval reader for system area and partitions: Bootable. (line 32) @@ -6107,7 +6113,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Sorting order, for -x, -list_arg_sorting: ArgSort. (line 26) * SUN Disk Label, production: Bootable. (line 383) * SUN SPARC boot images, activation: Bootable. (line 464) -* Symbolic link, create, -lns: Insert. (line 188) +* Symbolic link, create, -lns: Insert. (line 191) * System area, _definition: Bootable. (line 200) * Table-of-content, search sessions, -rom_toc_scan: Loading. (line 308) * Table-of-content, show, -toc: Inquiry. (line 27) @@ -6169,47 +6175,47 @@ Node: ArgSort27718 Node: AqDrive29212 Node: Loading36369 Node: Insert58208 -Node: SetInsert70117 -Node: Manip80081 -Node: CmdFind90181 -Node: Filter109110 -Node: Writing113732 -Node: SetWrite125987 -Node: Bootable155839 -Node: Jigdo183720 -Node: Charset188723 -Node: Exception192052 -Node: DialogCtl198181 -Node: Inquiry200783 -Node: Navigate209665 -Node: Verify218372 -Node: Restore229521 -Node: Emulation241729 -Node: Scripting252185 -Node: Frontend259968 -Node: Examples269594 -Node: ExDevices270772 -Node: ExCreate271433 -Node: ExDialog272733 -Node: ExGrowing274004 -Node: ExModifying274813 -Node: ExBootable275323 -Node: ExCharset275878 -Node: ExPseudo276774 -Node: ExCdrecord277701 -Node: ExMkisofs278021 -Node: ExGrowisofs279918 -Node: ExException281071 -Node: ExTime281529 -Node: ExIncBackup281987 -Node: ExRestore286013 -Node: ExRecovery286959 -Node: Files287531 -Node: Environ288865 -Node: Seealso289613 -Node: Bugreport290330 -Node: Legal290921 -Node: CommandIdx291933 -Node: ConceptIdx309758 +Node: SetInsert70325 +Node: Manip80442 +Node: CmdFind90542 +Node: Filter109471 +Node: Writing114093 +Node: SetWrite126348 +Node: Bootable156200 +Node: Jigdo184081 +Node: Charset189084 +Node: Exception192413 +Node: DialogCtl198542 +Node: Inquiry201144 +Node: Navigate210026 +Node: Verify218733 +Node: Restore229882 +Node: Emulation242090 +Node: Scripting252546 +Node: Frontend260329 +Node: Examples269955 +Node: ExDevices271133 +Node: ExCreate271794 +Node: ExDialog273094 +Node: ExGrowing274365 +Node: ExModifying275174 +Node: ExBootable275684 +Node: ExCharset276239 +Node: ExPseudo277135 +Node: ExCdrecord278062 +Node: ExMkisofs278382 +Node: ExGrowisofs280279 +Node: ExException281432 +Node: ExTime281890 +Node: ExIncBackup282348 +Node: ExRestore286374 +Node: ExRecovery287320 +Node: Files287892 +Node: Environ289226 +Node: Seealso289974 +Node: Bugreport290691 +Node: Legal291282 +Node: CommandIdx292294 +Node: ConceptIdx310119  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index f503fb2c..0050a005 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.5.5, May 30, 2022" +@c man .TH XORRISO 1 "Version 1.5.5, Jun 02, 2022" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1732,6 +1732,10 @@ E.g: @* /file/part_3_of_3_at_4094m_with_2047m_of_5753194821 @* +If the directory /file does no yet exist, then its permissions are not taken +from directory /my/disk but rather from /my/disk/file with additional +x-permission for those who have r-permission. +@* While command -split_size is set larger than 0, and if all pieces of a file reside in the same ISO directory with no other files, and if the names look like above, then their ISO directory will be recognized and handled like a @@ -2037,6 +2041,9 @@ FAILURE event. A well tested -split_size is 2047m. Sizes above -file_size_limit are not permissible. @* +The newly created ISO directory inherits its permissions from the data file +with additional x-permission for those who have r-permission. +@* While command -split_size is set larger than 0 such a directory with split file pieces will be recognized and handled like a regular file by commands -compare* , -update*, and in overwrite situations. There are -osirrox diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index c9a5a47a..3d500c37 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2022.05.30.164747" +#define Xorriso_timestamP "2022.06.02.140943"