summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1999-04-24 03:15:30 +0000
committerTom Yu <tlyu@mit.edu>1999-04-24 03:15:30 +0000
commit6db08dfe3be7542002231138669b7128fbb994a8 (patch)
tree40ff8ea146ef6461998fed43cb5a0db98a7ae4e5 /src
parent1c22d6daaa2d33b980c1a5d85e45c49b4f6ca394 (diff)
downloadkrb5-6db08dfe3be7542002231138669b7128fbb994a8.tar.gz
krb5-6db08dfe3be7542002231138669b7128fbb994a8.tar.xz
krb5-6db08dfe3be7542002231138669b7128fbb994a8.zip
* 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 <rbasch@mit.edu>. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11394 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/util/pty/ChangeLog7
-rw-r--r--src/util/pty/update_utmp.c2
2 files changed, 8 insertions, 1 deletions
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 <tlyu@mit.edu>
+
+ * 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 <rbasch@mit.edu>.
+
1999-04-14 <tytso@rsts-11.mit.edu>
* 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;