diff options
Diffstat (limited to 'crypto/heimdal/kadmin')
-rw-r--r-- | crypto/heimdal/kadmin/ChangeLog | 18 | ||||
-rw-r--r-- | crypto/heimdal/kadmin/kadmin_locl.h | 7 | ||||
-rw-r--r-- | crypto/heimdal/kadmin/load.c | 8 | ||||
-rw-r--r-- | crypto/heimdal/kadmin/server.c | 11 | ||||
-rw-r--r-- | crypto/heimdal/kadmin/version4.c | 6 |
5 files changed, 36 insertions, 14 deletions
diff --git a/crypto/heimdal/kadmin/ChangeLog b/crypto/heimdal/kadmin/ChangeLog index 4c56cc8acac0..6e625f872a19 100644 --- a/crypto/heimdal/kadmin/ChangeLog +++ b/crypto/heimdal/kadmin/ChangeLog @@ -1,3 +1,21 @@ +2002-09-10 Johan Danielsson <joda@pdc.kth.se> + + * server.c: constify match_appl_version() + + * version4.c: change some lingering krb_err_base + +2002-09-09 Jacques Vidrine <nectar@kth.se> + + * server.c (kadmind_dispatch): while decoding arguments for + kadm_chpass_with_key, sanity check the number of keys given. + Potential problem pointed out by + Sebastian Krahmer <krahmer@suse.de>. + +2002-09-04 Johan Danielsson <joda@pdc.kth.se> + + * load.c (parse_generation): return if there is no generation + (spotted by Daniel Kouril) + 2002-06-07 Jacques Vidrine <n@nectar.com> * ank.c: do not attempt to free uninitialized pointer when diff --git a/crypto/heimdal/kadmin/kadmin_locl.h b/crypto/heimdal/kadmin/kadmin_locl.h index 0cd5d4e78c08..59c1bd29a017 100644 --- a/crypto/heimdal/kadmin/kadmin_locl.h +++ b/crypto/heimdal/kadmin/kadmin_locl.h @@ -32,7 +32,7 @@ */ /* - * $Id: kadmin_locl.h,v 1.40 2001/08/22 20:30:24 assar Exp $ + * $Id: kadmin_locl.h,v 1.41 2002/09/10 20:04:45 joda Exp $ */ #ifndef __ADMIN_LOCL_H__ @@ -86,11 +86,6 @@ #endif #include <err.h> #include <roken.h> -#ifdef HAVE_OPENSSL -#include <openssl/des.h> -#else -#include <des.h> -#endif #include <krb5.h> #include <krb5_locl.h> #include <hdb.h> diff --git a/crypto/heimdal/kadmin/load.c b/crypto/heimdal/kadmin/load.c index ebeee6c8b3d0..3635023cbb19 100644 --- a/crypto/heimdal/kadmin/load.c +++ b/crypto/heimdal/kadmin/load.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2001 Kungliga Tekniska Högskolan + * Copyright (c) 1997-2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -34,7 +34,7 @@ #include "kadmin_locl.h" #include <kadm5/private.h> -RCSID("$Id: load.c,v 1.43 2001/08/10 13:52:22 joda Exp $"); +RCSID("$Id: load.c,v 1.44 2002/09/04 20:44:35 joda Exp $"); struct entry { char *principal; @@ -288,8 +288,10 @@ parse_generation(char *str, GENERATION **gen) char *p; int v; - if(strcmp(str, "-") == 0 || *str == '\0') + if(strcmp(str, "-") == 0 || *str == '\0') { *gen = NULL; + return 0; + } *gen = calloc(1, sizeof(**gen)); p = strsep(&str, ":"); diff --git a/crypto/heimdal/kadmin/server.c b/crypto/heimdal/kadmin/server.c index 0bda03ce11da..143e95d96fa4 100644 --- a/crypto/heimdal/kadmin/server.c +++ b/crypto/heimdal/kadmin/server.c @@ -34,7 +34,7 @@ #include "kadmin_locl.h" #include <krb5-private.h> -RCSID("$Id: server.c,v 1.34 2002/05/24 15:23:42 joda Exp $"); +RCSID("$Id: server.c,v 1.36 2002/09/10 19:23:28 joda Exp $"); static kadm5_ret_t kadmind_dispatch(void *kadm_handle, krb5_boolean initial, @@ -255,6 +255,13 @@ kadmind_dispatch(void *kadm_handle, krb5_boolean initial, krb5_free_principal(context->context, princ); goto fail; } + /* n_key_data will be squeezed into an int16_t below. */ + if (n_key_data < 0 || n_key_data >= 1 << 16 || + n_key_data > UINT_MAX/sizeof(*key_data)) { + ret = ERANGE; + krb5_free_principal(context->context, princ); + goto fail; + } key_data = malloc (n_key_data * sizeof(*key_data)); if (key_data == NULL) { @@ -440,7 +447,7 @@ v5_loop (krb5_context context, } static krb5_boolean -match_appl_version(void *data, const char *appl_version) +match_appl_version(const void *data, const char *appl_version) { unsigned minor; if(sscanf(appl_version, "KADM0.%u", &minor) != 1) diff --git a/crypto/heimdal/kadmin/version4.c b/crypto/heimdal/kadmin/version4.c index b660ad70d8f3..9dec87cd46bc 100644 --- a/crypto/heimdal/kadmin/version4.c +++ b/crypto/heimdal/kadmin/version4.c @@ -41,7 +41,7 @@ #include <krb_err.h> #include <kadm_err.h> -RCSID("$Id: version4.c,v 1.25 2002/05/24 15:23:43 joda Exp $"); +RCSID("$Id: version4.c,v 1.26 2002/09/10 15:20:46 joda Exp $"); #define KADM_NO_OPCODE -1 #define KADM_NO_ENCRYPT -2 @@ -868,7 +868,7 @@ decode_packet(krb5_context context, client_addr->sin_addr.s_addr, &ad, NULL); if(ret) { - make_you_loose_packet(krb_err_base + ret, reply); + make_you_loose_packet(ERROR_TABLE_BASE_krb + ret, reply); krb5_warnx(context, "krb_rd_req: %d", ret); return; } @@ -905,7 +905,7 @@ decode_packet(krb5_context context, ret = krb_rd_priv(msg + off, rlen, schedule, &ad.session, client_addr, admin_addr, &msg_dat); if (ret) { - make_you_loose_packet (krb_err_base + ret, reply); + make_you_loose_packet (ERROR_TABLE_BASE_krb + ret, reply); krb5_warnx(context, "krb_rd_priv: %d", ret); goto out; } |