Skip to content

Commit 84f7678

Browse files
permit_root_login is an enum not a boolean
1 parent 364c791 commit 84f7678

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/hostcfgd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ class SshServer(object):
11261126
if key == "inactivity_timeout":
11271127
# translate min to sec.
11281128
value = int(value) * 60
1129-
elif key in [ "permit_root_login", "password_authentication" ]:
1129+
elif key == "password_authentication":
11301130
# translate boolean to yes/no
11311131
if isinstance(value, str):
11321132
value = "no" if value.lower() in [ "false" ] else "yes"

tests/hostcfgd/test_ssh_server_vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
"ports": "22",
215215
"inactivity_timeout": "15",
216216
"max_sessions": "0",
217-
"permit_root_login": "false"
217+
"permit_root_login": "no"
218218
}
219219
},
220220
"DEVICE_METADATA": {

0 commit comments

Comments
 (0)