summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kvm_mkdb/nlist.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-12-15 10:15:39 +0000
committerderaadt <deraadt@openbsd.org>1997-12-15 10:15:39 +0000
commitc13e57aa538a2e3cab2a805639f54239e86ea170 (patch)
tree79669ca5cb9e96b08101059647dc0cbde4843a11 /usr.sbin/kvm_mkdb/nlist.c
parentfix for route change crash; from freebsd (diff)
downloadwireguard-openbsd-c13e57aa538a2e3cab2a805639f54239e86ea170.tar.xz
wireguard-openbsd-c13e57aa538a2e3cab2a805639f54239e86ea170.zip
use MAP_PRIVATE|MAP_FILE; mrg
Diffstat (limited to 'usr.sbin/kvm_mkdb/nlist.c')
-rw-r--r--usr.sbin/kvm_mkdb/nlist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c
index f148c95a1d8..8a477cb4460 100644
--- a/usr.sbin/kvm_mkdb/nlist.c
+++ b/usr.sbin/kvm_mkdb/nlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nlist.c,v 1.6 1997/01/15 22:08:16 millert Exp $ */
+/* $OpenBSD: nlist.c,v 1.7 1997/12/15 10:15:39 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "from: @(#)nlist.c 8.1 (Berkeley) 6/6/93";
#else
-static char *rcsid = "$OpenBSD: nlist.c,v 1.6 1997/01/15 22:08:16 millert Exp $";
+static char *rcsid = "$OpenBSD: nlist.c,v 1.7 1997/12/15 10:15:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -309,7 +309,8 @@ __elf_knlist(name, db)
* making the memory allocation permanent as with malloc/free
* (i.e., munmap will return it to the system).
*/
- strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fileno(fp), symstroff);
+ strtab = mmap(NULL, (size_t)symstrsize, PROT_READ,
+ MAP_PRIVATE|MAP_FILE, fileno(fp), symstroff);
if (strtab == (char *)-1)
badfmt("corrupt file");