From 3b61a0e4067d53ba3a9c816ff3427d43895256d3 Mon Sep 17 00:00:00 2001 From: Samson-W Date: Fri, 6 Mar 2020 03:57:46 +0800 Subject: [PATCH] Modify methods name: *_redhat to *_centos. --- bin/hardening/1.1_install_updates.sh | 8 ++++---- .../1.2_enable_verify_sign_packages_from_repository.sh | 8 ++++---- bin/hardening/1.3_enable_verify_sign_of_local_packages.sh | 8 ++++---- .../1.4_set_no_allow_insecure_repository_by_apt.sh | 8 ++++---- bin/hardening/10.1.5_set_password_lock_inactive_user.sh | 8 ++++---- bin/hardening/10.1.8_set_fail_delay_seconds.sh | 8 ++++---- bin/hardening/4.1_restrict_core_dumps.sh | 8 ++++---- bin/hardening/4.5_enable_apparmor.sh | 8 ++++---- bin/hardening/4.6_disable_usb_devices.sh | 4 ++-- bin/hardening/5.1.2_disable_rsh.sh | 8 ++++---- bin/hardening/5.1.4_disable_talk.sh | 8 ++++---- bin/hardening/5.1.6_disable_telnet_server.sh | 8 ++++---- .../6.18_ensure_virusscan_program_update_is_enabled.sh | 8 ++++---- bin/hardening/6.19_configure_ntp.sh | 2 +- bin/hardening/7.7.1_enable_firewall.sh | 8 ++++---- bin/hardening/9.2.10_pam_maxclassrepeat_cracklib.sh | 8 ++++---- bin/hardening/9.2.14_pam_auth_without_nullpwd_unix.sh | 8 ++++---- bin/hardening/9.2.17_pam_password_sha512_unix.sh | 8 ++++---- bin/hardening/9.2.2_pam_minlen_cracklib.sh | 8 ++++---- bin/hardening/9.2.3_pam_dcredit_cracklib.sh | 8 ++++---- bin/hardening/9.2.4_pam_ucredit_cracklib.sh | 8 ++++---- bin/hardening/9.2.5_pam_ocredit_cracklib.sh | 8 ++++---- bin/hardening/9.2.6_pam_lcredit_cracklib.sh | 8 ++++---- bin/hardening/9.2.7_pam_difok_cracklib.sh | 8 ++++---- bin/hardening/9.2.8_pam_minclass_cracklib.sh | 8 ++++---- bin/hardening/9.2.9_pam_maxrepeat_cracklib.sh | 8 ++++---- 26 files changed, 99 insertions(+), 99 deletions(-) diff --git a/bin/hardening/1.1_install_updates.sh b/bin/hardening/1.1_install_updates.sh index 87cab27..07e5820 100755 --- a/bin/hardening/1.1_install_updates.sh +++ b/bin/hardening/1.1_install_updates.sh @@ -30,7 +30,7 @@ audit_debian () fi } -audit_redhat () +audit_centos () { info "Checking if yum needs an update" info "Fetching upgrades ..." @@ -50,7 +50,7 @@ audit () if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -67,7 +67,7 @@ apply_debian () fi } -apply_redhat () +apply_centos () { if [ $FNRET -eq 100 ]; then info "Applying Upgrades..." @@ -85,7 +85,7 @@ apply () if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/1.2_enable_verify_sign_packages_from_repository.sh b/bin/hardening/1.2_enable_verify_sign_packages_from_repository.sh index eed42e4..5aeb68e 100755 --- a/bin/hardening/1.2_enable_verify_sign_packages_from_repository.sh +++ b/bin/hardening/1.2_enable_verify_sign_packages_from_repository.sh @@ -28,7 +28,7 @@ audit_debian () fi } -audit_redhat () +audit_centos () { if [ $(grep -c "^$YUM_OPTION" $YUM_CONF) -gt 0 ]; then if [ $(grep "^$YUM_OPTION" $YUM_CONF | awk -F"=" '{print $2}') -eq 1 ]; then @@ -50,7 +50,7 @@ audit () if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -70,7 +70,7 @@ apply_debian () { done fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "The signature of packages option is enable " elif [ $FNRET = 1 ]; then @@ -87,7 +87,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/1.3_enable_verify_sign_of_local_packages.sh b/bin/hardening/1.3_enable_verify_sign_of_local_packages.sh index e41b766..4daea6a 100755 --- a/bin/hardening/1.3_enable_verify_sign_of_local_packages.sh +++ b/bin/hardening/1.3_enable_verify_sign_of_local_packages.sh @@ -29,7 +29,7 @@ audit_debian () { fi } -audit_redhat () +audit_centos () { if [ $(grep -c "^$YUM_OPTION" $YUM_CONFFILE) -gt 0 ]; then if [ $(grep "^$YUM_OPTION" $YUM_CONFFILE | awk -F"=" '{print $2}') -eq 1 ]; then @@ -51,7 +51,7 @@ audit() if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -68,7 +68,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "The signature of packages option is enable " elif [ $FNRET = 1 ]; then @@ -86,7 +86,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/1.4_set_no_allow_insecure_repository_by_apt.sh b/bin/hardening/1.4_set_no_allow_insecure_repository_by_apt.sh index 480a593..be56853 100755 --- a/bin/hardening/1.4_set_no_allow_insecure_repository_by_apt.sh +++ b/bin/hardening/1.4_set_no_allow_insecure_repository_by_apt.sh @@ -28,7 +28,7 @@ audit_debian () { fi } -audit_redhat () +audit_centos () { if [ $(grep -c "^$YUM_OPTION" $YUM_CONFFILE) -gt 0 ]; then if [ $(grep "^$YUM_OPTION" $YUM_CONFFILE | awk -F"=" '{print $2}') -eq 1 ]; then @@ -49,7 +49,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -68,7 +68,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "The signature of repodata option is enable " elif [ $FNRET = 1 ]; then @@ -85,7 +85,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/10.1.5_set_password_lock_inactive_user.sh b/bin/hardening/10.1.5_set_password_lock_inactive_user.sh index eb98581..21b0350 100755 --- a/bin/hardening/10.1.5_set_password_lock_inactive_user.sh +++ b/bin/hardening/10.1.5_set_password_lock_inactive_user.sh @@ -46,7 +46,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { SSH_PARAM=$(echo $OPTIONS | cut -d= -f 1) SSH_VALUE=$(echo $OPTIONS | cut -d= -f 2) INACTIVE_V=$(useradd -D | grep $SSH_PARAM | awk -F= '{print $2}') @@ -64,7 +64,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else warn "Current OS is not support!" fi @@ -106,7 +106,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { SSH_PARAM=$(echo $OPTIONS | cut -d= -f 1) SSH_VALUE=$(echo $OPTIONS | cut -d= -f 2) PATTERN="^$SSH_PARAM=$SSH_VALUE" @@ -147,7 +147,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else warn "Current OS is not support!" fi diff --git a/bin/hardening/10.1.8_set_fail_delay_seconds.sh b/bin/hardening/10.1.8_set_fail_delay_seconds.sh index f3c79ca..ccc1992 100755 --- a/bin/hardening/10.1.8_set_fail_delay_seconds.sh +++ b/bin/hardening/10.1.8_set_fail_delay_seconds.sh @@ -37,7 +37,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { SSH_PARAM=$(echo $OPTION | cut -d= -f 1) SSH_VALUE=$(echo $OPTION | cut -d= -f 2) PATTERN="^$SSH_PARAM[[:space:]]*[[:digit:]]*" @@ -60,7 +60,7 @@ audit_redhat () { # This function will be called if the script status is on enabled / audit mode audit () { if [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else audit_debian fi @@ -86,7 +86,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$SSH_PARAM is set least four seconds between logon prompts following a failed console logon attempt" elif [ $FNRET = 1 ]; then @@ -103,7 +103,7 @@ apply_redhat () { # This function will be called if the script status is on enabled mode apply () { if [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else apply_debian fi diff --git a/bin/hardening/4.1_restrict_core_dumps.sh b/bin/hardening/4.1_restrict_core_dumps.sh index 705a3fa..8adc2bf 100755 --- a/bin/hardening/4.1_restrict_core_dumps.sh +++ b/bin/hardening/4.1_restrict_core_dumps.sh @@ -37,7 +37,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { is_service_active $SERVICE_NAME if [ $FNRET -eq 0 ]; then crit "$SERVICE_NAME is actived" @@ -53,7 +53,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -80,7 +80,7 @@ apply_debian () { } -apply_redhat () { +apply_centos () { if [ $FNRET -eq 1 ]; then info "Disabling $SERVICE_NAME" systemctl stop $SERVICE_NAME @@ -95,7 +95,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/4.5_enable_apparmor.sh b/bin/hardening/4.5_enable_apparmor.sh index cda021b..02701f8 100755 --- a/bin/hardening/4.5_enable_apparmor.sh +++ b/bin/hardening/4.5_enable_apparmor.sh @@ -50,7 +50,7 @@ audit_debian () { } # Todo -audit_redhat () { +audit_centos () { : } @@ -59,7 +59,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -86,7 +86,7 @@ apply_debian () { } # Todo -apply_redhat () { +apply_centos () { : } @@ -95,7 +95,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/4.6_disable_usb_devices.sh b/bin/hardening/4.6_disable_usb_devices.sh index 93805a9..dd60965 100755 --- a/bin/hardening/4.6_disable_usb_devices.sh +++ b/bin/hardening/4.6_disable_usb_devices.sh @@ -55,7 +55,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { : } @@ -64,7 +64,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 diff --git a/bin/hardening/5.1.2_disable_rsh.sh b/bin/hardening/5.1.2_disable_rsh.sh index 0c2f1f4..2340e1d 100755 --- a/bin/hardening/5.1.2_disable_rsh.sh +++ b/bin/hardening/5.1.2_disable_rsh.sh @@ -42,7 +42,7 @@ audit_debian () { done } -audit_redhat () { +audit_centos () { is_pkg_installed $PACKAGE_REDHAT if [ $FNRET = 0 ]; then crit "$PACKAGE_REDHAT is installed!" @@ -55,7 +55,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -90,7 +90,7 @@ apply_debian () { done } -apply_redhat () { +apply_centos () { is_pkg_installed $PACKAGE_REDHAT if [ $FNRET = 0 ]; then crit "$PACKAGE_REDHAT is installed, purging it" @@ -105,7 +105,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/5.1.4_disable_talk.sh b/bin/hardening/5.1.4_disable_talk.sh index 7733140..f680fe6 100755 --- a/bin/hardening/5.1.4_disable_talk.sh +++ b/bin/hardening/5.1.4_disable_talk.sh @@ -41,7 +41,7 @@ audit_debian () { done } -audit_redhat () { +audit_centos () { for PACKAGE in $PACKAGES_REDHAT; do is_pkg_installed $PACKAGE if [ $FNRET = 0 ]; then @@ -57,7 +57,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -92,7 +92,7 @@ apply_debian () { done } -apply_redhat () { +apply_centos () { for PACKAGE in $PACKAGES_REDHAT; do is_pkg_installed $PACKAGE if [ $FNRET = 0 ]; then @@ -109,7 +109,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/5.1.6_disable_telnet_server.sh b/bin/hardening/5.1.6_disable_telnet_server.sh index 712f744..4c4306f 100755 --- a/bin/hardening/5.1.6_disable_telnet_server.sh +++ b/bin/hardening/5.1.6_disable_telnet_server.sh @@ -42,7 +42,7 @@ audit_debian () { done } -audit_redhat () { +audit_centos () { is_pkg_installed $PACKAGE_REDHAT if [ $FNRET = 0 ]; then crit "$PACKAGE_REDHAT is installed" @@ -56,7 +56,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -91,7 +91,7 @@ apply_debian () { done } -apply_redhat () { +apply_centos () { is_pkg_installed $PACKAGE_REDHAT if [ $FNRET = 0 ]; then crit "$PACKAGE_REDHAT is installed, purging it" @@ -106,7 +106,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/6.18_ensure_virusscan_program_update_is_enabled.sh b/bin/hardening/6.18_ensure_virusscan_program_update_is_enabled.sh index 6176c00..3422a06 100755 --- a/bin/hardening/6.18_ensure_virusscan_program_update_is_enabled.sh +++ b/bin/hardening/6.18_ensure_virusscan_program_update_is_enabled.sh @@ -43,7 +43,7 @@ audit_debian () { } # todo -audit_redhat () { +audit_centos () { : } @@ -52,7 +52,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" fi @@ -75,7 +75,7 @@ apply_debian () { } # todo -apply_redhat () { +apply_centos () { : } @@ -84,7 +84,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/6.19_configure_ntp.sh b/bin/hardening/6.19_configure_ntp.sh index c3687d6..e0a67ca 100755 --- a/bin/hardening/6.19_configure_ntp.sh +++ b/bin/hardening/6.19_configure_ntp.sh @@ -2,7 +2,7 @@ # # harbian-audit for Debian GNU/Linux 7/8/9 or CentOS Hardening -# todo base redhat7 v2r3 of STIG +# todo base centos7 v2r3 of STIG # # 6.19 Configure Network Time Protocol (NTP) (Scored) diff --git a/bin/hardening/7.7.1_enable_firewall.sh b/bin/hardening/7.7.1_enable_firewall.sh index 0d05141..978df76 100755 --- a/bin/hardening/7.7.1_enable_firewall.sh +++ b/bin/hardening/7.7.1_enable_firewall.sh @@ -47,7 +47,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { for PACKAGE in $PACKAGES_REDHAT do is_pkg_installed $PACKAGE @@ -79,7 +79,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -108,7 +108,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$PACKAGES_REDHAT is installed" elif [ $FNRET = 1 ]; then @@ -138,7 +138,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" FNRET=44 diff --git a/bin/hardening/9.2.10_pam_maxclassrepeat_cracklib.sh b/bin/hardening/9.2.10_pam_maxclassrepeat_cracklib.sh index 318d3df..a7b46fb 100755 --- a/bin/hardening/9.2.10_pam_maxclassrepeat_cracklib.sh +++ b/bin/hardening/9.2.10_pam_maxclassrepeat_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.14_pam_auth_without_nullpwd_unix.sh b/bin/hardening/9.2.14_pam_auth_without_nullpwd_unix.sh index 1677808..6675411 100755 --- a/bin/hardening/9.2.14_pam_auth_without_nullpwd_unix.sh +++ b/bin/hardening/9.2.14_pam_auth_without_nullpwd_unix.sh @@ -46,7 +46,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { for FILE in $FILES; do does_pattern_exist_in_file $FILE $OPTIONNAME if [ $FNRET = 0 ]; then @@ -64,7 +64,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" fi @@ -89,7 +89,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { for FILE in $FILES; do does_pattern_exist_in_file $FILE $OPTIONNAME if [ $FNRET = 0 ]; then @@ -108,7 +108,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.17_pam_password_sha512_unix.sh b/bin/hardening/9.2.17_pam_password_sha512_unix.sh index abdcf1f..9b9d3a4 100755 --- a/bin/hardening/9.2.17_pam_password_sha512_unix.sh +++ b/bin/hardening/9.2.17_pam_password_sha512_unix.sh @@ -55,7 +55,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { for FILE in $FILES; do does_pattern_exist_in_file $FILE "$PATTERN.*$OPTIONNAME" if [ $FNRET -eq 0 ]; then @@ -71,7 +71,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -107,7 +107,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { for FILE in $FILES; do does_pattern_exist_in_file $FILE "$PATTERN.*$OPTIONNAME" if [ $FNRET -eq 0 ]; then @@ -124,7 +124,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.2_pam_minlen_cracklib.sh b/bin/hardening/9.2.2_pam_minlen_cracklib.sh index 4f47cce..ce7a154 100755 --- a/bin/hardening/9.2.2_pam_minlen_cracklib.sh +++ b/bin/hardening/9.2.2_pam_minlen_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME ge $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.3_pam_dcredit_cracklib.sh b/bin/hardening/9.2.3_pam_dcredit_cracklib.sh index f63faf6..8b84a5c 100755 --- a/bin/hardening/9.2.3_pam_dcredit_cracklib.sh +++ b/bin/hardening/9.2.3_pam_dcredit_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.4_pam_ucredit_cracklib.sh b/bin/hardening/9.2.4_pam_ucredit_cracklib.sh index e07970f..200867e 100755 --- a/bin/hardening/9.2.4_pam_ucredit_cracklib.sh +++ b/bin/hardening/9.2.4_pam_ucredit_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -97,7 +97,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -116,7 +116,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.5_pam_ocredit_cracklib.sh b/bin/hardening/9.2.5_pam_ocredit_cracklib.sh index c40d950..168624c 100755 --- a/bin/hardening/9.2.5_pam_ocredit_cracklib.sh +++ b/bin/hardening/9.2.5_pam_ocredit_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.6_pam_lcredit_cracklib.sh b/bin/hardening/9.2.6_pam_lcredit_cracklib.sh index 27b351d..a85a1bd 100755 --- a/bin/hardening/9.2.6_pam_lcredit_cracklib.sh +++ b/bin/hardening/9.2.6_pam_lcredit_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.7_pam_difok_cracklib.sh b/bin/hardening/9.2.7_pam_difok_cracklib.sh index 6d0756b..5bcc6f1 100755 --- a/bin/hardening/9.2.7_pam_difok_cracklib.sh +++ b/bin/hardening/9.2.7_pam_difok_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME ge $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.8_pam_minclass_cracklib.sh b/bin/hardening/9.2.8_pam_minclass_cracklib.sh index a99fb8e..d81a5c9 100755 --- a/bin/hardening/9.2.8_pam_minclass_cracklib.sh +++ b/bin/hardening/9.2.8_pam_minclass_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME ge $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is greater than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi diff --git a/bin/hardening/9.2.9_pam_maxrepeat_cracklib.sh b/bin/hardening/9.2.9_pam_maxrepeat_cracklib.sh index 4ef991a..01f0efb 100755 --- a/bin/hardening/9.2.9_pam_maxrepeat_cracklib.sh +++ b/bin/hardening/9.2.9_pam_maxrepeat_cracklib.sh @@ -51,7 +51,7 @@ audit_debian () { fi } -audit_redhat () { +audit_centos () { check_param_pair_by_value $FILE_REDHAT $OPTIONNAME le $CONDT_VAL if [ $FNRET = 0 ]; then ok "Option $OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" @@ -69,7 +69,7 @@ audit () { if [ $OS_RELEASE -eq 1 ]; then audit_debian elif [ $OS_RELEASE -eq 2 ]; then - audit_redhat + audit_centos else crit "Current OS is not support!" FNRET=44 @@ -96,7 +96,7 @@ apply_debian () { fi } -apply_redhat () { +apply_centos () { if [ $FNRET = 0 ]; then ok "$OPTIONNAME set condition is less than or equal to $CONDT_VAL in $FILE_REDHAT" elif [ $FNRET = 1 ]; then @@ -115,7 +115,7 @@ apply () { if [ $OS_RELEASE -eq 1 ]; then apply_debian elif [ $OS_RELEASE -eq 2 ]; then - apply_redhat + apply_centos else crit "Current OS is not support!" fi