[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.49 and 1.49.2.1

version 1.49, 2006/02/22 00:04:44 version 1.49.2.1, 2006/09/30 04:06:50
Line 1 
Line 1 
   /* $OpenBSD$ */
 /*  /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>   * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland   * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Line 11 
Line 12 
  * called by a name other than "ssh" or "Secure Shell".   * called by a name other than "ssh" or "Secure Shell".
  */   */
   
 #include "includes.h"  #include <sys/types.h>
 RCSID("$OpenBSD$");  #include <sys/socket.h>
   
   #include <netinet/in.h>
   
 #include <ctype.h>  #include <ctype.h>
   #include <errno.h>
   #include <netdb.h>
   #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
   #include <stdarg.h>
   
 #include "packet.h"  
 #include "xmalloc.h"  #include "xmalloc.h"
   #include "packet.h"
 #include "log.h"  #include "log.h"
 #include "canohost.h"  #include "canohost.h"
   
Line 84 
Line 93 
          */           */
         for (i = 0; name[i]; i++)          for (i = 0; name[i]; i++)
                 if (isupper(name[i]))                  if (isupper(name[i]))
                         name[i] = tolower(name[i]);                          name[i] = (char)tolower(name[i]);
         /*          /*
          * Map it back to an IP address and check that the given           * Map it back to an IP address and check that the given
          * address actually is an address of this host.  This is           * address actually is an address of this host.  This is
Line 99 
Line 108 
         hints.ai_socktype = SOCK_STREAM;          hints.ai_socktype = SOCK_STREAM;
         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 "
                     "failed - POSSIBLE BREAK-IN ATTEMPT!", name);                      "[%s] failed - POSSIBLE BREAK-IN ATTEMPT!", name, ntop);
                 return xstrdup(ntop);                  return xstrdup(ntop);
         }          }
         /* Look for the address from the list of addresses. */          /* Look for the address from the list of addresses. */

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.49.2.1