| 1 |
From: Pavel Semerad <[email protected]> |
| 2 |
Date: Mon, 16 Jul 2018 18:28:55 +0200 |
| 3 |
Subject: Add missing initialization of kdc_offset in kcm |
| 4 |
|
| 5 |
In KCM, when allocating new kcm_ccache struct, there is missing inicialization |
| 6 |
of kdc_offset. It is getting random values in my case and stored tickets are |
| 7 |
unusable, last time I got this value to "klist -v": KDC time offset: 61 years |
| 8 |
11 months 2 weeks 3 days 5 hours 28 minutes 32 seconds This commit seems to |
| 9 |
correct it. |
| 10 |
--- |
| 11 |
kcm/cache.c | 2 ++ |
| 12 |
1 file changed, 2 insertions(+) |
| 13 |
|
| 14 |
diff --git a/kcm/cache.c b/kcm/cache.c |
| 15 |
index 25b84ab..02624df 100644 |
| 16 |
--- a/kcm/cache.c |
| 17 |
+++ b/kcm/cache.c |
| 18 |
@@ -217,6 +217,7 @@ kcm_free_ccache_data_internal(krb5_context context, |
| 19 |
|
| 20 |
cache->tkt_life = 0; |
| 21 |
cache->renew_life = 0; |
| 22 |
+ cache->kdc_offset = 0; |
| 23 |
|
| 24 |
cache->next = NULL; |
| 25 |
cache->refcnt = 0; |
| 26 |
@@ -322,6 +323,7 @@ kcm_ccache_alloc(krb5_context context, |
| 27 |
slot->key.keytab = NULL; |
| 28 |
slot->tkt_life = 0; |
| 29 |
slot->renew_life = 0; |
| 30 |
+ slot->kdc_offset = 0; |
| 31 |
|
| 32 |
if (new_slot) |
| 33 |
ccache_head = slot; |