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

Diff for /src/usr.bin/nc/netcat.c between version 1.142 and 1.143

version 1.142, 2015/11/12 20:33:52 version 1.143, 2015/11/13 18:13:13
Line 310 
Line 310 
         argc -= optind;          argc -= optind;
         argv += optind;          argv += optind;
   
         if (rtableid >= 0) {          if (rtableid >= 0)
                 if (setrtable(rtableid) == -1)                  if (setrtable(rtableid) == -1)
                         err(1, "setrtable");                          err(1, "setrtable");
         }  
         if (family == AF_UNIX) {          if (family == AF_UNIX) {
                 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)                  if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
                         err(1, "pledge");                          err(1, "pledge");
         }          } else if (Fflag) {
         else if (Fflag) {  
                 if (pledge("stdio inet dns sendfd", NULL) == -1)                  if (pledge("stdio inet dns sendfd", NULL) == -1)
                         err(1, "pledge");                          err(1, "pledge");
         }          } else if (usetls) {
         else if (usetls) {  
                 if (pledge("stdio rpath inet dns", NULL) == -1)                  if (pledge("stdio rpath inet dns", NULL) == -1)
                         err(1, "pledge");                          err(1, "pledge");
         }          } else if (pledge("stdio inet dns", NULL) == -1)
         else if (pledge("stdio inet dns", NULL) == -1)  
                 err(1, "pledge");                  err(1, "pledge");
   
         /* Cruft to make sure options are clean, and used properly. */          /* Cruft to make sure options are clean, and used properly. */
Line 830 
Line 827 
   
                 if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0)                  if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0)
                         break;                          break;
                 else if (vflag)                  if (vflag)
                         warn("connect to %s port %s (%s) failed", host, port,                          warn("connect to %s port %s (%s) failed", host, port,
                             uflag ? "udp" : "tcp");                              uflag ? "udp" : "tcp");
   

Legend:
Removed from v.1.142  
changed lines
  Added in v.1.143