]> andersk Git - openssh.git/commitdiff
- (djm) Don't seek in directory based lastlogs
authordjm <djm>
Tue, 15 Aug 2000 00:21:17 +0000 (00:21 +0000)
committerdjm <djm>
Tue, 15 Aug 2000 00:21:17 +0000 (00:21 +0000)
 - (djm) Fix --with-ipaddr-display configure option test. Patch from
   Jarno Huuskonen <jhuuskon@messi.uku.fi>

ChangeLog
configure.in
loginrec.c

index 39ac03e5f9d00876e55dc352fd6c265c9ee5d678..ba4eaa12c6466c7bc2216324f0d3749ee04bc44c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
  - (djm) More SunOS 4.1.x fixes from Nate Itkin <nitkin@europa.com>
  - (djm) Avoid failures on Irix when ssh is not setuid. Fix from
    Michael Stone <mstone@cs.loyola.edu>
+ - (djm) Don't seek in directory based lastlogs
+ - (djm) Fix --with-ipaddr-display configure option test. Patch from 
+   Jarno Huuskonen <jhuuskon@messi.uku.fi>
 
 20000813
  - (djm) Add $(srcdir) to includes when compiling (for VPATH). Report from
index 0c9e4fc669438bff6241666b26c57ab5eda78738..7ad0d01d7ca8641339f344f2d3ecc46ba4f956d5 100644 (file)
@@ -1031,7 +1031,7 @@ DISPLAY_HACK_MSG="no"
 AC_ARG_WITH(ipaddr-display,
        [  --with-ipaddr-display   Use ip address instead of hostname in \$DISPLAY],
        [
-               if test "x$withval" = "xno" ; then      
+               if test "x$withval" != "xno" ; then     
                        AC_DEFINE(IPADDR_IN_DISPLAY)
                        DISPLAY_HACK_MSG="yes" 
                fi
index 48ab29c7cc852ba5f7dcf3607a3d8c2c94ea80f4..c233a028cdfcd5b4b45eec0c4cdf88873d8ce45f 100644 (file)
@@ -1380,14 +1380,17 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
                return 0;
        }
        
-       /* find this uid's offset in the lastlog file */
-       offset = (off_t) ( (long)li->uid * sizeof(struct lastlog));
+       if (type == LL_FILE) {
+               /* find this uid's offset in the lastlog file */
+               offset = (off_t) ( (long)li->uid * sizeof(struct lastlog));
 
-       if ( lseek(*fd, offset, SEEK_SET) != offset ) {
-               log("lastlog_openseek: %s->lseek(): %s",
-                   lastlog_file, strerror(errno));
-               return 0;
+               if ( lseek(*fd, offset, SEEK_SET) != offset ) {
+                       log("lastlog_openseek: %s->lseek(): %s",
+                        lastlog_file, strerror(errno));
+                       return 0;
+               }
        }
+       
        return 1;
 }
 
This page took 0.333656 seconds and 5 git commands to generate.