Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2002 06:41:45 +0200
From:      dirk.meyer@dinoex.sub.org (Dirk Meyer)
To:        FreeBSD-gnats-submit@FreeBSD.ORG, jestrix@jestrix.net, freebsd-security@FreeBSD.ORG, des@FreeBSD.ORG, dot@dotat.at, sheldonh@starjuice.net
Subject:   Re: ports/39953: Resolve failure in OpenSSH 3.4p1 when using PrivilegeSeperation
Message-ID:  <NYfFGl%2BTOz@dmeyer.dinoex.sub.org>

next in thread | raw e-mail | index | archive | help

I still can't repoduce the problem as described,
but this patch should fix it.

Please check if this solves the problem.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]

--- sshd.c.orig	Wed Jun 26 01:24:19 2002
+++ sshd.c	Thu Jul 25 06:32:37 2002
@@ -53,6 +53,10 @@
 #include <prot.h>
 #endif
 
+#ifdef __FreeBSD__
+#include <resolv.h>
+#endif
+
 #include "ssh.h"
 #include "ssh1.h"
 #include "ssh2.h"
@@ -1409,6 +1413,17 @@
 	    setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,
 	    sizeof(on)) < 0)
 		error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
+
+#ifdef __FreeBSD__
+	/*
+	 * Initialize the resolver.  This may not happen automatically
+	 * before privsep chroot().                                   
+	 */
+	if ((_res.options & RES_INIT) == 0) {
+		debug("res_init()");         
+		res_init();         
+	}
+#endif
 
 	/*
 	 * Register our connection.  This turns encryption off because we do

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NYfFGl%2BTOz>