--- openssh-3.4p1/sshd.c~ 2002-06-26 03:24:19 +0400 +++ openssh-3.4p1/sshd.c 2002-07-02 13:56:26 +0400 @@ -92,6 +92,10 @@ int deny_severity = LOG_WARNING; #endif /* LIBWRAP */ +#ifdef HAVE_LIBRESOLV +#include +#endif /* HAVE_LIBRESOLV */ + #ifndef O_NOCTTY #define O_NOCTTY 0 #endif @@ -1410,6 +1414,17 @@ sizeof(on)) < 0) error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); +#ifdef HAVE_LIBRESOLV + /* + * Initialize the resolver. This may not happen automatically + * before privsep chroot(). + */ + if (!(_res.options & RES_INIT)) { + debug("res_init()"); + res_init(); + } +#endif /* HAVE_LIBRESOLV */ + /* * Register our connection. This turns encryption off because we do * not have a key.