From 4867538c22c38477df7e022d7cd5d435aec11c6c Mon Sep 17 00:00:00 2001 From: "thibault.dewailly" Date: Mon, 2 May 2016 10:45:32 +0200 Subject: [PATCH 1/3] fix 99.1 Apply TMOUT Variable --- bin/hardening/99.1_timeout_tty.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hardening/99.1_timeout_tty.sh b/bin/hardening/99.1_timeout_tty.sh index 1c39958..45d65d5 100755 --- a/bin/hardening/99.1_timeout_tty.sh +++ b/bin/hardening/99.1_timeout_tty.sh @@ -12,7 +12,7 @@ set -e # One error, it's over set -u # One variable unset, it's over USER='root' -PATTERN='^TMOUT=' +PATTERN='TMOUT=' VALUE='600' FILES_TO_SEARCH='/etc/bash.bashrc /etc/profile.d/* /etc/profile' FILE='/etc/profile.d/CIS_99.1_timeout.sh' From 612e28b16ffaaff3fddbeb3d4c30eb1de2a40629 Mon Sep 17 00:00:00 2001 From: "thibault.dewailly" Date: Mon, 2 May 2016 11:11:07 +0200 Subject: [PATCH 2/3] tripwire : fixed typo on postinstall helper --- bin/postinstall/tripwire.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/postinstall/tripwire.sh b/bin/postinstall/tripwire.sh index 3533830..43f5f29 100755 --- a/bin/postinstall/tripwire.sh +++ b/bin/postinstall/tripwire.sh @@ -17,4 +17,3 @@ echo "Generating Local database with newly created key..." /usr/sbin/twadmin --create-cfgfile -S /etc/tripwire/site.key /etc/tripwire/twcfg.txt # Init database with generated local key file echo "Testing tripwire database update" tripwire -m i # Test configuration update -~ From e902c9b4c8689aa3c4898a449fd53441d2a44d5b Mon Sep 17 00:00:00 2001 From: "thibault.dewailly" Date: Tue, 3 May 2016 11:25:37 +0200 Subject: [PATCH 3/3] Fixed replace in file function with proper substitution --- lib/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.sh b/lib/utils.sh index abd9e72..118cf35 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -138,7 +138,7 @@ replace_in_file() { backup_file "$FILE" debug "Replacing $SOURCE to $DESTINATION in $FILE" - SOURCE=$(sed 's@/@\\\/@g' <<< $PATTERN) + SOURCE=$(sed 's@/@\\\/@g' <<< $SOURCE) debug "sed -i 's/$SOURCE/$DESTINATION/g' $FILE" sed -i "s/$SOURCE/$DESTINATION/g" $FILE FNRET=0