diff options
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/loginrec.c b/loginrec.c index 609e84768..02c3106a3 100644 --- a/loginrec.c +++ b/loginrec.c | |||
@@ -163,7 +163,7 @@ | |||
163 | #include "log.h" | 163 | #include "log.h" |
164 | #include "atomicio.h" | 164 | #include "atomicio.h" |
165 | 165 | ||
166 | RCSID("$Id: loginrec.c,v 1.40 2002/04/23 13:09:19 djm Exp $"); | 166 | RCSID("$Id: loginrec.c,v 1.44 2002/09/26 00:38:49 tim Exp $"); |
167 | 167 | ||
168 | #ifdef HAVE_UTIL_H | 168 | #ifdef HAVE_UTIL_H |
169 | # include <util.h> | 169 | # include <util.h> |
@@ -622,13 +622,13 @@ construct_utmp(struct logininfo *li, | |||
622 | switch (li->type) { | 622 | switch (li->type) { |
623 | case LTYPE_LOGIN: | 623 | case LTYPE_LOGIN: |
624 | ut->ut_type = USER_PROCESS; | 624 | ut->ut_type = USER_PROCESS; |
625 | #ifdef _CRAY | 625 | #ifdef _UNICOS |
626 | cray_set_tmpdir(ut); | 626 | cray_set_tmpdir(ut); |
627 | #endif | 627 | #endif |
628 | break; | 628 | break; |
629 | case LTYPE_LOGOUT: | 629 | case LTYPE_LOGOUT: |
630 | ut->ut_type = DEAD_PROCESS; | 630 | ut->ut_type = DEAD_PROCESS; |
631 | #ifdef _CRAY | 631 | #ifdef _UNICOS |
632 | cray_retain_utmp(ut, li->pid); | 632 | cray_retain_utmp(ut, li->pid); |
633 | #endif | 633 | #endif |
634 | break; | 634 | break; |
@@ -1249,7 +1249,7 @@ wtmpx_get_entry(struct logininfo *li) | |||
1249 | } | 1249 | } |
1250 | if (fstat(fd, &st) != 0) { | 1250 | if (fstat(fd, &st) != 0) { |
1251 | log("wtmpx_get_entry: couldn't stat %s: %s", | 1251 | log("wtmpx_get_entry: couldn't stat %s: %s", |
1252 | WTMP_FILE, strerror(errno)); | 1252 | WTMPX_FILE, strerror(errno)); |
1253 | close(fd); | 1253 | close(fd); |
1254 | return 0; | 1254 | return 0; |
1255 | } | 1255 | } |
@@ -1271,6 +1271,7 @@ wtmpx_get_entry(struct logininfo *li) | |||
1271 | /* Logouts are recorded as a blank username on a particular line. | 1271 | /* Logouts are recorded as a blank username on a particular line. |
1272 | * So, we just need to find the username in struct utmpx */ | 1272 | * So, we just need to find the username in struct utmpx */ |
1273 | if ( wtmpx_islogin(li, &utx) ) { | 1273 | if ( wtmpx_islogin(li, &utx) ) { |
1274 | found = 1; | ||
1274 | # ifdef HAVE_TV_IN_UTMPX | 1275 | # ifdef HAVE_TV_IN_UTMPX |
1275 | li->tv_sec = utx.ut_tv.tv_sec; | 1276 | li->tv_sec = utx.ut_tv.tv_sec; |
1276 | # else | 1277 | # else |