aboutsummaryrefslogtreecommitdiff
path: root/ftp
diff options
context:
space:
mode:
authorTorsten Blum <torstenb@FreeBSD.org>1997-11-25 08:23:54 +0000
committerTorsten Blum <torstenb@FreeBSD.org>1997-11-25 08:23:54 +0000
commitf645acac38fef73fc11f7fe52fb7fda170a7b8c2 (patch)
treeb1264f92acca0d14d48455e33652f1ef5b08c8dc /ftp
parentae9aa661c5bdf501fb1a1b52e5d79db76856fd9e (diff)
downloadports-f645acac38fef73fc11f7fe52fb7fda170a7b8c2.tar.gz
ports-f645acac38fef73fc11f7fe52fb7fda170a7b8c2.zip
Notes
Diffstat (limited to 'ftp')
-rw-r--r--ftp/mirror/files/patch-ae19
-rw-r--r--ftp/mirror/files/patch-af58
2 files changed, 77 insertions, 0 deletions
diff --git a/ftp/mirror/files/patch-ae b/ftp/mirror/files/patch-ae
new file mode 100644
index 000000000000..fbcf0ad24238
--- /dev/null
+++ b/ftp/mirror/files/patch-ae
@@ -0,0 +1,19 @@
+*** ftp.pl.orig Tue May 23 23:53:25 1995
+--- ftp.pl Tue Nov 25 09:20:17 1997
+***************
+*** 430,436 ****
+ return 0;
+ }
+ if( $ret == 1 ) {
+! $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)$/;
+ $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
+ $newport = $5 * 256 + $6;
+ }
+--- 430,436 ----
+ return 0;
+ }
+ if( $ret == 1 ) {
+! $response =~ m/^227 .* \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)$/;
+ $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
+ $newport = $5 * 256 + $6;
+ }
diff --git a/ftp/mirror/files/patch-af b/ftp/mirror/files/patch-af
new file mode 100644
index 000000000000..ab7f5db0b877
--- /dev/null
+++ b/ftp/mirror/files/patch-af
@@ -0,0 +1,58 @@
+*** lchat.pl.orig Wed Jun 7 22:19:22 1995
+--- lchat.pl Tue Nov 25 09:20:20 1997
+***************
+*** 123,129 ****
+ # Similar to open_port, but does less. Used for PASV code with ftp.pl
+ # -Erez Zadok.
+ sub open_newport { ## public
+! local($server, $port, $newsock) = @_;
+
+ local($serveraddr,$serverproc);
+
+--- 123,129 ----
+ # Similar to open_port, but does less. Used for PASV code with ftp.pl
+ # -Erez Zadok.
+ sub open_newport { ## public
+! local($server, $port, *newsock) = @_;
+
+ local($serveraddr,$serverproc);
+
+***************
+*** 142,159 ****
+ }
+ $serverproc = pack($sockaddr, 2, $port, $serveraddr);
+
+! unless (connect($newsock, $serverproc)) {
+! ($!) = ($!, close($newsock)); # close newsock while saving $!
+ return undef;
+ }
+ # We opened with the local address set to ANY, at this stage we know
+ # which interface we are using. This is critical if our machine is
+ # multi-homed, with IP forwarding off, so fix-up.
+ local($fam,$lport);
+! ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname($newsock));
+ $thisproc = pack($sockaddr, 2, 0, $thisaddr);
+ # end of post-connect fixup
+! select((select($newsock), $| = 1)[0]);
+ return 1;
+ }
+ ##############################################################################
+--- 142,159 ----
+ }
+ $serverproc = pack($sockaddr, 2, $port, $serveraddr);
+
+! unless (connect(newsock, $serverproc)) {
+! ($!) = ($!, close(newsock)); # close newsock while saving $!
+ return undef;
+ }
+ # We opened with the local address set to ANY, at this stage we know
+ # which interface we are using. This is critical if our machine is
+ # multi-homed, with IP forwarding off, so fix-up.
+ local($fam,$lport);
+! ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(newsock));
+ $thisproc = pack($sockaddr, 2, 0, $thisaddr);
+ # end of post-connect fixup
+! select((select(newsock), $| = 1)[0]);
+ return 1;
+ }
+ ##############################################################################