diff options
author | dinoex <dinoex@FreeBSD.org> | 2003-03-24 12:09:05 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2003-03-24 12:09:05 +0800 |
commit | 65e66b967c7e732ac2cdb3a37b3cb1d208835c3b (patch) | |
tree | 317a87c5054df6c830494f67e6667258b5abbeb3 /security/openssh | |
parent | ac1321fe0adb1ab5e802eda8a461f822c8c73ec1 (diff) | |
download | freebsd-ports-gnome-65e66b967c7e732ac2cdb3a37b3cb1d208835c3b.tar.gz freebsd-ports-gnome-65e66b967c7e732ac2cdb3a37b3cb1d208835c3b.tar.zst freebsd-ports-gnome-65e66b967c7e732ac2cdb3a37b3cb1d208835c3b.zip |
- merge patch from openssh-portable
to initialize resolver libary before
chroot to /var/empty if UsePrivilegeSeparation=yes
Diffstat (limited to 'security/openssh')
-rw-r--r-- | security/openssh/Makefile | 1 | ||||
-rw-r--r-- | security/openssh/files/patch-sshd.c | 35 |
2 files changed, 33 insertions, 3 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile index b5c2966790d4..2c2157a80621 100644 --- a/security/openssh/Makefile +++ b/security/openssh/Makefile @@ -7,6 +7,7 @@ PORTNAME= openssh PORTVERSION= 3.5 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \ ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \ diff --git a/security/openssh/files/patch-sshd.c b/security/openssh/files/patch-sshd.c index e5f14e469d89..ab218ae9c4ca 100644 --- a/security/openssh/files/patch-sshd.c +++ b/security/openssh/files/patch-sshd.c @@ -1,6 +1,17 @@ ---- /home/bright/ssh/ssh/sshd.c Thu Aug 17 13:06:34 2000 -+++ sshd.c Fri Feb 9 11:19:08 2001 -@@ -49,6 +49,12 @@ +--- sshd.c.orig Mon Mar 24 05:01:09 2003 ++++ sshd.c Mon Mar 24 05:01:36 2003 +@@ -49,6 +49,10 @@ + #include <openssl/md5.h> + #include <openssl/rand.h> + ++#ifdef __FreeBSD__ ++#include <resolv.h> ++#endif ++ + #include "ssh.h" + #include "ssh1.h" + #include "ssh2.h" +@@ -88,6 +92,12 @@ int deny_severity = LOG_WARNING; #endif /* LIBWRAP */ @@ -13,3 +24,21 @@ #ifndef O_NOCTTY #define O_NOCTTY 0 #endif +@@ -1365,6 +1375,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 |