mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Added developer mode (--developer)
This commit is contained in:
parent
2cefdb79d6
commit
55799a524c
@ -74,6 +74,7 @@ unset LANG
|
|||||||
CUSTOM_URL_PREPEND=""
|
CUSTOM_URL_PREPEND=""
|
||||||
CUSTOM_URL_PROTOCOL=""
|
CUSTOM_URL_PROTOCOL=""
|
||||||
DB2_RUNNING=0
|
DB2_RUNNING=0
|
||||||
|
DEVELOPER_MODE=0
|
||||||
DISCOVERED_BINARIES=""
|
DISCOVERED_BINARIES=""
|
||||||
DOCKER_DAEMON_RUNNING=0
|
DOCKER_DAEMON_RUNNING=0
|
||||||
ERROR_ON_WARNINGS=0
|
ERROR_ON_WARNINGS=0
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
# FileIsReadable Check if a file is readable or directory accessible
|
# FileIsReadable Check if a file is readable or directory accessible
|
||||||
# GetHostID Retrieve an unique ID for this host
|
# GetHostID Retrieve an unique ID for this host
|
||||||
# IsDebug Check if --debug is used
|
# IsDebug Check if --debug is used
|
||||||
|
# IsDeveloperMode Check if --developer is used
|
||||||
# IsRunning Check if a process is running
|
# IsRunning Check if a process is running
|
||||||
# InsertSection Insert a section block
|
# InsertSection Insert a section block
|
||||||
# InsertPluginSection Insert a section block for plugins
|
# InsertPluginSection Insert a section block for plugins
|
||||||
@ -180,6 +181,7 @@
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Name : TestCase_Equal()
|
# Name : TestCase_Equal()
|
||||||
# Description : Test case for checking if value whether value is equal to value
|
# Description : Test case for checking if value whether value is equal to value
|
||||||
@ -897,6 +899,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()
|
# Name : IsRunning()
|
||||||
# Description : Check if a process is running
|
# Description : Check if a process is running
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
COMMANDS="audit show update"
|
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_ARGS="commands help license man options pidfile plugindir profiles release releasedate tests version"
|
||||||
SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands)
|
SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands)
|
||||||
|
@ -140,6 +140,11 @@
|
|||||||
DEBUG=1
|
DEBUG=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Developer mode (more details when creating tests)
|
||||||
|
--developer)
|
||||||
|
DEVELOPER_MODE=1
|
||||||
|
;;
|
||||||
|
|
||||||
# Display all available options with short alias
|
# Display all available options with short alias
|
||||||
--dump-options | --dumpoptions)
|
--dump-options | --dumpoptions)
|
||||||
OPTIONS="--auditor
|
OPTIONS="--auditor
|
||||||
|
3
lynis.8
3
lynis.8
@ -68,6 +68,9 @@ breaks).
|
|||||||
.B \-\-debug
|
.B \-\-debug
|
||||||
Display debug information to screen for troubleshooting purposes.
|
Display debug information to screen for troubleshooting purposes.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-developer
|
||||||
|
Display developer information when creating tests.
|
||||||
|
.TP
|
||||||
.B \-\-dump\-options
|
.B \-\-dump\-options
|
||||||
Show all available parameters.
|
Show all available parameters.
|
||||||
.TP
|
.TP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user