Update firewall.py
This commit is contained in:
parent
007b1bd21b
commit
9bcb41ab5d
|
|
@ -230,7 +230,7 @@ class Firewall(object):
|
|||
data['pubkey_prohibit_status'] = True
|
||||
|
||||
# root登陆配置检查
|
||||
root_rep = r"^PermitRootLogin\s+(\w*)\s*\n"
|
||||
root_rep = r"PermitRootLogin\s+(\w*)\s*\n"
|
||||
root_status = re.search(root_rep, conf)
|
||||
if root_status:
|
||||
if root_status and root_status.groups(0)[0].strip() == 'no':
|
||||
|
|
|
|||
Loading…
Reference in New Issue