[krbdev.mit.edu #5429] SVN Commit

Ezra Peisach via RT rt-comment at krbdev.mit.edu
Mon Feb 5 16:28:39 EST 2007


Sam Hartman via RT wrote:
>>>>>> "Ezra" == Ezra Peisach via RT <rt-comment at krbdev.mit.edu> writes:
>>>>>>             
>
>     Ezra> Sam Hartman via RT wrote:
>     >> It would be desirable to actually use krb5_copy_keyblock if
>     >> possible or if not, at least initialize the keyblock using
>     >> krb5_keyblock_init.
>     >> 
>     >> 
>     Ezra> Umm.... The code is currently (now) using
>     Ezra> krb5_copy_keyblock_contents...  Is this sufficient?
>
> Not with the current code.
>
> copy_keyblock_contents can (and should) call keyblock_init.
>
> No, we do not want there to be an keyblock_init_contents routine;.
>
>
>   
Err - I would like some advise... Currently, nowhere in the keytab code 
in the krb5_keytab_entry is the keyblock inited w/ the copy_keyblock or 
keyblock_init code - as both
will try to malloc a krb5_keyblock structure.   The krb5_keyblock_entry 
contains a krb5_keyblock  structure - not a pointer to one.

So - one solution is ugly...  use keyblock_init, copy everything out of 
there - zero the contents
pointer  in the original - and free the keyblock.... This is ugly and 
would do what you want.

Is there a better solution?


Ezra





More information about the krb5-bugs mailing list