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

Diff for /src/usr.bin/ssh/clientloop.c between version 1.312 and 1.313

version 1.312, 2018/04/10 00:10:49 version 1.313, 2018/06/09 03:01:12
Line 2143 
Line 2143 
 client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,  client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
     const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env)      const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env)
 {  {
         int len;          int i, j, matched, len;
           char *name, *val;
         Channel *c = NULL;          Channel *c = NULL;
   
         debug2("%s: id %d", __func__, id);          debug2("%s: id %d", __func__, id);
Line 2178 
Line 2179 
   
         /* Transfer any environment variables from client to server */          /* Transfer any environment variables from client to server */
         if (options.num_send_env != 0 && env != NULL) {          if (options.num_send_env != 0 && env != NULL) {
                 int i, j, matched;  
                 char *name, *val;  
   
                 debug("Sending environment.");                  debug("Sending environment.");
                 for (i = 0; env[i] != NULL; i++) {                  for (i = 0; env[i] != NULL; i++) {
                         /* Split */                          /* Split */
Line 2211 
Line 2209 
                         packet_send();                          packet_send();
                         free(name);                          free(name);
                 }                  }
           }
           for (i = 0; i < options.num_setenv; i++) {
                   /* Split */
                   name = xstrdup(options.setenv[i]);
                   if ((val = strchr(name, '=')) == NULL) {
                           free(name);
                           continue;
                   }
                   *val++ = '\0';
   
                   debug("Setting env %s = %s", name, val);
                   channel_request_start(ssh, id, "env", 0);
                   packet_put_cstring(name);
                   packet_put_cstring(val);
                   packet_send();
                   free(name);
         }          }
   
         len = buffer_len(cmd);          len = buffer_len(cmd);

Legend:
Removed from v.1.312  
changed lines
  Added in v.1.313