Page MenuHomeFreeBSD

D29972.diff
No OneTemporary

D29972.diff

Index: sshd.c
===================================================================
--- sshd.c
+++ sshd.c
@@ -46,6 +46,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
@@ -2026,6 +2027,10 @@
/* Reinitialize the log (because of the fork above). */
log_init(__progname, options.log_level, options.log_facility, log_stderr);
+ /* Avoid killing the process in high-pressure swapping environments. */
+ if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0)
+ debug("madvise(): %.200s", strerror(errno));
+
/*
* Chdir to the root directory so that the current disk can be
* unmounted if desired.

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 23, 8:17 PM (4 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37091241
Default Alt Text
D29972.diff (707 B)

Event Timeline