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

Diff for /src/usr.bin/ssh/sshconnect.c between version 1.168 and 1.168.2.1

version 1.168, 2005/07/17 07:17:55 version 1.168.2.1, 2006/02/03 03:01:58
Line 31 
Line 31 
 #include "readconf.h"  #include "readconf.h"
 #include "atomicio.h"  #include "atomicio.h"
 #include "misc.h"  #include "misc.h"
   
 #include "dns.h"  #include "dns.h"
   
 char *client_version_string = NULL;  char *client_version_string = NULL;
 char *server_version_string = NULL;  char *server_version_string = NULL;
   
 int matching_host_key_dns = 0;  static int matching_host_key_dns = 0;
   
 /* import */  /* import */
 extern Options options;  extern Options options;
Line 596 
Line 595 
         file_key = key_new(host_key->type);          file_key = key_new(host_key->type);
   
         /*          /*
          * Check if the host key is present in the user\'s list of known           * Check if the host key is present in the user's list of known
          * hosts or in the systemwide list.           * hosts or in the systemwide list.
          */           */
         host_file = user_hostfile;          host_file = user_hostfile;
Line 1026 
Line 1025 
         error("Please contact your system administrator.");          error("Please contact your system administrator.");
   
         xfree(fp);          xfree(fp);
   }
   
   /*
    * Execute a local command
    */
   int
   ssh_local_cmd(const char *args)
   {
           char *shell;
           pid_t pid;
           int status;
   
           if (!options.permit_local_command ||
               args == NULL || !*args)
                   return (1);
   
           if ((shell = getenv("SHELL")) == NULL)
                   shell = _PATH_BSHELL;
   
           pid = fork();
           if (pid == 0) {
                   debug3("Executing %s -c \"%s\"", shell, args);
                   execl(shell, shell, "-c", args, (char *)NULL);
                   error("Couldn't execute %s -c \"%s\": %s",
                       shell, args, strerror(errno));
                   _exit(1);
           } else if (pid == -1)
                   fatal("fork failed: %.100s", strerror(errno));
           while (waitpid(pid, &status, 0) == -1)
                   if (errno != EINTR)
                           fatal("Couldn't wait for child: %s", strerror(errno));
   
           if (!WIFEXITED(status))
                   return (1);
   
           return (WEXITSTATUS(status));
 }  }

Legend:
Removed from v.1.168  
changed lines
  Added in v.1.168.2.1