Commit 91d0e2fd authored by runge's avatar runge

Synchronize ssvnc 1.0.26. Improvements to perl scripts desktop.cgi, connect_switch and inet6to4.

parent 97540de5
...@@ -211,6 +211,7 @@ if (exists $ENV{CONNECT_SWITCH_PIDFILE}) { ...@@ -211,6 +211,7 @@ if (exists $ENV{CONNECT_SWITCH_PIDFILE}) {
# CONNECT_SWITCH_BUFSIZE # CONNECT_SWITCH_BUFSIZE
# CONNECT_SWITCH_LOGFILE # CONNECT_SWITCH_LOGFILE
# CONNECT_SWITCH_PIDFILE # CONNECT_SWITCH_PIDFILE
# CONNECT_SWITCH_MAX_CONNECTIONS
# #
# You can also set these on the cmdline: # You can also set these on the cmdline:
# connect_switch CONNECT_SWITCH_LISTEN=X CONNECT_SWITCH_ALLOW_FILE=Y ... # connect_switch CONNECT_SWITCH_LISTEN=X CONNECT_SWITCH_ALLOW_FILE=Y ...
...@@ -335,6 +336,13 @@ if (exists $ENV{CONNECT_SWITCH_VERBOSE}) { ...@@ -335,6 +336,13 @@ if (exists $ENV{CONNECT_SWITCH_VERBOSE}) {
$verbose = $ENV{CONNECT_SWITCH_VERBOSE}; $verbose = $ENV{CONNECT_SWITCH_VERBOSE};
} }
# zero means loop forever, positive value means exit after handling that
# many connections.
#
my $cmax = 0;
if (exists $ENV{CONNECT_SWITCH_MAX_CONNECTIONS}) {
$cmax = $ENV{CONNECT_SWITCH_MAX_CONNECTIONS};
}
#=========================================================================== #===========================================================================
...@@ -384,6 +392,10 @@ my $conn = 0; ...@@ -384,6 +392,10 @@ my $conn = 0;
while (1) { while (1) {
$conn++; $conn++;
if ($cmax > 0 && $conn > $cmax) {
print STDERR "last connection ($cmax)\n" if $verbose;
last;
}
print STDERR "listening for connection: $conn\n" if $verbose; print STDERR "listening for connection: $conn\n" if $verbose;
my ($client, $ip) = $listen_sock->accept(); my ($client, $ip) = $listen_sock->accept();
if (! $client) { if (! $client) {
......
This diff is collapsed.
...@@ -16,8 +16,8 @@ See these sites and related ones for more information: ...@@ -16,8 +16,8 @@ See these sites and related ones for more information:
http://www.tightvnc.com http://www.tightvnc.com
http://www.realvnc.com http://www.realvnc.com
http://www.stunnel.org
http://stunnel.mirt.net http://stunnel.mirt.net
http://www.stunnel.org
http://www.openssl.org http://www.openssl.org
http://www.chiark.greenend.org.uk/~sgtatham/putty/ http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://sourceforge.net/projects/cotvnc/ http://sourceforge.net/projects/cotvnc/
...@@ -255,7 +255,7 @@ Unix and Mac OS X: ...@@ -255,7 +255,7 @@ Unix and Mac OS X:
Unpack the archive: Unpack the archive:
% gzip -dc ssvnc-1.0.25.tar.gz | tar xvf - % gzip -dc ssvnc-1.0.27.tar.gz | tar xvf -
Run the GUI: Run the GUI:
...@@ -263,7 +263,7 @@ Unix and Mac OS X: ...@@ -263,7 +263,7 @@ Unix and Mac OS X:
% ./ssvnc/MacOSX/ssvnc (for Mac OS X) % ./ssvnc/MacOSX/ssvnc (for Mac OS X)
The smaller file "ssvnc_no_windows-1.0.25.tar.gz" The smaller file "ssvnc_no_windows-1.0.27.tar.gz"
could have been used as well. could have been used as well.
On MacOSX you could also click on the SSVNC app icon in the Finder. On MacOSX you could also click on the SSVNC app icon in the Finder.
...@@ -309,8 +309,8 @@ Unix/MacOSX Install: ...@@ -309,8 +309,8 @@ Unix/MacOSX Install:
For the conventional source tarball it will compile and install, e.g.: For the conventional source tarball it will compile and install, e.g.:
gzip -dc ssvnc-1.0.25.src.tar.gz | tar xvf - gzip -dc ssvnc-1.0.27.src.tar.gz | tar xvf -
cd ssvnc-1.0.25 cd ssvnc-1.0.27
make config make config
make all make all
make PREFIX=/my/install/dir install make PREFIX=/my/install/dir install
...@@ -322,7 +322,7 @@ Windows: ...@@ -322,7 +322,7 @@ Windows:
Unzip, using WinZip or a similar utility, the zip file: Unzip, using WinZip or a similar utility, the zip file:
ssvnc-1.0.25.zip ssvnc-1.0.27.zip
Run the GUI, e.g.: Run the GUI, e.g.:
...@@ -334,7 +334,7 @@ Windows: ...@@ -334,7 +334,7 @@ Windows:
select Open, and then OK to launch it. select Open, and then OK to launch it.
The smaller file "ssvnc_windows_only-1.0.25.zip" The smaller file "ssvnc_windows_only-1.0.27.zip"
could have been used as well. could have been used as well.
You can make a Windows shortcut to this program if you want to. You can make a Windows shortcut to this program if you want to.
...@@ -664,7 +664,7 @@ Untrusted Local Users: ...@@ -664,7 +664,7 @@ Untrusted Local Users:
By 'do not trust' we mean they might try to gain access to remote By 'do not trust' we mean they might try to gain access to remote
machines you connect to via SSVNC. Note that an untrusted local machines you connect to via SSVNC. Note that an untrusted local
user can often obtain root access in a short amount of time; if a user can often obtain root access in a short amount of time; if a
user has acheived that, then all bets are off for ANYTHING that you user has achieved that, then all bets are off for ANYTHING that you
do on the workstation. It is best to get rid of Untrusted Local do on the workstation. It is best to get rid of Untrusted Local
Users as soon as possible. Users as soon as possible.
...@@ -680,7 +680,7 @@ Untrusted Local Users: ...@@ -680,7 +680,7 @@ Untrusted Local Users:
If the untrusted local user tries to connect to these ports, he may If the untrusted local user tries to connect to these ports, he may
succeed in varying degrees to gain access to the remote machine. succeed in varying degrees to gain access to the remote machine.
We now list some safeguards one can put in place to try to make this We now list some safeguards one can put in place to try to make this
more difficult to acheive. more difficult to achieve.
It probably pays to have the VNC server require a password, even It probably pays to have the VNC server require a password, even
though there has already been SSL or SSH authentication (via though there has already been SSL or SSH authentication (via
...@@ -747,8 +747,8 @@ See also: ...@@ -747,8 +747,8 @@ See also:
http://www.karlrunge.com/x11vnc/faq.html http://www.karlrunge.com/x11vnc/faq.html
x11vnc -h | more x11vnc -h | more
http://www.stunnel.org
http://stunnel.mirt.net http://stunnel.mirt.net
http://www.stunnel.org
http://www.openssl.org http://www.openssl.org
http://www.tightvnc.com http://www.tightvnc.com
http://www.realvnc.com http://www.realvnc.com
......
...@@ -123,6 +123,12 @@ proc bmesg {msg} { ...@@ -123,6 +123,12 @@ proc bmesg {msg} {
label $w.l -width 70 -text "$msg" label $w.l -width 70 -text "$msg"
pack $w.l pack $w.l
update update
if {$env(BMESG) > 1} {
for {set i 0} {$i < $env(BMESG)} {incr i} {
after 1000
update
}
}
} }
proc do_connect_http {sock hostport which} { proc do_connect_http {sock hostport which} {
...@@ -165,9 +171,15 @@ proc do_connect_http {sock hostport which} { ...@@ -165,9 +171,15 @@ proc do_connect_http {sock hostport which} {
proc do_connect_socks4 {sock hostport which} { proc do_connect_socks4 {sock hostport which} {
global debug cur_proxy global debug cur_proxy
set s [split $hostport ":"] set host ""
set host [lindex $s 0] set port ""
set port [lindex $s 1] if [regexp {^(.*):([0-9][0-9]*)$} $hostport mvar host port] {
;
} else {
puts stderr "could not parse host:port $hostport"
destroy .
exit 1
}
set i1 "" set i1 ""
set i2 "" set i2 ""
...@@ -249,9 +261,15 @@ proc do_connect_socks4 {sock hostport which} { ...@@ -249,9 +261,15 @@ proc do_connect_socks4 {sock hostport which} {
proc do_connect_socks5 {sock hostport which} { proc do_connect_socks5 {sock hostport which} {
global debug cur_proxy global debug cur_proxy
set s [split $hostport ":"] set host ""
set host [lindex $s 0] set port ""
set port [lindex $s 1] if [regexp {^(.*):([0-9][0-9]*)$} $hostport mvar host port] {
;
} else {
puts stderr "could not parse host:port $hostport"
destroy .
exit 1
}
set p1 [binary format ccc 5 1 0] set p1 [binary format ccc 5 1 0]
puts -nonewline $sock $p1 puts -nonewline $sock $p1
...@@ -1058,7 +1076,7 @@ proc proxy_type {proxy} { ...@@ -1058,7 +1076,7 @@ proc proxy_type {proxy} {
} }
proc proxy_hostport {proxy} { proc proxy_hostport {proxy} {
regsub -nocase {^[a-z][a-z]*://} $proxy "" hp regsub -nocase {^[a-z][a-z0-9]*://} $proxy "" hp
regsub {\+.*$} $hp "" hp regsub {\+.*$} $hp "" hp
if {! [regexp {:[0-9]} $hp] && [regexp {^repeater:} $proxy]} { if {! [regexp {:[0-9]} $hp] && [regexp {^repeater:} $proxy]} {
set hp "$hp:5900" set hp "$hp:5900"
...@@ -1140,9 +1158,15 @@ if {$do_bridge} { ...@@ -1140,9 +1158,15 @@ if {$do_bridge} {
set proxy1_type [proxy_type $proxy1] set proxy1_type [proxy_type $proxy1]
set proxy1_hp [proxy_hostport $proxy1] set proxy1_hp [proxy_hostport $proxy1]
set s [split $proxy1_hp ":"] set proxy1_host ""
set proxy1_host [lindex $s 0] set proxy1_port ""
set proxy1_port [lindex $s 1] if [regexp {^(.*):([0-9][0-9]*)$} $proxy1_hp mvar proxy1_host proxy1_port] {
;
} else {
puts stderr "could not parse hp1 host:port $proxy1_hp"
destroy .
exit 1
}
set proxy2_type "" set proxy2_type ""
set proxy2_host "" set proxy2_host ""
...@@ -1151,9 +1175,16 @@ if {$do_bridge} { ...@@ -1151,9 +1175,16 @@ if {$do_bridge} {
if {$proxy2 != ""} { if {$proxy2 != ""} {
set proxy2_type [proxy_type $proxy2] set proxy2_type [proxy_type $proxy2]
set proxy2_hp [proxy_hostport $proxy2] set proxy2_hp [proxy_hostport $proxy2]
set s [split $proxy2_hp ":"]
set proxy2_host [lindex $s 0] set proxy2_host ""
set proxy2_port [lindex $s 1] set proxy2_port ""
if [regexp {^(.*):([0-9][0-9]*)$} $proxy2_hp mvar proxy2_host proxy2_port] {
;
} else {
puts stderr "could not parse hp2 host:port $proxy2_hp"
destroy .
exit 1
}
} }
set proxy3_type "" set proxy3_type ""
...@@ -1163,9 +1194,16 @@ if {$do_bridge} { ...@@ -1163,9 +1194,16 @@ if {$do_bridge} {
if {$proxy3 != ""} { if {$proxy3 != ""} {
set proxy3_type [proxy_type $proxy3] set proxy3_type [proxy_type $proxy3]
set proxy3_hp [proxy_hostport $proxy3] set proxy3_hp [proxy_hostport $proxy3]
set s [split $proxy3_hp ":"]
set proxy3_host [lindex $s 0] set proxy3_host ""
set proxy3_port [lindex $s 1] set proxy3_port ""
if [regexp {^(.*):([0-9][0-9]*)$} $proxy3_hp mvar proxy3_host proxy3_port] {
;
} else {
puts stderr "could not parse hp3 host:port $proxy3_hp"
destroy .
exit 1
}
} }
bmesg "1: '$proxy1_host' '$proxy1_port' '$proxy1_type'"; bmesg "1: '$proxy1_host' '$proxy1_port' '$proxy1_type'";
...@@ -1173,9 +1211,15 @@ if {$do_bridge} { ...@@ -1173,9 +1211,15 @@ if {$do_bridge} {
bmesg "3: '$proxy3_host' '$proxy3_port' '$proxy3_type'"; bmesg "3: '$proxy3_host' '$proxy3_port' '$proxy3_type'";
if [info exists env(SSVNC_REVERSE)] { if [info exists env(SSVNC_REVERSE)] {
set s [split $env(SSVNC_REVERSE) ":"] set rhost ""
set rhost [lindex $s 0] set rport ""
set rport [lindex $s 1] if [regexp {^(.*):([0-9][0-9]*)$} $env(SSVNC_REVERSE) mvar rhost rport] {
;
} else {
puts stderr "could not parse SSVNC_REVERSE host:port $env(SSVNC_REVERSE)"
destroy .
exit 1
}
set rc [catch {set lsock [socket $rhost $rport]}] set rc [catch {set lsock [socket $rhost $rport]}]
if {$rc != 0} { if {$rc != 0} {
puts stderr "error reversing" puts stderr "error reversing"
......
...@@ -389,7 +389,7 @@ if [ "X$SSVNC_BUILD_SKIP_STUNNEL" = "X" ]; then ...@@ -389,7 +389,7 @@ if [ "X$SSVNC_BUILD_SKIP_STUNNEL" = "X" ]; then
cp configure configure.orig cp configure configure.orig
sed -e "s,/var/ssl,/var/ssl /usr/sfw," configure.orig > configure sed -e "s,/var/ssl,/var/ssl /usr/sfw," configure.orig > configure
fi fi
env LDFLAGS="-L$start/$libs $LDFLAGS_OS" CPPFLAGS="$CPPFLAGS_OS" ./configure --disable-libwrap env LDFLAGS="-L$start/$libs $LDFLAGS_OS" CPPFLAGS="$CPPFLAGS_OS" ./configure --disable-libwrap --enable-ipv6
make make
ls -l src/stunnel ls -l src/stunnel
cd "$start" cd "$start"
......
...@@ -217,7 +217,7 @@ For example: ...@@ -217,7 +217,7 @@ For example:
or set both of them at once. or set both of them at once.
To acheive the same effect, you can also To achieve the same effect, you can also
set parameters in your ~/.ssvncrc file, for example: set parameters in your ~/.ssvncrc file, for example:
font_default=helvetica -20 bold font_default=helvetica -20 bold
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" License as specified in the file LICENCE.TXT that comes with the .\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution. .\" TightVNC distribution.
.\" .\"
.TH ssvncviewer 1 "December 2009" "" "SSVNC" .TH ssvncviewer 1 "September 2009" "" "SSVNC"
.SH NAME .SH NAME
ssvncviewer \- an X viewer client for VNC ssvncviewer \- an X viewer client for VNC
.SH SYNOPSIS .SH SYNOPSIS
......
#!/bin/sh #!/bin/sh
rm -rf ./src/tmp/* || exit 1 rm -rf ./src/tmp/* || exit 1
vers=1.0.25 vers=1.0.27
cd .. || exit 1 cd .. || exit 1
......
#!/bin/sh #!/bin/sh
if [ ! -f ./_getpatches ]; then
ls -l ./_getpatches
exit 1
fi
cp -p /dist/src/apps/VNC/tight_vnc_1.3dev5/tight-vncviewer*patch . cp -p /dist/src/apps/VNC/tight_vnc_1.3dev5/tight-vncviewer*patch .
cp -p /dist/src/apps/VNC/tight_vnc_1.3dev5/vnc_unixsrc_vncviewer.patched.tar ../zips/ cp -p /dist/src/apps/VNC/tight_vnc_1.3dev5/vnc_unixsrc_vncviewer.patched.tar ../zips/
......
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
# clients that need to connect to ipv6 servers.) Reversing is the default # clients that need to connect to ipv6 servers.) Reversing is the default
# if this script is named 'inet4to6' (e.g. by a symlink.) # if this script is named 'inet4to6' (e.g. by a symlink.)
# #
# Use Ctrl-C to stop this program. # Use Ctrl-C to stop this program. You can also supply '-c n' as the
# first option to only handle that many connections.
# #
# You can also set env. vars INET6TO4_LOOP=1 or INET6TO4_LOOP=BG # Also set the env. vars INET6TO4_LOOP=1 or INET6TO4_LOOP=BG
# to have an outer loop restarting this program (BG means do that # to have an outer loop restarting this program (BG means do that
# in the background), and INET6TO4_LOGFILE for a log file. # in the background), and INET6TO4_LOGFILE for a log file.
# Also set INET6TO4_VERBOSE to verbosity level and INET6TO4_WAITTIME # Also set INET6TO4_VERBOSE to verbosity level and INET6TO4_WAITTIME
...@@ -42,12 +43,14 @@ ...@@ -42,12 +43,14 @@
# or see <http://www.gnu.org/licenses/>. # or see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
my $program = "inet6to4";
# Set up logging: # Set up logging:
# #
if (exists $ENV{INET6TO4_LOGFILE}) { if (exists $ENV{INET6TO4_LOGFILE}) {
close STDOUT; close STDOUT;
if (!open(STDOUT, ">>$ENV{INET6TO4_LOGFILE}")) { if (!open(STDOUT, ">>$ENV{INET6TO4_LOGFILE}")) {
die "inet6to4: $ENV{INET6TO4_LOGFILE} $!\n"; die "$program: $ENV{INET6TO4_LOGFILE} $!\n";
} }
close STDERR; close STDERR;
open(STDERR, ">&STDOUT"); open(STDERR, ">&STDOUT");
...@@ -98,14 +101,14 @@ sub open_pidfile { ...@@ -98,14 +101,14 @@ sub open_pidfile {
if (exists $ENV{INET6TO4_LOOP}) { if (exists $ENV{INET6TO4_LOOP}) {
my $csl = $ENV{INET6TO4_LOOP}; my $csl = $ENV{INET6TO4_LOOP};
if ($csl ne 'BG' && $csl ne '1') { if ($csl ne 'BG' && $csl ne '1') {
die "inet6to4: invalid INET6TO4_LOOP.\n"; die "$program: invalid INET6TO4_LOOP.\n";
} }
if ($csl eq 'BG') { if ($csl eq 'BG') {
# go into bg as "daemon": # go into bg as "daemon":
setpgrp(0, 0); setpgrp(0, 0);
my $pid = fork(); my $pid = fork();
if (! defined $pid) { if (! defined $pid) {
die "inet6to4: $!\n"; die "$program: $!\n";
} elsif ($pid) { } elsif ($pid) {
wait; wait;
exit 0; exit 0;
...@@ -126,7 +129,7 @@ if (exists $ENV{INET6TO4_LOOP}) { ...@@ -126,7 +129,7 @@ if (exists $ENV{INET6TO4_LOOP}) {
open_pidfile(); open_pidfile();
} }
print STDERR "inet6to4: starting service at ", scalar(localtime), " master-pid=$$\n"; print STDERR "$program: starting service at ", scalar(localtime), " master-pid=$$\n";
while (1) { while (1) {
$looppid = fork; $looppid = fork;
if (! defined $looppid) { if (! defined $looppid) {
...@@ -137,7 +140,7 @@ if (exists $ENV{INET6TO4_LOOP}) { ...@@ -137,7 +140,7 @@ if (exists $ENV{INET6TO4_LOOP}) {
exec $0, @ARGV; exec $0, @ARGV;
exit 1; exit 1;
} }
print STDERR "inet6to4: re-starting service at ", scalar(localtime), " master-pid=$$\n"; print STDERR "$program: re-starting service at ", scalar(localtime), " master-pid=$$\n";
sleep 1; sleep 1;
} }
exit 0; exit 0;
...@@ -177,6 +180,12 @@ if (! @ARGV || $ARGV[0] =~ '^-+h') { # -help ...@@ -177,6 +180,12 @@ if (! @ARGV || $ARGV[0] =~ '^-+h') { # -help
exit; exit;
} }
my $cmax = 0;
if ($ARGV[0] eq '-c') { # -c
shift;
$cmax = shift;
}
if ($ARGV[0] eq '-r') { # -r if ($ARGV[0] eq '-r') { # -r
shift; shift;
$reverse = 1; $reverse = 1;
...@@ -203,24 +212,30 @@ setpgrp(0, 0); ...@@ -203,24 +212,30 @@ setpgrp(0, 0);
# create listening socket: # create listening socket:
# #
my %opts;
$opts{Listen} = 10;
$opts{Proto} = "tcp";
$opts{ReuseAddr} = 1;
if ($listen_port =~ /^(.*):(\d+)$/) {
$opts{LocalAddr} = $1;
$listen_port = $2;
}
$opts{LocalPort} = $listen_port;
if (!$reverse) { if (!$reverse) {
$listen_sock = IO::Socket::INET6->new( # force ipv6 interface:
Listen => 10, $opts{Domain} = AF_INET6;
LocalPort => $listen_port, $listen_sock = IO::Socket::INET6->new(%opts);
Domain => AF_INET6,
ReuseAddr => 1,
Proto => "tcp"
);
} else { } else {
$listen_sock = IO::Socket::INET->new( $listen_sock = IO::Socket::INET->new(%opts);
Listen => 10, if (! $listen_sock && $! =~ /invalid/i) {
LocalPort => $listen_port, warn "$program: $!, retrying with AF_UNSPEC:\n";
ReuseAddr => 1, $opts{Domain} = AF_UNSPEC;
Proto => "tcp" $listen_sock = IO::Socket::INET6->new(%opts);
); }
} }
if (! $listen_sock) { if (! $listen_sock) {
die "inet6to4: $!\n"; die "$program: $!\n";
} }
# for use by the xfer helper processes' interrupt handlers: # for use by the xfer helper processes' interrupt handlers:
...@@ -236,6 +251,10 @@ my $conn = 0; ...@@ -236,6 +251,10 @@ my $conn = 0;
# #
while (1) { while (1) {
$conn++; $conn++;
if ($cmax > 0 && $conn > $cmax) {
print STDERR "last connection ($cmax)\n" if $verbose;
last;
}
print STDERR "listening for connection: $conn\n" if $verbose; print STDERR "listening for connection: $conn\n" if $verbose;
my ($client, $ip) = $listen_sock->accept(); my ($client, $ip) = $listen_sock->accept();
...@@ -259,7 +278,7 @@ while (1) { ...@@ -259,7 +278,7 @@ while (1) {
# #
my $pid = fork(); my $pid = fork();
if (! defined $pid) { if (! defined $pid) {
die "inet6to4: $!\n"; die "$program: $!\n";
} elsif ($pid) { } elsif ($pid) {
wait; wait;
# to throttle runaways # to throttle runaways
...@@ -286,24 +305,25 @@ sub handle_conn { ...@@ -286,24 +305,25 @@ sub handle_conn {
print STDERR "connecting to: $host:$port\n" if $verbose; print STDERR "connecting to: $host:$port\n" if $verbose;
my $sock = ''; my $sock = '';
my %opts;
$opts{PeerAddr} = $host;
$opts{PeerPort} = $port;
$opts{Proto} = "tcp";
if (!$reverse) { if (!$reverse) {
$sock = IO::Socket::INET->new( $sock = IO::Socket::INET->new(%opts);
PeerAddr => $host,
PeerPort => $port,
Proto => "tcp"
);
} else { } else {
$sock = IO::Socket::INET6->new( $opts{Domain} = AF_INET6;
PeerAddr => $host, $sock = IO::Socket::INET6->new(%opts);
PeerPort => $port, }
Domain => AF_INET6, if (! $sock) {
Proto => "tcp" warn "$program: $!, retrying with AF_UNSPEC:\n";
); $opts{Domain} = AF_UNSPEC;
$sock = IO::Socket::INET6->new(%opts);
} }
if (! $sock) { if (! $sock) {
close $client; close $client;
die "inet6to4: $!\n"; die "$program: $!\n";
} }
$current_fh1 = $client; $current_fh1 = $client;
...@@ -359,10 +379,10 @@ sub xfer { ...@@ -359,10 +379,10 @@ sub xfer {
my $len = sysread($in, $buf, 8192); my $len = sysread($in, $buf, 8192);
if (! defined($len)) { if (! defined($len)) {
next if $! =~ /^Interrupted/; next if $! =~ /^Interrupted/;
print STDERR "inet6to4\[$lab/$conn/$$]: $!\n"; print STDERR "$program\[$lab/$conn/$$]: $!\n";
last; last;
} elsif ($len == 0) { } elsif ($len == 0) {
print STDERR "inet6to4\[$lab/$conn/$$]: " print STDERR "$program\[$lab/$conn/$$]: "
. "Input is EOF.\n"; . "Input is EOF.\n";
last; last;
} }
...@@ -378,7 +398,7 @@ sub xfer { ...@@ -378,7 +398,7 @@ sub xfer {
while ($len) { while ($len) {
my $written = syswrite($out, $buf, $len, $offset); my $written = syswrite($out, $buf, $len, $offset);
if (! defined $written) { if (! defined $written) {
print STDERR "inet6to4\[$lab/$conn/$$]: " print STDERR "$program\[$lab/$conn/$$]: "
. "Output is EOF. $!\n"; . "Output is EOF. $!\n";
$quit = 1; $quit = 1;
last; last;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment