Refusing to apply -chattr to non-dir, non-regular files

This commit is contained in:
2024-08-07 15:26:09 +02:00
parent 58fb826c1d
commit c142b7b58f
7 changed files with 122 additions and 77 deletions

View File

@ -1743,7 +1743,9 @@ whether they stem from the loaded image or were newly inserted.
\000 for 0-bytes.
-chattr mode iso_rr_path [***]
Set or unset Linux file attributes like program chattr(1) would do
to disk files.
to disk files. Applying this command to files which are neither
directory nor regular data file will yield a SORRY event, unless
the mode is "-remove-lfa-flags".
The first letter of the mode string determines what to do. The
other letters are symbolic attribute flag letters out of the set
"aAcCdDeEFhiIjNmPsStTuVxZ" as described in man 1 chattr. There is
@ -1767,7 +1769,12 @@ whether they stem from the loaded image or were newly inserted.
afterwards.
Example: -chattr +sDu /my/file /my/other_file -
-chattr_r mode iso_rr_path [***]
Like -chattr but affecting all files below given directories.
Like -chattr but affecting also all suitable files below the given
directories. Except with mode "-remove-lfa-flags", the given
iso_rr_path parameters need to be directories or regular data files
or else a SORRY event will happen. Files below the given
directories will be skipped silently if their type is not suitable
for -chattr.
-alter_date type timestring iso_rr_path [***]
Alter the date entries of files in the ISO image. type may be one
of the following:
@ -1928,12 +1935,11 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands
-has_lfa_flags di
-has_some_lfa_flags_of flag_letters :
Similar to -has_lfa_flags but matching files which have Linux
file attributes attached and have at least one of the flags
set which correspond to the characters in the string
flag_letters. The flag_letters string "-" never matches any
file. E.g. look for files which have 'i' or 'a' or both of
them set:
Similar to -has_lfa_flags but matching files which have at
least one of the flags set which correspond to the characters
in the string flag_letters. The flag_letters string "-" never
matches any file. E.g. look for files which have 'i' or 'a'
or both of them set:
-has_some_lfa_flags_of ia
-has_any_xattr :
Matches files which have any xattr other than ACL.
@ -2135,7 +2141,9 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Commands
shows the Linux file attribute flags like command -lsattrd
does.
chattr
applies -chattr with the given mode.
applies -chattr with the given mode. Other than command
-chattr this silently skips any file which are not -type "dir"
or "file".
E.g.: -exec chattr +sDu -
get_md5
prints the MD5 sum, if recorded, together with file path.
@ -5930,8 +5938,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -acl controls handling of ACLs: Loading. (line 189)
* -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 166)
* -alter_date_r sets timestamps in ISO image: Manip. (line 201)
* -alter_date sets timestamps in ISO image: Manip. (line 173)
* -alter_date_r sets timestamps in ISO image: Manip. (line 208)
* -append_partition adds arbitrary file after image end: Bootable.
(line 470)
* -application_id sets application id: SetWrite. (line 218)
@ -5951,7 +5959,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -changes_pending overrides change status: Writing. (line 12)
* -charset sets input/output character set: Charset. (line 54)
* -chattr sets Linux file attributes in ISO image: Manip. (line 139)
* -chattr_r sets Linux file attributes in ISO image: Manip. (line 164)
* -chattr_r sets Linux file attributes in ISO image: Manip. (line 166)
* -check_md5 verifies file checksum: Verify. (line 184)
* -check_md5_r verifies file tree checksums: Verify. (line 198)
* -check_media reads media block by block: Verify. (line 21)
@ -6029,7 +6037,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -hardlinks controls handling of hard links: Loading. (line 152)
* -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 204)
* -hide excludes file names from directory trees: Manip. (line 211)
* -history brings text into readline history: Scripting. (line 44)
* -indev acquires a drive for input: AqDrive. (line 23)
* -in_charset sets input character set: Loading. (line 136)
@ -6292,7 +6300,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Hard links, control handling, -hardlinks: Loading. (line 152)
* HFS+ allocation block size: Bootable. (line 458)
* HFS+ serial number: Bootable. (line 455)
* hidden, set in ISO image, -hide: Manip. (line 204)
* hidden, set in ISO image, -hide: Manip. (line 211)
* HP-PA boot sector, production: Bootable. (line 430)
* Image reading, cache size, -data_cache_size: Loading. (line 444)
* Image, demand volume ID, -assert_volid: Loading. (line 129)
@ -6351,7 +6359,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Linux file attributes, control handling, -lfa_flags: Loading.
(line 207)
* Linux file attributes, set in ISO image, -chattr: Manip. (line 139)
* Linux file attributes, set in ISO image, -chattr_r: Manip. (line 164)
* Linux file attributes, set in ISO image, -chattr_r: Manip. (line 166)
* Linux file attributes, show in ISO image, -lsattr: Navigate.
(line 78)
* Linux file attributes, _definition: Extras. (line 84)
@ -6472,8 +6480,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 390)
* Table-of-content, show parts of, -toc_of: Inquiry. (line 41)
* Table-of-content, show, -toc: Inquiry. (line 27)
* Timestamps, set in ISO image, -alter_date: Manip. (line 166)
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 201)
* Timestamps, set in ISO image, -alter_date: Manip. (line 173)
* Timestamps, set in ISO image, -alter_date_r: Manip. (line 208)
* Tree, disk, traverse, -findx: Navigate. (line 99)
* Tree, ISO, traverse and alter, -find: CmdFind. (line 7)
* Unsuitable media states, _definition: Media. (line 25)
@ -6532,45 +6540,45 @@ Node: Loading36962
Node: Insert63843
Node: SetInsert76038
Node: Manip86212
Node: CmdFind97876
Node: Filter119126
Node: Writing123748
Node: SetWrite136242
Node: Bootable167517
Node: Jigdo198799
Node: Charset203802
Node: Exception207131
Node: DialogCtl213260
Node: Inquiry215862
Node: Navigate228427
Node: Verify237582
Node: Restore248731
Node: Emulation260938
Node: Scripting271394
Node: Frontend279288
Node: Examples288914
Node: ExDevices290092
Node: ExCreate290753
Node: ExDialog292053
Node: ExGrowing293324
Node: ExModifying294133
Node: ExBootable294643
Node: ExCharset295198
Node: ExPseudo296094
Node: ExCdrecord297021
Node: ExMkisofs297341
Node: ExGrowisofs299238
Node: ExException300391
Node: ExTime300849
Node: ExIncBackup301307
Node: ExRestore305333
Node: ExRecovery306279
Node: Files306851
Node: Environ308185
Node: Seealso308933
Node: Bugreport309697
Node: Legal310288
Node: CommandIdx311300
Node: ConceptIdx329629
Node: CmdFind98332
Node: Filter119646
Node: Writing124268
Node: SetWrite136762
Node: Bootable168037
Node: Jigdo199319
Node: Charset204322
Node: Exception207651
Node: DialogCtl213780
Node: Inquiry216382
Node: Navigate228947
Node: Verify238102
Node: Restore249251
Node: Emulation261458
Node: Scripting271914
Node: Frontend279808
Node: Examples289434
Node: ExDevices290612
Node: ExCreate291273
Node: ExDialog292573
Node: ExGrowing293844
Node: ExModifying294653
Node: ExBootable295163
Node: ExCharset295718
Node: ExPseudo296614
Node: ExCdrecord297541
Node: ExMkisofs297861
Node: ExGrowisofs299758
Node: ExException300911
Node: ExTime301369
Node: ExIncBackup301827
Node: ExRestore305853
Node: ExRecovery306799
Node: Files307371
Node: Environ308705
Node: Seealso309453
Node: Bugreport310217
Node: Legal310808
Node: CommandIdx311820
Node: ConceptIdx330149

End Tag Table