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

Diff for /src/usr.bin/ssh/sftp.c between version 1.8 and 1.9

version 1.8, 2001/02/28 05:36:28 version 1.9, 2001/03/03 23:52:22
Line 91 
Line 91 
         static char **args = NULL;          static char **args = NULL;
         static int nargs = 0;          static int nargs = 0;
         char debug_buf[4096];          char debug_buf[4096];
         int i, use_subsystem = 1;          int i;
   
         /* no subsystem if protocol 1 or the server-spec contains a '/' */  
         if (use_ssh1 ||  
             (sftp_server != NULL && strchr(sftp_server, '/') != NULL))  
                 use_subsystem = 0;  
   
         /* Init args array */          /* Init args array */
         if (args == NULL) {          if (args == NULL) {
                 nargs = use_subsystem ? 6 : 5;                  nargs = 2;
                 i = 0;                  i = 0;
                 args = xmalloc(sizeof(*args) * nargs);                  args = xmalloc(sizeof(*args) * nargs);
                 args[i++] = "ssh";                  args[i++] = "ssh";
                 args[i++] = use_ssh1 ? "-oProtocol=1" : "-oProtocol=2";  
                 if (use_subsystem)  
                         args[i++] = "-s";  
                 args[i++] = "-oForwardAgent=no";  
                 args[i++] = "-oForwardX11=no";  
                 args[i++] = NULL;                  args[i++] = NULL;
         }          }
   
Line 120 
Line 110 
                 args[i++] = NULL;                  args[i++] = NULL;
                 return(NULL);                  return(NULL);
         }          }
   
           /* no subsystem if the server-spec contains a '/' */
           if (sftp_server == NULL || strchr(sftp_server, '/') == NULL)
                   make_ssh_args("-s");
           make_ssh_args("-oForwardX11=no");
           make_ssh_args("-oForwardAgent=no");
           make_ssh_args(use_ssh1 ? "-oProtocol=1" : "-oProtocol=2");
   
         /* Otherwise finish up and return the arg array */          /* Otherwise finish up and return the arg array */
         if (sftp_server != NULL)          if (sftp_server != NULL)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9