Commit 1170a9b8 authored by Thomas Schmitt's avatar Thomas Schmitt

New xorriso-dd-target option -trust_lsblk_udev

parent 49690fca
......@@ -15,7 +15,7 @@
# announces.
xdt_print_version() {
echo "xorriso-dd-target , version 1.5.3 , 2020.01.08.204757"
echo "xorriso-dd-target , version 1.5.3 , 2020.02.12.145929"
}
......@@ -123,6 +123,10 @@ xdt_print_usage() {
echo " If no filesystems are detected and the program"
echo " has no superuser power, the device is not advised."
echo " If -DO_WRITE is given, run umount and dd by sudo."
echo " -trust_lsblk_udev Suppress the reason no_fs_while_not_su- if lsblk"
echo " is linked with libudev.so. In this case it is very"
echo " likely that lsblk can retrieve FSTYPE even if"
echo " run by a non-priviledged user."
echo " -image_file PATH Set the path of the image file which shall be"
echo " written to a device. Its size will be set as"
echo " -min_size."
......@@ -220,6 +224,7 @@ xdt_reset_job() {
xdt_dummy_force=
xdt_no_pacifier=
xdt_do_plug_test=
xdt_trust_lsblk_udev=
# Status
xdt_sudo_cmd=
......@@ -233,6 +238,7 @@ xdt_reset_job() {
}
## Predict superuser power. Possibly enable sudo with lsblk -o FSTYPE and dd.
## Also predict whether lsblk -o FSTYPE will bring results as non-root.
xdt_predict_su_power() {
if test "$(whoami)" = "root"
then
......@@ -251,6 +257,16 @@ xdt_predict_su_power() {
return 11
fi
fi
# lsblk linked with libudev.so usually can obtain filesystem info
# without superuser powers.
if test -n "$xdt_trust_lsblk_udev"
then
if ldd "$xdt_lsblk_cmd" | grep '\tlibudev\.so' >/dev/null
then
xdt_lsblk_fs_wo_su=y
fi
fi
return 0
}
......@@ -308,6 +324,9 @@ xdt_arg_interpreter() {
elif test "X$xdt_i" = "X-look_for_iso"
then
xdt_look_for_iso=y
elif test "X$xdt_i" = "X-trust_lsblk_udev"
then
xdt_trust_lsblk_udev=y
elif test "X$xdt_i" = "X-with_sudo"
then
xdt_with_sudo=y
......@@ -604,7 +623,7 @@ xdt_list_devices() {
# Decide whether the found filesystems look dispensible enough
xdt_reasons="${xdt_reasons}${xdt_good_fs}${xdt_bad_fs}"
if test "${xdt_bad_fs}${xdt_good_fs}" = "" \
&& test -z "$xdt_have_su_power"
&& test -z "$xdt_have_su_power" && test -z "$xdt_lsblk_fs_wo_su"
then
xdt_yucky=y
xdt_reasons="${xdt_reasons}no_fs_while_not_su- "
......
......@@ -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-DD-TARGET 1 "Version 1.5.3, Jan 7, 2020"
.TH XORRISO-DD-TARGET 1 "Version 1.5.3, Fep 12, 2020"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -498,6 +498,16 @@ program as superuser.
If \-DO_WRITE \-with_sudo is given, then the programs umount and dd will be run
by sudo, too.
.TP
\fB\-trust_lsblk_udev\fR
Suppress the reason no_fs_while_not_su\- if lsblk is linked with libudev.so.
In this case it is likely that lsblk can retrieve FSTYPE even if run
by a non\-priviledged user.
.br
This option is intended for use by frontend programs which are certain
that they do not encounter a udev\-using version of lsblk which nevertheless
fails to detect existing filesystems. Human users should better acquire
superuser powers if reason no_fs_while_not_su\- is reported.
.TP
\fB\-image_file\fR PATH
Set the path of the image file which shall be written to a device. Its size
will be set as \-min_size.
......
......@@ -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-DD-TARGET 1 "Version 1.5.3, Jan 7, 2020"
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.3, Fep 12, 2020"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
......@@ -630,6 +630,18 @@ program as superuser.
If -DO_WRITE -with_sudo is given, then the programs umount and dd will be run
by sudo, too.
@c man .TP
@item -trust_lsblk_udev
@kindex -trust_lsblk_udev suppress no_fs_while_not_su-
@cindex suppress no_fs_while_not_su-, -trust_lsblk_udev
Suppress the reason no_fs_while_not_su- if lsblk is linked with libudev.so.
In this case it is likely that lsblk can retrieve FSTYPE even if run
by a non-priviledged user.
@*
This option is intended for use by frontend programs which are certain
that they do not encounter a udev-using version of lsblk which nevertheless
fails to detect existing filesystems. Human users should better acquire
superuser powers if reason no_fs_while_not_su- is reported.
@c man .TP
@item -image_file PATH
@kindex -image_file set path of disk image file
@cindex disk image file, set path, -image_file
......
#define Xorriso_timestamP "2020.01.20.132834"
#define Xorriso_timestamP "2020.02.12.145929"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment