From 7d3f77e4c46cfdd3ea8ec5956fe9762753917c5d Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 12 Jul 2025 11:55:48 -0600 Subject: [PATCH] =?UTF-8?q?create:=20Don=E2=80=99t=20allow=20-|=5F=20in=20?= =?UTF-8?q?VNET=20jail=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/local/share/bastille/create.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index c187c072..01052e42 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -69,6 +69,8 @@ validate_name() { # Make sure NAME has only allowed characters if [ -n "$(echo "${NAME_SANITY}" | awk "/^[-_].*$/" )" ]; then error_exit "[ERROR]: Jail names may not begin with (-|_) characters!" + elif [ "${VNET_JAIL}" -eq 1 ] && echo "${NAME_VERIFY}" | grep -qE '(-|_)'; then + error_exit "[ERROR]: VNET jail names may not contain (-|_) characters." elif [ "${NAME_VERIFY}" != "${NAME_SANITY}" ]; then error_exit "[ERROR]: Jail names may not contain special characters!" elif echo "${NAME_VERIFY}" | grep -qE '^[0-9]+$'; then @@ -759,6 +761,7 @@ EMPTY_JAIL="" THICK_JAIL="" CLONE_JAIL="" VNET_JAIL="" +VNET_JAIL_BRIDGE="" VLAN_ID="" LINUX_JAIL="" STATIC_MAC=""