]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Make maximum lifetime and renew time signed
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 27 Apr 2023 23:58:38 +0000 (11:58 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 May 2023 01:03:37 +0000 (01:03 +0000)
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 <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/sdb.h
source4/kdc/sdb_to_hdb.c

index f211c25187bb9a489a2642ac1a0d132a651578aa..c8515102e5c1bcb454b153784a21d24b3e9ecc95 100644 (file)
@@ -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;
 };
 
index c72eb91ea218b585dc68c2c4895fc7988c0f5ca5..994a52d7d440625945cf3d7fba7542c5f08c121c 100644 (file)
@@ -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;