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

Diff for /src/usr.bin/ssh/canohost.c between version 1.70 and 1.71

version 1.70, 2014/01/19 04:17:29 version 1.71, 2014/07/15 15:54:14
Line 14 
Line 14 
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/socket.h>  #include <sys/socket.h>
   #include <sys/un.h>
   
 #include <netinet/in.h>  #include <netinet/in.h>
   
Line 222 
Line 223 
                     < 0)                      < 0)
                         return NULL;                          return NULL;
         }          }
   
           if (addr.ss_family == AF_UNIX) {
                   /* Get the Unix domain socket path. */
                   return xstrdup(((struct sockaddr_un *)&addr)->sun_path);
           }
   
         /* Get the address in ascii. */          /* Get the address in ascii. */
         if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop,          if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop,
             sizeof(ntop), NULL, 0, flags)) != 0) {              sizeof(ntop), NULL, 0, flags)) != 0) {
Line 337 
Line 344 
                         return -1;                          return -1;
                 }                  }
         }          }
   
           /* Unix domain sockets don't have a port number. */
           if (from.ss_family == AF_UNIX)
                   return 0;
   
         /* Return port number. */          /* Return port number. */
         if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0,          if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0,
             strport, sizeof(strport), NI_NUMERICSERV)) != 0)              strport, sizeof(strport), NI_NUMERICSERV)) != 0)

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71