diff options
author | Roman Rakus <rrakus@redhat.com> | 2013-05-30 09:58:01 +0200 |
---|---|---|
committer | Roman Rakus <rrakus@redhat.com> | 2013-05-30 09:58:01 +0200 |
commit | 08959a97787e4d120010bca1645b547217869374 (patch) | |
tree | a59c7a618674e8523241f004982395535d3766fe /src/account/macros.h | |
parent | dec0ce45beeb80fd125dd2500c28a0a5d4535625 (diff) | |
download | openlmi-providers-08959a97787e4d120010bca1645b547217869374.tar.gz openlmi-providers-08959a97787e4d120010bca1645b547217869374.tar.xz openlmi-providers-08959a97787e4d120010bca1645b547217869374.zip |
Account: Correctly handle empty fields in shadow file
libuser returns -1 for empty fields. Handle the -1 on missing places.
Added macro definitions for -1 and 99999 values.
Fixes Ticket #113: LMI_Account instance enumeration fails with "DateTime is out of range"
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Diffstat (limited to 'src/account/macros.h')
-rw-r--r-- | src/account/macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/account/macros.h b/src/account/macros.h index 513d472..80a9400 100644 --- a/src/account/macros.h +++ b/src/account/macros.h @@ -34,4 +34,10 @@ #define MSTODAYS(ms) ((ms) / 86400000000) #define STOMS(s) ((s) * 1000000) +/* This will identify empty values in shadow file */ +#define SHADOW_VALUE_EMPTY -1 + +/* libuser uses this value to disable checking for password change */ +#define SHADOW_MAX_DISABLED 99999 + #endif |