From 615a8e6967b5b0b59cf191a104569f05a6f0227b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 22 Apr 2021 01:39:47 +0200 Subject: [PATCH] Get root before unmounting things on Linux. --- src/lib/cross_linux.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 8ce72d6fc..510bce8c3 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -356,6 +356,7 @@ bool Drive::unmount () { for (auto i: _mount_points) { + PrivilegeEscalator esc; int const r = umount(i.string().c_str()); LOG_DISK("Tried to unmount %1 and got %2 and %3", i.string(), r, errno); if (r == -1) { -- 2.30.2