summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2022-05-22 09:25:01 -0400
committerGökay ŞATIR <gokaysatir@gmail.com>2022-08-05 15:58:08 +0300
commitf80d88fd5bf0959d633c229624802fcbbba3dea1 (patch)
tree657164cde578d8894709aedb2389d4eb7b35dff7
parentBump package version to 21.11.6.1 (diff)
downloadonline-f80d88fd5bf0959d633c229624802fcbbba3dea1.tar.gz
online-f80d88fd5bf0959d633c229624802fcbbba3dea1.zip
wsd: privatize internal JailUtil helpers
Change-Id: I86c87f162fd174d888cb167d7d89ccd0d13cadeb Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
-rw-r--r--common/JailUtil.cpp5
-rw-r--r--common/JailUtil.hpp3
2 files changed, 3 insertions, 5 deletions
diff --git a/common/JailUtil.cpp b/common/JailUtil.cpp
index ac9bf32d14..8b523783ae 100644
--- a/common/JailUtil.cpp
+++ b/common/JailUtil.cpp
@@ -60,7 +60,8 @@ bool remountReadonly(const std::string& source, const std::string& target)
return res;
}
-bool unmount(const std::string& target)
+/// Unmount a bind-mounted jail directory.
+static bool unmount(const std::string& target)
{
LOG_DBG("Unmounting [" << target << ']');
const bool res = coolmount("-u", "", target);
@@ -98,7 +99,7 @@ bool isJailCopied(const std::string& root)
return delFileStat.exists();
}
-bool safeRemoveDir(const std::string& path)
+static bool safeRemoveDir(const std::string& path)
{
// Always unmount, just in case.
unmount(path);
diff --git a/common/JailUtil.hpp b/common/JailUtil.hpp
index df103bd8a4..07e74f92ec 100644
--- a/common/JailUtil.hpp
+++ b/common/JailUtil.hpp
@@ -24,9 +24,6 @@ bool bind(const std::string& source, const std::string& target);
/// Remount a bound mount point as readonly.
bool remountReadonly(const std::string& source, const std::string& target);
-/// Unmount a bind-mounted jail directory.
-bool unmount(const std::string& target);
-
/// Marks a jail as having been copied instead of mounted.
void markJailCopied(const std::string& root);