mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-29 16:45:50 +02:00
Fix a bug for 9.2.15 and delete the debug method in lib/utils.sh
This commit is contained in:
parent
471a3a0d62
commit
c4b9847694
@ -53,7 +53,7 @@ apply () {
|
|||||||
apt_install $PACKAGE
|
apt_install $PACKAGE
|
||||||
elif [ $FNRET = 2 ]; then
|
elif [ $FNRET = 2 ]; then
|
||||||
warn "$PATTERN is not present in $FILE"
|
warn "$PATTERN is not present in $FILE"
|
||||||
add_line_file_before_pattern $FILE "password [success=1 default=ignore] pam_unix.so obscure sha512" "# pam-auth-update(8) for details."
|
add_line_file_before_pattern $FILE "session optional pam_lastlog.so showfailed" "# pam-auth-update(8) for details."
|
||||||
elif [ $FNRET = 3 ]; then
|
elif [ $FNRET = 3 ]; then
|
||||||
crit "$FILE is not exist, please check"
|
crit "$FILE is not exist, please check"
|
||||||
elif [ $FNRET = 4 ]; then
|
elif [ $FNRET = 4 ]; then
|
||||||
|
@ -568,7 +568,6 @@ check_no_param_option_by_pam()
|
|||||||
|
|
||||||
if [ -f "$LOCATION" ];then
|
if [ -f "$LOCATION" ];then
|
||||||
RESULT=$(sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' $LOCATION | grep "$KEYWORD.*$OPTION" | wc -l)
|
RESULT=$(sed -e '/^#/d' -e '/^[ \t][ \t]*#/d' -e 's/#.*$//' -e '/^$/d' $LOCATION | grep "$KEYWORD.*$OPTION" | wc -l)
|
||||||
echo $RESULT
|
|
||||||
if [ "$RESULT" -eq 1 ]; then
|
if [ "$RESULT" -eq 1 ]; then
|
||||||
debug "$KEYWORD $OPTION is conf"
|
debug "$KEYWORD $OPTION is conf"
|
||||||
FNRET=0
|
FNRET=0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user