Skip to content

Commit

Permalink
[ssh] change check for ssh_server_policies.
Browse files Browse the repository at this point in the history
  • Loading branch information
i-davydenko committed May 21, 2024
1 parent 04ca8f6 commit 5f19e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ class PamLimitsCfg(object):

# Read max_sessions config
def read_max_sessions_config(self, ssh_server_policies):
if ssh_server_policies is not None:
if not ssh_server_policies:
max_sess_cfg = ssh_server_policies.get('max_sessions', 0)
self.max_sessions = max_sess_cfg if max_sess_cfg != 0 else None

Expand Down

0 comments on commit 5f19e1b

Please sign in to comment.