diff options
author | Damien Miller <djm@mindrot.org> | 2000-08-15 10:21:17 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-08-15 10:21:17 +1000 |
commit | e477ef65294501de06096cfecb6cfcc923f634f5 (patch) | |
tree | 1d569c95095d2bac58a33aacc105b3c93dc42612 /loginrec.c | |
parent | c83aa8378447861b1bc0a030fdb32f78783dc979 (diff) |
- (djm) Don't seek in directory based lastlogs
- (djm) Fix --with-ipaddr-display configure option test. Patch from
Jarno Huuskonen <jhuuskon@messi.uku.fi>
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/loginrec.c b/loginrec.c index 798e966f0..6b87ba320 100644 --- a/loginrec.c +++ b/loginrec.c | |||
@@ -160,7 +160,7 @@ | |||
160 | #include "xmalloc.h" | 160 | #include "xmalloc.h" |
161 | #include "loginrec.h" | 161 | #include "loginrec.h" |
162 | 162 | ||
163 | RCSID("$Id: loginrec.c,v 1.19 2000/08/15 00:01:22 djm Exp $"); | 163 | RCSID("$Id: loginrec.c,v 1.20 2000/08/15 00:21:17 djm Exp $"); |
164 | 164 | ||
165 | /** | 165 | /** |
166 | ** prototypes for helper functions in this file | 166 | ** prototypes for helper functions in this file |
@@ -1380,14 +1380,17 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode) | |||
1380 | return 0; | 1380 | return 0; |
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | /* find this uid's offset in the lastlog file */ | 1383 | if (type == LL_FILE) { |
1384 | offset = (off_t) ( (long)li->uid * sizeof(struct lastlog)); | 1384 | /* find this uid's offset in the lastlog file */ |
1385 | offset = (off_t) ( (long)li->uid * sizeof(struct lastlog)); | ||
1385 | 1386 | ||
1386 | if ( lseek(*fd, offset, SEEK_SET) != offset ) { | 1387 | if ( lseek(*fd, offset, SEEK_SET) != offset ) { |
1387 | log("lastlog_openseek: %s->lseek(): %s", | 1388 | log("lastlog_openseek: %s->lseek(): %s", |
1388 | lastlog_file, strerror(errno)); | 1389 | lastlog_file, strerror(errno)); |
1389 | return 0; | 1390 | return 0; |
1391 | } | ||
1390 | } | 1392 | } |
1393 | |||
1391 | return 1; | 1394 | return 1; |
1392 | } | 1395 | } |
1393 | 1396 | ||