mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 23:11:24 +01:00
ADD(1.1.23): disable usb storage
This commit is contained in:
parent
8da1107532
commit
f626201fdd
@ -19,14 +19,27 @@ DESCRIPTION="Disable USB storage."
|
|||||||
|
|
||||||
# Note: we check /proc/config.gz to be compliant with both monolithic and modular kernels
|
# Note: we check /proc/config.gz to be compliant with both monolithic and modular kernels
|
||||||
|
|
||||||
|
KERNEL_OPTION="CONFIG_USB_STORAGE"
|
||||||
|
MODULE_FILE="usb-storage"
|
||||||
|
|
||||||
# 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() {
|
||||||
:
|
is_kernel_option_enabled "$KERNEL_OPTION" "$MODULE_FILE"
|
||||||
|
if [ "$FNRET" = 0 ]; then # 0 means true in bash, so it IS activated
|
||||||
|
crit "$KERNEL_OPTION is enabled!"
|
||||||
|
else
|
||||||
|
ok "$KERNEL_OPTION 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
|
||||||
apply() {
|
apply() {
|
||||||
:
|
is_kernel_option_enabled "$KERNEL_OPTION"
|
||||||
|
if [ "$FNRET" = 0 ]; then # 0 means true in bash, so it IS activated
|
||||||
|
warn "I cannot fix $KERNEL_OPTION enabled, recompile your kernel please"
|
||||||
|
else
|
||||||
|
ok "$KERNEL_OPTION is disabled, nothing to do"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will check config parameters required
|
# This function will check config parameters required
|
||||||
|
Loading…
Reference in New Issue
Block a user