From b2448139b5fa97a57b8f219101fd119801add7d6 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 12 Mar 1998 23:12:52 +0000 Subject: [PATCH] * update_utmp.c (pty_update_utmp): Fix bogus entry of PTY_LOGIN_PROCESS types on BSD-ish systems. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10499 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 5 +++++ src/util/pty/update_utmp.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index 2c149cb1c..220e22b4d 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 12 18:09:25 1998 Tom Yu + + * update_utmp.c (pty_update_utmp): Fix bogus entry of + PTY_LOGIN_PROCESS types on BSD-ish systems. + Wed Feb 18 16:33:58 1998 Tom Yu * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/util/pty/update_utmp.c b/src/util/pty/update_utmp.c index 3b1f74185..0c106febe 100644 --- a/src/util/pty/update_utmp.c +++ b/src/util/pty/update_utmp.c @@ -55,11 +55,14 @@ long pty_update_utmp (process_type, pid, username, line, host, flags) strncpy(ent.ut_line, line+sizeof("/dev/")-1, sizeof(ent.ut_line)); ent.ut_time = time(0); -#ifndef NO_UT_PID +#ifdef NO_UT_PID + if (process_type == PTY_LOGIN_PROCESS) + return 0; +#else /* NO_UT_PID */ ent.ut_pid = pid; - switch ( process_type ) { + switch (process_type) { case PTY_LOGIN_PROCESS: - ent . ut_type = LOGIN_PROCESS; + ent.ut_type = LOGIN_PROCESS; break; case PTY_USER_PROCESS: ent.ut_type = USER_PROCESS; -- 2.26.2