Since it appears we don't actually set the conf_tgs_ktypes field except in this
authorKen Raeburn <raeburn@mit.edu>
Sat, 10 Jun 2006 01:05:40 +0000 (01:05 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 10 Jun 2006 01:05:40 +0000 (01:05 +0000)
initial allocation of zero elements, it can be deleted, along with
conf_tgs_ktypes_count and the associated code...

ticket: 2786

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18105 dc483132-0cff-0310-8789-dd5450dbe970

src/include/k5-int.h
src/lib/krb5/krb/init_ctx.c

index 6bfdfeed1d18cb47f46f2cee867a816fc89c84ed..7e4effed5ae4dcf5b603e7cd092980108bf550bd 100644 (file)
@@ -1047,15 +1047,7 @@ struct _krb5_context {
           absolute limit on the UDP packet size.  */
        int             udp_pref_limit;
 
-       /* This is the tgs_ktypes list as read from the profile, or
-          set to compiled-in defaults.  The application code cannot
-          override it.  This is used for session keys for
-          intermediate ticket-granting tickets used to acquire the
-          requested ticket (the session key of which may be
-          constrained by tgs_ktypes above).  */
-       krb5_enctype    *conf_tgs_ktypes;
-       unsigned int    conf_tgs_ktypes_count;
-       /* Use the _configured version?  */
+       /* Use the config-file ktypes instead of app-specified?  */
        krb5_boolean    use_conf_ktypes;
 
 #ifdef KRB5_DNS_LOOKUP
index 9b90f71210ae3bb3a7a9e35870ca199e53264f5a..e1e1e755e7d1e404cdd11b4ee675629d17667df3 100644 (file)
@@ -169,13 +169,6 @@ init_common (krb5_context *context, krb5_boolean secure, krb5_boolean kdc)
        if ((retval = krb5_set_default_tgs_ktypes(ctx, NULL)))
                goto cleanup;
 
-       ctx->conf_tgs_ktypes = calloc(ctx->tgs_ktype_count, sizeof(krb5_enctype));
-       if (ctx->conf_tgs_ktypes == NULL && ctx->tgs_ktype_count != 0)
-           goto cleanup;
-       memcpy(ctx->conf_tgs_ktypes, ctx->tgs_ktypes,
-              sizeof(krb5_enctype) * ctx->tgs_ktype_count);
-       ctx->conf_tgs_ktypes_count = ctx->tgs_ktype_count;
-
        if ((retval = krb5_os_init_context(ctx, kdc)))
                goto cleanup;
 
@@ -269,11 +262,6 @@ krb5_free_context(krb5_context ctx)
          ctx->tgs_ktypes = 0;
      }
 
-     if (ctx->conf_tgs_ktypes) {
-        free(ctx->conf_tgs_ktypes);
-        ctx->conf_tgs_ktypes = 0;
-     }
-
      if (ctx->default_realm) {
          free(ctx->default_realm);
          ctx->default_realm = 0;
@@ -462,8 +450,7 @@ krb5_get_tgs_ktypes(krb5_context context, krb5_const_principal princ, krb5_encty
        /* This one is set *only* by reading the config file; it's not
           set by the application.  */
        return(get_profile_etype_list(context, ktypes, "default_tgs_enctypes",
-                                     context->conf_tgs_ktypes_count,
-                                     context->conf_tgs_ktypes));
+                                     0, NULL));
     else
        return(get_profile_etype_list(context, ktypes, "default_tgs_enctypes",
                                      context->tgs_ktype_count,