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

Diff for /src/usr.bin/ssh/sshlogin.c between version 1.31 and 1.32

version 1.31, 2015/01/20 23:14:00 version 1.32, 2015/12/26 20:51:35
Line 83 
Line 83 
         if (fd < 0)          if (fd < 0)
                 return 0;                  return 0;
   
         pos = (long) uid * sizeof(ll);          pos = (off_t)uid * sizeof(ll);
         r = lseek(fd, pos, SEEK_SET);          r = lseek(fd, pos, SEEK_SET);
         if (r == -1) {          if (r == -1) {
                 error("%s: lseek: %s", __func__, strerror(errno));                  error("%s: lseek: %s", __func__, strerror(errno));
Line 176 
Line 176 
                 strncpy(ll.ll_host, host, sizeof(ll.ll_host));                  strncpy(ll.ll_host, host, sizeof(ll.ll_host));
                 fd = open(lastlog, O_RDWR);                  fd = open(lastlog, O_RDWR);
                 if (fd >= 0) {                  if (fd >= 0) {
                         lseek(fd, (off_t) ((long) uid * sizeof(ll)), SEEK_SET);                          lseek(fd, (off_t)uid * sizeof(ll), SEEK_SET);
                         if (write(fd, &ll, sizeof(ll)) != sizeof(ll))                          if (write(fd, &ll, sizeof(ll)) != sizeof(ll))
                                 logit("Could not write %.100s: %.100s", lastlog, strerror(errno));                                  logit("Could not write %.100s: %.100s", lastlog, strerror(errno));
                         close(fd);                          close(fd);

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32