aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/msec/plugins/msec.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/msec/plugins/msec.py b/src/msec/plugins/msec.py
index fa8a41d..390a637 100755
--- a/src/msec/plugins/msec.py
+++ b/src/msec/plugins/msec.py
@@ -65,6 +65,7 @@ SYSLOGCONF = '/etc/syslog.conf'
XDM = '/etc/pam.d/xdm'
XSERVERS = '/etc/X11/xdm/Xservers'
EXPORT = '/root/.xauth/export'
+SYSTEMCTL = '../bin/systemctl'
# regexps
# X server
@@ -75,8 +76,6 @@ GDMCONF_REGEXP = '(\s*command=.*/X.*?) -nolisten tcp(.*)$'
KDMRC_REGEXP = re.compile('(.*?)-nolisten tcp(.*)$')
# ctrl-alt-del
CTRALTDEL_REGEXP = '^ca::ctrlaltdel:/sbin/shutdown.*'
-# consolehelper
-CONSOLE_HELPER = 'consolehelper'
# ssh PermitRootLogin
PERMIT_ROOT_LOGIN_REGEXP = '^\s*PermitRootLogin\s+(no|yes|without-password|forced-commands-only)'
# tcp_wrappers
@@ -330,10 +329,10 @@ class msec:
if val_shutdownallow or not val_shutdown or not val_poweroff or not val_reboot or not val_halt:
self.log.info(_('Allowing reboot and shutdown to the console user'))
shutdownallow.exists() and shutdownallow.move(SUFFIX)
- shutdown.exists() or shutdown.symlink(CONSOLE_HELPER)
- poweroff.exists() or poweroff.symlink(CONSOLE_HELPER)
- reboot.exists() or reboot.symlink(CONSOLE_HELPER)
- halt.exists() or halt.symlink(CONSOLE_HELPER)
+ shutdown.exists() or shutdown.symlink(SYSTEMCTL)
+ poweroff.exists() or poweroff.symlink(SYSTEMCTL)
+ reboot.exists() or reboot.symlink(SYSTEMCTL)
+ halt.exists() or halt.symlink(SYSTEMCTL)
if val_sysctlconf == '0':
self.log.info(_('Allowing SysRq key to the console user'))
sysctlconf.set_shell_variable('kernel.sysrq', 1)