summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>2004-06-20 16:22:08 +0000
committerniklas <niklas@openbsd.org>2004-06-20 16:22:08 +0000
commitd0532c92fdc7187eca669cf98ff55143c38108cf (patch)
treece7dd811a5823e79ce47f8b26f6bde6bd1320c90
parentNAT-Traversal for isakmpd. Work in progress... (diff)
downloadwireguard-openbsd-d0532c92fdc7187eca669cf98ff55143c38108cf.tar.xz
wireguard-openbsd-d0532c92fdc7187eca669cf98ff55143c38108cf.zip
Do not go on if the -C option caused a failed chdir. ok millert@ henning@
-rw-r--r--bin/pax/ar_io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c
index 99b0b382dbe..73cd5f8f618 100644
--- a/bin/pax/ar_io.c
+++ b/bin/pax/ar_io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar_io.c,v 1.35 2004/04/16 22:50:23 deraadt Exp $ */
+/* $OpenBSD: ar_io.c,v 1.36 2004/06/20 16:22:08 niklas Exp $ */
/* $NetBSD: ar_io.c,v 1.5 1996/03/26 23:54:13 mrg Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-static const char rcsid[] = "$OpenBSD: ar_io.c,v 1.35 2004/04/16 22:50:23 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: ar_io.c,v 1.36 2004/06/20 16:22:08 niklas Exp $";
#endif
#endif /* not lint */
@@ -157,8 +157,10 @@ ar_open(const char *name)
return(-1);
if (chdname != NULL)
- if (chdir(chdname) != 0)
+ if (chdir(chdname) != 0) {
syswarn(1, errno, "Failed chdir to %s", chdname);
+ return(-1);
+ }
/*
* set up is based on device type
*/