summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dmesg/dmesg.c10
-rw-r--r--sbin/ping/ping.c10
-rw-r--r--sbin/ping6/ping6.c10
3 files changed, 15 insertions, 15 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index 28c83f56c8d..6eb68d32930 100644
--- a/sbin/dmesg/dmesg.c
+++ b/sbin/dmesg/dmesg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dmesg.c,v 1.26 2015/10/04 18:49:30 deraadt Exp $ */
+/* $OpenBSD: dmesg.c,v 1.27 2015/10/09 01:37:06 deraadt Exp $ */
/* $NetBSD: dmesg.c,v 1.8 1995/03/18 14:54:49 cgd Exp $ */
/*-
@@ -108,8 +108,8 @@ main(int argc, char *argv[])
if (sysctl(mib, 2, bufdata, &len, NULL, 0))
err(1, "sysctl: KERN_MSGBUF");
- if (tame("stdio", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
memcpy(&cur, bufdata, sizeof(cur));
bufdata = ((struct msgbuf *)bufdata)->msg_bufc;
@@ -123,8 +123,8 @@ main(int argc, char *argv[])
"dmesg")) == NULL)
return (1);
- if (tame("stdio", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
if (kvm_nlist(kd, nl) == -1)
errx(1, "kvm_nlist: %s", kvm_geterr(kd));
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index a78b4f50669..57af30bf1be 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.126 2015/10/03 00:44:37 deraadt Exp $ */
+/* $OpenBSD: ping.c,v 1.127 2015/10/09 01:37:06 deraadt Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -502,11 +502,11 @@ main(int argc, char *argv[])
(void)printf("PING %s: %d data bytes\n", hostname, datalen);
if (options & F_NUMERIC) {
- if (tame("stdio inet", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio inet", NULL) == -1)
+ err(1, "pledge");
} else {
- if (tame("stdio inet dns", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio inet dns", NULL) == -1)
+ err(1, "pledge");
}
(void)signal(SIGINT, finish);
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index 287b43b84b8..18793ae3098 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping6.c,v 1.119 2015/10/04 04:56:50 deraadt Exp $ */
+/* $OpenBSD: ping6.c,v 1.120 2015/10/09 01:37:06 deraadt Exp $ */
/* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */
/*
@@ -747,11 +747,11 @@ main(int argc, char *argv[])
warn("setsockopt(IPV6_RECVHOPLIMIT)"); /* XXX err? */
if (options & F_HOSTNAME) {
- if (tame("stdio inet dns", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio inet dns", NULL) == -1)
+ err(1, "pledge");
} else {
- if (tame("stdio inet", NULL) == -1)
- err(1, "tame");
+ if (pledge("stdio inet", NULL) == -1)
+ err(1, "pledge");
}
arc4random_buf(&tv64_offset, sizeof(tv64_offset));