Checking for ctrl-alt-del link
This commit is contained in:
parent
2fd24df9a1
commit
23f67f2426
|
@ -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
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/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
|
||||
ctrl_alt_del=$(ls -l /etc/systemd/system/ctrl-alt-del.target)
|
||||
if [[ "$ctrl_alt_del" != *"/dev/null" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue