summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-06 20:33:06 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-06 20:33:06 +0000
commit105ccbe192391735f499d31207618757c37426e2 (patch)
tree34d19995eb47a7068078753e3d520713d9b66d85
parent033a49c7cc0de8ec659110ab6cfb3a06e306d5b4 (diff)
- stevesk@cvs.openbsd.org 2002/05/28 16:45:27
[monitor_mm.c] print strerror(errno) on mmap/munmap error; ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--monitor_mm.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 943f6870c..a9bf773d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,9 @@
38 - stevesk@cvs.openbsd.org 2002/05/26 20:35:10 38 - stevesk@cvs.openbsd.org 2002/05/26 20:35:10
39 [ssh.1] 39 [ssh.1]
40 sort ChallengeResponseAuthentication; ok markus@ 40 sort ChallengeResponseAuthentication; ok markus@
41 - stevesk@cvs.openbsd.org 2002/05/28 16:45:27
42 [monitor_mm.c]
43 print strerror(errno) on mmap/munmap error; ok markus@
41 44
4220020604 4520020604
43 - (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed 46 - (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
@@ -722,4 +725,4 @@
722 - (stevesk) entropy.c: typo in debug message 725 - (stevesk) entropy.c: typo in debug message
723 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 726 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
724 727
725$Id: ChangeLog,v 1.2154 2002/06/06 20:30:28 mouring Exp $ 728$Id: ChangeLog,v 1.2155 2002/06/06 20:33:06 mouring Exp $
diff --git a/monitor_mm.c b/monitor_mm.c
index 993925e48..17b319cce 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $"); 27RCSID("$OpenBSD: monitor_mm.c,v 1.5 2002/05/28 16:45:27 stevesk Exp $");
28 28
29#ifdef HAVE_SYS_MMAN_H 29#ifdef HAVE_SYS_MMAN_H
30#include <sys/mman.h> 30#include <sys/mman.h>
@@ -88,7 +88,7 @@ mm_create(struct mm_master *mmalloc, size_t size)
88 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, 88 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
89 -1, 0); 89 -1, 0);
90 if (address == MAP_FAILED) 90 if (address == MAP_FAILED)
91 fatal("mmap(%lu)", (u_long)size); 91 fatal("mmap(%lu): %s", (u_long)size, strerror(errnor));
92#else 92#else
93 fatal("%s: UsePrivilegeSeparation=yes not supported", 93 fatal("%s: UsePrivilegeSeparation=yes not supported",
94 __FUNCTION__); 94 __FUNCTION__);
@@ -132,7 +132,8 @@ mm_destroy(struct mm_master *mm)
132 132
133#ifdef HAVE_MMAP 133#ifdef HAVE_MMAP
134 if (munmap(mm->address, mm->size) == -1) 134 if (munmap(mm->address, mm->size) == -1)
135 fatal("munmap(%p, %lu)", mm->address, (u_long)mm->size); 135 fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size
136 strerror(errno));
136#else 137#else
137 fatal("%s: UsePrivilegeSeparation=yes not supported", 138 fatal("%s: UsePrivilegeSeparation=yes not supported",
138 __FUNCTION__); 139 __FUNCTION__);