aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2006-08-25 10:15:21 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2006-08-25 10:15:21 +0000
commit0b76363572b0d98ca685ada24aea7b0058a49099 (patch)
tree4f12d37b76e2cbe7bb4afc6b6d334d1b1fd4d8ce
parent357c077a9677ce39c90cba5ed965b1f9df4e9c1b (diff)
downloadmsec-0b76363572b0d98ca685ada24aea7b0058a49099.tar
msec-0b76363572b0d98ca685ada24aea7b0058a49099.tar.gz
msec-0b76363572b0d98ca685ada24aea7b0058a49099.tar.bz2
msec-0b76363572b0d98ca685ada24aea7b0058a49099.tar.xz
msec-0b76363572b0d98ca685ada24aea7b0058a49099.zip
- hopefully fix #12190
-rw-r--r--share/libmsec.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index e4f1adb..1e24b02 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -495,6 +495,7 @@ def allow_root_login(arg):
securetty = ConfigFile.get_config_file(SECURETTY)
kde = ConfigFile.get_config_file(KDE)
gdm = ConfigFile.get_config_file(GDM)
+ gdmconf = ConfigFile.get_config_file(GDMCONF)
xdm = ConfigFile.get_config_file(XDM)
val = {}
@@ -524,6 +525,8 @@ def allow_root_login(arg):
if arg:
if val[kde] or val[gdm] or val[xdm] or num != 12:
_interactive and log(_('Allowing direct root login'))
+ gdmconf.exists() and gdmconf.set_shell_variable('ConfigAvailable', 'true', '\[greeter\]', '^\s*')
+
for cnf in (kde, gdm, xdm):
if not (same_level() and val[cnf]):
@@ -537,6 +540,7 @@ def allow_root_login(arg):
if not (same_level() and not val[s]):
securetty.replace_line_matching(s, s, 1)
else:
+ gdmconf.exists() and gdmconf.set_shell_variable('ConfigAvailable', 'false', '\[greeter\]', '^\s*')
if (kde.exists() and not val[kde]) or (gdm.exists() and not val[gdm]) or (xdm.exists() and not val[xdm]) or num > 0:
_interactive and log(_('Forbidding direct root login'))
@@ -545,8 +549,7 @@ def allow_root_login(arg):
for cnf in (kde, gdm, xdm):
cnf.exists() and (cnf.replace_line_matching('^auth\s*required\s*(?:/lib/security/)?pam_listfile.so.*bastille-no-login', 'auth required pam_listfile.so onerr=succeed item=user sense=deny file=/etc/bastille-no-login') or \
- cnf.insert_at(0, 'auth required pam_listfile.so onerr=succeed item=user sense=deny file=/etc/bastille-no-login'))
-
+ cnf.insert_at(0, 'auth required pam_listfile.so onerr=succeed item=user sense=deny file=/etc/bastille-no-login'))
securetty.remove_line_matching('.+', 1)
allow_root_login.arg_trans = YES_NO_TRANS