From 69f7cc5d041a9dfc1509180c9fcf195373b1cce9 Mon Sep 17 00:00:00 2001 From: David Pilnik Date: Sun, 18 Feb 2024 09:37:13 +0200 Subject: [PATCH] password-hardening: Fix default return of dict to -1 instead None --- scripts/hostcfgd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/hostcfgd b/scripts/hostcfgd index 914fd1af..7864dd0b 100644 --- a/scripts/hostcfgd +++ b/scripts/hostcfgd @@ -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