Rename function name for human.
This commit is contained in:
parent
79e8bea65f
commit
b44ad4fa8b
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,7 +16,7 @@ set -u # One variable unset, it's over
|
||||||
HARDENING_LEVEL=3
|
HARDENING_LEVEL=3
|
||||||
|
|
||||||
PACKAGE='libpam-modules-bin'
|
PACKAGE='libpam-modules-bin'
|
||||||
AUTHPATTERN='^auth[[:space:]]*required[[:space:]]*pam_tally[2]?.so'
|
AUTHPATTERN='^auth[[:space:]]*required[[:space:]]*pam_tally2.so'
|
||||||
AUTHFILE='/etc/pam.d/common-auth'
|
AUTHFILE='/etc/pam.d/common-auth'
|
||||||
AUTHRULE='auth required pam_tally2.so audit silent deny=3 unlock_time=900'
|
AUTHRULE='auth required pam_tally2.so audit silent deny=3 unlock_time=900'
|
||||||
ADDPATTERNLINE='# pam-auth-update(8) for details.'
|
ADDPATTERNLINE='# pam-auth-update(8) for details.'
|
||||||
|
@ -49,7 +49,7 @@ apply () {
|
||||||
apt_install $PACKAGE
|
apt_install $PACKAGE
|
||||||
elif [ $FNRET = 2 ]; then
|
elif [ $FNRET = 2 ]; then
|
||||||
warn "Apply:$AUTHPATTERN is not present in $AUTHFILE"
|
warn "Apply:$AUTHPATTERN is not present in $AUTHFILE"
|
||||||
add_line_file_after_pattern $AUTHFILE $AUTHRULE $ADDPATTERNLINE
|
add_line_file_after_pattern "$AUTHFILE" "$AUTHRULE" "$ADDPATTERNLINE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $KEYWORD $OPTIONNAME ge $CONDT_VAL
|
check_param_pair_by_pam $FILE $KEYWORD $OPTIONNAME ge $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition to $CONDT_VAL is ok"
|
ok "$OPTIONNAME set condition to $CONDT_VAL is ok"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME ge $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,7 +35,7 @@ audit () {
|
||||||
does_pattern_exist_in_file $FILE $PATTERN
|
does_pattern_exist_in_file $FILE $PATTERN
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PATTERN is present in $FILE"
|
ok "$PATTERN is present in $FILE"
|
||||||
check_password_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
check_param_pair_by_pam $FILE $PAMLIBNAME $OPTIONNAME le $CONDT_VAL
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
ok "$OPTIONNAME set condition is $CONDT_VAL"
|
||||||
else
|
else
|
||||||
|
|
|
@ -454,7 +454,7 @@ verify_integrity_all_packages()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_password_by_pam()
|
check_param_pair_by_pam()
|
||||||
{
|
{
|
||||||
LOCATION=$1
|
LOCATION=$1
|
||||||
KEYWORD=$2
|
KEYWORD=$2
|
||||||
|
|
Loading…
Reference in New Issue