diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-10-26 07:19:27 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-10-26 07:19:27 +0000 |
commit | ffc48a5b70b5c9b043a0c7638925e7d1ea78b7ce (patch) | |
tree | cf74711b7c07820ff09304048b38de4dce65a379 /usr.bin/nc | |
parent | c85add24f35f291602d0191e66f3459dda3f9637 (diff) |
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@
Diffstat (limited to 'usr.bin/nc')
-rw-r--r-- | usr.bin/nc/netcat.c | 6 |
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); |