aboutsummaryrefslogtreecommitdiffstats
path: root/share/libmsec.py
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-07-04 07:30:24 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-07-04 07:30:24 +0000
commitb4d240605dcc997e6c080277f802f47976d337f6 (patch)
treef28e63f461ea7965a80170709817ad418905e5e9 /share/libmsec.py
parent7b8c0d3511c9cc4e97373e7763b6322a378b9f99 (diff)
downloadmsec-b4d240605dcc997e6c080277f802f47976d337f6.tar
msec-b4d240605dcc997e6c080277f802f47976d337f6.tar.gz
msec-b4d240605dcc997e6c080277f802f47976d337f6.tar.bz2
msec-b4d240605dcc997e6c080277f802f47976d337f6.tar.xz
msec-b4d240605dcc997e6c080277f802f47976d337f6.zip
insert changes when no match is found for logindefs and sshd_config.
Diffstat (limited to 'share/libmsec.py')
-rw-r--r--share/libmsec.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index 1e0da48..68d18e1 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -245,7 +245,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',
- 'PermitRootLogin yes')
+ 'PermitRootLogin yes', 1)
kde = ConfigFile.get_config_file(KDE)
gdm = ConfigFile.get_config_file(GDM)
@@ -262,7 +262,7 @@ def allow_root_login(arg):
else:
_interactive and log(_('Forbidding direct root login'))
sshd_config.exists() and sshd_config.replace_line_matching('^\s*PermitRootLogin\s+yes',
- 'PermitRootLogin no')
+ 'PermitRootLogin no', 1)
bastillenologin = ConfigFile.get_config_file(BASTILLENOLOGIN)
bastillenologin.replace_line_matching('^\s*root', 'root', 1)
@@ -557,7 +557,7 @@ def password_aging(max, inactive=-1):
_interactive and log(_('Setting password maximum aging for new user to %d') % max)
logindefs = ConfigFile.get_config_file(LOGINDEFS)
if logindefs.exists():
- logindefs.replace_line_matching('^\s*PASS_MAX_DAYS', 'PASS_MAX_DAYS ' + str(max))
+ logindefs.replace_line_matching('^\s*PASS_MAX_DAYS', 'PASS_MAX_DAYS ' + str(max), 1)
uid_min = logindefs.get_match('^\s*UID_MIN\s+([0-9]+)', '@1')
if uid_min:
uid_min = int(uid_min)