- (stevesk) HAVE_MMAP and HAVE_SYS_MMAN_H and use them in
monitor_mm.c
This commit is contained in:
parent
c3c825575c
commit
86b9fe6a77
|
@ -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
|
||||
|
@ -8193,4 +8195,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.2035 2002/04/07 16:39:12 stevesk Exp $
|
||||
$Id: ChangeLog,v 1.2036 2002/04/07 17:08:53 stevesk Exp $
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.ac,v 1.36 2002/04/07 16:18:04 stevesk Exp $
|
||||
# $Id: configure.ac,v 1.37 2002/04/07 17:08:54 stevesk Exp $
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
|
@ -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 \
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue