diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2010-04-15 08:20:57 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2010-04-15 08:20:57 +0000 |
| commit | eada7f55a885dec9dde9a15bebda88c3f56aa2ad (patch) | |
| tree | 698adef2a85bdd0db521258581fbb27c74872d64 /crypto | |
| parent | b754ab83bc91b3be115ec4a1e70651817c669eae (diff) | |
Notes
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/openssh/sshd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 1d44fc8d9b9f..3b955d944b7a 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -1293,10 +1293,6 @@ main(int ac, char **av) /* Initialize configuration options to their default values. */ initialize_server_options(&options); - /* Avoid killing the process in high-pressure swapping environments. */ - if (madvise(NULL, 0, MADV_PROTECT) != 0) - debug("madvise(): %.200s", strerror(errno)); - /* Parse command-line arguments. */ while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:C:dDeiqrtQRT46")) != -1) { switch (opt) { @@ -1663,6 +1659,10 @@ main(int ac, char **av) /* 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)); + /* Initialize the random number generator. */ arc4random_stir(); |
