Commit Graph

32 Commits

Author SHA1 Message Date
Luca Fontana 9270ab0a38 More support for busybox devices
- Replaced "head -1" with "head -n 1"
- Fixed Stat format error in busybox
- Fixed find -printf error in busybox
- SafeInput accept only alphanumeric values, underscore and hyphens
2024-11-04 19:04:37 +02:00
Josh Soref 499dff2428 spelling: settings
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-11-08 23:53:09 -05:00
Kepi f94817f66f Command line option for slow test threshold
IMHO it should be OK to run long tests if we count with it.

Example:

    lynis audit system --slow-warning 300

Will warn when test takes longer than 300 seconds, instead of default 10.
2020-07-02 23:42:28 +02:00
Michael Boelen b39d0c3b69
Indented spacing 2019-09-19 15:21:51 +02:00
Michael Boelen 82d9940f13
Style changes 2019-09-19 15:17:23 +02:00
Michael Boelen 67eae302e1
Updated systemd units 2019-07-13 20:03:53 +02:00
Michael Boelen 63a66a971c
Extended completion script with show commands 2019-07-13 15:49:04 +02:00
Michael Boelen 7506fd4af8
Adjusted text and use 'audit system' instead of deprecated -c option 2019-07-12 13:25:29 +02:00
John Eismeier c5dcbe8c31 Propose fix some typos (#538) 2018-04-23 10:54:44 +02:00
hlein e054e9757c Lots of cleanups (#366)
* Description fix: SafePerms works on files not dirs.

All uses of SafePerms are on files (and indeed, it would reject
directories which would have +x set).

* Lots of whitespace cleanups.

Enforce everywhere(?) the same indentations for if/fi blocks.
The standard for the Lynis codebase is 4 spaces.  But sometimes
it's 1, sometimes 3, sometimes 8.

These patches standardize all(?) if blocks but _not_ else's (which
are usually indented 2, but sometimes zero); I was too lazy to
identify those (see below).

This diff is giant, but should not change code behavior at all;
diff -w shows no changes apart from whitespace.

FWIW I identified instances to check by using:

  perl -ne 'if ($oldfile ne $ARGV) { $.=1; $oldfile=$ARGV; }; chomp; if ($spaces) { next unless /^( *)([^ ]+)/; $newspaces=length($1); $firsttok = $2; next unless defined($firsttok); $offset = ($firsttok eq "elif" ? 0 : 4); if ($newspaces != $spaces + $offset) { print "$ARGV:$ifline\n$ARGV:$.:$_\n\n" }; $ifline=""; $spaces="";  } if (/^( *)if (?!.*[; ]fi)/) { $ifline = "$.:$_"; $spaces = length($1); }' $(find . -type f -print0 | xargs -0 file | egrep shell | cut -d: -f1)

Which produced output like:

  ./extras/build-lynis.sh:217:            if [ ${VERSION_IN_SPECFILE} = "" -o ! "${VERSION_IN_SPECFILE}" = "${LYNIS_VERSION}" ]; then
  ./extras/build-lynis.sh:218:               echo "[X] Version in specfile is outdated"

  ./plugins/plugin_pam_phase1:69:        if [ -d ${PAM_DIRECTORY} ]; then
  ./plugins/plugin_pam_phase1:70:                LogText "Result: /etc/pam.d exists"

...There's probably formal shellscript-beautification tools that
I'm oblivious about.

* More whitespace standardization.

* Fix a syntax error.

This looks like an if [ foo -o bar ]; was converted to if .. elif,
but incompletely.

* Add whitespace before closing ].

Without it, the shell thinks the ] is part of the last string, and
emits warnings like:

  .../lynis/include/tests_authentication: line 1028: [: missing `]'
2017-03-07 19:23:08 +00:00
hlein b595cc0fb5 Various cleanups (#363)
* Typo fix.

* Style change: always use $(), never ``.

The Lynis code already mostly used $(), but backticks were sprinkled
around.  Converted all of them.

* Lots of minor spelling/typo fixes.

FWIW these were found with:

  find . -type f -print0 | xargs -0 cat | aspell list | sort -u | egrep '^[a-z]+$' | less

And then reviewing the list to pick out things that looked like
misspelled words as opposed to variables, etc., and then manual
inspection of context to determine the intention.
2017-03-06 07:41:21 +00:00
Michael Boelen 483a45e506 Updated files 2016-11-13 20:11:22 +01:00
Michael Boelen 773c410a02 Update remaining items for categories and groups 2016-07-24 17:24:09 +02:00
Michael Boelen 2f4c854ba7 Rename of categories, introduction of groups 2016-07-24 17:22:00 +02:00
Michael Boelen ea6e945bc0 Refer to https://packages.cisofy.com and Lynis SDK 2016-07-18 14:20:01 +02:00
Michael Boelen d14dea3465 More 1 directory up first 2016-05-12 06:39:16 +02:00
Michael Boelen 9ba99711d6 Add Travis CI 2016-05-12 06:24:37 +02:00
mboelen 6143e7ed83 Updated bash completion script 2016-04-25 20:04:44 +02:00
mboelen d32de79716 Bump for upcoming 2.2.0 release 2015-12-21 11:25:03 +01:00
SiemKorteweg 0c48fc3880 Optimized use of cat, grep and awk.
Detection of duplicate entries in /etc/hosts is now more robust.
On CentOS7 the SERVICE_MANAGER is detected correctly.
2015-10-10 13:25:14 +02:00
Laurent Quillerou 3cdd9ea949 Delete trailing whitespace 2015-09-07 18:35:07 +03:00
mboelen e0f9536761 Updated spec file with description, website and documentation link, version bump 2015-05-13 14:50:43 +02:00
mboelen 14f2629d3c Improvements for building 2014-10-26 23:34:34 +01:00
mboelen 7bb93936e3 Adjustments for building process 2014-10-24 13:24:51 +02:00
mboelen e6598119a6 Build source package 2014-10-24 12:54:08 +02:00
mboelen f60537ade7 Build steps on screen 2014-10-24 12:49:59 +02:00
mboelen e3eb743eab Updated script 2014-10-24 12:45:44 +02:00
mboelen 4a82e62933 Added git clone 2014-10-24 12:02:45 +02:00
mboelen 7a08544fff Ignore new files 2014-10-24 11:55:43 +02:00
mboelen 85543a6f40 Added new lines at end 2014-10-24 11:30:09 +02:00
mboelen 64b5d9b9c3 Minor changes to build script for DEB 2014-10-24 11:19:35 +02:00
mboelen 231582ac53 Added systemd service script and timer (as replacement for cronjob) 2014-10-02 15:15:19 +02:00