2016-04-07 16:24:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#################################################################################
|
|
|
|
#
|
|
|
|
# Lynis
|
|
|
|
# ------------------
|
|
|
|
#
|
|
|
|
# Copyright 2007-2013, Michael Boelen
|
|
|
|
# Copyright 2013-2016, CISOfy
|
|
|
|
#
|
|
|
|
# Website : https://cisofy.com
|
|
|
|
# Blog : http://linux-audit.com
|
|
|
|
# GitHub : https://github.com/CISOfy/lynis
|
|
|
|
#
|
|
|
|
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
|
|
|
# welcome to redistribute it under the terms of the GNU General Public License.
|
|
|
|
# See LICENSE file for usage of this software.
|
|
|
|
#
|
|
|
|
######################################################################
|
|
|
|
#
|
|
|
|
# Helper program to share details
|
|
|
|
#
|
|
|
|
######################################################################
|
|
|
|
#
|
|
|
|
# How to use:
|
|
|
|
# ------------
|
|
|
|
# Run: lynis show <option>
|
|
|
|
#
|
|
|
|
######################################################################
|
|
|
|
|
2016-04-12 21:59:23 +02:00
|
|
|
COMMANDS="audit show update"
|
2016-05-15 14:03:57 +02:00
|
|
|
HELPERS="audit configure show update"
|
2016-07-05 18:18:54 +02:00
|
|
|
OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--developer\n--help (-h)\n--info\n--license-key --log-file\n--manpage (--man)\n--no-colors --no-log\n--pentest\n--profile\n--plugins-dir\n--quiet (-q)\n--quick (-Q)\n--report-file\n--reverse-colors\n--tests\n--tests-category\n--upload\n--verbose\n--version (-V)\n--view-categories"
|
2016-04-13 16:12:22 +02:00
|
|
|
|
2016-07-13 13:20:55 +02:00
|
|
|
SHOW_ARGS="categories commands dbdir help hostids includedir language license logfile man options pidfile plugindir profiles release releasedate report settings tests version workdir"
|
|
|
|
SHOW_HELP="lynis show ${BROWN}categories${NORMAL} (display test categories)
|
|
|
|
lynis show ${BROWN}commands${NORMAL} (all available commands)
|
2016-05-14 18:04:26 +02:00
|
|
|
lynis show ${BROWN}dbdir${NORMAL} (database directory)
|
2016-04-12 21:59:23 +02:00
|
|
|
lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
|
2016-05-17 18:08:08 +02:00
|
|
|
lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system)
|
2016-05-14 18:04:26 +02:00
|
|
|
lynis show ${BROWN}includedir${NORMAL} (include directory for tests and functions)
|
2016-07-12 20:09:10 +02:00
|
|
|
lynis show ${BROWN}language${NORMAL} (configured or detected language)
|
2016-04-12 21:59:23 +02:00
|
|
|
lynis show ${BROWN}license${NORMAL} (license details)
|
2016-07-13 13:20:55 +02:00
|
|
|
lynis show ${BROWN}logfile${NORMAL} (location of logfile)
|
2016-04-12 21:59:23 +02:00
|
|
|
lynis show ${BROWN}man${NORMAL} (show help)
|
|
|
|
lynis show ${BROWN}options${NORMAL} (available flags and options)
|
|
|
|
lynis show ${BROWN}pidfile${NORMAL} (active file to stored process ID)
|
2016-04-13 16:12:22 +02:00
|
|
|
lynis show ${BROWN}plugindir${NORMAL} (directory with plugins)
|
2016-04-12 21:59:23 +02:00
|
|
|
lynis show ${BROWN}profiles${NORMAL} (discovered profiles)
|
|
|
|
lynis show ${BROWN}release${NORMAL} (version)
|
|
|
|
lynis show ${BROWN}releasedate${NORMAL} (date of release)
|
2016-07-13 13:20:55 +02:00
|
|
|
lynis show ${BROWN}report${NORMAL} (location of report data)
|
|
|
|
lynis show ${BROWN}settings${NORMAL} (display configured settings, ${WHITE}options:${NORMAL} ${CYAN}--brief --nocolors${NORMAL})
|
|
|
|
lynis show ${BROWN}tests${NORMAL} ${GRAY}[test]${NORMAL} (display information about one or more tests)
|
2016-04-25 15:49:45 +02:00
|
|
|
lynis show ${BROWN}tests skipped${NORMAL} (which tests to skip according profile)
|
2016-05-14 18:04:26 +02:00
|
|
|
lynis show ${BROWN}version${NORMAL} (${PROGRAM_NAME} version)
|
|
|
|
lynis show ${BROWN}workdir${NORMAL} (work directory)"
|
2016-04-12 21:59:23 +02:00
|
|
|
|
|
|
|
AUDIT_ARGS="( dockerfile | system )"
|
|
|
|
AUDIT_HELP="
|
2016-05-14 17:42:33 +02:00
|
|
|
${WHITE}lynis audit <target>${NORMAL}
|
2016-04-12 21:59:23 +02:00
|
|
|
|
2016-05-14 17:42:33 +02:00
|
|
|
${CYAN}audit dockerfile ${BROWN}<file>${NORMAL}
|
2016-04-12 21:59:23 +02:00
|
|
|
|
2016-05-14 17:42:33 +02:00
|
|
|
Perform security audit on a Docker build file
|
|
|
|
${GRAY}Example:${NORMAL}
|
|
|
|
lynis audit dockerfile Dockerfile
|
2016-04-12 21:59:23 +02:00
|
|
|
|
|
|
|
|
2016-05-14 17:42:33 +02:00
|
|
|
${CYAN}audit system ${GRAY}[options]${NORMAL}
|
|
|
|
|
|
|
|
Perform security system audit
|
|
|
|
|
|
|
|
${GRAY}Examples:${NORMAL}
|
|
|
|
lynis audit system
|
|
|
|
lynis audit system --cronjob
|
|
|
|
lynis audit system --profile developer.prf
|
|
|
|
lynis audit system --quick
|
|
|
|
|
|
|
|
|
|
|
|
${CYAN}audit system remote ${BROWN}<target> ${GRAY}[options]${NORMAL}
|
|
|
|
|
|
|
|
Perform security system audit on a remote target
|
|
|
|
|
|
|
|
${GRAY}Examples:${NORMAL}
|
|
|
|
lynis audit system remote 192.168.1.100
|
|
|
|
lynis audit system remote 192.168.1.100 --no-colors
|
|
|
|
|
2016-04-12 21:59:23 +02:00
|
|
|
"
|
2016-04-07 16:24:38 +02:00
|
|
|
|
|
|
|
UPDATE_ARGS="info release"
|
2016-05-14 17:42:33 +02:00
|
|
|
UPDATE_HELP="
|
|
|
|
${CYAN}update info${NORMAL}
|
|
|
|
|
|
|
|
Check version information
|
|
|
|
|
|
|
|
|
|
|
|
${CYAN}update release${NORMAL}
|
|
|
|
|
|
|
|
Perform update of release
|
|
|
|
|
|
|
|
"
|
2016-04-07 16:24:38 +02:00
|
|
|
|
2016-07-05 19:57:11 +02:00
|
|
|
SHOW_SETTINGS_ARGS="--brief --configured-only --nocolors"
|
2016-04-25 15:49:45 +02:00
|
|
|
SHOW_TESTS_ARGS="skipped"
|
|
|
|
|
2016-04-07 16:24:38 +02:00
|
|
|
COMMANDS_AUDIT_SYSTEM_USAGE="Usage: lynis audit system"
|
|
|
|
COMMANDS_AUDIT_SYSTEM_FUNCTION="Function: performs a security audit of the system"
|
|
|
|
|
|
|
|
if [ $# -gt 0 ]; then
|
|
|
|
case $1 in
|
2016-07-13 13:20:55 +02:00
|
|
|
"categories")
|
|
|
|
ViewCategories
|
|
|
|
;;
|
2016-04-07 16:24:38 +02:00
|
|
|
"commands")
|
|
|
|
if [ $# -eq 1 ]; then
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "\n${WHITE}Commands:${NORMAL}"
|
2016-04-12 21:59:23 +02:00
|
|
|
for I in ${COMMANDS}; do
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "lynis ${CYAN}${I}${NORMAL}"
|
2016-04-12 21:59:23 +02:00
|
|
|
done
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} ""
|
2016-04-07 16:24:38 +02:00
|
|
|
else
|
|
|
|
shift
|
|
|
|
if [ $# -eq 1 ]; then
|
2016-05-03 13:16:11 +02:00
|
|
|
case $1 in
|
2016-05-14 17:42:33 +02:00
|
|
|
"audit") ${ECHOCMD} "${AUDIT_HELP}" ;;
|
|
|
|
"show") ${ECHOCMD} "${SHOW_HELP}" ;;
|
2016-07-13 13:20:55 +02:00
|
|
|
"update") ${ECHOCMD} "No help available yet" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
*) ${ECHOCMD} "Unknown argument for 'commands'"
|
2016-05-03 13:16:11 +02:00
|
|
|
esac
|
|
|
|
else
|
|
|
|
shift
|
|
|
|
case $1 in
|
|
|
|
"dockerfile")
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "Usage: lynis audit dockerfile <file>"
|
2016-05-03 13:16:11 +02:00
|
|
|
;;
|
|
|
|
"system")
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "${COMMANDS_AUDIT_SYSTEM_USAGE}\n${COMMANDS_AUDIT_SYSTEM_FUNCTION}\n"
|
2016-05-03 13:16:11 +02:00
|
|
|
;;
|
|
|
|
*)
|
2016-07-13 13:20:55 +02:00
|
|
|
${ECHOCMD} "Unknown argument '$1' for commands"
|
2016-05-03 13:16:11 +02:00
|
|
|
;;
|
|
|
|
esac
|
2016-04-07 16:24:38 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
2016-05-14 18:04:26 +02:00
|
|
|
"dbdir")
|
2016-05-15 13:41:03 +02:00
|
|
|
${ECHOCMD} "${DBDIR}"
|
2016-05-14 18:04:26 +02:00
|
|
|
;;
|
2016-07-13 13:20:55 +02:00
|
|
|
"help" | "--help" | "-h")
|
2016-04-07 16:24:38 +02:00
|
|
|
if [ $# -eq 1 ]; then
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "${PROGRAM_NAME} ${PROGRAM_VERSION} - Help"
|
|
|
|
${ECHOCMD} "=========================="
|
|
|
|
${ECHOCMD} ""
|
|
|
|
${ECHOCMD} "${WHITE}Commands${NORMAL}:"
|
2016-04-12 21:59:23 +02:00
|
|
|
for I in ${COMMANDS}; do
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "${CYAN}${I}${NORMAL}"
|
2016-04-12 21:59:23 +02:00
|
|
|
done
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} ""
|
2016-05-14 18:04:26 +02:00
|
|
|
${ECHOCMD} "Use 'lynis show help ${CYAN}<command>${NORMAL}' to see details"
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} ""; ${ECHOCMD} ""
|
|
|
|
${ECHOCMD} "${WHITE}Options${NORMAL}:\n${GRAY}${OPTIONS}${NORMAL}"
|
2016-04-07 16:24:38 +02:00
|
|
|
else
|
|
|
|
shift
|
|
|
|
case $1 in
|
2016-05-14 17:42:33 +02:00
|
|
|
"audit") ${ECHOCMD} "${AUDIT_HELP}" ;;
|
|
|
|
"show") ${ECHOCMD} "${SHOW_HELP}" ;;
|
|
|
|
"update") ${ECHOCMD} "${UPDATE_HELP}" ;;
|
|
|
|
"?") ${ECHOCMD} "${SHOW_ARGS}" ;;
|
|
|
|
*) ${ECHOCMD} "Invalid argument provided for lynis show help" ;;
|
2016-04-07 16:24:38 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
;;
|
2016-05-15 14:03:57 +02:00
|
|
|
"helpers") for I in ${HELPERS}; do ${ECHOCMD} ${I}; done ;;
|
2016-05-17 18:08:08 +02:00
|
|
|
"hostids" | "hostid")
|
|
|
|
${ECHOCMD} "hostid=${HOSTID}"
|
|
|
|
${ECHOCMD} "hostid2=${HOSTID2}"
|
|
|
|
;;
|
2016-05-14 18:04:26 +02:00
|
|
|
"includedir")
|
2016-05-15 13:41:03 +02:00
|
|
|
${ECHOCMD} "${INCLUDEDIR}"
|
2016-05-14 18:04:26 +02:00
|
|
|
;;
|
2016-07-12 20:09:10 +02:00
|
|
|
"language") ${ECHOCMD} "${LANGUAGE}" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
"license") ${ECHOCMD} "${PROGRAM_LICENSE}" ;;
|
2016-07-13 13:20:55 +02:00
|
|
|
"logfile") ${ECHOCMD} "${LOGFILE}" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
"man") ${ECHOCMD} "Use ./lynis --man or man lynis" ;;
|
|
|
|
"options") ${ECHOCMD} "${OPTIONS}" ;;
|
|
|
|
"pidfile") ${ECHOCMD} "${PIDFILE}" ;;
|
|
|
|
"profile" | "profiles") for I in ${PROFILES}; do ${ECHOCMD} ${I}; done ;;
|
2016-05-15 14:03:57 +02:00
|
|
|
"profiledir") ${ECHOCMD} "${PROFILEDIR}" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
"plugindir") ${ECHOCMD} "${PLUGINDIR}" ;;
|
2016-05-17 18:12:49 +02:00
|
|
|
"release") ${ECHOCMD} "${PROGRAM_VERSION}-${PROGRAM_RELEASE_TYPE}" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
"releasedate") ${ECHOCMD} "${PROGRAM_RELEASE_DATE}" ;;
|
2016-07-13 13:20:55 +02:00
|
|
|
"report") ${ECHOCMD} "${REPORTFILE}" ;;
|
2016-07-05 16:49:10 +02:00
|
|
|
"settings")
|
|
|
|
BRIEF_OUTPUT=0
|
2016-07-05 19:57:11 +02:00
|
|
|
COLORED_OUTPUT=1
|
|
|
|
CONFIGURED_ONLY_OUTPUT=0
|
2016-07-05 16:49:10 +02:00
|
|
|
while [ $# -gt 1 ]; do
|
|
|
|
shift
|
|
|
|
case $1 in
|
2016-07-05 19:57:11 +02:00
|
|
|
"--brief" | "--br") BRIEF_OUTPUT=1 ;;
|
|
|
|
"--configured-only" | "--co") CONFIGURED_ONLY_OUTPUT=1 ;;
|
2016-07-18 19:58:32 +02:00
|
|
|
"--nocolors" | "--no-colors" | "--nc") COLORED_OUTPUT=0; COLORS=0 ;;
|
2016-07-05 16:49:10 +02:00
|
|
|
*)
|
|
|
|
${ECHOCMD} "${RED}Error${NORMAL}: Invalid argument provided to 'lynis show settings'\n\n"
|
|
|
|
${ECHOCMD} "Suggestions:"
|
|
|
|
for I in ${SHOW_SETTINGS_ARGS}; do ${ECHOCMD} "lynis show settings ${I}"; done
|
|
|
|
ExitFatal
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2016-07-18 19:58:32 +02:00
|
|
|
if [ ${COLORED_OUTPUT} -eq 0 ]; then RemoveColors; fi
|
2016-07-05 16:49:10 +02:00
|
|
|
# Sort all settings and display them
|
|
|
|
SETTINGS=$(sort ${SETTINGS_FILE} | sed 's/ /:space:/g')
|
|
|
|
for LINE in ${SETTINGS}; do
|
|
|
|
SETTING=$(echo ${LINE} | awk -F';' '{print $1}')
|
|
|
|
VALUE=$(echo ${LINE} | awk -F';' '{print $2}')
|
|
|
|
DESCRIPTION=$(echo ${LINE} | awk -F';' '{print $3}' | sed 's/:space:/ /g')
|
|
|
|
LINESIZE=$(echo "${SETTING}=${VALUE}" | wc -m | tr -d ' ')
|
|
|
|
SPACES=$((60 - ${LINESIZE}))
|
2016-07-05 19:57:11 +02:00
|
|
|
if [ -z "${VALUE}" -a ${CONFIGURED_ONLY_OUTPUT} -eq 0 ]; then VALUE="${GRAY}[not configured]${NORMAL}"; fi
|
2016-07-05 16:49:10 +02:00
|
|
|
if [ ! -z "${VALUE}" ]; then
|
|
|
|
if [ ${BRIEF_OUTPUT} -eq 0 ]; then ${ECHOCMD} "${GRAY}# ${DESCRIPTION}${NORMAL}"; fi
|
|
|
|
${ECHOCMD} "${WHITE}${SETTING}${NORMAL}=${CYAN}${VALUE}${NORMAL}"
|
|
|
|
if [ ${BRIEF_OUTPUT} -eq 0 ]; then ${ECHOCMD} ""; fi
|
|
|
|
fi
|
|
|
|
done
|
2016-07-05 19:57:11 +02:00
|
|
|
if [ ${BRIEF_OUTPUT} -eq 0 -a ${CONFIGURED_ONLY_OUTPUT} -eq 0 -a ${COLORED_OUTPUT} -eq 1 ]; then
|
|
|
|
if [ ${COLORS} -eq 1 ]; then
|
2016-07-13 13:20:55 +02:00
|
|
|
${ECHOCMD} "# Add --brief to hide descriptions, --configured-only to show configured items only, or --nocolors to remove colors"
|
2016-07-05 19:57:11 +02:00
|
|
|
else
|
2016-07-13 13:20:55 +02:00
|
|
|
${ECHOCMD} "# Add --brief to hide descriptions, --configured-only to show configured items only"
|
2016-07-05 19:57:11 +02:00
|
|
|
fi
|
|
|
|
fi
|
2016-07-05 17:26:27 +02:00
|
|
|
|
2016-07-05 16:49:10 +02:00
|
|
|
;;
|
2016-04-25 15:49:45 +02:00
|
|
|
"tests")
|
2016-07-13 13:20:55 +02:00
|
|
|
if [ $# -gt 1 ]; then
|
2016-04-25 15:49:45 +02:00
|
|
|
shift
|
|
|
|
case $1 in
|
2016-07-13 13:20:55 +02:00
|
|
|
"skipped")
|
|
|
|
if [ -z "${SKIP_TESTS}" ]; then
|
|
|
|
${ECHOCMD} "# ${CYAN}No tests are skipped (according profile)${NORMAL}"
|
|
|
|
else
|
|
|
|
${ECHOCMD} "# Skipped tests (according profile)"
|
|
|
|
${ECHOCMD} "${SKIP_TESTS}"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ -f ${DBDIR}/tests.db ]; then
|
|
|
|
SEARCH="$1"
|
|
|
|
FIND=$(grep "^${SEARCH}" ${DBDIR}/tests.db | sed "s/ /:space:/g")
|
|
|
|
if [ -z "${FIND}" ]; then
|
|
|
|
${ECHOCMD} "Error: Invalid argument provided to 'lynis show tests'\n\n"
|
|
|
|
${ECHOCMD} "Suggestions:"
|
|
|
|
for I in ${SHOW_TESTS_ARGS}; do ${ECHOCMD} "lynis show tests ${I}"; done
|
|
|
|
ExitFatal
|
|
|
|
else
|
|
|
|
for ITEM in ${FIND}; do
|
|
|
|
TEST_DESCRIPTION=$(echo ${ITEM} | sed "s/:space:/ /g" | awk -F: '{print $5}')
|
|
|
|
TEST=$(echo ${ITEM} | awk -F: '{print $1}')
|
|
|
|
TEST_TYPE=$(echo ${ITEM} | awk -F: '{print $2}')
|
|
|
|
TEST_OS=$(echo ${ITEM} | awk -F: '{print $4}')
|
|
|
|
TEST_SKIPPED=0
|
|
|
|
${ECHOCMD} "${CYAN}${TEST}${NORMAL} [type=${TEST_TYPE}]"
|
|
|
|
${ECHOCMD} "==================================="
|
|
|
|
${ECHOCMD} ""
|
|
|
|
${ECHOCMD} "Description:"
|
|
|
|
${ECHOCMD} "${WHITE}${TEST_DESCRIPTION}${NORMAL}"
|
|
|
|
${ECHOCMD} ""
|
|
|
|
${ECHOCMD} "Perform test:"
|
|
|
|
if [ "${TEST_OS}" = "" ]; then
|
|
|
|
${ECHOCMD} " Operating System: ${GREEN}Yes${NORMAL} (all systems)"
|
|
|
|
elif [ "${TEST_OS}" = "${OS}" ]; then
|
|
|
|
${ECHOCMD} " Operating System: ${GREEN}Yes${NORMAL} (${TEST_OS} only)"
|
|
|
|
else
|
|
|
|
${ECHOCMD} " Operating System: ${RED}No${NORMAL} (${TEST_OS} only)"
|
|
|
|
TEST_SKIPPED=1
|
|
|
|
fi
|
|
|
|
if [ -z "${SKIP_TESTS}" ]; then
|
|
|
|
${ECHOCMD} " Profile: ${GREEN}Yes${NORMAL} (not configured)"
|
|
|
|
else
|
|
|
|
FIND=$(echo ${SKIP_TESTS} | egrep "${TEST}")
|
|
|
|
if [ -z "${FIND}" ]; then
|
|
|
|
${ECHOCMD} " Profile: ${GREEN}Yes${NORMAL} (test not marked to be skipped)"
|
|
|
|
else
|
|
|
|
${ECHOCMD} " Profile: ${RED}No${NORMAL} (marked test as to be skipped)"
|
|
|
|
TEST_SKIPPED=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ ${TEST_SKIPPED} -eq 1 ]; then ${ECHOCMD} ""; ${ECHOCMD} " This test will NOT be performed on this system"; fi
|
|
|
|
|
|
|
|
${ECHOCMD} ""
|
|
|
|
${ECHOCMD} ""
|
|
|
|
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
${ECHOCMD} "${RED}ERROR:${NORMAL} Can not find tests database"
|
|
|
|
ExitFatal
|
|
|
|
fi
|
|
|
|
;;
|
2016-04-25 15:49:45 +02:00
|
|
|
esac
|
2016-07-13 13:20:55 +02:00
|
|
|
else
|
|
|
|
if [ -f ${DBDIR}/tests.db ]; then
|
|
|
|
${ECHOCMD} "# Test OS Description"
|
|
|
|
${ECHOCMD} "# ======================================================================================"
|
|
|
|
awk -F: '{ if ($1 !~ /^#/) printf("%-12s %-10s %s\n",$1,$4,$5)}' ${DBDIR}/tests.db
|
|
|
|
else
|
|
|
|
${ECHOCMD} "${RED}ERROR:${NORMAL} Can not find tests database"
|
|
|
|
ExitFatal
|
|
|
|
fi
|
2016-04-25 15:49:45 +02:00
|
|
|
fi
|
|
|
|
;;
|
2016-05-17 18:12:49 +02:00
|
|
|
"version") ${ECHOCMD} "${PROGRAM_VERSION}" ;;
|
2016-05-14 18:04:26 +02:00
|
|
|
"workdir") ${ECHOCMD} "${WORKDIR}" ;;
|
2016-05-14 17:42:33 +02:00
|
|
|
"?") ${ECHOCMD} "${SHOW_ARGS}" ;;
|
2016-07-13 13:20:55 +02:00
|
|
|
*) ${ECHOCMD} "Unknown argument '${RED}$1${NORMAL}' for lynis show" ;;
|
2016-04-07 16:24:38 +02:00
|
|
|
esac
|
|
|
|
else
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "\n ${WHITE}Provide an additional argument${NORMAL}\n\n"
|
2016-04-07 16:24:38 +02:00
|
|
|
for I in ${SHOW_ARGS}; do
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} " lynis show ${BROWN}${I}${NORMAL}"
|
2016-04-07 16:24:38 +02:00
|
|
|
done
|
2016-05-14 17:42:33 +02:00
|
|
|
${ECHOCMD} "\n"
|
2016-07-13 13:20:55 +02:00
|
|
|
|
|
|
|
${ECHOCMD} "Use '$0 show commands show' for extended help about the show command"
|
2016-04-07 16:24:38 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
ExitClean
|
|
|
|
|
2016-04-19 19:43:51 +02:00
|
|
|
# More additions:
|
|
|
|
# - categories
|
|
|
|
# - workdir
|
|
|
|
|
2016-04-07 16:24:38 +02:00
|
|
|
# The End
|