[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.37 and 1.38

version 1.37, 2015/08/20 18:42:11 version 1.38, 2015/08/22 16:01:05
Line 327 
Line 327 
         int i, ch;          int i, ch;
         int sflag = 0;          int sflag = 0;
         int nflag = 0;          int nflag = 0;
           char cwdpath[PATH_MAX];
           const char *cwd;
   
         uid = getuid();          uid = getuid();
   
Line 423 
Line 425 
             LOGIN_SETUSER) != 0)              LOGIN_SETUSER) != 0)
                 errx(1, "failed to set user context for target");                  errx(1, "failed to set user context for target");
   
         syslog(LOG_AUTHPRIV | LOG_INFO, "%s ran command as %s: %s",          if (getcwd(cwdpath, sizeof(cwdpath)) == NULL)
             myname, pw->pw_name, cmdline);                  cwd = "(failed)";
           else
                   cwd = cwdpath;
   
           syslog(LOG_AUTHPRIV | LOG_INFO, "%s ran command %s as %s from %s",
               myname, cmdline, pw->pw_name, cwd);
   
         if (setenv("PATH", safepath, 1) == -1)          if (setenv("PATH", safepath, 1) == -1)
                 err(1, "failed to set PATH '%s'", safepath);                  err(1, "failed to set PATH '%s'", safepath);
         execvpe(cmd, argv, envp);          execvpe(cmd, argv, envp);

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38