diff options
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -1,10 +1,5 @@ #!/bin/sh -# 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" "$@" - ################################################################################# # # Lynis @@ -27,15 +22,21 @@ exec /usr/xpg4/bin/sh "$0" "$@" # ################################################################################# # + # 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" "$@" +# +################################################################################# +# # Program information PROGRAM_NAME="Lynis" PROGRAM_AUTHOR="CISOfy" PROGRAM_AUTHOR_CONTACT="lynis-dev@cisofy.com" # Version details - PROGRAM_RELEASE_DATE="2017-03-05" - PROGRAM_RELEASE_TIMESTAMP=1488378460 - PROGRAM_RELEASE_TYPE="dev" # dev or final + PROGRAM_RELEASE_DATE="2017-03-09" + PROGRAM_RELEASE_TIMESTAMP=1489058902 + PROGRAM_RELEASE_TYPE="final" # dev or final PROGRAM_VERSION="2.4.5" # Source, documentation and license @@ -103,7 +104,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta if [ ! -f ${DBDIR}/languages/en ]; then echo "Could not find languages directory (file: ${DBDIR}/languages/en)" exit 1 - else + else . ${DBDIR}/languages/en fi @@ -223,7 +224,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta # Now determine if we are root (UID = 0) if [ ${MYID} -eq 0 ]; then PRIVILEGED=1 - else + else Debug "Starting Lynis non-privileged" # Implied pentesting mode if not performed by root user PENTESTINGMODE=1 @@ -336,7 +337,7 @@ ${YELLOW}Note: ${WHITE}Cancelling the program can leave temporary files behind${ if [ ${CRONJOB} -eq 1 ]; then echo "Quitting, to prevent multiple cron jobs running at the same time" exit 1 # Manually exit, no cleanups to prevent deleting an active PID file - else + else wait_for_keypress fi @@ -549,7 +550,7 @@ ${NORMAL} Display --indent 4 --text "${YELLOW}Notice:${NORMAL} no language file found for '${LANGUAGE}' (tried: ${DBDIR}/languages/${LANGUAGE})" if IsDeveloperVersion; then Display --indent 4 --text "See https://github.com/CISOfy/lynis-sdk/documentation/10-translations.md for more details to help translating Lynis"; fi sleep 5 - else + else LogText "Importing language file (${DBDIR}/languages/${LANGUAGE})" . ${DBDIR}/languages/${LANGUAGE} fi @@ -657,12 +658,14 @@ ${NORMAL} # LogText "Test: Checking for program update..." UPDATE_AVAILABLE=0 + if [ ${SKIP_UPGRADE_TEST} -eq 1 ]; then LogText "Upgrade test skipped due profile option set (skip_upgrade_test)" PROGRAM_LV="${PROGRAM_AC}" else CheckUpdates fi + if [ "${PROGRAM_AC}" = "" -o "${PROGRAM_LV}" = "" ]; then Display --indent 2 --text "- Program update status... " --result UNKNOWN --color YELLOW LogText "Result: Update check failed. No network connection?" |