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

Diff for /src/usr.bin/ssh/mux.c between version 1.83 and 1.84

version 1.83, 2020/07/05 23:59:45 version 1.84, 2020/10/03 09:22:26
Line 1883 
Line 1883 
         const char *term;          const char *term;
         u_int echar, rid, sid, esid, exitval, type, exitval_seen;          u_int echar, rid, sid, esid, exitval, type, exitval_seen;
         extern char **environ;          extern char **environ;
         int r, i, devnull, rawmode;          int r, i, rawmode;
   
         debug3("%s: entering", __func__);          debug3("%s: entering", __func__);
   
Line 1894 
Line 1894 
   
         ssh_signal(SIGPIPE, SIG_IGN);          ssh_signal(SIGPIPE, SIG_IGN);
   
         if (stdin_null_flag) {          if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1)
                 if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1)                  fatal("%s: stdfd_devnull failed", __func__);
                         fatal("open(/dev/null): %s", strerror(errno));  
                 if (dup2(devnull, STDIN_FILENO) == -1)  
                         fatal("dup2: %s", strerror(errno));  
                 if (devnull > STDERR_FILENO)  
                         close(devnull);  
         }  
   
         if ((term = getenv("TERM")) == NULL)          if ((term = getenv("TERM")) == NULL)
                 term = "";                  term = "";
Line 2117 
Line 2111 
         struct sshbuf *m;          struct sshbuf *m;
         char *e;          char *e;
         u_int type, rid, sid;          u_int type, rid, sid;
         int r, devnull;          int r;
   
         debug3("%s: entering", __func__);          debug3("%s: entering", __func__);
   
Line 2128 
Line 2122 
   
         ssh_signal(SIGPIPE, SIG_IGN);          ssh_signal(SIGPIPE, SIG_IGN);
   
         if (stdin_null_flag) {          if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1)
                 if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1)                  fatal("%s: stdfd_devnull failed", __func__);
                         fatal("open(/dev/null): %s", strerror(errno));  
                 if (dup2(devnull, STDIN_FILENO) == -1)  
                         fatal("dup2: %s", strerror(errno));  
                 if (devnull > STDERR_FILENO)  
                         close(devnull);  
         }  
   
         if ((m = sshbuf_new()) == NULL)          if ((m = sshbuf_new()) == NULL)
                 fatal("%s: sshbuf_new", __func__);                  fatal("%s: sshbuf_new", __func__);

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84