Skip to content

Commit

Permalink
password-hardening: Fix default return of dict to -1 instead None
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpil2002 committed Feb 18, 2024
1 parent 7daab08 commit 69f7cc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ class PasswHardening(object):
# Special values of expiration/expiration warning
# 0: meaning password will be expired/warning immediately.
# -1: meaning password expired/warning never.
curr_expiration = int(passw_policies.get('expiration'))
curr_expiration_warning = int(passw_policies.get('expiration_warning'))
curr_expiration = int(passw_policies.get('expiration', -1))
curr_expiration_warning = int(passw_policies.get('expiration_warning', -1))

if self.is_passwd_aging_expire_update(curr_expiration, 'MAX_DAYS'):
# Set aging policy for existing users
Expand Down

0 comments on commit 69f7cc5

Please sign in to comment.