Version 0.23 some fixes for newer awk versions. default tip

Sat, 18 Jul 2020 15:55:11 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 18 Jul 2020 15:55:11 +0200
changeset 23
b66522a5726e
parent 22
32af3eef438b

Version 0.23 some fixes for newer awk versions.

Makefile file | annotate | diff | comparison | revisions
cron.daily/security file | annotate | diff | comparison | revisions
security.d/chk_exports file | annotate | diff | comparison | revisions
security.d/chk_passwd file | annotate | diff | comparison | revisions
--- a/Makefile	Fri Dec 26 11:43:45 2014 +0100
+++ b/Makefile	Sat Jul 18 15:55:11 2020 +0200
@@ -1,5 +1,5 @@
 # Top level makefile for Slackware Security Check Scripts
-# (C) 2014 Michiel Broek
+# (C) 2014-2020 Michiel Broek
 #
 
 all:
--- a/cron.daily/security	Fri Dec 26 11:43:45 2014 +0100
+++ b/cron.daily/security	Sat Jul 18 15:55:11 2020 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 #############################################################################
-# Copyright (C) 2005-2014
+# Copyright (C) 2005-2020
 #   
 # Michiel Broek               <mbse at mbse.eu>
 #
@@ -22,7 +22,7 @@
 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 #############################################################################
 
-VERSION=0.22
+VERSION=0.23
 export PATH=/bin:/usr/bin:/sbin:/usr/sbin
 umask 077
 LANG=C; export LANG
--- a/security.d/chk_exports	Fri Dec 26 11:43:45 2014 +0100
+++ b/security.d/chk_exports	Sat Jul 18 15:55:11 2020 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 #############################################################################
-# Copyright (C) 2005-2013
+# Copyright (C) 2005-2020
 #   
 # Michiel Broek               <mbse at mbse.eu>
 #
@@ -45,7 +45,7 @@
 if [ -f /etc/exports ]; then
     cat /etc/exports | awk '{
 	# ignore comments and blank lines
-	if ($0 ~ /^\#/ || $0 ~ /^$/ )
+	if ($0 ~ /^#/ || $0 ~ /^$/ )
 	    next;
 	readwrite = 0;
 	global = 0;
--- a/security.d/chk_passwd	Fri Dec 26 11:43:45 2014 +0100
+++ b/security.d/chk_passwd	Sat Jul 18 15:55:11 2020 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 #############################################################################
-# Copyright (C) 2005-2013
+# Copyright (C) 2005-2020
 #   
 # Michiel Broek               <mbse at mbse.eu>
 #
@@ -72,7 +72,7 @@
 awk -v "len=$max_loginlen" '
     BEGIN {
 	while ( getline < "/etc/shells" > 0 ) {
-	    if ($0 ~ /^\#/ || $0 ~ /^$/ )
+	    if ($0 ~ /^#/ || $0 ~ /^$/ )
 		continue;
 	    shells[$1]++;
 	}

mercurial