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

This commit is contained in:
2019-09-08 12:30:52 +02:00
parent 8828d6f465
commit 901939986a
15 changed files with 509 additions and 288 deletions

View File

@ -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].