Problem with klogind/kshd
Marc Horowitz
marc at MIT.EDU
Wed May 1 20:23:53 EDT 2002
tim at gaastra.net ("Tim Gaastra") writes:
>> One confirmed problem: crashing in login.krb5
>>
>> Because of:
>> Src/appl/bsd/login.c
>> Line 1193: strncpy(term, getenv("TERM"), sizeof(term));
>>
>> Apparently, there have been issues with strncpy and alignment problems
>> with the IA64 in the past...
>>
>> The current kludgey fix has been to make a pointer, assign the getenv to
>> it, strlen the pointer, assign that to a size_t, and then call the
>> strncpy as strncpy(term,<pointer>,<size_t>);
This sounds an awful lot like a libc or compiler bug, not a kerberos
bug. Perhaps you should fix it there.
Also, your fix is broken: if $TERM is longer than the term array,
you're guaranteed a core dump.
Marc
More information about the Kerberos
mailing list