summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--loginrec.c12
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a5988b68..9d6016332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120011001
2 - (stevesk) loginrec.c: fix type conversion problems exposed when using
3 64-bit off_t.
4
120010929 520010929
2 - (bal) move reading 'config.h' up higher. Patch by albert chin 6 - (bal) move reading 'config.h' up higher. Patch by albert chin
3 <china@thewrittenword.com) 7 <china@thewrittenword.com)
@@ -6585,4 +6589,4 @@
6585 - Wrote replacements for strlcpy and mkdtemp 6589 - Wrote replacements for strlcpy and mkdtemp
6586 - Released 1.0pre1 6590 - Released 1.0pre1
6587 6591
6588$Id: ChangeLog,v 1.1567 2001/09/29 14:27:00 mouring Exp $ 6592$Id: ChangeLog,v 1.1568 2001/10/02 00:29:00 stevesk Exp $
diff --git a/loginrec.c b/loginrec.c
index 5789aad76..140cd3f64 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
166RCSID("$Id: loginrec.c,v 1.34 2001/08/06 23:29:17 mouring Exp $"); 166RCSID("$Id: loginrec.c,v 1.35 2001/10/02 00:29:00 stevesk Exp $");
167 167
168#ifdef HAVE_UTIL_H 168#ifdef HAVE_UTIL_H
169# include <util.h> 169# include <util.h>
@@ -1095,7 +1095,7 @@ wtmp_get_entry(struct logininfo *li)
1095 } 1095 }
1096 1096
1097 /* Seek to the start of the last struct utmp */ 1097 /* Seek to the start of the last struct utmp */
1098 if (lseek(fd, (off_t)(0 - sizeof(struct utmp)), SEEK_END) == -1) { 1098 if (lseek(fd, -(off_t)sizeof(struct utmp), SEEK_END) == -1) {
1099 /* Looks like we've got a fresh wtmp file */ 1099 /* Looks like we've got a fresh wtmp file */
1100 close(fd); 1100 close(fd);
1101 return 0; 1101 return 0;
@@ -1128,7 +1128,7 @@ wtmp_get_entry(struct logininfo *li)
1128 continue; 1128 continue;
1129 } 1129 }
1130 /* Seek back 2 x struct utmp */ 1130 /* Seek back 2 x struct utmp */
1131 if (lseek(fd, (off_t)(0-2*sizeof(struct utmp)), SEEK_CUR) == -1) { 1131 if (lseek(fd, -(off_t)(2 * sizeof(struct utmp)), SEEK_CUR) == -1) {
1132 /* We've found the start of the file, so quit */ 1132 /* We've found the start of the file, so quit */
1133 close (fd); 1133 close (fd);
1134 return 0; 1134 return 0;
@@ -1251,7 +1251,7 @@ wtmpx_get_entry(struct logininfo *li)
1251 } 1251 }
1252 1252
1253 /* Seek to the start of the last struct utmpx */ 1253 /* Seek to the start of the last struct utmpx */
1254 if (lseek(fd, (off_t)(0-sizeof(struct utmpx)), SEEK_END) == -1 ) { 1254 if (lseek(fd, -(off_t)sizeof(struct utmpx), SEEK_END) == -1 ) {
1255 /* probably a newly rotated wtmpx file */ 1255 /* probably a newly rotated wtmpx file */
1256 close(fd); 1256 close(fd);
1257 return 0; 1257 return 0;
@@ -1281,7 +1281,7 @@ wtmpx_get_entry(struct logininfo *li)
1281# endif 1281# endif
1282 continue; 1282 continue;
1283 } 1283 }
1284 if (lseek(fd, (off_t)(0-2*sizeof(struct utmpx)), SEEK_CUR) == -1) { 1284 if (lseek(fd, -(off_t)(2 * sizeof(struct utmpx)), SEEK_CUR) == -1) {
1285 close (fd); 1285 close (fd);
1286 return 0; 1286 return 0;
1287 } 1287 }
@@ -1424,7 +1424,7 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
1424 1424
1425 if (type == LL_FILE) { 1425 if (type == LL_FILE) {
1426 /* find this uid's offset in the lastlog file */ 1426 /* find this uid's offset in the lastlog file */
1427 offset = (off_t) ( (long)li->uid * sizeof(struct lastlog)); 1427 offset = (off_t) ((long)li->uid * sizeof(struct lastlog));
1428 1428
1429 if ( lseek(*fd, offset, SEEK_SET) != offset ) { 1429 if ( lseek(*fd, offset, SEEK_SET) != offset ) {
1430 log("lastlog_openseek: %s->lseek(): %s", 1430 log("lastlog_openseek: %s->lseek(): %s",