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

Diff for /src/usr.bin/ssh/readconf.c between version 1.243 and 1.244

version 1.243, 2015/10/25 23:14:03 version 1.244, 2015/10/27 00:49:53
Line 446 
Line 446 
   
         /* Fork and execute the command. */          /* Fork and execute the command. */
         if ((pid = fork()) == 0) {          if ((pid = fork()) == 0) {
                 char *argv[4];                  char *argv[] = { shell, "-c", xstrdup(cmd), NULL };
   
                 /* Child.  Permanently give up superuser privileges. */                  /* Child.  Permanently give up superuser privileges. */
                 permanently_drop_suid(original_real_uid);                  permanently_drop_suid(original_real_uid);
Line 459 
Line 459 
                 if (devnull > STDERR_FILENO)                  if (devnull > STDERR_FILENO)
                         close(devnull);                          close(devnull);
                 closefrom(STDERR_FILENO + 1);                  closefrom(STDERR_FILENO + 1);
   
                 argv[0] = shell;  
                 argv[1] = "-c";  
                 argv[2] = cmd;  
                 argv[3] = NULL;  
   
                 execv(argv[0], argv);                  execv(argv[0], argv);
                 error("Unable to execute '%.100s': %s", cmd, strerror(errno));                  error("Unable to execute '%.100s': %s", cmd, strerror(errno));

Legend:
Removed from v.1.243  
changed lines
  Added in v.1.244