Update firewall.py

This commit is contained in:
dami
2025-09-10 21:53:39 +08:00
parent 0d9381b528
commit 64484ef18b
+1 -1
View File
@@ -233,7 +233,7 @@ class Firewall(object):
root_rep = r"PermitRootLogin\s+(\w*)\s*\n"
root_status = re.search(pass_rep, conf)
if root_status:
if root_status and root_status.groups(0)[0].strip() == 'no':
if root_status and root_status.groups(0)[0].strip() == 'yes':
data['root_prohibit_status'] = True
else:
data['root_prohibit_status'] = True