summaryrefslogtreecommitdiff
path: root/usr.bin/ypcat
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
commitfe9e8af8f3246e14a9eb585feb4d7f5aaa093855 (patch)
tree3281fbb5b5f5de11321c6825dd5a2c6d70e07068 /usr.bin/ypcat
parent0edf0956a8620a9cd461d3f081c92645c20c8b9e (diff)
exit() after perror() for pledge failure. Perhaps this got introduced
as a test idiom, either when pledge was young or during the transition to strings.... dunno
Diffstat (limited to 'usr.bin/ypcat')
-rw-r--r--usr.bin/ypcat/ypcat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c
index f0f981ca2e2..015013f3b19 100644
--- a/usr.bin/ypcat/ypcat.c
+++ b/usr.bin/ypcat/ypcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypcat.c,v 1.19 2015/10/18 17:53:51 miod Exp $ */
+/* $OpenBSD: ypcat.c,v 1.20 2015/11/11 02:52:46 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
@@ -88,8 +88,10 @@ main(int argc, char *argv[])
extern int optind;
int notrans, c, r, i;
- if (pledge("stdio rpath inet getpw", NULL) == -1)
+ if (pledge("stdio rpath inet getpw", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
notrans = key = 0;
while ((c=getopt(argc, argv, "xd:kt")) != -1)