aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-07-04 16:57:32 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-07-04 16:57:32 +0000
commit6c0e41d32efae056cf45b9cb1a6f78d6e9375388 (patch)
tree3ac848014c7d3640fe49571f5dd828eb153fe3cc
parent013c59ebc1eb95033eb0fe20d6596601c35b8f96 (diff)
downloadmsec-6c0e41d32efae056cf45b9cb1a6f78d6e9375388.tar
msec-6c0e41d32efae056cf45b9cb1a6f78d6e9375388.tar.gz
msec-6c0e41d32efae056cf45b9cb1a6f78d6e9375388.tar.bz2
msec-6c0e41d32efae056cf45b9cb1a6f78d6e9375388.tar.xz
msec-6c0e41d32efae056cf45b9cb1a6f78d6e9375388.zip
allow_root_login: corrected regexp to avoid adding the string at every run.
-rw-r--r--share/libmsec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index 68d18e1..b2dc631 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -244,7 +244,7 @@ def allow_root_login(arg):
if arg:
_interactive and log(_('Allowing direct root login'))
- sshd_config.exists() and sshd_config.replace_line_matching('^\s*PermitRootLogin\s+no',
+ sshd_config.exists() and sshd_config.replace_line_matching('^\s*PermitRootLogin\s+(no|yes)',
'PermitRootLogin yes', 1)
kde = ConfigFile.get_config_file(KDE)
@@ -261,7 +261,7 @@ def allow_root_login(arg):
securetty.replace_line_matching(s, s, 1)
else:
_interactive and log(_('Forbidding direct root login'))
- sshd_config.exists() and sshd_config.replace_line_matching('^\s*PermitRootLogin\s+yes',
+ sshd_config.exists() and sshd_config.replace_line_matching('^\s*PermitRootLogin\s+(no|yes)',
'PermitRootLogin no', 1)
bastillenologin = ConfigFile.get_config_file(BASTILLENOLOGIN)