Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / secure / usr.sbin / sshd / sshd.c.patch
1 $DragonFly: src/secure/usr.sbin/sshd/Attic/sshd.c.patch,v 1.3 2006/09/28 18:42:50 corecode Exp $
2 --- sshd.c      2006-09-17 06:04:46.000000000 +0200
3 +++ sshd.c      2006-09-28 19:58:34.000000000 +0200
4 @@ -80,6 +80,10 @@
5  #include <prot.h>
6  #endif
7  
8 +#ifdef __DragonFly__
9 +#include <resolv.h>
10 +#endif
11 +
12  #include "xmalloc.h"
13  #include "ssh.h"
14  #include "ssh1.h"
15 @@ -1630,6 +1634,17 @@
16         /* This is the child processing a new connection. */
17         setproctitle("%s", "[accepted]");
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          * Create a new session and process group since the 4.4BSD
32          * setlogin() affects the entire process group.  We don't