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

Diff for /src/usr.bin/ssh/session.c between version 1.332 and 1.333

version 1.332, 2023/01/06 02:41:49 version 1.333, 2023/01/06 02:42:34
Line 1637 
Line 1637 
 {  {
         struct stat st;          struct stat st;
         int r, success = 0;          int r, success = 0;
         char *prog, *cmd;          char *prog, *cmd, *type;
         u_int i;          u_int i;
   
         if ((r = sshpkt_get_cstring(ssh, &s->subsys, NULL)) != 0 ||          if ((r = sshpkt_get_cstring(ssh, &s->subsys, NULL)) != 0 ||
Line 1660 
Line 1660 
                                 s->is_subsystem = SUBSYSTEM_EXT;                                  s->is_subsystem = SUBSYSTEM_EXT;
                                 debug("subsystem: exec() %s", cmd);                                  debug("subsystem: exec() %s", cmd);
                         }                          }
                           xasprintf(&type, "session:subsystem:%s",
                               options.subsystem_name[i]);
                           channel_set_xtype(ssh, s->chanid, type);
                           free(type);
                         success = do_exec(ssh, s, cmd) == 0;                          success = do_exec(ssh, s, cmd) == 0;
                         break;                          break;
                 }                  }
Line 1715 
Line 1719 
   
         if ((r = sshpkt_get_end(ssh)) != 0)          if ((r = sshpkt_get_end(ssh)) != 0)
                 sshpkt_fatal(ssh, r, "%s: parse packet", __func__);                  sshpkt_fatal(ssh, r, "%s: parse packet", __func__);
   
           channel_set_xtype(ssh, s->chanid, "session:shell");
   
         return do_exec(ssh, s, NULL) == 0;          return do_exec(ssh, s, NULL) == 0;
 }  }
   
Line 1728 
Line 1735 
         if ((r = sshpkt_get_cstring(ssh, &command, NULL)) != 0 ||          if ((r = sshpkt_get_cstring(ssh, &command, NULL)) != 0 ||
             (r = sshpkt_get_end(ssh)) != 0)              (r = sshpkt_get_end(ssh)) != 0)
                 sshpkt_fatal(ssh, r, "%s: parse packet", __func__);                  sshpkt_fatal(ssh, r, "%s: parse packet", __func__);
   
           channel_set_xtype(ssh, s->chanid, "session:command");
   
         success = do_exec(ssh, s, command) == 0;          success = do_exec(ssh, s, command) == 0;
         free(command);          free(command);

Legend:
Removed from v.1.332  
changed lines
  Added in v.1.333