summaryrefslogtreecommitdiff
path: root/src/lib/cross_linux.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-22 01:39:47 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-22 15:42:11 +0200
commit615a8e6967b5b0b59cf191a104569f05a6f0227b (patch)
tree17deb3a328313d6b4f72e84781830b076f9a34d5 /src/lib/cross_linux.cc
parentb2c1eb46888c3a606e751c037b6482306a461d5f (diff)
Get root before unmounting things on Linux.
Diffstat (limited to 'src/lib/cross_linux.cc')
-rw-r--r--src/lib/cross_linux.cc1
1 files changed, 1 insertions, 0 deletions
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) {