[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kadmin/version4.c doesn't check krb5_425_conv_principal



On Thu, 7 Sep 2000, Derrick J Brashear wrote:

> in kadmin/version4.c krb5_425_conv_principal is called but the return
> value isn't checked. in this case it's HEIM_ERR_V4_PRINC_NO_CONV, which
> means the
> krb5_unparse_name(context, client, &client_str); 
> on the next line causes a SEGV.

*** version4.c  2000/08/09 20:53:09     1.22
--- version4.c  2000/09/08 05:57:39
***************
*** 868,875 ****
        return;
      }
  
!     krb5_425_conv_principal(context, ad.pname, ad.pinst, ad.prealm,
!                           &client);
      krb5_unparse_name(context, client, &client_str);
  
      ret = kadm5_init_with_password_ctx(context, 
--- 868,881 ----
        return;
      }
  
!     ret = krb5_425_conv_principal(context, ad.pname, ad.pinst, ad.prealm,
!                                 &client);
!     if (ret) {
!       krb5_warnx (context, "krb5_425_conv_principal: %d", ret);
!       make_you_loose_packet (KADM_NOMEM, reply);
!       goto out;
!     }
! 
      krb5_unparse_name(context, client, &client_str);
  
      ret = kadm5_init_with_password_ctx(context,