mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
FIX(2.2.12) handle smbd as a service
This commit is contained in:
parent
0fa10240cd
commit
5074c5a8bd
@ -15,7 +15,8 @@ HARDENING_LEVEL=3
|
||||
DESCRIPTION="Ensure Samba is not enabled."
|
||||
HARDENING_EXCEPTION=samba
|
||||
|
||||
PACKAGES='samba smbd'
|
||||
PACKAGES='samba'
|
||||
SERVICE='smbd'
|
||||
|
||||
# This function will be called if the script status is on enabled / audit mode
|
||||
audit () {
|
||||
@ -27,6 +28,12 @@ audit () {
|
||||
ok "$PACKAGE is absent"
|
||||
fi
|
||||
done
|
||||
is_service_enabled $SERVICE
|
||||
if [ $FNRET = 1 ]; then
|
||||
crit "Service $SERVICE is enabled!"
|
||||
else
|
||||
ok "Service $SERVICE is disabled"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function will be called if the script status is on enabled mode
|
||||
@ -41,6 +48,13 @@ apply () {
|
||||
ok "$PACKAGE is absent"
|
||||
fi
|
||||
done
|
||||
is_service_enabled $SERVICE
|
||||
if [ $FNRET = 1 ]; then
|
||||
crit "Service $SERVICE is enabled!"
|
||||
systemctl disable $SERVICE
|
||||
else
|
||||
ok "Service $SERVICE is disabled"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function will check config parameters required
|
||||
|
Loading…
Reference in New Issue
Block a user