diff options
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/loginrec.c b/loginrec.c index bdac3e959..71dbaea15 100644 --- a/loginrec.c +++ b/loginrec.c | |||
@@ -158,7 +158,7 @@ | |||
158 | #include "log.h" | 158 | #include "log.h" |
159 | #include "atomicio.h" | 159 | #include "atomicio.h" |
160 | 160 | ||
161 | RCSID("$Id: loginrec.c,v 1.52 2003/07/06 05:20:46 dtucker Exp $"); | 161 | RCSID("$Id: loginrec.c,v 1.54 2004/02/10 05:49:35 dtucker Exp $"); |
162 | 162 | ||
163 | #ifdef HAVE_UTIL_H | 163 | #ifdef HAVE_UTIL_H |
164 | # include <util.h> | 164 | # include <util.h> |
@@ -442,7 +442,7 @@ login_write (struct logininfo *li) | |||
442 | int | 442 | int |
443 | login_utmp_only(struct logininfo *li) | 443 | login_utmp_only(struct logininfo *li) |
444 | { | 444 | { |
445 | li->type = LTYPE_LOGIN; | 445 | li->type = LTYPE_LOGIN; |
446 | login_set_current_time(li); | 446 | login_set_current_time(li); |
447 | # ifdef USE_UTMP | 447 | # ifdef USE_UTMP |
448 | utmp_write_entry(li); | 448 | utmp_write_entry(li); |
@@ -1183,6 +1183,7 @@ wtmp_get_entry(struct logininfo *li) | |||
1183 | static int | 1183 | static int |
1184 | wtmpx_write(struct logininfo *li, struct utmpx *utx) | 1184 | wtmpx_write(struct logininfo *li, struct utmpx *utx) |
1185 | { | 1185 | { |
1186 | #ifndef HAVE_UPDWTMPX | ||
1186 | struct stat buf; | 1187 | struct stat buf; |
1187 | int fd, ret = 1; | 1188 | int fd, ret = 1; |
1188 | 1189 | ||
@@ -1202,6 +1203,10 @@ wtmpx_write(struct logininfo *li, struct utmpx *utx) | |||
1202 | (void)close(fd); | 1203 | (void)close(fd); |
1203 | 1204 | ||
1204 | return ret; | 1205 | return ret; |
1206 | #else | ||
1207 | updwtmpx(WTMPX_FILE, utx); | ||
1208 | return 1; | ||
1209 | #endif | ||
1205 | } | 1210 | } |
1206 | 1211 | ||
1207 | 1212 | ||
@@ -1534,7 +1539,7 @@ lastlog_get_entry(struct logininfo *li) | |||
1534 | lastlog_populate_entry(li, &last); | 1539 | lastlog_populate_entry(li, &last); |
1535 | return (1); | 1540 | return (1); |
1536 | case -1: | 1541 | case -1: |
1537 | error("%s: Error reading from %s: %s", __func__, | 1542 | error("%s: Error reading from %s: %s", __func__, |
1538 | LASTLOG_FILE, strerror(errno)); | 1543 | LASTLOG_FILE, strerror(errno)); |
1539 | return (0); | 1544 | return (0); |
1540 | default: | 1545 | default: |