summaryrefslogtreecommitdiffstats
path: root/security/ssh2/files
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-08-12 14:17:53 +0000
committerpeter <peter@FreeBSD.org>1996-08-12 14:17:53 +0000
commit507a6e72a237e346ea07c1673e7ad6a7abdbd64b (patch)
tree1f8889f4f13e65b205509932fea7268047e4b2a9 /security/ssh2/files
parent977118f35d632d7ef46de61b3993a39aac600b31 (diff)
downloadFreeBSD-ports-507a6e72a237e346ea07c1673e7ad6a7abdbd64b.zip
FreeBSD-ports-507a6e72a237e346ea07c1673e7ad6a7abdbd64b.tar.gz
Have ssh use rresvport() to get a privileged socket instead of doing it
itself. This means it obeys the portrange sysctl's.
Diffstat (limited to 'security/ssh2/files')
-rw-r--r--security/ssh2/files/patch-al26
1 files changed, 26 insertions, 0 deletions
diff --git a/security/ssh2/files/patch-al b/security/ssh2/files/patch-al
new file mode 100644
index 0000000..4add248
--- /dev/null
+++ b/security/ssh2/files/patch-al
@@ -0,0 +1,26 @@
+*** sshconnect.c.dist Thu Jun 6 21:47:06 1996
+--- sshconnect.c Mon Aug 12 13:26:46 1996
+***************
+*** 235,240 ****
+--- 235,245 ----
+ {
+ struct sockaddr_in sin;
+ int p;
++ #if defined(__FreeBSD__) && !defined(SOCKS)
++ sock = rresvport(&p);
++ if (sock < 0)
++ fatal("rresvport: %.100s", strerror(errno));
++ #else
+ for (p = 1023; p > 512; p--)
+ {
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+***************
+*** 262,267 ****
+--- 267,273 ----
+ }
+ fatal("bind: %.100s", strerror(errno));
+ }
++ #endif
+ debug("Allocated local port %d.", p);
+ }
+ else
OpenPOWER on IntegriCloud