diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-07-04 16:57:32 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-07-04 16:57:32 +0000 |
commit | 6c0e41d32efae056cf45b9cb1a6f78d6e9375388 (patch) | |
tree | 3ac848014c7d3640fe49571f5dd828eb153fe3cc | |
parent | 013c59ebc1eb95033eb0fe20d6596601c35b8f96 (diff) | |
download | msec-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.py | 4 |
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) |