]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Initialize life/rlife in kdcpolicy interface
authorRobbie Harwood <rharwood@redhat.com>
Fri, 9 Aug 2019 18:07:22 +0000 (14:07 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 9 Dec 2019 22:02:52 +0000 (17:02 -0500)
A value of 0 indicates that the plugin doesn't wish to modify lifetimes.
Make this the default, rather than requiring all plugins to set these
values themselves.

(cherry picked from commit d81c5870013240c04642c8e0cb994b4c49e40ddf)

ticket: 8824
version_fixed: 1.17.1

src/kdc/policy.c

index 26c16f97cb5360ad184bebcf157236b85f79a0fa..a3ff556c53859d0129e0e8a22c479d82205e19e8 100644 (file)
@@ -106,7 +106,7 @@ check_kdcpolicy_as(krb5_context context, const krb5_kdc_req *request,
                    krb5_data *const *auth_indicators, krb5_timestamp kdc_time,
                    krb5_ticket_times *times, const char **status)
 {
-    krb5_deltat life, rlife;
+    krb5_deltat life = 0, rlife = 0;
     krb5_error_code ret;
     kdcpolicy_handle *hp, h;
     char **ais = NULL;
@@ -146,7 +146,7 @@ check_kdcpolicy_tgs(krb5_context context, const krb5_kdc_req *request,
                     krb5_data *const *auth_indicators, krb5_timestamp kdc_time,
                     krb5_ticket_times *times, const char **status)
 {
-    krb5_deltat life, rlife;
+    krb5_deltat life = 0, rlife = 0;
     krb5_error_code ret;
     kdcpolicy_handle *hp, h;
     char **ais = NULL;