summaryrefslogtreecommitdiff
path: root/usr.bin/sudo/env.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-04-03 19:15:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-04-03 19:15:35 +0000
commit7d1bac92416230d9ee85e1a890ead0683d0948f6 (patch)
treeefd7bd51fa1e440c0cf7c099ebc14195ff0b333a /usr.bin/sudo/env.c
parenta8c1bd16fee3bf5fff45987e8ba0ef7a281ede93 (diff)
Sync with my sudo cvs repo:
o update to sudo 1.6.7p2 o use warn/err throughout
Diffstat (limited to 'usr.bin/sudo/env.c')
-rw-r--r--usr.bin/sudo/env.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/sudo/env.c b/usr.bin/sudo/env.c
index 4078ecde422..002c139df5e 100644
--- a/usr.bin/sudo/env.c
+++ b/usr.bin/sudo/env.c
@@ -56,13 +56,17 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_ERR_H
+# include <err.h>
+#else
+# include "emul/err.h"
+#endif /* HAVE_ERR_H */
#include <pwd.h>
-#include <errno.h>
#include "sudo.h"
#ifndef lint
-static const char rcsid[] = "$Sudo: env.c,v 1.25 2003/03/15 20:31:01 millert Exp $";
+static const char rcsid[] = "$Sudo: env.c,v 1.26 2003/04/02 18:25:19 millert Exp $";
#endif /* lint */
/*
@@ -113,7 +117,7 @@ static const char *initial_badenv_table[] = {
#endif
#ifdef HAVE_KERB4
"KRB_CONF*",
- "KRBCONFDIR"
+ "KRBCONFDIR",
"KRBTKFILE",
#endif /* HAVE_KERB4 */
#ifdef HAVE_KERB5
@@ -223,9 +227,8 @@ format_env(var, val)
if (strlcpy(estring, var, esize) >= esize ||
strlcat(estring, "=", esize) >= esize ||
strlcat(estring, val, esize) >= esize) {
- (void) fprintf(stderr, "%s: internal error, format_env() overflow\n",
- Argv[0]);
- exit(1);
+
+ errx(1, "internal error, format_env() overflow");
}
return(estring);