New -as mkisofs options -uid and -gid

This commit is contained in:
Thomas Schmitt 2017-11-17 15:31:43 +01:00
parent 143f60fb48
commit d965b81d53
5 changed files with 91 additions and 37 deletions

View File

@ -806,6 +806,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" Disable deep directory relocation (violates ISO9660)", " Disable deep directory relocation (violates ISO9660)",
" -hide-rr-moved Relocate deep directories to /.rr_moved", " -hide-rr-moved Relocate deep directories to /.rr_moved",
" -rr_reloc_dir NAME Set deep directory relocation target in root", " -rr_reloc_dir NAME Set deep directory relocation target in root",
" -uid uid Make the owner of all files this uid.",
" -gid gid Make the group owner of all files this gid.",
" -o FILE, -output FILE Set output file name", " -o FILE, -output FILE Set output file name",
" -m GLOBFILE, -exclude GLOBFILE", " -m GLOBFILE, -exclude GLOBFILE",
" Exclude file name", " Exclude file name",
@ -2259,6 +2261,22 @@ rr_reloc_dir:;
} else if(strcmp(argpt, "-gui") == 0) { } else if(strcmp(argpt, "-gui") == 0) {
/* was already handled in first argument scan */; /* was already handled in first argument scan */;
} else if(strcmp(argpt, "-uid") == 0) {
if(i + 1 >= argc)
goto not_enough_args;
i++;
ret= Xorriso_option_uid(xorriso, argv[i], 0);
if(ret <= 0)
goto problem_handler_2;
} else if(strcmp(argpt, "-gid") == 0) {
if(i + 1 >= argc)
goto not_enough_args;
i++;
ret= Xorriso_option_gid(xorriso, argv[i], 0);
if(ret <= 0)
goto problem_handler_2;
} else if(argpt[0]=='-' && argpt[1]!=0) { } else if(argpt[0]=='-' && argpt[1]!=0) {
ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1, ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1,
&option_d, &iso_level, &lower_r, ra_text, 1); &option_d, &iso_level, &lower_r, ra_text, 1);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2017.11.16.114215" #define Xorriso_timestamP "2017.11.17.143122"

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISOFS 1 "Version 1.4.9, Oct 10, 2017" .TH XORRISOFS 1 "Version 1.4.9, Nov 17, 2017"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -407,6 +407,16 @@ Like \-\-sort\-weight\-list , but expanding the iso_rr_paths as
shell parser patterns and applying \-\-sort\-weight to each shell parser patterns and applying \-\-sort\-weight to each
matching file. matching file.
.TP .TP
\fB\-uid\fR number|name
Use the given number or locally existing user name as owner id of all files
and directories in the emerging filesystem.
Empty name or name "\-" revoke this feature.
.TP
\fB\-gid\fR number|name
Use the given number or locally existing group name as group id of all files
and directories in the emerging filesystem.
Empty name or name "\-" revoke this feature.
.TP
\fB\-dir-mode\fR mode \fB\-dir-mode\fR mode
Set the access permissions for all directories in the image to the given Set the access permissions for all directories in the image to the given
mode which is either an octal number beginning with "0" or a comma separated mode which is either an octal number beginning with "0" or a comma separated

View File

@ -394,6 +394,14 @@ File: xorrisofs.info, Node: SetProduct, Next: SetCompl, Prev: SetInsert, Up:
--sort-weight-patterns disk_path --sort-weight-patterns disk_path
Like --sort-weight-list , but expanding the iso_rr_paths as shell Like --sort-weight-list , but expanding the iso_rr_paths as shell
parser patterns and applying --sort-weight to each matching file. parser patterns and applying --sort-weight to each matching file.
-uid number|name
Use the given number or locally existing user name as owner id of
all files and directories in the emerging filesystem. Empty name
or name "-" revoke this feature.
-gid number|name
Use the given number or locally existing group name as group id of
all files and directories in the emerging filesystem. Empty name
or name "-" revoke this feature.
-dir-mode mode -dir-mode mode
Set the access permissions for all directories in the image to the Set the access permissions for all directories in the image to the
given mode which is either an octal number beginning with "0" or a given mode which is either an octal number beginning with "0" or a
@ -1941,7 +1949,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --norock disable Rock Ridge production: SetExtras. (line 28) * --norock disable Rock Ridge production: SetExtras. (line 28)
* --no_rc do not execute startup files: Miscellaneous. (line 18) * --no_rc do not execute startup files: Miscellaneous. (line 18)
* --old-empty old block addresses for empty files: SetProduct. * --old-empty old block addresses for empty files: SetProduct.
(line 97) (line 105)
* --old-root-devno enable disk idevno with -old-root: SetInsert. * --old-root-devno enable disk idevno with -old-root: SetInsert.
(line 84) (line 84)
* --old-root-no-ino disable disk ino with -old-root: SetInsert. * --old-root-no-ino disable disk ino with -old-root: SetInsert.
@ -1991,7 +1999,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -D allow deep directory hierachies: SetExtras. (line 60) * -D allow deep directory hierachies: SetExtras. (line 60)
* -d omit trailing dot in ISO file names: SetCompl. (line 50) * -d omit trailing dot in ISO file names: SetCompl. (line 50)
* -dev set path for loading existing ISO image: Loading. (line 23) * -dev set path for loading existing ISO image: Loading. (line 23)
* -dir-mode permissions for all directories: SetProduct. (line 79) * -dir-mode permissions for all directories: SetProduct. (line 87)
* -disable-deep-relocation allow deep directory hierachies: SetExtras. * -disable-deep-relocation allow deep directory hierachies: SetExtras.
(line 72) (line 72)
* -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl. * -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl.
@ -2008,13 +2016,14 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -exclude exclude disk files from inserting: SetInsert. (line 37) * -exclude exclude disk files from inserting: SetInsert. (line 37)
* -exclude-list exclude disk files from inserting: SetInsert. (line 44) * -exclude-list exclude disk files from inserting: SetInsert. (line 44)
* -f follow symbolic links on disk: SetInsert. (line 22) * -f follow symbolic links on disk: SetInsert. (line 22)
* -file-mode permissions for all data files: SetProduct. (line 84) * -file-mode permissions for all data files: SetProduct. (line 92)
* -file_name_limit curbs length of file names: SetExtras. (line 49) * -file_name_limit curbs length of file names: SetExtras. (line 49)
* -follow-links follow symbolic links on disk: SetInsert. (line 26) * -follow-links follow symbolic links on disk: SetInsert. (line 26)
* -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl. * -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl.
(line 59) (line 59)
* -G Fill System Area e.g. by MBR: SystemArea. (line 68) * -G Fill System Area e.g. by MBR: SystemArea. (line 68)
* -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 77) * -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 77)
* -gid group assignment for all files: SetProduct. (line 83)
* -graft-points enable target=source pathspecs: SetInsert. (line 28) * -graft-points enable target=source pathspecs: SetInsert. (line 28)
* -gui increase frequency of pacifier messages: Miscellaneous. * -gui increase frequency of pacifier messages: Miscellaneous.
(line 29) (line 29)
@ -2082,7 +2091,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 266) * -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 266)
* -N omit version number in ISO file names: SetCompl. (line 64) * -N omit version number in ISO file names: SetCompl. (line 64)
* -no-emul-boot El Torito boot image emulation: Bootable. (line 86) * -no-emul-boot El Torito boot image emulation: Bootable. (line 86)
* -no-pad do not add zeros to ISO tree: SetProduct. (line 93) * -no-pad do not add zeros to ISO tree: SetProduct. (line 101)
* -o set output file address: SetProduct. (line 8) * -o set output file address: SetProduct. (line 8)
* -old-exclude exclude disk files from inserting: SetInsert. (line 42) * -old-exclude exclude disk files from inserting: SetInsert. (line 42)
* -old-root enable incremental insertion: SetInsert. (line 60) * -old-root enable incremental insertion: SetInsert. (line 60)
@ -2094,7 +2103,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 21) (line 21)
* -p set Preparer Id: ImageId. (line 47) * -p set Preparer Id: ImageId. (line 47)
* -P set Publisher Id: ImageId. (line 28) * -P set Publisher Id: ImageId. (line 28)
* -pad add 300 KiB of zeros to ISO tree: SetProduct. (line 86) * -pad add 300 KiB of zeros to ISO tree: SetProduct. (line 94)
* -partition_cyl_align Image size alignment: SystemArea. (line 178) * -partition_cyl_align Image size alignment: SystemArea. (line 178)
* -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 161) * -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 161)
* -partition_offset Make mountable by partition 1: SystemArea. * -partition_offset Make mountable by partition 1: SystemArea.
@ -2126,6 +2135,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -transparent-compression enable recognition of zisofs files: SetInsert. * -transparent-compression enable recognition of zisofs files: SetInsert.
(line 53) (line 53)
* -U very relaxed filename rules: SetCompl. (line 27) * -U very relaxed filename rules: SetCompl. (line 27)
* -uid ownership for all files: SetProduct. (line 79)
* -untranslated-filenames very relaxed filename rules: SetCompl. * -untranslated-filenames very relaxed filename rules: SetCompl.
(line 34) (line 34)
* -untranslated_name_len untranslated file names: SetCompl. (line 36) * -untranslated_name_len untranslated file names: SetCompl. (line 36)
@ -2246,6 +2256,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* GPT, mark appended partitions, -appended_part_as_gpt: SystemArea. * GPT, mark appended partitions, -appended_part_as_gpt: SystemArea.
(line 209) (line 209)
* GPT, _definition: SystemArea. (line 13) * GPT, _definition: SystemArea. (line 13)
* Group, for all files, -gid: SetProduct. (line 83)
* HFS+, enables production: SetExtras. (line 164) * HFS+, enables production: SetExtras. (line 164)
* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 215) * HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 215)
* HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 205) * HFS+, issue blessing, -hfs-bless-by: SetExtras. (line 205)
@ -2327,15 +2338,16 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 150) (line 150)
* Options, list, -help: Miscellaneous. (line 21) * Options, list, -help: Miscellaneous. (line 21)
* Output file, set address, -o, -output: SetProduct. (line 8) * Output file, set address, -o, -output: SetProduct. (line 8)
* Padding, 300 KiB, -pad: SetProduct. (line 86) * Ownership, for all files, -uid: SetProduct. (line 79)
* Padding, disable, --old-empty: SetProduct. (line 97) * Padding, 300 KiB, -pad: SetProduct. (line 94)
* Padding, disable, -no-pad: SetProduct. (line 93) * Padding, disable, --old-empty: SetProduct. (line 105)
* Padding, disable, -no-pad: SetProduct. (line 101)
* pathspec, enable target=source, -graft-points: SetInsert. (line 28) * pathspec, enable target=source, -graft-points: SetInsert. (line 28)
* pathspec, read list of, --quoted_path_list: SetInsert. (line 12) * pathspec, read list of, --quoted_path_list: SetInsert. (line 12)
* pathspec, read list of, -path-list: SetInsert. (line 8) * pathspec, read list of, -path-list: SetInsert. (line 8)
* pathspec, _definition: Insert. (line 11) * pathspec, _definition: Insert. (line 11)
* Permissions, for all data files, -file-mode: SetProduct. (line 84) * Permissions, for all data files, -file-mode: SetProduct. (line 92)
* Permissions, for all directories, -dir-mode: SetProduct. (line 79) * Permissions, for all directories, -dir-mode: SetProduct. (line 87)
* Preparer Id, set, -p: ImageId. (line 47) * Preparer Id, set, -p: ImageId. (line 47)
* Problems, reporting: Bugreport. (line 6) * Problems, reporting: Bugreport. (line 6)
* Program version, report, -version: Miscellaneous. (line 43) * Program version, report, -version: Miscellaneous. (line 43)
@ -2377,29 +2389,29 @@ Node: Options6762
Node: Loading7489 Node: Loading7489
Node: SetInsert9789 Node: SetInsert9789
Node: SetProduct14198 Node: SetProduct14198
Node: SetCompl19374 Node: SetCompl19769
Node: SetExtras21966 Node: SetExtras22361
Node: SetHide33260 Node: SetHide33655
Node: ImageId34564 Node: ImageId34959
Node: Bootable38846 Node: Bootable39241
Node: SystemArea45132 Node: SystemArea45527
Node: Charset62498 Node: Charset62893
Node: Jigdo63523 Node: Jigdo63918
Node: Miscellaneous67800 Node: Miscellaneous68195
Node: Examples69445 Node: Examples69840
Node: ExSimple69939 Node: ExSimple70334
Node: ExGraft70422 Node: ExGraft70817
Node: ExMkisofs71722 Node: ExMkisofs72117
Node: ExGrowisofs72988 Node: ExGrowisofs73383
Node: ExIncBackup74178 Node: ExIncBackup74573
Node: ExIncBckAcc77339 Node: ExIncBckAcc77734
Node: ExBootable79028 Node: ExBootable79423
Node: Files83210 Node: Files83605
Node: Environ84305 Node: Environ84700
Node: Seealso85076 Node: Seealso85471
Node: Bugreport85727 Node: Bugreport86122
Node: Legal86320 Node: Legal86715
Node: CommandIdx87217 Node: CommandIdx87612
Node: ConceptIdx102938 Node: ConceptIdx103479
 
End Tag Table End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISOFS 1 "Version 1.4.9, Oct 10, 2017" @c man .TH XORRISOFS 1 "Version 1.4.9, Nov 17, 2017"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -595,6 +595,20 @@ Like @minus{}@minus{}sort-weight-list , but expanding the iso_rr_paths as
shell parser patterns and applying @minus{}@minus{}sort-weight to each shell parser patterns and applying @minus{}@minus{}sort-weight to each
matching file. matching file.
@c man .TP @c man .TP
@item -uid number|name
@kindex -uid ownership for all files
@cindex Ownership, for all files, -uid
Use the given number or locally existing user name as owner id of all files
and directories in the emerging filesystem.
Empty name or name "-" revoke this feature.
@c man .TP
@item -gid number|name
@kindex -gid group assignment for all files
@cindex Group, for all files, -gid
Use the given number or locally existing group name as group id of all files
and directories in the emerging filesystem.
Empty name or name "-" revoke this feature.
@c man .TP
@item -dir-mode mode @item -dir-mode mode
@kindex -dir-mode permissions for all directories @kindex -dir-mode permissions for all directories
@cindex Permissions, for all directories, -dir-mode @cindex Permissions, for all directories, -dir-mode