summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2018-09-07 07:24:05 +0000
committeryasuoka <yasuoka@openbsd.org>2018-09-07 07:24:05 +0000
commitd9ca134e8ad9cbe1a80d5edf8dfeb27f9d9b6154 (patch)
tree2b2d2f5701565f4fa0df738619accefcf617f83f
parentAlso verify a overwrite for the copy of a fifo, link and device node. (diff)
downloadwireguard-openbsd-d9ca134e8ad9cbe1a80d5edf8dfeb27f9d9b6154.tar.xz
wireguard-openbsd-d9ca134e8ad9cbe1a80d5edf8dfeb27f9d9b6154.zip
Fix "_nfiles" reference for crash dump.
Diff from fukaumi at soum.co.jp ok mpi
-rw-r--r--lib/libkvm/kvm_file2.c6
-rw-r--r--usr.sbin/pstat/pstat.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libkvm/kvm_file2.c b/lib/libkvm/kvm_file2.c
index 4a9aa7384bc..7c63a5abb3a 100644
--- a/lib/libkvm/kvm_file2.c
+++ b/lib/libkvm/kvm_file2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_file2.c,v 1.53 2018/01/02 06:38:45 guenther Exp $ */
+/* $OpenBSD: kvm_file2.c,v 1.54 2018/09/07 07:24:05 yasuoka Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -209,7 +209,7 @@ kvm_deadfile_byfile(kvm_t *kd, int op, int arg, size_t esize, int *cnt)
int nfiles;
nl[0].n_name = "_filehead";
- nl[1].n_name = "_nfiles";
+ nl[1].n_name = "_numfiles";
nl[2].n_name = 0;
if (kvm_nlist(kd, nl) != 0) {
@@ -280,7 +280,7 @@ kvm_deadfile_byid(kvm_t *kd, int op, int arg, size_t esize, int *cnt)
int i, nfiles;
nl[0].n_name = "_filehead";
- nl[1].n_name = "_nfiles";
+ nl[1].n_name = "_numfiles";
nl[2].n_name = "_allprocess";
nl[3].n_name = 0;
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 79499d848e9..6ad0460fca3 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.118 2018/08/03 14:39:55 deraadt Exp $ */
+/* $OpenBSD: pstat.c,v 1.119 2018/09/07 07:24:05 yasuoka Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -69,7 +69,7 @@
struct nlist vnodenl[] = {
#define FNL_NFILE 0 /* sysctl */
- {"_nfiles"},
+ {"_numfiles"},
#define FNL_MAXFILE 1 /* sysctl */
{"_maxfiles"},
#define TTY_NTTY 2 /* sysctl */
@@ -229,8 +229,8 @@ main(int argc, char *argv[])
ttymodeprep();
}
- if (unveil(_PATH_DEVDB, "r") == -1)
- err(1, "unveil");
+// if (unveil(_PATH_DEVDB, "r") == -1)
+// err(1, "unveil");
if (pledge("stdio rpath vminfo", NULL) == -1)
err(1, "pledge");