mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 13:37:02 +01:00
Merge pull request #22 in IAAS/cis-hardening from dev/thibault.dewailly/fix to master
* commit '1bb8c5b387673e2c069a41ca4fc793b1d4c0869b': Fixed replace in file function with proper substitution tripwire : fixed typo on postinstall helper fix 99.1 Apply TMOUT Variable
This commit is contained in:
commit
544c2a4aea
@ -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'
|
||||
|
@ -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
|
||||
~
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user