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

Diff for /src/usr.bin/ssh/misc.c between version 1.34 and 1.35

version 1.34, 2005/07/08 09:26:18 version 1.35, 2005/09/13 23:40:07
Line 501 
Line 501 
         return -1;          return -1;
 }  }
   
   void
   sanitise_stdfd(void)
   {
           int nullfd;
   
           if ((nullfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
                   fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno));
                   exit(1);
           }
           while (nullfd < 2) {
                   if (dup2(nullfd, nullfd + 1) == -1) {
                           fprintf(stderr, "dup2: %s", strerror(errno));
                           exit(1);
                   }
                   nullfd++;
           }
           if (nullfd > 2)
                   close(nullfd);
   }
   
 char *  char *
 tohex(const u_char *d, u_int l)  tohex(const u_char *d, u_int l)
 {  {

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35