From f8f508f6f6c7db5a18f04d84646c070b314c5cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88tz=20Salzmann?= Date: Mon, 24 May 2021 13:28:18 +0200 Subject: [PATCH] Fix wrong mountpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In ed50e3fa041b35f274a30e0f2ac425252485e7f0 _jailpath was updated to include the full path on the host. The test and if required mkdir were then done with the jail’s root pirectory perpended to that full path. --- usr/local/share/bastille/mount.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/mount.sh b/usr/local/share/bastille/mount.sh index 82147350..298d42a3 100644 --- a/usr/local/share/bastille/mount.sh +++ b/usr/local/share/bastille/mount.sh @@ -97,8 +97,8 @@ for _jail in ${JAILS}; do _fstab_entry="${_hostpath} ${_jailpath} ${_type} ${_perms} ${_checks}" ## Create mount point if it does not exist. -- cwells - if [ ! -d "${bastille_jailsdir}/${_jail}/root/${_jailpath}" ]; then - if ! mkdir -p "${bastille_jailsdir}/${_jail}/root/${_jailpath}"; then + if [ ! -d "${_jailpath}" ]; then + if ! mkdir -p "${_jailpath}"; then error_exit "Failed to create mount point inside jail." fi fi