Checking for ctrl-alt-del link
This commit is contained in:
parent
2fd24df9a1
commit
23f67f2426
|
@ -424,6 +424,10 @@ function set_sticky_bits {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disable_ctrl_alt_del {
|
||||||
|
ln -sf /dev/null /etc/systemd/system/ctrl-alt-del.target
|
||||||
|
}
|
||||||
|
|
||||||
function lockdown_permissions {
|
function lockdown_permissions {
|
||||||
# All commands owned by root
|
# All commands owned by root
|
||||||
if [ -d /bin ]; then
|
if [ -d /bin ]; then
|
||||||
|
@ -541,6 +545,9 @@ function setup_utils {
|
||||||
read_config_param "PROJECT_REPO"
|
read_config_param "PROJECT_REPO"
|
||||||
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
|
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
|
||||||
|
|
||||||
|
function_check disable_ctrl_alt_del
|
||||||
|
disable_ctrl_alt_del
|
||||||
|
|
||||||
function_check dummy_nologin_command
|
function_check dummy_nologin_command
|
||||||
dummy_nologin_command
|
dummy_nologin_command
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -f /etc/systemd/system/ctrl-alt-del.target ];then
|
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)
|
||||||
exit 1
|
if [[ "$ctrl_alt_del" != *"/dev/null" ]]; then
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue