summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-12-27 08:42:41 +0000
committerpeter <peter@FreeBSD.org>1996-12-27 08:42:41 +0000
commite3fda05140a68e271d1f0656591f8e50f59ef303 (patch)
treedc0972943364fec1e9b4217fe06519f2c9759a7a
parent97bf8a23997a9d372e5a5a61463e7aba03d2936f (diff)
downloadFreeBSD-ports-e3fda05140a68e271d1f0656591f8e50f59ef303.zip
FreeBSD-ports-e3fda05140a68e271d1f0656591f8e50f59ef303.tar.gz
Make one of our changes for -current work on 2.1. In -current, rresvport()
ignores it's argument (it's meaningless, the kernel keeps the state), but 2.1.x use it. ssh was effectively giving a random port to 2.1. Originally noticed by: John Polstra <jdp@polstra.com>
-rw-r--r--security/ssh/files/patch-al3
-rw-r--r--security/ssh2/files/patch-al3
2 files changed, 4 insertions, 2 deletions
diff --git a/security/ssh/files/patch-al b/security/ssh/files/patch-al
index 4add248..cdda2b1 100644
--- a/security/ssh/files/patch-al
+++ b/security/ssh/files/patch-al
@@ -2,11 +2,12 @@
--- sshconnect.c Mon Aug 12 13:26:46 1996
***************
*** 235,240 ****
---- 235,245 ----
+--- 235,246 ----
{
struct sockaddr_in sin;
int p;
+ #if defined(__FreeBSD__) && !defined(SOCKS)
++ p = 1023; /* Compat with old FreeBSD */
+ sock = rresvport(&p);
+ if (sock < 0)
+ fatal("rresvport: %.100s", strerror(errno));
diff --git a/security/ssh2/files/patch-al b/security/ssh2/files/patch-al
index 4add248..cdda2b1 100644
--- a/security/ssh2/files/patch-al
+++ b/security/ssh2/files/patch-al
@@ -2,11 +2,12 @@
--- sshconnect.c Mon Aug 12 13:26:46 1996
***************
*** 235,240 ****
---- 235,245 ----
+--- 235,246 ----
{
struct sockaddr_in sin;
int p;
+ #if defined(__FreeBSD__) && !defined(SOCKS)
++ p = 1023; /* Compat with old FreeBSD */
+ sock = rresvport(&p);
+ if (sock < 0)
+ fatal("rresvport: %.100s", strerror(errno));
OpenPOWER on IntegriCloud