summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Basch <probe@mit.edu>1994-12-28 18:55:37 +0000
committerRichard Basch <probe@mit.edu>1994-12-28 18:55:37 +0000
commit5fb36376c5d7c77053b9235057c6aee3b64db0ef (patch)
tree65a57038321d99adf15e3a1ad11623cc5ede5c42 /src
parent6a6ee02945b3d843c408cfc0aa7e396f4c9dc08a (diff)
downloadkrb5-5fb36376c5d7c77053b9235057c6aee3b64db0ef.tar.gz
krb5-5fb36376c5d7c77053b9235057c6aee3b64db0ef.tar.xz
krb5-5fb36376c5d7c77053b9235057c6aee3b64db0ef.zip
* 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
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/logutil.c18
1 files changed, 2 insertions, 16 deletions
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 */