Commit 90193998 authored by Thomas Schmitt's avatar Thomas Schmitt

New command -drive_access, new -as cdrecord option --drive_not_exclusive

parent 8828d6f4
......@@ -207,6 +207,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->displacement_sign= 0;
m->read_fs= 0;
m->drives_exclusive= 1;
m->drives_access= 1;
m->linux_scsi_dev_family= 0;
m->early_stdio_test= 0;
m->cache_num_tiles= 0;
......@@ -219,6 +220,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->in_charset= NULL;
m->isofs_st_out= time(0) - 1;
m->indev_is_exclusive= 1;
m->indev_access= 1;
m->indev_off_adr[0]= 0;
m->isofs_st_in= 0;
m->volset_change_pending= 0;
......@@ -231,6 +233,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->out_charset= NULL;
m->dev_fd_1= -1;
m->outdev_is_exclusive= 1;
m->outdev_access= 1;
m->outdev_off_adr[0]= 0;
m->grow_blindly_msc2= -1;
m->ban_stdio_write= 0;
......@@ -475,6 +478,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
if(strcmp(leafname, "osirrox")==0) {
m->allow_restore= 1;
m->drives_exclusive= 0;
m->drives_access= 0;
} else if(strcmp(leafname, "xorrisofs")==0 || strcmp(leafname, "genisofs")==0 ||
strcmp(leafname, "mkisofs")==0 || strcmp(leafname, "genisoimage")==0) {
m->argument_emulation= 1;
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -279,12 +279,16 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
Xorriso_get_drive_handles(xorriso, &out_dinfo, &out_drive, "", 2 | 16);
if(in_dinfo != NULL && (out_dinfo == NULL || out_dinfo == in_dinfo)) {
dinfo= in_dinfo;
if(flag & 2)
if(flag & 2) {
xorriso->outdev_is_exclusive= xorriso->indev_is_exclusive;
xorriso->outdev_access= xorriso->indev_access;
}
} else if(out_dinfo != NULL && in_dinfo == NULL) {
dinfo= out_dinfo;
if(flag & 1)
if(flag & 1) {
xorriso->indev_is_exclusive= xorriso->outdev_is_exclusive;
xorriso->indev_access= xorriso->outdev_access;
}
} else if(out_dinfo != NULL || in_dinfo != NULL) {
sprintf(xorriso->info_text,
"Two different drives shall be re-assed in one call");
......@@ -304,6 +308,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
if(ret==1) {
dinfo= out_dinfo;
xorriso->indev_is_exclusive= xorriso->outdev_is_exclusive;
xorriso->indev_access= xorriso->outdev_access;
}
} else if((flag&3)==2 && xorriso->in_drive_handle!=NULL) {
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
......@@ -314,6 +319,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
if(ret==1) {
dinfo= in_dinfo;
xorriso->outdev_is_exclusive= xorriso->indev_is_exclusive;
xorriso->outdev_access= xorriso->indev_access;
}
}
......@@ -362,10 +368,14 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
if(flag&1)
if(xorriso->image_start_mode&(1u<<31)) /* used up setting */
xorriso->image_start_mode= 0; /* no need to perform auto setting */
if(flag & 1)
if(flag & 1) {
xorriso->indev_is_exclusive= xorriso->drives_exclusive;
if(flag & 2)
xorriso->indev_access= xorriso->drives_access;
}
if(flag & 2) {
xorriso->outdev_is_exclusive= xorriso->drives_exclusive;
xorriso->outdev_access= xorriso->drives_access;
}
}
drive= dinfo[0].drive;
volset= isoburn_get_attached_image(drive);
......@@ -727,9 +737,9 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
if(!in_is_out_too) {
do_eject= !!(flag&4);
if((flag & 4) && !xorriso->indev_is_exclusive) {
if((flag & 4) && xorriso->indev_access == 0) {
sprintf(xorriso->info_text,
"Will not eject medium in non-exclusively acquired input drive.");
"Will not eject medium in readonly acquired input drive.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
do_eject= 0;
}
......@@ -759,9 +769,9 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
}
if((flag&2) && xorriso->out_drive_handle!=NULL) {
do_eject= !!(flag&4);
if((flag & 4) && !xorriso->outdev_is_exclusive) {
if((flag & 4) && xorriso->outdev_access == 0) {
sprintf(xorriso->info_text,
"Will not eject medium in non-exclusively acquired drive.");
"Will not eject medium in readonly acquired drive.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
do_eject= 0;
}
......@@ -795,16 +805,17 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
int Xorriso_may_burn(struct XorrisO *xorriso, int flag)
{
if(xorriso->outdev_is_exclusive)
if(xorriso->outdev_access == 1)
return(1);
sprintf(xorriso->info_text, "The output drive was not acquired exclusively.");
sprintf(xorriso->info_text, "The output drive was acquired readonly.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text, "A possible remedy is: -osirrox 'o_excl_on'");
if(xorriso->outdev[0]) {
strcat(xorriso->info_text," -outdev ");
Text_shellsafe(xorriso->outdev, xorriso->info_text, 1);
}
sprintf(xorriso->info_text, "Possible remedy: -drive_access \"exclusive:unrestricted\".");
strcat(xorriso->info_text," Then give up and re-acquire the drive.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
if(!xorriso->outdev_is_exclusive) {
sprintf(xorriso->info_text, "If you insist in -drive_access \"shared:unrestricted\", first read man xorriso about the risks.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
}
return(0);
}
......@@ -1026,6 +1037,25 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
Xorriso_toc_line(xorriso, flag & 8);
if(flag & 128)
{ret= 1; goto ex;}
/* Report -drive_access if non-default or if long form */
respt[0]= 0;
if(flag & 2) {
if(xorriso->outdev_is_exclusive == 0 || xorriso->outdev_access == 0 ||
!(flag & 33)) {
sprintf(respt, "Drive access : %s:%s\n",
xorriso->outdev_is_exclusive ? "exclusive" : "shared",
xorriso->outdev_access == 0 ? "readonly" : "unrestricted");
}
} else {
if(xorriso->indev_is_exclusive == 0 || xorriso->indev_access == 0 ||
!(flag & 33)) {
sprintf(respt, "Drive access : %s:%s\n",
xorriso->indev_is_exclusive ? "exclusive" : "shared",
xorriso->indev_access == 0 ? "readonly" : "unrestricted");
}
}
if(respt[0])
Xorriso_toc_line(xorriso, flag & 8);
sprintf(respt, "Drive type : vendor '%s' product '%s' revision '%s'\n",
dinfo[0].vendor, dinfo[0].product, dinfo[0].revision);
if((flag & 32) || !(flag & 1))
......@@ -1417,11 +1447,11 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
}
if (disc!=NULL)
isoburn_toc_disc_free(disc);
Xorriso_process_msg_queues(xorriso,0);
ret= 1;
ex:;
Xorriso_process_msg_queues(xorriso,0);
if (disc!=NULL)
isoburn_toc_disc_free(disc);
return(ret);
}
......
......@@ -55,6 +55,7 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
"\t--devices\tprint list of available MMC drives and exit emulation",
"\tdev=target\tpseudo-SCSI target to use as CD-Recorder",
"\tdrive_scsi_dev_family=sr|scd|sg\t\tselect Linux device type",
"\t--drive_not_exclusive\tdo not try to prevent use of busy drive",
"\t-v\t\tincrement verbose level by one",
"\t-V\t\tincrement SCSI command transport verbose level by one",
"\t-checkdrive\tcheck if a driver for the drive is present",
......@@ -266,6 +267,8 @@ no_volunteer:;
strcpy(dev_adr, cpt);
} else if(strcmp(argv[i], "--devices")==0) { /* intentional: argv[i] */
do_scanbus= 2;
} else if(strcmp(argv[i], "--drive_not_exclusive") == 0) { /* intentional */
Xorriso_option_drive_access(xorriso, "shared:unrestricted", 0);
} else if(strncmp(argpt,"driveropts=", 11)==0 ||
strncmp(argpt,"-driveropts=", 12)==0) {
if(strcmp(argpt+11, "help")==0) {
......
......@@ -257,6 +257,43 @@ int Xorriso_option_displacement(struct XorrisO *xorriso, char *value, int flag)
}
/* Command -drive_access "exclusive"|"shared":"readonly"|"unrestricted" */
int Xorriso_option_drive_access(struct XorrisO *xorriso, char *mode, int flag)
{
int l;
char *npt, *cpt;
npt= cpt= mode;
for(cpt= mode; npt != NULL; cpt= npt+1) {
npt= strchr(cpt, ':');
if(npt==NULL)
l= strlen(cpt);
else
l= npt - cpt;
if(l == 0 && mode[0] != 0)
goto unknown_mode;
if(strncmp(cpt, "shared", l) == 0 && l == 6) {
xorriso->drives_exclusive= 0;
} else if(strncmp(cpt, "exclusive", l) == 0 && l == 9) {
xorriso->drives_exclusive= 1;
} else if(strncmp(cpt, "readonly", l) == 0 && l == 8) {
xorriso->drives_access= 0;
} else if(strncmp(cpt, "unrestricted", l) == 0 && l == 12) {
xorriso->drives_access= 1;
} else {
unknown_mode:;
sprintf(xorriso->info_text, "-drive_access: unknown mode '");
if(l > 0 && l < SfileadrL)
strncat(xorriso->info_text, cpt, l);
strcat(xorriso->info_text, "'");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
}
return(1);
}
/* Option -drive_class */
int Xorriso_option_drive_class(struct XorrisO *xorriso,
char *d_class, char *pattern, int flag)
......@@ -1737,13 +1774,16 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" -drive_class \"harmless\"|\"banned\"|\"risky\"|\"clear_list\" disk_pattern",
" Add a drive path pattern to one of the safety lists or make",
" those lists empty. Defaulty entry in \"risky\" is \"/dev\".",
" -grow_blindly \"off\"|predicted_nwa",
" Switch between modifying and blind growing.",
" -drive_access \"exclusive\"|\"shared\":\"unrestricted\"|\"readonly\"",
" Enable or disable device file locking mechanisms.",
" Enable or disable status and content changes of drive.",
" -scsi_dev_family \"default\"|\"sr\"|\"scd\"|\"sg\"",
" Linux specific: Choose device file type.",
" -read_speed number[\"k/s\"|\"m/s\"|\"[x]CD\"|\"[x]DVD\"|\"[x]BD\"]",
" Set the read speed. Default is \"none\" = do not set speed",
" before reading.",
" -grow_blindly \"off\"|predicted_nwa",
" Switch between modifying and blind growing.",
" -load \"session\"|\"track\"|\"lba\"|\"sbsector\"|\"volid\"|\"auto\" id",
" Load a particular (outdated) ISO session from a -dev or",
" -indev which hosts more than one session.",
......
......@@ -541,7 +541,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"close","close_damaged",
"commit_eject","compliance","copyright_file",
"dev","dialog","disk_dev_ino","disk_pattern","displacement",
"dummy","dvd_obs","early_stdio_test","ecma119_map","eject",
"drive_access","dummy","dvd_obs","early_stdio_test","ecma119_map","eject",
"iso_nowtime","iso_rr_pattern","file_name_limit","follow","format","fs",
"gid","grow_blindly","hardlinks",
"hfsplus","history","indev","in_charset","joliet",
......@@ -684,17 +684,20 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
"print", "print_info", "print_mark", "prompt", "sleep",
"sh_style_result",
"* Influencing opening of drives:",
"drive_access","drive_class","early_stdio_test",
"* Drive and media related inquiry actions (1):",
"devices", "device_links",
"mount_opts", "mount_cmd", "session_string",
"* Influencing the behavior of image loading:",
"read_speed", "load", "displacement", "read_fs",
"drive_class", "assert_volid", "in_charset",
"assert_volid", "in_charset",
"auto_charset", "hardlinks", "acl", "xattr", "md5", "for_backup",
"ecma119_map",
"disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write",
"early_stdio_test", "data_cache_size",
"data_cache_size",
"scsi_dev_family", "iso_nowtime",
"* Character sets:",
......@@ -1255,6 +1258,10 @@ next_command:;
(*idx)++;
ret= Xorriso_option_disk_pattern(xorriso, arg1, 0);
} else if(strcmp(cmd,"drive_access")==0) {
(*idx)++;
ret= Xorriso_option_drive_access(xorriso, arg1, 0);
} else if(strcmp(cmd,"drive_class")==0) {
(*idx)+= 2;
ret= Xorriso_option_drive_class(xorriso, arg1, arg2, 0);
......
......@@ -2058,6 +2058,8 @@ int Xorriso_sieve_big(struct XorrisO *xorriso, int flag)
1, 1},
{"DVD obs 64 kB:", 3, "DVD obs 64 kB:", "", 1, { 0, -1, -1, -1, -1, -1},
1, 0},
{"Drive access :", 3, "Drive access : ", ": ", 2, { 0, 1, -1, -1, -1, -1},
2, 0},
{"Drive current:", 3, "Drive current:", "", 2, { 0, 1, -1, -1, -1, -1},
2, 0},
{"Drive id :", 3, "Drive id :", "", 1, { 0, -1, -1, -1, -1, -1},
......@@ -2771,6 +2773,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
{
int is_default, no_defaults, i, ret, adr_mode, do_single, behavior;
int show_indev= 1, show_outdev= 1, show_dev= 0;
int do_drive_access, did_drive_access;
int part_table_implicit= 0;
char *line, *sfe= NULL, mode[80], *form, *treatment;
char *in_pt, *out_pt, *nl_charset, *local_charset, *mode_pt;
......@@ -3814,13 +3817,20 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
}
}
is_default= (xorriso->drives_exclusive == 1 && xorriso->drives_access == 1);
sprintf(line, "-drive_access %s:%s\n",
xorriso->drives_exclusive ? "exclusive" : "shared",
xorriso->drives_access == 0 ? "readonly" : "unrestricted");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
is_default= (xorriso->linux_scsi_dev_family == 0);
sprintf(line, "-scsi_dev_family %s\n",
scsi_family[xorriso->linux_scsi_dev_family & 7]);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
do_single= 0;
do_single= do_drive_access= 0;
dev_filter= filter;
if(dev_filter != NULL) {
show_dev= Xorriso_status_filter(xorriso, filter, "-dev", 0);
......@@ -3833,43 +3843,52 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(show_outdev > 0 || show_indev > 0)
do_single= 1;
}
if(xorriso->drives_exclusive != xorriso->indev_is_exclusive &&
xorriso->indev[0])
if((xorriso->drives_exclusive != xorriso->indev_is_exclusive ||
xorriso->drives_access != xorriso->indev_access) && xorriso->indev[0]) {
do_single= 1;
else if(xorriso->drives_exclusive != xorriso->outdev_is_exclusive &&
xorriso->outdev[0])
do_drive_access|= 1;
}
if((xorriso->drives_exclusive != xorriso->outdev_is_exclusive ||
xorriso->drives_access != xorriso->outdev_access) &&
xorriso->outdev[0]) {
do_single= 1;
do_drive_access|= 2;
}
if(strcmp(xorriso->indev, xorriso->outdev) == 0 && !do_single) {
sprintf(line,"-dev %s\n", Text_shellsafe(xorriso->indev,sfe,0));
Xorriso_status_result(xorriso, dev_filter, fp, flag & 2);
} else {
if(xorriso->drives_exclusive != xorriso->indev_is_exclusive &&
xorriso->indev[0] && show_indev) {
sprintf(line,"-osirrox o_excl_%s\n",
xorriso->indev_is_exclusive ? "on" : "off");
did_drive_access= 0;
if((do_drive_access & 1) && xorriso->indev[0] && show_indev) {
sprintf(line,"-drive_access %s:%s\n",
xorriso->indev_is_exclusive ? "exclusive" : "shared",
xorriso->indev_access == 0 ? "readonly" : "unrestricted");
Xorriso_status_result(xorriso, NULL, fp, flag & 2);
did_drive_access= 1;
}
sprintf(line,"-indev %s\n", Text_shellsafe(xorriso->indev,sfe,0));
Xorriso_status_result(xorriso, dev_filter, fp, flag & 2);
if(xorriso->drives_exclusive != xorriso->indev_is_exclusive &&
xorriso->indev[0] && show_indev) {
sprintf(line,"-osirrox o_excl_%s\n",
xorriso->drives_exclusive ? "on" : "off");
if(did_drive_access) {
sprintf(line,"-drive_access %s:%s\n",
xorriso->drives_exclusive ? "exclusive" : "shared",
xorriso->drives_access == 0 ? "readonly" : "unrestricted");
Xorriso_status_result(xorriso, NULL, fp, flag & 2);
}
if(xorriso->drives_exclusive != xorriso->outdev_is_exclusive &&
xorriso->outdev[0] && show_outdev) {
sprintf(line,"-osirrox o_excl_%s\n",
xorriso->outdev_is_exclusive ? "on" : "off");
did_drive_access= 0;
if((do_drive_access & 2) && xorriso->outdev[0] && show_outdev) {
sprintf(line,"-drive_access %s:%s\n",
xorriso->outdev_is_exclusive ? "exclusive" : "shared",
xorriso->outdev_access == 0 ? "readonly" : "unrestricted");
Xorriso_status_result(xorriso, NULL, fp, flag & 2);
did_drive_access= 1;
}
sprintf(line,"-outdev %s\n", Text_shellsafe(xorriso->outdev,sfe,0));
Xorriso_status_result(xorriso, dev_filter, fp, flag & 2);
if(xorriso->drives_exclusive != xorriso->outdev_is_exclusive &&
xorriso->outdev[0] && show_outdev) {
sprintf(line,"-osirrox o_excl_%s\n",
xorriso->drives_exclusive ? "on" : "off");
if(did_drive_access) {
sprintf(line,"-drive_access %s:%s\n",
xorriso->drives_exclusive ? "exclusive" : "shared",
xorriso->drives_access == 0 ? "readonly" : "unrestricted");
Xorriso_status_result(xorriso, NULL, fp, flag & 2);
}
}
......
......@@ -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 XORRECORD 1 "Version 1.5.1, Nov 11, 2018"
.TH XORRECORD 1 "Version 1.5.1, Sep 04, 2019"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -531,6 +531,16 @@ Afterwards end emulation without performing any drive operation.
Only if used as first command line argument this option
prevents reading and interpretation of startup files. See section FILES below.
.TP
\fB--drive_not_exclusive\fR
This option disables the use of device file locking mechanisms when acquiring
the drive. On GNU/Linux the locking is done by open(O_EXCL), on FreeBSD by
flock(LOCK_EX).
.br
Be aware that it can cause problems if you use a drive which is mounted,
or opened by some other process, or guarded by /dev/pktcdvd*.
Make sure that other users of the drive do not cause drive activities
while a xorrecord burn run is going on.
.TP
\fBdrive_scsi_dev_family=sr|scd|sg|default\fR
GNU/Linux specific:
.br
......@@ -870,7 +880,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2011 \- 2018 Thomas Schmitt
Copyright (c) 2011 \- 2019 Thomas Schmitt
.br
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make use
......
No preview for this file type
......@@ -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 XORRECORD 1 "Version 1.5.1, Nov 11, 2018"
@c man .TH XORRECORD 1 "Version 1.5.1, Sep 04, 2019"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
......@@ -68,7 +68,7 @@
@copying
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso
Copyright @copyright{} 2011 - 2018 Thomas Schmitt
Copyright @copyright{} 2011 - 2019 Thomas Schmitt
@quotation
Permission is granted to distrubute this text freely.
......@@ -736,6 +736,18 @@ Afterwards end emulation without performing any drive operation.
Only if used as first command line argument this option
prevents reading and interpretation of startup files. See section FILES below.
@c man .TP
@item @minus{}@minus{}drive_not_exclusive
@kindex @minus{}@minus{}drive_not_exclusive use drive even if busy
@cindex Drive, use even if busy, @minus{}@minus{}drive_not_exclusive
This option disables the use of device file locking mechanisms when acquiring
the drive. On GNU/Linux the locking is done by open(O_EXCL), on FreeBSD by
flock(LOCK_EX).
@*
Be aware that it can cause problems if you use a drive which is mounted,
or opened by some other process, or guarded by /dev/pktcdvd*.
Make sure that other users of the drive do not cause drive activities
while a xorrecord burn run is going on.
@c man .TP
@item drive_scsi_dev_family=sr|scd|sg|default
@kindex drive_scsi_dev_family= Linux device type to be used
@cindex Drive, Linux device type, drive_scsi_dev_family
......@@ -1185,7 +1197,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2011 - 2018 Thomas Schmitt
Copyright (c) 2011 - 2019 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make use
......
......@@ -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.1, Apr 15, 2019"
.TH XORRISO 1 "Version 1.5.1, Sep 04, 2019"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -690,6 +690,64 @@ apply. See above paragraph "Libburn drives".
An empty address string "" gives up the current output drive
without acquiring a new one. No writing is possible without an output drive.
.TP
\fB\-drive_class\fR "harmless"|"banned"|"caution"|"clear_list" disk_pattern
Add a drive path pattern to one of the safety lists or make those lists empty.
There are three lists defined which get tested in the following sequence:
.br
If a drive address path matches the "harmless" list then the drive will be
accepted. If it is not a MMC device then the prefix "stdio:" will be prepended
automatically. This list is empty by default.
.br
Else if the path matches the "banned" list then the drive will not be
accepted by \fBxorriso\fR but rather lead to a FAILURE event.
This list is empty by default.
.br
Else if the path matches the "caution" list and if it is not a MMC device,
then its address must have the prefix "stdio:" or it will be rejected.
This list has by default one entry: "/dev".
.br
If a drive path matches no list then it is considered "harmless". By default
these are all paths which do not begin with directory "/dev".
.br
A path matches a list if one of its parent paths or itself matches a list
entry. Address prefix "stdio:" or "mmc:" will be ignored when
testing for matches.
.br
By pseudo\-class "clear_list" and pseudo\-patterns "banned", "caution",
"harmless", or "all", the lists may be made empty.
.br
E.g.: \-drive_class clear_list banned
.br
One will normally define the \-drive_class lists in one of the \fBxorriso\fR
Startup Files.
.br
Note: This is not a security feature but rather a bumper for the superuser to
prevent inadverted mishaps. For reliably blocking access to a device file you
have to deny its rw\-permissions in the filesystem.
.TP
\fB\-drive_access\fR "exclusive"|"shared":"unrestricted"|"readonly"
Control whether device file locking mechanisms shall be used when acquiring a
drive, and whether status or content of the medium in the drive may be
altered. Useful and most harmless are the setting "shared:readonly"
and the default setting "exclusive:unrestricted".
.br
"exclusive" enables tests and locks when acquiring the drive. It depends on the
operating system which locking mechanisms get applied, if any. On GNU/Linux
it is open(O_EXCL). On FreeBSD it is flock(LOCK_EX).
.br
"shared" disables the use of these mechanisms to become able to acquire drives
which are mounted, or opened by some process, or guarded by /dev/pktcdvd*.
.br
"unrestricted" enables all technically appropriate operations on an acquired
drive. "shared:unrestricted" risks to get own burn runs spoiled by other
processes or to vice versa spoil activities of such processes. So use
"exclusive:unrestricted" unless you know for sure that "shared" is safe.
.br
"readonly" disables operations which might surprise a co\-user of the drive.
For \-outdev these are formatting, blanking, writing, ejecting. For \-indev
this is ejecting. Be aware that even reading and drive status inquiries can
disturb an ongoing burn run on CD\-R[W] and DVD\-R[W].
.TP
\fB\-scsi_dev_family\fR "default"|"sr"|"scd"|"sg"
GNU/Linux specific:
.br
......@@ -816,41 +874,6 @@ to employ a loop device instead.)
In both cases, the ISO sessions should be self contained, i.e. not add\-on
sessions to an ISO image outside their track or partition.
.TP
\fB\-drive_class\fR "harmless"|"banned"|"caution"|"clear_list" disk_pattern
Add a drive path pattern to one of the safety lists or make those lists empty.
There are three lists defined which get tested in the following sequence:
.br
If a drive address path matches the "harmless" list then the drive will be
accepted. If it is not a MMC device then the prefix "stdio:" will be prepended
automatically. This list is empty by default.
.br
Else if the path matches the "banned" list then the drive will not be
accepted by \fBxorriso\fR but rather lead to a FAILURE event.
This list is empty by default.
.br
Else if the path matches the "caution" list and if it is not a MMC device,
then its address must have the prefix "stdio:" or it will be rejected.
This list has by default one entry: "/dev".
.br
If a drive path matches no list then it is considered "harmless". By default
these are all paths which do not begin with directory "/dev".
.br
A path matches a list if one of its parent paths or itself matches a list
entry. Address prefix "stdio:" or "mmc:" will be ignored when
testing for matches.
.br
By pseudo\-class "clear_list" and pseudo\-patterns "banned", "caution",
"harmless", or "all", the lists may be made empty.
.br
E.g.: \-drive_class clear_list banned
.br
One will normally define the \-drive_class lists in one of the \fBxorriso\fR
Startup Files.
.br
Note: This is not a security feature but rather a bumper for the superuser to
prevent inadverted mishaps. For reliably blocking access to a device file you
have to deny its rw\-permissions in the filesystem.
.TP
\fB\-read_fs\fR "any"|"norock"|"nojoliet"|"ecma119"
Specify which kind of filesystem tree to load if present. If the wish cannot
be fulfilled, then ECMA\-119 names are loaded and converted according
......@@ -1025,7 +1048,7 @@ for timestamps of ISO 9660 nodes without a disk source file and as default
for superblock timestamps.
.br
If a timestring is given, then it is used for such timestamps. For the formats
of time strings see command \fB\-alter_date\fR.
of timestrings see command \fB\-alter_date\fR.
.TP
\fB\-disk_dev_ino\fR "on"|"ino_only"|"off"
Enable or disable processing of recorded file identification numbers
......@@ -4773,7 +4796,8 @@ write permission. Default is "sort_lba_off".
Option "o_excl_on" is the default unless the program was started with leafname
"osirrox". On GNU/Linux it tries to avoid using drives which are mounted or in
use by other libburn programs.
Option "o_excl_off" on GNU/Linux enables access to such drives. Drives which
Option "o_excl_off" on GNU/Linux enables access to such drives by the
equivalent of \-drive_access "shared:readonly". I.e. drives which
get acquired while "o_excl_off" will refuse to get blanked, formatted,
written, or ejected. But be aware that even harmless inquiries can spoil
ongoing burns of CD\-R[W] and DVD\-R[W].
......
......@@ -820,6 +820,9 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
(Note: prefix is "Creation Time: ")
"DVD obs 64 kB:" up to 1 result from -list_extras
argv[0]= "yes" or "no"
"Drive access: " up to 2 result from -dev, -indev, -toc
argv[0]= "exclusive", "shared"
argv[1]= "readonly","restricted"
"Drive current:" up to 2 results from -dev, -indev, -toc, others
argv[0]= command ("-dev", "-outdev", "-indev")
argv[1]= drive address
......@@ -1502,6 +1505,10 @@ int Xorriso_option_disk_pattern(struct XorrisO *xorriso, char *mode, int flag);
int Xorriso_option_displacement(struct XorrisO *xorriso, char *value,
int flag);
/* Command -drive_access "exclusive"|"shared":"readonly"|"unrestricted" */
/* @since 1.5.2 */
int Xorriso_option_drive_access(struct XorrisO *xorriso, char *mode, int flag);
/* Command -drive_class */
/* @since 0.3.2 */
int Xorriso_option_drive_class(struct XorrisO *xorriso,
......
No preview for this file type
......@@ -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.1, Apr 15, 2019"
@c man .TH XORRISO 1 "Version 1.5.1, Sep 04, 2019"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
......@@ -69,7 +69,7 @@
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images
with Rock Ridge extensions.
Copyright @copyright{} 2007 - 2017 Thomas Schmitt
Copyright @copyright{} 2007 - 2019 Thomas Schmitt
@quotation
Permission is granted to distrubute this text freely.
......@@ -903,6 +903,68 @@ apply. See above paragraph "Libburn drives".
An empty address string "" gives up the current output drive
without acquiring a new one. No writing is possible without an output drive.
@c man .TP
@item -drive_class "harmless"|"banned"|"caution"|"clear_list" disk_pattern
@kindex -drive_class controls drive accessability
@cindex Drive, accessability, -drive_class
Add a drive path pattern to one of the safety lists or make those lists empty.
There are three lists defined which get tested in the following sequence:
@*
If a drive address path matches the "harmless" list then the drive will be
accepted. If it is not a MMC device then the prefix "stdio:" will be prepended
automatically. This list is empty by default.
@*
Else if the path matches the "banned" list then the drive will not be
accepted by @command{xorriso} but rather lead to a FAILURE event.
This list is empty by default.
@*
Else if the path matches the "caution" list and if it is not a MMC device,
then its address must have the prefix "stdio:" or it will be rejected.
This list has by default one entry: "/dev".
@*
If a drive path matches no list then it is considered "harmless". By default
these are all paths which do not begin with directory "/dev".
@*
A path matches a list if one of its parent paths or itself matches a list
entry. Address prefix "stdio:" or "mmc:" will be ignored when
testing for matches.
@*
By pseudo-class "clear_list" and pseudo-patterns "banned", "caution",
"harmless", or "all", the lists may be made empty.
@*
E.g.: -drive_class clear_list banned
@*
One will normally define the -drive_class lists in one of the @command{xorriso}
Startup Files.
@*
Note: This is not a security feature but rather a bumper for the superuser to
prevent inadverted mishaps. For reliably blocking access to a device file you
have to deny its rw-permissions in the filesystem.
@c man .TP
@item -drive_access "exclusive"|"shared":"unrestricted"|"readonly"
@kindex -drive_access control device file locking
@cindex Device file locking, -drive_access
Control whether device file locking mechanisms shall be used when acquiring a
drive, and whether status or content of the medium in the drive may be
altered. Useful and most harmless are the setting "shared:readonly"
and the default setting "exclusive:unrestricted".
@*
"exclusive" enables tests and locks when acquiring the drive. It depends on the
operating system which locking mechanisms get applied, if any. On GNU/Linux
it is open(O_EXCL). On FreeBSD it is flock(LOCK_EX).
@*
"shared" disables the use of these mechanisms to become able to acquire drives
which are mounted, or opened by some process, or guarded by /dev/pktcdvd*.
@*
"unrestricted" enables all technically appropriate operations on an acquired
drive. "shared:unrestricted" risks to get own burn runs spoiled by other
processes or to vice versa spoil activities of such processes. So use
"exclusive:unrestricted" unless you know for sure that "shared" is safe.
@*
"readonly" disables operations which might surprise a co-user of the drive.
For