From 042ec611a9ead49d015ff48199547b3823bed57d Mon Sep 17 00:00:00 2001 From: wei dong Date: Mon, 11 Oct 2021 14:43:39 +0800 Subject: [PATCH] FIX https://gitee.com/openeuler/security-tool/issues/I4CNEL Let the kernel parameters take effect immediately Signed-off-by: wei dong --- security-tool.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/security-tool.sh b/security-tool.sh index c6bc4e7..af9f823 100644 --- a/security-tool.sh +++ b/security-tool.sh @@ -974,12 +974,10 @@ function fn_main() # harden grub2 fn_harden_grub2 - fn_harden_sysctl - sed -i "s/^OPENEULER_SECURITY=.*$/OPENEULER_SECURITY=1/g" /etc/openEuler_security/security elif [ "x${OPENEULER_SECURITY}" = "x1" ] then - fn_harden_sysctl + : else echo "the value of OPENEULER_SECURITY is unexpected! please check it." fi @@ -987,6 +985,9 @@ function fn_main() # harden user conf fn_harden_usr_conf + # Let the kernel parameters take effect immediately + fn_harden_sysctl + # disable the service in system start systemctl disable openEuler-security.service -- Gitee