summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-07-23 10:36:40 +0000
committerderaadt <deraadt@openbsd.org>1996-07-23 10:36:40 +0000
commit7c69189d6fb80cc9f38c9ea53c624026196acf3e (patch)
treee9379d1f9605cf4982af3a204bb3abf568930ce1
parentptrace is safe; limit preload to root (diff)
downloadwireguard-openbsd-7c69189d6fb80cc9f38c9ea53c624026196acf3e.tar.xz
wireguard-openbsd-7c69189d6fb80cc9f38c9ea53c624026196acf3e.zip
treat -l and -f the same
-rw-r--r--sbin/ping/ping.83
-rw-r--r--sbin/ping/ping.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8
index ddda81edf5b..daacd4a1461 100644
--- a/sbin/ping/ping.8
+++ b/sbin/ping/ping.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ping.8,v 1.5 1996/07/23 10:31:27 deraadt Exp $
+.\" $OpenBSD: ping.8,v 1.6 1996/07/23 10:36:40 deraadt Exp $
.\" $NetBSD: ping.8,v 1.10 1995/12/31 04:55:35 ghudson Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
@@ -101,6 +101,7 @@ Only the super-user may use this option.
.Bf -emphasis
This can be very hard on a network and should be used with caution.
.Ef
+Only root can do a flood ping.
.It Fl I Ar ifaddr
Specify the interface to transmit from on machines with multiple
interfaces. For unicast and multicast pings.
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 3eac8259be3..ea4f4850731 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.7 1996/07/23 10:31:28 deraadt Exp $ */
+/* $OpenBSD: ping.c,v 1.8 1996/07/23 10:36:41 deraadt Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: ping.c,v 1.7 1996/07/23 10:31:28 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ping.c,v 1.8 1996/07/23 10:36:41 deraadt Exp $";
#endif
#endif /* not lint */
@@ -243,8 +243,8 @@ main(argc, argv)
loop = 0;
break;
case 'l':
- if (getuid() != 0)
- errx(1, "must be root to specify preload");
+ if (getuid())
+ errx(1, "%s", strerror(EPERM));
preload = strtol(optarg, NULL, 0);
if (preload < 0)
errx(1, "bad preload value: %s", optarg);