From 81c8f1f2a6a4c2b554853ca15fda2ee2cf2e52d2 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sat, 29 Jun 2019 19:29:42 +0200 Subject: [PATCH] Security: don't allow uninitialized variables (set as a strict default now) --- lynis | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lynis b/lynis index 8c016110..727e2894 100755 --- a/lynis +++ b/lynis @@ -22,6 +22,9 @@ # ################################################################################# # + # Code quality: don't allow using undefined variables + set -o nounset + # In Solaris /bin/sh is not POSIX, but /usr/xpg4/bin/sh is. # Switch to /usr/xpg4/bin/sh if it exists and we are not already running it. test "$_" != "/usr/xpg4/bin/sh" && test -f /usr/xpg4/bin/sh && exec /usr/xpg4/bin/sh "$0" "$@" @@ -35,10 +38,10 @@ PROGRAM_AUTHOR_CONTACT="lynis-dev@cisofy.com" # Version details - PROGRAM_RELEASE_DATE="2019-06-24" + PROGRAM_RELEASE_DATE="2019-06-29" PROGRAM_RELEASE_TIMESTAMP=1561383761 - PROGRAM_RELEASE_TYPE="final" # dev or final - PROGRAM_VERSION="2.7.5" + PROGRAM_RELEASE_TYPE="dev" # dev or final + PROGRAM_VERSION="3.0.0" # Source, documentation and license PROGRAM_SOURCE="https://github.com/CISOfy/lynis" @@ -55,11 +58,6 @@ DISPLAY_LANG="${LANG}" # required by function Display to deal with multi-bytes characters. - # Code quality: - # Set strict checking for development version for first part of code. After - # initialization this is checked with strict profile option. - if [ ${PROGRAM_RELEASE_TYPE} = "dev" ]; then set -u; fi - # ################################################################################# #