From: Tom Yu Date: Sat, 24 Apr 1999 03:15:30 +0000 (+0000) Subject: * update_utmp.c (pty_update_utmp): utx.ut_pid is a pid_t, and X-Git-Tag: krb5-1.1-beta1~200 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6db08dfe3be7542002231138669b7128fbb994a8;p=krb5.git * update_utmp.c (pty_update_utmp): utx.ut_pid is a pid_t, and ent.ut_pid is sometimes a short; accordingly, use pid rather than ent.ut_pid, which might have gotten truncated. This fixes an Irix problem found by . git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11394 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index b6a34041d..efc93bc2d 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,10 @@ +Fri Apr 23 23:13:57 1999 Tom Yu + + * update_utmp.c (pty_update_utmp): utx.ut_pid is a pid_t, and + ent.ut_pid is sometimes a short; accordingly, use pid rather than + ent.ut_pid, which might have gotten truncated. This fixes an Irix + problem found by . + 1999-04-14 * update_wtmp.c: Don't use updwtmpx() even if it exists for glibc diff --git a/src/util/pty/update_utmp.c b/src/util/pty/update_utmp.c index d131b046e..be4fc32d0 100644 --- a/src/util/pty/update_utmp.c +++ b/src/util/pty/update_utmp.c @@ -136,7 +136,7 @@ long pty_update_utmp (process_type, pid, username, line, host, flags) strncpy(utx.ut_user, ent.ut_user, sizeof(ent.ut_user)); strncpy(utx.ut_id, ent.ut_id, sizeof(ent.ut_id)); strncpy(utx.ut_line, ent.ut_line, sizeof(ent.ut_line)); - utx.ut_pid = ent.ut_pid; + utx.ut_pid = pid; /* kludge for Irix, etc. to avoid trunc. */ utx.ut_type = ent.ut_type; #ifdef UT_EXIT_STRUCTURE_DIFFER utx.ut_exit.ut_exit = ent.ut_exit.e_exit;