]> andersk Git - openssh.git/commitdiff
- (stevesk) HAVE_MMAP and HAVE_SYS_MMAN_H and use them in
authorstevesk <stevesk>
Sun, 7 Apr 2002 17:08:53 +0000 (17:08 +0000)
committerstevesk <stevesk>
Sun, 7 Apr 2002 17:08:53 +0000 (17:08 +0000)
   monitor_mm.c

ChangeLog
configure.ac
monitor_mm.c

index 82e696f44940ed698bcf841bf8733fcfcd1c99e7..04e572b1e6027f570b97024456368e66bc8531ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
    Future: we may want to test if fd passing works correctly.
  - (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes
    and no fd passing support.
+ - (stevesk) HAVE_MMAP and HAVE_SYS_MMAN_H and use them in
+   monitor_mm.c
 
 20020406
  - (djm) Typo in Suse SPEC file. Fix from Carsten Grohmann 
index 367533c1706019a7753ee3361c2e43e2517d6ab8..637a3030c59210f65898e084b69ac50f8e76a446 100644 (file)
@@ -317,7 +317,7 @@ AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
        netinet/in_systm.h paths.h poll.h pty.h \
        rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
        strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
-       sys/poll.h sys/select.h sys/stat.h \
+       sys/mman.h sys/poll.h sys/select.h sys/stat.h \
        sys/stropts.h sys/sysmacros.h sys/time.h \
        sys/un.h time.h ttyent.h usersec.h \
        util.h utime.h utmp.h utmpx.h)
@@ -534,7 +534,7 @@ AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
        getaddrinfo getcwd getgrouplist getnameinfo getopt \
        getrlimit getrusage getttyent glob inet_aton inet_ntoa \
        inet_ntop innetgr login_getcapbool md5_crypt memmove \
-       mkdtemp openpty readpassphrase realpath \
+       mkdtemp mmap openpty readpassphrase realpath \
        rresvport_af setdtablesize setegid setenv seteuid \
        setlogin setproctitle setresgid setreuid setrlimit \
        setsid setvbuf sigaction sigvec snprintf strerror \
index b383193cd3595d23bab21906d5acec6951a1d871..b9ea978a6604c3074163f77b2ae2c740a74f5a5b 100644 (file)
@@ -26,7 +26,9 @@
 #include "includes.h"
 RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $");
 
+#ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
+#endif
 
 #include "ssh.h"
 #include "xmalloc.h"
@@ -82,10 +84,15 @@ mm_create(struct mm_master *mmalloc, size_t size)
         */
        mm->mmalloc = mmalloc;
 
+#ifdef HAVE_MMAP
        address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
            -1, 0);
        if (address == MAP_FAILED)
                fatal("mmap(%lu)", (u_long)size);
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
 
        mm->address = address;
        mm->size = size;
This page took 0.429685 seconds and 5 git commands to generate.