password-hardening: Add support to disable expiration date like in Linux (PAM) (#17426)

- Why I did it
Enhance the feature to support disabling password hardening as Linux support.
-1: expiration will never occur
0: expiration will expired immediately

Opened bug:
#17427

- How I did it
Added the -1 value to be supported in hostcfgd and this value will propagate to the relevant Linux files

- How to verify it
Pls see the details in the bug description that link attached above
This commit is contained in:
davidpil2002 2023-12-25 11:14:17 +02:00 committed by GitHub
parent 18dd948e60
commit 80f2f6bce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,14 +28,14 @@ module sonic-passwh {
} }
leaf expiration { leaf expiration {
description "expiration time (days unit)"; description "expiration time (days unit)";
type uint16 { type int16 {
range 1..365; range -1..365;
} }
} }
leaf expiration_warning { leaf expiration_warning {
description "expiration warning time (days unit)"; description "expiration warning time (days unit)";
type uint8 { type int8 {
range 1..30; range -1..30;
} }
} }
leaf history_cnt { leaf history_cnt {