mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-31 01:24:58 +02:00
Modified utils.sh and 8.7 to be compatible with CentOS.
This commit is contained in:
parent
359a7c3c5e
commit
db2f6a5f34
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# harbian audit 7/8/9 Hardening
|
# harbian audit 7/8/9/10 or CentOS Hardening
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# 8.7 Verifies integrity all packages (Scored)
|
# 8.7 Verifies integrity all packages (Scored)
|
||||||
@ -25,7 +25,7 @@ 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 () {
|
||||||
info "This check item need to confirm manually. No automatic fix is available."
|
warn "This check item need to confirm manually. No automatic fix is available."
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will check config parameters required
|
# This function will check config parameters required
|
||||||
|
14
lib/utils.sh
14
lib/utils.sh
@ -521,7 +521,19 @@ is_pkg_installed()
|
|||||||
verify_integrity_all_packages()
|
verify_integrity_all_packages()
|
||||||
{
|
{
|
||||||
if [ $OS_RELEASE -eq 2 ]; then
|
if [ $OS_RELEASE -eq 2 ]; then
|
||||||
:
|
set +e
|
||||||
|
rpm -Va > /dev/shm/yum_verify_ret
|
||||||
|
COUNT=$(cat /dev/shm/yum_verify_ret | wc -l )
|
||||||
|
if [ $COUNT -gt 0 ]; then
|
||||||
|
debug "Verify integrity all packages is fail"
|
||||||
|
cat /dev/shm/yum_verify_ret
|
||||||
|
rm /dev/shm/yum_verify_ret
|
||||||
|
FNRET=1
|
||||||
|
else
|
||||||
|
debug "Verify integrity all packages is OK"
|
||||||
|
FNRET=0
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
else
|
else
|
||||||
dpkg -V > /dev/shm/dpkg_verify_ret
|
dpkg -V > /dev/shm/dpkg_verify_ret
|
||||||
if [ $(cat /dev/shm/dpkg_verify_ret | wc -l) -gt 0 ]; then
|
if [ $(cat /dev/shm/dpkg_verify_ret | wc -l) -gt 0 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user