kerberos 5 login (krb 5.1.2-5)
Jerry Heyman
jerry at scosco.raleigh.tivoli.com
Thu Jul 18 15:21:17 EDT 2002
In article <tslvg7evwi6.fsf at konishi-polis.mit.edu>,
hartmans at mit.edu (Sam Hartman) writes:
>I'd step through login in a debugger and see where it hangs. If you
>cannot do that, then start inserting debugging print statements and
>binary search where it hangs.
Not a hang - an infinite loop, hence the CPU utilization. I've
got it narrowed down to the code section:
in src/util/pty/update_utmp.c, in function best_utxent():
/*
* Uh-oh, someone didn't enter our pid. Try valiantly to search
* by terminal line.
*/
i = 0;
best = -1;
PTY_SETUTXENT();
while ((utxp = PTY_GETUTXLINE(search)) != NULL) {
if (better(search, utxp, &utxtmp)) {
utxtmp = *utxp;
best = i; }
memset(utxp, 0, sizeof(*utxp));
i++;
}
The ttyname that I'm running on is: /dev/ttyAE/AAEy
but that is getting mangled to: kAEyttyAE/AAEy
Is there a problem in the pty_update_utmp() function around line
554 (my numbers are off because of inserted printf()s). It seems
that there is a strncpy () call without appending a NULL character.
#ifdef __hpux
strcpy(utmp_id, cp);
#else
if (len > 2 && *(cp - 1) != '/')
sprintf(utmp_id, "k%s", cp - 1);
else
sprintf(utmp_id, "k0%s", cp);
#endif
strncpy(utx.ut_id, utmp_id, sizeof(utx.ut_id));
More information about the Kerberos
mailing list