Merge from vendor branch OPENSSL:
[dragonfly.git] / secure / usr.sbin / sshd / sshd.c.patch
1 # $DragonFly: src/secure/usr.sbin/sshd/Attic/sshd.c.patch,v 1.2 2004/08/30 21:59:58 geekgod Exp $
2 --- ./sshd.c    2004-08-12 13:08:15.000000000 +0000
3 +++ /home/sullrich/openssh-3.9p1/sshd.c 2004-08-19 17:37:10.000000000 +0000
4 @@ -53,6 +53,10 @@
5  #include <prot.h>
6  #endif
7  
8 +#ifdef __DragonFly__
9 +#include <resolv.h>
10 +#endif
11 +
12  #include "ssh.h"
13  #include "ssh1.h"
14  #include "ssh2.h"
15 @@ -1623,6 +1627,17 @@
16             sizeof(on)) < 0)
17                 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
18  
19 +#ifdef __DragonFly__
20 +       /*
21 +        * Initialize the resolver.  This may not happen automatically
22 +        * before privsep chroot().
23 +        */
24 +       if ((_res.options & RES_INIT) == 0) {
25 +               debug("res_init()");
26 +               res_init();
27 +       }
28 +#endif
29 +
30         /*
31          * Register our connection.  This turns encryption off because we do
32          * not have a key.