diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index aef59e38..74c12e67 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -58,7 +58,7 @@ error_notify() { # Notify message on error and exit error_exit() { - error_notify $@ + error_notify "$@" exit 1 } diff --git a/usr/local/share/bastille/rdr.sh b/usr/local/share/bastille/rdr.sh index 9e3ebf7b..6bd7fbcd 100644 --- a/usr/local/share/bastille/rdr.sh +++ b/usr/local/share/bastille/rdr.sh @@ -183,21 +183,21 @@ while [ $# -gt 0 ]; do jail_port=$3 shift 3 if [ $# -gt 3 ]; then - for last in $@; do + for last in "$@"; do true done if [ $2 == "(" ] && [ $last == ")" ] ; then check_jail_validity - persist_rdr_log_rule $proto $host_port $jail_port $@ - load_rdr_log_rule $proto $host_port $jail_port $@ + persist_rdr_log_rule $proto $host_port $jail_port "$@" + load_rdr_log_rule $proto $host_port $jail_port "$@" shift $# else usage fi elif [ $# -eq 1 ]; then check_jail_validity - persist_rdr_log_rule $proto $host_port $jail_port $@ - load_rdr_log_rule $proto $host_port $jail_port $@ + persist_rdr_log_rule $proto $host_port $jail_port "$@" + load_rdr_log_rule $proto $host_port $jail_port "$@" shift 1 else usage