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

Diff for /src/usr.bin/ssh/auth.c between version 1.143 and 1.144

version 1.143, 2019/11/25 00:54:23 version 1.144, 2019/12/16 13:58:53
Line 631 
Line 631 
         if (getpeername(ssh_packet_get_connection_in(ssh),          if (getpeername(ssh_packet_get_connection_in(ssh),
             (struct sockaddr *)&from, &fromlen) == -1) {              (struct sockaddr *)&from, &fromlen) == -1) {
                 debug("getpeername failed: %.100s", strerror(errno));                  debug("getpeername failed: %.100s", strerror(errno));
                 return strdup(ntop);                  return xstrdup(ntop);
         }          }
   
         debug3("Trying to reverse map address %.100s.", ntop);          debug3("Trying to reverse map address %.100s.", ntop);
Line 639 
Line 639 
         if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),          if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
             NULL, 0, NI_NAMEREQD) != 0) {              NULL, 0, NI_NAMEREQD) != 0) {
                 /* Host name not found.  Use ip address. */                  /* Host name not found.  Use ip address. */
                 return strdup(ntop);                  return xstrdup(ntop);
         }          }
   
         /*          /*
Line 654 
Line 654 
                 logit("Nasty PTR record \"%s\" is set up for %s, ignoring",                  logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
                     name, ntop);                      name, ntop);
                 freeaddrinfo(ai);                  freeaddrinfo(ai);
                 return strdup(ntop);                  return xstrdup(ntop);
         }          }
   
         /* Names are stored in lowercase. */          /* Names are stored in lowercase. */
Line 675 
Line 675 
         if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {          if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
                 logit("reverse mapping checking getaddrinfo for %.700s "                  logit("reverse mapping checking getaddrinfo for %.700s "
                     "[%s] failed.", name, ntop);                      "[%s] failed.", name, ntop);
                 return strdup(ntop);                  return xstrdup(ntop);
         }          }
         /* Look for the address from the list of addresses. */          /* Look for the address from the list of addresses. */
         for (ai = aitop; ai; ai = ai->ai_next) {          for (ai = aitop; ai; ai = ai->ai_next) {
Line 690 
Line 690 
                 /* Address not found for the host name. */                  /* Address not found for the host name. */
                 logit("Address %.100s maps to %.600s, but this does not "                  logit("Address %.100s maps to %.600s, but this does not "
                     "map back to the address.", ntop, name);                      "map back to the address.", ntop, name);
                 return strdup(ntop);                  return xstrdup(ntop);
         }          }
         return strdup(name);          return xstrdup(name);
 }  }
   
 /*  /*

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144