In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (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));
>From what I read, kAEy should be the right value for utx.ut_id,
but I'm seeing a much longer string (see above).
jerry
--
Jerry Heyman 919.224.1442 | IBM SWG/Tivoli Software|"Software is the
Build Infrastructure Architect| 3901 S Miami Blvd | difference between
[EMAIL PROTECTED] | Durham, NC 27703 | hardware and reality"
http://vcard.acm.org/~heymanj
________________________________________________
Kerberos mailing list [EMAIL PROTECTED]
http://mailman.mit.edu/mailman/listinfo/kerberos