aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2004-09-30 05:08:17 +0000
committerFrederic Lepied <flepied@mandriva.com>2004-09-30 05:08:17 +0000
commit68ba03c6120e0df597b26226db928c2becf2d997 (patch)
tree1653575f8d3c8f23f1735c57daff65199ef638e7
parent9bfb757e482163d1bbd706249991aa6a626a8f2d (diff)
downloadmsec-68ba03c6120e0df597b26226db928c2becf2d997.tar
msec-68ba03c6120e0df597b26226db928c2becf2d997.tar.gz
msec-68ba03c6120e0df597b26226db928c2becf2d997.tar.bz2
msec-68ba03c6120e0df597b26226db928c2becf2d997.tar.xz
msec-68ba03c6120e0df597b26226db928c2becf2d997.zip
allow_reboot: remove consolehelper links instead of files in
/etc/security/console.apps.
-rw-r--r--share/libmsec.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index 830d32c..dc17fc9 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -43,7 +43,7 @@ CRON = '/etc/cron.d/msec'
CRONALLOW = '/etc/cron.allow'
GDM = '/etc/pam.d/gdm'
GDMCONF = '/etc/X11/gdm/gdm.conf'
-HALT = '/etc/security/console.apps/halt'
+HALT = '/usr/bin/halt'
HOSTCONF = '/etc/host.conf'
HOSTSDENY = '/etc/hosts.deny'
INITTAB = '/etc/inittab'
@@ -61,15 +61,15 @@ MSECCRON = '/etc/cron.hourly/msec'
MSEC_XINIT = '/etc/X11/xinit.d/msec'
OPASSWD = '/etc/security/opasswd'
PASSWD = '/etc/pam.d/passwd'
-POWEROFF = '/etc/security/console.apps/poweroff'
-REBOOT = '/etc/security/console.apps/reboot'
+POWEROFF = '/usr/bin/poweroff'
+REBOOT = '/usr/bin/reboot'
SECURETTY = '/etc/securetty'
SECURITYCONF = '/var/lib/msec/security.conf'
SECURITYCRON = '/etc/cron.daily/msec'
SECURITYSH = '/usr/share/msec/security.sh'
SERVER = '/etc/security/msec/server'
SHADOW = '/etc/shadow'
-SHUTDOWN = '/etc/security/console.apps/shutdown'
+SHUTDOWN = '/usr/bin/shutdown'
SHUTDOWNALLOW = '/etc/shutdown.allow'
SSHDCONFIG = '/etc/ssh/sshd_config'
STARTX = '/usr/X11R6/bin/startx'
@@ -376,6 +376,7 @@ def get_index(val, array):
################################################################################
ALLOW_SHUTDOWN_VALUES = ('All', 'Root', 'None')
CTRALTDEL_REGEXP = '^ca::ctrlaltdel:/sbin/shutdown.*'
+CONSOLE_HELPER = 'consolehelper'
def allow_reboot(arg):
''' Allow/Forbid reboot by the console user.'''
@@ -417,7 +418,7 @@ def allow_reboot(arg):
for f in [SHUTDOWN, POWEROFF, REBOOT, HALT]:
cfg = ConfigFile.get_config_file(f)
if not (same_level() and not val[f]):
- cfg.exists() or cfg.touch()
+ cfg.exists() or cfg.symlink(CONSOLE_HELPER)
if not (same_level() and val_sysctlconf == '0'):
sysctlconf.set_shell_variable('kernel.sysrq', 1)
if not (same_level() and val_gdmconf == 'false'):