aboutsummaryrefslogtreecommitdiffstats
path: root/security/openssh-portable/files
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2002-07-27 14:20:28 +0800
committerdinoex <dinoex@FreeBSD.org>2002-07-27 14:20:28 +0800
commit0172b5c8124936982d6d98b6e6f9dc473cf04b22 (patch)
tree9f9e21f4bb4097b437f4115270fc0a3c6be384c1 /security/openssh-portable/files
parent9aaa52274059a3f31114b9e9d463631295062ed7 (diff)
downloadfreebsd-ports-gnome-0172b5c8124936982d6d98b6e6f9dc473cf04b22.tar.gz
freebsd-ports-gnome-0172b5c8124936982d6d98b6e6f9dc473cf04b22.tar.zst
freebsd-ports-gnome-0172b5c8124936982d6d98b6e6f9dc473cf04b22.zip
Fix resolver problem with privilege-separation.
PR: 39953
Diffstat (limited to 'security/openssh-portable/files')
-rw-r--r--security/openssh-portable/files/patch-sshd.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/security/openssh-portable/files/patch-sshd.c b/security/openssh-portable/files/patch-sshd.c
new file mode 100644
index 000000000000..09665a42d7bd
--- /dev/null
+++ b/security/openssh-portable/files/patch-sshd.c
@@ -0,0 +1,31 @@
+--- 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