lo_mount: check for loop support needs privilege escalation (#437)

If there is no free loop device, the call of loopsetup -f will create one and return it. For this it needs privilege escalation.
It doesn't need those, if there is already an used device, but that cannot be guaranteed.

Closes #436
This commit is contained in:
Narrat 2022-04-07 15:20:38 +02:00 committed by GitHub
parent 6955719f04
commit b7822afaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
tomb
View File

@ -630,7 +630,7 @@ lo_mount() {
tpath="$1"
# check if we have support for loop mounting
TOMBLOOP=`losetup -f`
TOMBLOOP=`_sudo losetup -f`
[[ $? = 0 ]] || {
_warning "Loop mount of volumes is not possible on this machine, this error"
_warning "often occurs on VPS and kernels that don't provide the loop module."