[BACK]Return to login.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/Attic/login.c between version 1.6 and 1.7

version 1.6, 1999/09/30 05:43:33 version 1.7, 1999/09/30 16:55:06
Line 45 
Line 45 
   fd = open(lastlog, O_RDONLY);    fd = open(lastlog, O_RDONLY);
   if (fd < 0)    if (fd < 0)
     return 0;      return 0;
   lseek(fd, (off_t)((long)uid * sizeof(ll)), 0);    lseek(fd, (off_t)((long)uid * sizeof(ll)), SEEK_SET);
   if (read(fd, &ll, sizeof(ll)) != sizeof(ll))    if (read(fd, &ll, sizeof(ll)) != sizeof(ll))
     {      {
       close(fd);        close(fd);
Line 101 
Line 101 
       fd = open(lastlog, O_RDWR);        fd = open(lastlog, O_RDWR);
       if (fd >= 0)        if (fd >= 0)
         {          {
           lseek(fd, (off_t)((long)uid * sizeof(ll)), 0);            lseek(fd, (off_t)((long)uid * sizeof(ll)), SEEK_SET);
           if (write(fd, &ll, sizeof(ll)) != sizeof(ll))            if (write(fd, &ll, sizeof(ll)) != sizeof(ll))
             log("Could not write %.100s: %.100s", lastlog, strerror(errno));              log("Could not write %.100s: %.100s", lastlog, strerror(errno));
           close(fd);            close(fd);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7