From 205be1afdd703a51e5b9fc6109e4e656112b605f Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Wed, 29 Jan 2025 07:59:47 -0700 Subject: [PATCH] console: Fix _jail > TARGET --- usr/local/share/bastille/console.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/console.sh b/usr/local/share/bastille/console.sh index 96690b3de..33851a052 100644 --- a/usr/local/share/bastille/console.sh +++ b/usr/local/share/bastille/console.sh @@ -94,10 +94,10 @@ fi validate_user() { if jexec -l "${TARGET}" id "${USER}" >/dev/null 2>&1; then - USER_SHELL="$(jexec -l "${_jail}" getent passwd "${USER}" | cut -d: -f7)" + USER_SHELL="$(jexec -l "${TARGET}" getent passwd "${USER}" | cut -d: -f7)" if [ -n "${USER_SHELL}" ]; then - if jexec -l "${_jail}" grep -qwF "${USER_SHELL}" /etc/shells; then - jexec -l "${_jail}" $LOGIN -f "${USER}" + if jexec -l "${TARGET}" grep -qwF "${USER_SHELL}" /etc/shells; then + jexec -l "${TARGET}" $LOGIN -f "${USER}" else echo "Invalid shell for user ${USER}" fi