mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 21:47:02 +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."
|
DESCRIPTION="Ensure Samba is not enabled."
|
||||||
HARDENING_EXCEPTION=samba
|
HARDENING_EXCEPTION=samba
|
||||||
|
|
||||||
PACKAGES='samba smbd'
|
PACKAGES='samba'
|
||||||
|
SERVICE='smbd'
|
||||||
|
|
||||||
# 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 () {
|
||||||
@ -27,6 +28,12 @@ audit () {
|
|||||||
ok "$PACKAGE is absent"
|
ok "$PACKAGE is absent"
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# This function will be called if the script status is on enabled mode
|
||||||
@ -41,6 +48,13 @@ apply () {
|
|||||||
ok "$PACKAGE is absent"
|
ok "$PACKAGE is absent"
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# This function will check config parameters required
|
||||||
|
Loading…
Reference in New Issue
Block a user