From f1212ffe4e4e2c09b9e10e9b7fe5a152e6f7adf6 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Fri, 28 Apr 2023 11:58:38 +1200 Subject: s4:kdc: Make maximum lifetime and renew time signed This is now consistent with Heimdal, and with our usage of time_t elsewhere. NOTE: This commit finally works again! Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- source4/kdc/sdb.h | 4 ++-- source4/kdc/sdb_to_hdb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/kdc/sdb.h b/source4/kdc/sdb.h index f211c25187b..c8515102e5c 100644 --- a/source4/kdc/sdb.h +++ b/source4/kdc/sdb.h @@ -98,8 +98,8 @@ struct sdb_entry { time_t *valid_start; time_t *valid_end; time_t *pw_end; - unsigned int *max_life; - unsigned int *max_renew; + int *max_life; + int *max_renew; struct SDBFlags flags; }; diff --git a/source4/kdc/sdb_to_hdb.c b/source4/kdc/sdb_to_hdb.c index c72eb91ea21..994a52d7d44 100644 --- a/source4/kdc/sdb_to_hdb.c +++ b/source4/kdc/sdb_to_hdb.c @@ -250,7 +250,7 @@ int sdb_entry_to_hdb_entry(krb5_context context, } if (s->max_life != NULL) { - h->max_life = malloc(sizeof(unsigned int)); + h->max_life = malloc(sizeof(*h->max_life)); if (h->max_life == NULL) { rc = ENOMEM; goto error; @@ -261,7 +261,7 @@ int sdb_entry_to_hdb_entry(krb5_context context, } if (s->max_renew != NULL) { - h->max_renew = malloc(sizeof(unsigned int)); + h->max_renew = malloc(sizeof(*h->max_renew)); if (h->max_renew == NULL) { rc = ENOMEM; goto error; -- cgit v1.2.1