[408] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: Some bugs, some questions, and a Next.cf

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Tue Jan 25 15:44:29 1994

Date: Tue, 25 Jan 94 15:44:06 EST
From: tytso@MIT.EDU (Theodore Ts'o)
To: Andrew Gross <drew@drew.extern.ucsd.edu>
Cc: krb5-bugs@athena.mit.edu.
In-Reply-To: Andrew Gross's message of Mon, 24 Jan 94 23:11:45 -0800,

   Date: Mon, 24 Jan 94 23:11:45 -0800
   From: Andrew Gross <drew@drew.extern.ucsd.edu>

      Are you all interested in mods to make multihomed hosts possible
   under K5?  I can make kadmind listen on all interfaces, krshd/krlogind
   choose the right pricipal based on the interface being used, and
   kdb5_edit extract several principals to the v5srvtab (one per
   interface).  I understand that you do not have any use for this
   functionality but could it be added (#defined) to show others who want
   to use it how it can be done?

Yes, I'm interested; send me diffs, and I'll see about getting them
integrated in.  Please try to make the changes as clean as possible.
While the Kerberos V5 distributions haven't been exactly clean
themselves, I've been trying make the code cleaner, and I'd rather not
add any dirty code in.

   ( ) memory deallocation - in krb5_free_principal (lib/krb5/free/f_princ.c)
   we have:

       if (val->data) {
	   while(--i >= 0)
	       free(krb5_princ_component(val, i)->data);
	   krb5_xfree(val->data);
       }

   and krb5_xfree is defined as (include/krb5/free.h):

   #define krb5_xfree(val) free((char *)(val))

      Now, if a principal is freed twice, then the second
   krb5_free_principal does not know that the principal was freed before
   because val->data is never set to NULL.  Is this the proper behavior?

A principal should never be freed twice; if it is, that's a bug.

      This causes problems in kadmind (adm_funcs.c:adm5_change) because
   parts of the krb5_db_entry structure called entry are freed in
   functions called by this function, and on some occasions entry.mod_name
   will point to the same structure as newprinc.  

That's a problem in kadmind, and should be fixed.

						- Ted

home help back first fref pref prev next nref lref last post