Mageia Bugzilla – Attachment 6935 Details for
Bug 16084
msec links halt/poweroff/reboot to consolehelper instead of systemctl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Use systemctl instead of consolehelper
0001-Use-systemctl-instead-of-consolehelper.-See-16084.patch (text/plain), 2.04 KB, created by
papoteur
on 2015-08-15 22:08:59 CEST
(
hide
)
Description:
Use systemctl instead of consolehelper
Filename:
MIME Type:
Creator:
papoteur
Created:
2015-08-15 22:08:59 CEST
Size:
2.04 KB
patch
obsolete
>From bd31173fea5c79cc70421f85520a9dff069d3ac0 Mon Sep 17 00:00:00 2001 >From: Papoteur <papoteur@mageialinux-online.org> >Date: Sat, 15 Aug 2015 21:55:43 +0200 >Subject: [PATCH] Use systemctl instead of consolehelper. See #16084. > >--- > src/msec/plugins/msec.py | 11 +++++------ > 1 file 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) >-- >2.3.8 >
From bd31173fea5c79cc70421f85520a9dff069d3ac0 Mon Sep 17 00:00:00 2001 From: Papoteur <papoteur@mageialinux-online.org> Date: Sat, 15 Aug 2015 21:55:43 +0200 Subject: [PATCH] Use systemctl instead of consolehelper. See #16084. --- src/msec/plugins/msec.py | 11 +++++------ 1 file 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) -- 2.3.8
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16084
: 6935