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

Diff for /src/usr.bin/doas/doas.c between version 1.76 and 1.77

version 1.76, 2019/06/12 02:50:29 version 1.77, 2019/06/16 18:16:34
Line 421 
Line 421 
                 errx(1, "no passwd entry for target");                  errx(1, "no passwd entry for target");
   
         if (setusercontext(NULL, targpw, target, LOGIN_SETGROUP |          if (setusercontext(NULL, targpw, target, LOGIN_SETGROUP |
               LOGIN_SETPATH |
             LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK |              LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK |
             LOGIN_SETUSER) != 0)              LOGIN_SETUSER) != 0)
                 errx(1, "failed to set user context for target");                  errx(1, "failed to set user context for target");
Line 439 
Line 440 
         syslog(LOG_AUTHPRIV | LOG_INFO, "%s ran command %s as %s from %s",          syslog(LOG_AUTHPRIV | LOG_INFO, "%s ran command %s as %s from %s",
             mypw->pw_name, cmdline, targpw->pw_name, cwd);              mypw->pw_name, cmdline, targpw->pw_name, cwd);
   
         envp = prepenv(rule);          envp = prepenv(rule, mypw, targpw);
   
           if (rule->cmd) {
                   /* do this again after setusercontext reset it */
                   if (setenv("PATH", safepath, 1) == -1)
                           err(1, "failed to set PATH '%s'", safepath);
           }
         execvpe(cmd, argv, envp);          execvpe(cmd, argv, envp);
 fail:  fail:
         if (errno == ENOENT)          if (errno == ENOENT)

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77