diff options
author | Tomas Babej <tbabej@redhat.com> | 2013-01-14 10:19:44 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-02-08 15:54:21 +0100 |
commit | 0e8a329048629f639ae64ff32e01e12a495e7763 (patch) | |
tree | 0ad4e0cba576a25639785809bf9f30776adde1d7 /util | |
parent | 1d35043e466dfca22cdaf463b6623c10a9ff2d39 (diff) | |
download | freeipa-0e8a329048629f639ae64ff32e01e12a495e7763.tar.gz freeipa-0e8a329048629f639ae64ff32e01e12a495e7763.tar.xz freeipa-0e8a329048629f639ae64ff32e01e12a495e7763.zip |
Prevent integer overflow when setting krbPasswordExpiration
Since in Kerberos V5 are used 32-bit unix timestamps, setting
maxlife in pwpolicy to values such as 9999 days would cause
integer overflow in krbPasswordExpiration attribute.
This would result into unpredictable behaviour such as users
not being able to log in after password expiration if password
policy was changed (#3114) or new users not being able to log
in at all (#3312).
The timestamp value is truncated to Jan 1, 2038 in ipa-kdc driver.
https://fedorahosted.org/freeipa/ticket/3312
https://fedorahosted.org/freeipa/ticket/3114
Diffstat (limited to 'util')
-rw-r--r-- | util/ipa_pwd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/ipa_pwd.h b/util/ipa_pwd.h index 00de889ff..a6990cac6 100644 --- a/util/ipa_pwd.h +++ b/util/ipa_pwd.h @@ -27,6 +27,9 @@ #define IPAPWD_DEFAULT_PWDLIFE (90 * 24 *3600) #define IPAPWD_DEFAULT_MINLEN 0 +/* 1 Jan 2038, 00:00 GMT */ +#define IPAPWD_END_OF_TIME 2145916800 + /* * IMPORTANT: please update error string table in ipa_pwd.c if you change this * error code table. |