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
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)
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 \
#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"
*/
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;