summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-10-26 07:19:26 +0000
committerdlg <dlg@openbsd.org>2018-10-26 07:19:26 +0000
commitbbc0d3361bf931a4e212729bcc74ecae1030ee84 (patch)
treed1ae5933be75e50c26c4c8c245efc2825d94d155
parentWhen walking the list of ribs use continue instead of break after the (diff)
downloadwireguard-openbsd-bbc0d3361bf931a4e212729bcc74ecae1030ee84.tar.xz
wireguard-openbsd-bbc0d3361bf931a4e212729bcc74ecae1030ee84.zip
show what went wrong with a unix domain socket, rather than fail silently
handy if you type the path wrong or don't have permission... ok deraadt@
-rw-r--r--usr.bin/nc/netcat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 3798dc760f1..9ce2b6bb7ab 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.195 2018/10/04 17:04:50 bluhm Exp $ */
+/* $OpenBSD: netcat.c,v 1.196 2018/10/26 07:19:26 dlg Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
* Copyright (c) 2015 Bob Beck. All rights reserved.
@@ -639,8 +639,10 @@ main(int argc, char *argv[])
if (!zflag)
readwrite(s, NULL);
close(s);
- } else
+ } else {
+ warn("%s", host);
ret = 1;
+ }
if (uflag)
unlink(unix_dg_tmp_socket);