diff options
author | SARL ENR 68 <david@david.david> | 2015-08-28 20:18:29 +0200 |
---|---|---|
committer | SARL ENR 68 <david@david.david> | 2015-08-28 20:18:29 +0200 |
commit | da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c (patch) | |
tree | 4c237244065c29ebef7cd981713593db1782f9d1 | |
parent | 71c7542f490e69f94b2a5277b40f4072a0fc7ad5 (diff) | |
download | msec-da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c.tar msec-da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c.tar.gz msec-da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c.tar.bz2 msec-da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c.tar.xz msec-da3c537d80fa90c27a3ff9f2c80082a51d1dbd2c.zip |
Use systemctl instead of consolehelper (mga#16084)
- by papoteur: https://bugs.mageia.org/attachment.cgi?id=6935
-rwxr-xr-x | src/msec/plugins/msec.py | 11 |
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) |