aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/nc
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/nc')
-rw-r--r--usr.bin/nc/CVS/Entries12
-rw-r--r--usr.bin/nc/CVS/Entries.Log4
-rw-r--r--usr.bin/nc/nc.111
-rw-r--r--usr.bin/nc/netcat.c18
4 files changed, 26 insertions, 19 deletions
diff --git a/usr.bin/nc/CVS/Entries b/usr.bin/nc/CVS/Entries
index 86fb43f..ed809bd 100644
--- a/usr.bin/nc/CVS/Entries
+++ b/usr.bin/nc/CVS/Entries
@@ -1,7 +1,7 @@
-/Makefile/1.7/Fri Sep 11 21:07:01 2015//
-/atomicio.c/1.11/Tue Dec 4 02:24:47 2012//
-/atomicio.h/1.2/Fri Sep 7 14:50:44 2007//
-/nc.1/1.95/Wed Feb 12 14:46:36 2020//
-/netcat.c/1.217/Wed Feb 12 14:46:36 2020//
-/socks.c/1.30/Mon Nov 4 17:33:28 2019//
+/Makefile/1.7/Mon Oct 19 10:36:43 2020//
+/atomicio.c/1.11/Mon Oct 19 10:36:43 2020//
+/atomicio.h/1.2/Mon Oct 19 10:36:43 2020//
+/nc.1/1.96/Wed Jul 14 10:53:32 2021//
+/netcat.c/1.218/Result of merge//
+/socks.c/1.30/Mon Oct 19 10:36:43 2020//
D
diff --git a/usr.bin/nc/CVS/Entries.Log b/usr.bin/nc/CVS/Entries.Log
new file mode 100644
index 0000000..9895b9d
--- /dev/null
+++ b/usr.bin/nc/CVS/Entries.Log
@@ -0,0 +1,4 @@
+A D/data////
+A D/scripts////
+R D/scripts////
+R D/data////
diff --git a/usr.bin/nc/nc.1 b/usr.bin/nc/nc.1
index fff5857..1473359 100644
--- a/usr.bin/nc/nc.1
+++ b/usr.bin/nc/nc.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: nc.1,v 1.95 2020/02/12 14:46:36 schwarze Exp $
+.\" $OpenBSD: nc.1,v 1.96 2021/03/31 20:41:35 jmc Exp $
.\"
.\" Copyright (c) 1996 David Sacerdote
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 12 2020 $
+.Dd $Mdocdate: March 31 2021 $
.Dt NC 1
.Os
.Sh NAME
@@ -414,7 +414,7 @@ On a second console
.Pq or a second machine ,
connect to the machine and port being listened on:
.Pp
-.Dl $ nc 127.0.0.1 1234
+.Dl $ nc -N 127.0.0.1 1234
.Pp
There should now be a connection between the ports.
Anything typed at the second console will be concatenated to the first,
@@ -427,7 +427,10 @@ and which side is being used as a
.Sq client .
The connection may be terminated using an
.Dv EOF
-.Pq Sq ^D .
+.Pq Sq ^D ,
+as the
+.Fl N
+flag was given.
.Sh DATA TRANSFER
The example in the previous section can be expanded to build a
basic data transfer model.
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index f052766..489fe49 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.217 2020/02/12 14:46:36 schwarze Exp $ */
+/* $OpenBSD: netcat.c,v 1.218 2021/07/12 15:09:20 beck Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
* Copyright (c) 2015 Bob Beck. All rights reserved.
@@ -374,13 +374,13 @@ main(int argc, char *argv[])
if (usetls) {
if (Cflag && unveil(Cflag, "r") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", Cflag);
if (unveil(Rflag, "r") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", Rflag);
if (Kflag && unveil(Kflag, "r") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", Kflag);
if (oflag && unveil(oflag, "r") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", oflag);
} else if (family == AF_UNIX && uflag && lflag && !kflag) {
/*
* After recvfrom(2) from client, the server connects
@@ -390,20 +390,20 @@ main(int argc, char *argv[])
} else {
if (family == AF_UNIX) {
if (unveil(host, "rwc") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", host);
if (uflag && !kflag) {
if (sflag) {
if (unveil(sflag, "rwc") == -1)
- err(1, "unveil");
+ err(1, "unveil %s", sflag);
} else {
if (unveil("/tmp", "rwc") == -1)
- err(1, "unveil");
+ err(1, "unveil /tmp");
}
}
} else {
/* no filesystem visibility */
if (unveil("/", "") == -1)
- err(1, "unveil");
+ err(1, "unveil /");
}
}