Skip to content
Snippets Groups Projects
Commit 23f67f24 authored by Bob Mottram's avatar Bob Mottram
Browse files

Checking for ctrl-alt-del link

parent 2fd24df9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment