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

Diff for /src/usr.bin/ssh/ssh.c between version 1.214 and 1.215

version 1.214, 2004/06/13 15:03:02 version 1.215, 2004/06/17 14:52:48
Line 1064 
Line 1064 
 static void  static void
 ssh_session2_setup(int id, void *arg)  ssh_session2_setup(int id, void *arg)
 {  {
           extern char **environ;
   
         int interactive = tty_flag;          int interactive = tty_flag;
         if (options.forward_x11 && getenv("DISPLAY") != NULL) {          if (options.forward_x11 && getenv("DISPLAY") != NULL) {
                 char *proto, *data;                  char *proto, *data;
Line 1084 
Line 1086 
         }          }
   
         client_session2_setup(id, tty_flag, subsystem_flag, getenv("TERM"),          client_session2_setup(id, tty_flag, subsystem_flag, getenv("TERM"),
             NULL, fileno(stdin), &command, &ssh_subsystem_reply);              NULL, fileno(stdin), &command, environ, &ssh_subsystem_reply);
   
         packet_set_interactive(interactive);          packet_set_interactive(interactive);
 }  }
Line 1214 
Line 1216 
 control_client(const char *path)  control_client(const char *path)
 {  {
         struct sockaddr_un addr;          struct sockaddr_un addr;
         int r, sock, exitval;          int i, r, sock, exitval;
         Buffer m;          Buffer m;
         char *cp;          char *cp;
           extern char **environ;
   
         memset(&addr, '\0', sizeof(addr));          memset(&addr, '\0', sizeof(addr));
         addr.sun_family = AF_UNIX;          addr.sun_family = AF_UNIX;
Line 1249 
Line 1252 
                 fatal("%s: wrong version", __func__);                  fatal("%s: wrong version", __func__);
         control_server_pid = buffer_get_int(&m);          control_server_pid = buffer_get_int(&m);
   
         /* XXX: env passing */  
   
         buffer_clear(&m);          buffer_clear(&m);
         buffer_put_int(&m, tty_flag);          buffer_put_int(&m, tty_flag);
         buffer_put_int(&m, subsystem_flag);          buffer_put_int(&m, subsystem_flag);
Line 1258 
Line 1259 
   
         buffer_append(&command, "\0", 1);          buffer_append(&command, "\0", 1);
         buffer_put_cstring(&m, buffer_ptr(&command));          buffer_put_cstring(&m, buffer_ptr(&command));
   
           /* Pass environment */
           for (i = 0; environ != NULL && environ[i] != NULL; i++)
                   ;
           buffer_put_int(&m, i);
           for (i = 0; environ != NULL && environ[i] != NULL; i++)
                   buffer_put_cstring(&m, environ[i]);
   
         if (ssh_msg_send(sock, /* version */0, &m) == -1)          if (ssh_msg_send(sock, /* version */0, &m) == -1)
                 fatal("%s: msg_send", __func__);                  fatal("%s: msg_send", __func__);

Legend:
Removed from v.1.214  
changed lines
  Added in v.1.215