diff options
author | bouyer <bouyer@pkgsrc.org> | 1999-05-12 16:20:33 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 1999-05-12 16:20:33 +0000 |
commit | e7af32300a4440abd452d1af7e70e9f38cc9bfed (patch) | |
tree | d72d8728345d6068f9bba15176aaab9bd4d3a823 /net | |
parent | a724af7aa34ef630055df349227c16b51a237d01 (diff) | |
download | pkgsrc-e7af32300a4440abd452d1af7e70e9f38cc9bfed.tar.gz |
- in lchat.pl, use pack_sockaddr_in() instead of building the list ourselve
with pack(). This is how perl's socket test works, and makes mirror work
on my i386/1.4 (otherwise connect() fails with "Address family not
supported by protocol family").
- ftp.pl: temporary files were created 0666 ! create the temp file mode 0600,
the correct permissions will be set by mirror once the transfer is done.
Diffstat (limited to 'net')
-rw-r--r-- | net/mirror/patches/patch-ad | 66 | ||||
-rw-r--r-- | net/mirror/patches/patch-ae | 14 |
2 files changed, 76 insertions, 4 deletions
diff --git a/net/mirror/patches/patch-ad b/net/mirror/patches/patch-ad new file mode 100644 index 00000000000..8ef7b653735 --- /dev/null +++ b/net/mirror/patches/patch-ad @@ -0,0 +1,66 @@ +--- lchat.pl.orig Wed Jun 7 22:19:22 1995 ++++ lchat.pl Wed May 12 18:10:54 1999 +@@ -79,7 +79,7 @@ + + # We may be multi-homed, start with 0, fixup once connexion is made + $thisaddr = "\0\0\0\0" ; +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ $thisproc = pack_sockaddr_in(0, $thisaddr); + + if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { + $serveraddr = pack('C4', $1, $2, $3, $4); +@@ -90,7 +90,7 @@ + } + $serveraddr = $x[4]; + } +- $serverproc = pack($sockaddr, 2, $port, $serveraddr); ++ $serverproc = pack_sockaddr_in($port, $serveraddr); + unless (socket(S, $main'pf_inet, $main'sock_stream, $main'tcp_proto)) { + ($!) = ($!, close(S)); # close S while saving $! + return undef; +@@ -99,12 +99,12 @@ + # The SOCKS documentation claims that this bind before the connet + # is unnecessary. Not just, that, but when used with SOCKS, + # a connect() must not follow a bind(). -Erez Zadok. +- unless( $using_socks ){ +- unless (bind(S, $thisproc)) { +- ($!) = ($!, close(S)); # close S while saving $! +- return undef; +- } +- } ++# unless( $using_socks ){ ++# unless (bind(S, $thisproc)) { ++# ($!) = ($!, close(S)); # close S while saving $! ++# return undef; ++# } ++# } + unless (connect(S, $serverproc)) { + ($!) = ($!, close(S)); # close S while saving $! + return undef; +@@ -114,7 +114,7 @@ + # multi-homed, with IP forwarding off, so fix-up. + local($fam,$lport); + ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(S)); +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ $thisproc = pack_sockaddr_in(0, $thisaddr); + # end of post-connect fixup + select((select(S), $| = 1)[0]); + return 1; +@@ -129,7 +129,7 @@ + + # We may be multi-homed, start with 0, fixup once connexion is made + $thisaddr = "\0\0\0\0" ; +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ $thisproc = pack_sockaddr_in(0, $thisaddr); + + if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { + $serveraddr = pack('C4', $1, $2, $3, $4); +@@ -151,7 +151,7 @@ + # 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); ++ $thisproc = pack_sockaddr_in(0, $thisaddr); + # end of post-connect fixup + select((select($newsock), $| = 1)[0]); + return 1; diff --git a/net/mirror/patches/patch-ae b/net/mirror/patches/patch-ae index 54b2334b43c..6c34e76f7b3 100644 --- a/net/mirror/patches/patch-ae +++ b/net/mirror/patches/patch-ae @@ -1,7 +1,5 @@ -$NetBSD: patch-ae,v 1.2 1998/08/29 18:06:47 kim Exp $ - ---- ftp.pl.orig Tue May 23 17:53:25 1995 -+++ ftp.pl Sat Aug 29 12:08:42 1998 +--- ftp.pl.orig Tue May 23 23:53:25 1995 ++++ ftp.pl Wed May 12 18:10:21 1999 @@ -430,7 +430,7 @@ return 0; } @@ -20,3 +18,11 @@ $NetBSD: patch-ae,v 1.2 1998/08/29 18:06:47 kim Exp $ return 0; } } +@@ -700,6 +700,7 @@ + + return 0; + } ++ chmod 0600, $loc_fname; + + local( $start_time ) = time; + local( $bytes, $lasthash, $hashes ) = (0, 0, 0); |