mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-31 01:24:58 +02:00
Update 9.2.2 for Debian12
This commit is contained in:
parent
3308bd7aa4
commit
ab55dd82ee
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
|
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -37,17 +37,6 @@ CONDT_VAL=3
|
|||||||
|
|
||||||
# This function will be called if the script status is on enabled / audit mode
|
# This function will be called if the script status is on enabled / audit mode
|
||||||
audit () {
|
audit () {
|
||||||
if [ $OS_RELEASE -eq 2 ]; then
|
|
||||||
PACKAGE=$PACKAGE_CENTOS
|
|
||||||
PAMLIBNAME=$PAMLIBNAME_CENTOS
|
|
||||||
PATTERN=$PATTERN_CENTOS
|
|
||||||
FILE=$FILE_CENTOS
|
|
||||||
fi
|
|
||||||
if [ $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
|
|
||||||
PACKAGE=$PACKAGE_DEBIAN11
|
|
||||||
PAMLIBNAME=$PAMLIBNAME_DEBIAN11
|
|
||||||
PATTERN=$PATTERN_DEBIAN11
|
|
||||||
fi
|
|
||||||
is_pkg_installed $PACKAGE
|
is_pkg_installed $PACKAGE
|
||||||
if [ $FNRET != 0 ]; then
|
if [ $FNRET != 0 ]; then
|
||||||
crit "$PACKAGE is not installed!"
|
crit "$PACKAGE is not installed!"
|
||||||
@ -73,12 +62,6 @@ audit () {
|
|||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
apply () {
|
apply () {
|
||||||
if [ $OS_RELEASE -eq 2 ]; then
|
|
||||||
PACKAGE=$PACKAGE_CENTOS
|
|
||||||
PAMLIBNAME=$PAMLIBNAME_CENTOS
|
|
||||||
PATTERN=$PATTERN_CENTOS
|
|
||||||
FILE=$FILE_CENTOS
|
|
||||||
fi
|
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$PACKAGE is installed"
|
ok "$PACKAGE is installed"
|
||||||
elif [ $FNRET = 1 ]; then
|
elif [ $FNRET = 1 ]; then
|
||||||
@ -104,7 +87,17 @@ apply () {
|
|||||||
|
|
||||||
# This function will check config parameters required
|
# This function will check config parameters required
|
||||||
check_config() {
|
check_config() {
|
||||||
:
|
if [ $OS_RELEASE -eq 2 ]; then
|
||||||
|
PACKAGE=$PACKAGE_CENTOS
|
||||||
|
PAMLIBNAME=$PAMLIBNAME_CENTOS
|
||||||
|
PATTERN=$PATTERN_CENTOS
|
||||||
|
FILE=$FILE_CENTOS
|
||||||
|
fi
|
||||||
|
if [ $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
|
||||||
|
PACKAGE=$PACKAGE_DEBIAN11
|
||||||
|
PAMLIBNAME=$PAMLIBNAME_DEBIAN11
|
||||||
|
PATTERN=$PATTERN_DEBIAN11
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Source Root Dir Parameter
|
# Source Root Dir Parameter
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
|
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -68,7 +68,8 @@ audit_centos () {
|
|||||||
audit () {
|
audit () {
|
||||||
if [ $OS_RELEASE -eq 1 ]; then
|
if [ $OS_RELEASE -eq 1 ]; then
|
||||||
audit_debian
|
audit_debian
|
||||||
elif [ $OS_RELEASE -eq 2 ]; then
|
# debian11/debian12 default use pam_pwquality, same as centos
|
||||||
|
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
|
||||||
audit_centos
|
audit_centos
|
||||||
else
|
else
|
||||||
crit "Current OS is not support!"
|
crit "Current OS is not support!"
|
||||||
@ -114,7 +115,8 @@ apply_centos () {
|
|||||||
apply () {
|
apply () {
|
||||||
if [ $OS_RELEASE -eq 1 ]; then
|
if [ $OS_RELEASE -eq 1 ]; then
|
||||||
apply_debian
|
apply_debian
|
||||||
elif [ $OS_RELEASE -eq 2 ]; then
|
# debian11/debian12 default use pam_pwquality, same as centos
|
||||||
|
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
|
||||||
apply_centos
|
apply_centos
|
||||||
else
|
else
|
||||||
crit "Current OS is not support!"
|
crit "Current OS is not support!"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user