I see no point in hidding underlying error message from user.
Found while preparing chroot for doas run tests.

Okay?

--
WBR,
  Vadim Zhukov


Index: doas.c
===================================================================
RCS file: /cvs/src/usr.bin/doas/doas.c,v
retrieving revision 1.27
diff -u -p -r1.27 doas.c
--- doas.c      26 Jul 2015 22:44:33 -0000      1.27
+++ doas.c      28 Jul 2015 13:08:05 -0000
@@ -417,7 +424,7 @@ main(int argc, char **argv, char **envp)
        if (setusercontext(NULL, pw, target, LOGIN_SETGROUP |
            LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK |
            LOGIN_SETUSER) != 0)
-               errx(1, "failed to set user context for target");
+               err(1, "failed to set user context for target");
 
        syslog(LOG_AUTHPRIV | LOG_INFO, "%s ran command as %s: %s",
            myname, pw->pw_name, cmdline);

Reply via email to