diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 8ecf39b3..0542323c 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -424,6 +424,10 @@ function set_sticky_bits { done } +function disable_ctrl_alt_del { + ln -sf /dev/null /etc/systemd/system/ctrl-alt-del.target +} + function lockdown_permissions { # All commands owned by root if [ -d /bin ]; then @@ -541,6 +545,9 @@ function setup_utils { read_config_param "PROJECT_REPO" write_config_param "PROJECT_REPO" "$PROJECT_REPO" + function_check disable_ctrl_alt_del + disable_ctrl_alt_del + function_check dummy_nologin_command dummy_nologin_command diff --git a/tests/check-ctrl-alt-del.sh b/tests/check-ctrl-alt-del.sh index 05d7d829..e6e06a51 100644 --- a/tests/check-ctrl-alt-del.sh +++ b/tests/check-ctrl-alt-del.sh @@ -1,9 +1,10 @@ #!/bin/bash if [ -f /etc/systemd/system/ctrl-alt-del.target ];then - if ! ls -l /etc/systemd/system/ctrl-alt-del.target | grep "/dev/null";then - exit 1 - fi -else + ctrl_alt_del=$(ls -l /etc/systemd/system/ctrl-alt-del.target) + if [[ "$ctrl_alt_del" != *"/dev/null" ]]; then exit 1 + fi +else + exit 1 fi