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' 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 -~ 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