From: Richard Basch Date: Wed, 28 Dec 1994 18:55:37 +0000 (+0000) Subject: * logutil.c X-Git-Tag: krb5-1.0-beta5~889 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5fb36376c5d7c77053b9235057c6aee3b64db0ef;p=krb5.git * logutil.c Search to the proper position in the utmp/utmpx files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4764 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/logutil.c b/src/appl/bsd/logutil.c index 2be2c0db0..4fcef6d39 100644 --- a/src/appl/bsd/logutil.c +++ b/src/appl/bsd/logutil.c @@ -80,28 +80,13 @@ void update_utmp(ent, username, line, host) sprintf(utmp_id, "kl%s", tmpx); strncpy(ent->ut_id, utmp_id, sizeof(ent->ut_id)); strncpy(ent->ut_user, username, sizeof(ent->ut_user)); - - switch(ent->ut_type) { - case LOGIN_PROCESS: - case USER_PROCESS: - memset((char *)&ut, 0, sizeof(ut)); - strncpy(ut.ut_id, ent->ut_id, sizeof(ut.ut_id)); - ut.ut_type = DEAD_PROCESS; - getutid(&ut); - break; - case DEAD_PROCESS: - memset((char *)&ut, 0, sizeof(ut)); - strncpy(ut.ut_id, ent->ut_id, sizeof(ut.ut_id)); - ut.ut_type = USER_PROCESS; - getutid(&ut); - break; - } #else strncpy(ent->ut_name, username, sizeof(ent->ut_name)); #endif #ifdef HAVE_SETUTXENT getutmpx(ent, &utx); + getutxid(&ent); setutxent(); pututxline(&utx); endutxent(); @@ -109,6 +94,7 @@ void update_utmp(ent, username, line, host) #ifdef HAVE_SETUTENT utmpname(UTMP_FILE); setutent(); + getutid(ent); pututline(ent); endutent(); #else /* HAVE_SETUTENT */