summaryrefslogtreecommitdiff
path: root/usr.bin/kdump
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2019-11-26 09:43:50 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2019-11-26 09:43:50 +0000
commit933b0ace059d5e08d3212fc9f98546e01a4c45f9 (patch)
tree7f393a72bb610c8e39cd3cf14f8ec0f026073506 /usr.bin/kdump
parenta20f38bb76699f99ce8559a06f1b7c535e1941bb (diff)
kdump reads /etc/protocols to translate proto numbers into names; ok sthen@ gilles@
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r--usr.bin/kdump/kdump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index be30fd305a5..75cc7764093 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.138 2019/05/15 15:36:59 schwarze Exp $ */
+/* $OpenBSD: kdump.c,v 1.139 2019/11/26 09:43:49 otto Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -211,6 +211,8 @@ main(int argc, char *argv[])
if (strcmp(tracefile, "-") != 0)
if (unveil(tracefile, "r") == -1)
err(1, "unveil");
+ if (unveil("/etc/protocols", "r") == -1)
+ err(1, "unveil");
if (pledge("stdio rpath getpw", NULL) == -1)
err(1, "pledge");