diff options
author | mboelen <michael@cisofy.com> | 2016-04-26 14:40:21 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2016-04-26 14:40:21 +0300 |
commit | 55799a524c19ee4f7ebc291ad9b0153796303383 (patch) | |
tree | c59a8b41d74af33fc8b587fed83241d165445c92 | |
parent | 2cefdb79d6ea80d5cb897064c6e8df92312a63b4 (diff) |
Added developer mode (--developer)
-rw-r--r-- | include/consts | 1 | ||||
-rw-r--r-- | include/functions | 13 | ||||
-rw-r--r-- | include/helper_show | 2 | ||||
-rw-r--r-- | include/parameters | 5 | ||||
-rw-r--r-- | lynis.8 | 3 |
5 files changed, 23 insertions, 1 deletions
diff --git a/include/consts b/include/consts index 1fbc4e9f..4dd60428 100644 --- a/include/consts +++ b/include/consts @@ -74,6 +74,7 @@ unset LANG CUSTOM_URL_PREPEND="" CUSTOM_URL_PROTOCOL="" DB2_RUNNING=0 + DEVELOPER_MODE=0 DISCOVERED_BINARIES="" DOCKER_DAEMON_RUNNING=0 ERROR_ON_WARNINGS=0 diff --git a/include/functions b/include/functions index b29a29e9..e7fdd97a 100644 --- a/include/functions +++ b/include/functions @@ -44,6 +44,7 @@ # FileIsReadable Check if a file is readable or directory accessible # GetHostID Retrieve an unique ID for this host # IsDebug Check if --debug is used +# IsDeveloperMode Check if --developer is used # IsRunning Check if a process is running # InsertSection Insert a section block # InsertPluginSection Insert a section block for plugins @@ -180,6 +181,7 @@ return $RETVAL } + ################################################################################ # Name : TestCase_Equal() # Description : Test case for checking if value whether value is equal to value @@ -898,6 +900,17 @@ ################################################################################ + # Name : IsDeveloperMode() + # Description : Check if we are in development mode (--developer) + # Returns : (0 - True, 1 - False) + ################################################################################ + + IsDeveloperMode() { + if [ ${DEVELOPER_MODE} -eq 1 ]; then return 0; else return 1; fi + } + + + ################################################################################ # Name : IsRunning() # Description : Check if a process is running # Returns : 0 (process is running), 1 (process not running) diff --git a/include/helper_show b/include/helper_show index fb194fa8..5a217931 100644 --- a/include/helper_show +++ b/include/helper_show @@ -29,7 +29,7 @@ ###################################################################### COMMANDS="audit show update" -OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\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" +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" SHOW_ARGS="commands help license man options pidfile plugindir profiles release releasedate tests version" SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands) diff --git a/include/parameters b/include/parameters index 7ffb1905..0fa63c7f 100644 --- a/include/parameters +++ b/include/parameters @@ -140,6 +140,11 @@ DEBUG=1 ;; + # Developer mode (more details when creating tests) + --developer) + DEVELOPER_MODE=1 + ;; + # Display all available options with short alias --dump-options | --dumpoptions) OPTIONS="--auditor @@ -68,6 +68,9 @@ breaks). .B \-\-debug Display debug information to screen for troubleshooting purposes. .TP +.B \-\-developer +Display developer information when creating tests. +.TP .B \-\-dump\-options Show all available parameters. .TP |