Branch Coverage

blib/lib/Net/FTPServer.pm
Criterion Covered Total %
branch 396 1060 37.3


line true false branch
2275 41 0 if $self->{'hostname'} =~ /^([\w\-\.]+)$/
2333 0 41 if ($self->{'_enable_syslog'})
2335 0 0 if (defined $self->config('log socket type')) { }
2349 0 41 if (defined $self->config('error log')) { }
2381 0 0 if $self
2406 0 41 if (my $ftpdata = $self->config('ftp data port'))
2408 0 0 $ftpdata =~ /^\d+$/ ? :
2412 0 0 unless defined $ftp_data_port
2423 0 0 if ($sub) { }
2425 0 0 if (ref $sub eq 'CODE') { }
2433 0 0 if ($!) { }
2446 0 41 $daemon_mode ? :
0 41 $run_in_background ? :
2 39 $self->config('port') ? :
2453 0 41 if ($daemon_mode)
2456 0 0 if $run_in_background
2466 41 0 if $self->{'debug'}
2475 0 41 unless ($self->{'_test_mode'})
2477 0 0 if $self->{'debug'}
2480 0 0 unless (defined $sockname)
2490 0 0 unless setsockopt STDIN, 1, 10, "\cA\000\000\000"
2503 0 41 if ($self->config('enable virtual hosts'))
2505 0 0 if $self->{'debug'}
2510 0 0 unless ($virtual_host_multiplex and $virtual_host_multiplex eq $sockaddrstring)
2517 0 0 unless ($sitename)
2523 0 0 if ($self->{'debug'})
2525 0 0 if ($sitename) { }
2541 41 0 if $self->{'debug'}
2546 0 41 if ($peername = getpeername STDIN) { }
2562 0 41 if ($self->config('resolve addresses'))
2566 0 0 if ($hostname)
2570 0 0 if ($ipaddr and inet_ntoa($ipaddr) eq $peeraddrstring)
2576 0 0 if ($self->config('require resolved addresses') and not $peerhostname)
2620 2 39 defined $self->config('maintainer email') ? :
2629 41 0 unless exists $self->{'archive_filters'}
2630 41 0 unless exists $self->{'archive_generators'}
2631 41 0 if ($self->{'archive_mode'})
2634 0 41 if $self->_find_prog('compress')
2636 41 0 if $self->_find_prog('gzip')
2638 41 0 if $self->_find_prog('bzip2')
2640 0 41 if $self->_find_prog('uuencode')
2644 0 41 if exists $INC{'Archive/Zip.pm'}
2649 41 0 if ($self->{'debug'})
2659 41 0 if $self->{'debug'}
2662 0 41 if $r == -1
2665 41 0 if ($r == 0)
2667 0 41 unless ($self->_eval_rule('access control rule'))
2675 41 0 if $self->{'debug'}
2678 0 41 if $r == -1
2681 41 0 if ($r == 0)
2684 40 1 if $limit >= 0
2687 40 1 if $limit >= 0
2690 40 1 if $limit >= 0
2693 0 41 unless ($self->{'_test_mode'})
2696 0 0 $peerhostname ? :
2704 0 0 unless (defined $self->config('change process name') and not $self->config('change process name'))
2714 38 3 if ($greeting_type eq 'full') { }
1 2 elsif ($greeting_type eq 'brief') { }
1 1 elsif ($greeting_type eq 'terse') { }
1 0 elsif ($greeting_type eq 'text') { }
2728 0 1 unless my $greeting_text = $self->config('greeting text')
2749 0 0 if (defined $ident_timeout and $ident_timeout > 0 and defined $self->{'peerport'} and defined $self->{'sockport'} and defined $self->{'peeraddrstring'})
2767 0 0 if ($got_bored) { }
2776 0 0 if (defined $ident) { }
2793 0 0 if ($got_bored) { }
2800 0 0 if ($response =~ /:\s*USERID\s*:\s*OTHER\s*:\s*(\S+)/) { }
2829 0 1 unless (/^"([a-zA-Z\s]+)"\s+(.*)/)
2848 0 41 if (defined $self->config('no authentication commands')) { }
2875 15 311 unless defined($_ = readline STDIN)
2886 0 311 if (getppid == 1)
2901 311 0 unless /^PASS /i and $self->config('hide passwords in client log')
2905 0 311 if $self->config('command wait')
2913 0 311 if $r == -1
2916 311 0 if ($r == 0)
2918 15 296 if (defined $cmd_filter)
2920 2 13 unless ($_ =~ /$cmd_filter/)
2930 10 3 if ($_ =~ /$rc->{'pattern'}/i)
2944 0 10 if $@
2946 7 3 unless ($rv)
2958 0 302 unless (/^([A-Z]{3,4})\s?(.*)/i)
2977 302 0 if $self->{'debug'}
2980 0 61 unless ($self->{'authenticated'} or exists $no_authentication_commands{$cmd})
2988 25 277 if ($cmd eq 'QUIT')
2995 0 277 unless (exists $self->{'command_table'}{$cmd})
3010 0 277 if $self->{'_xferlog'}
3015 0 40 unless ($self->{'_test_mode'})
3032 2 5046 if ($Net::FTPServer::GOT_SIGURG)
3038 0 5048 if ($Net::FTPServer::GOT_SIGCHLD)
3044 0 5048 if ($Net::FTPServer::GOT_SIGHUP)
3050 0 5048 if ($Net::FTPServer::GOT_SIGTERM)
3101 0 0 unless exec $0, @ARGV
3122 0 0 defined $self->config($prop) ? :
0 0 if (defined $self->config($prop) ? $self->config($prop) : 0)
3136 0 0 if (my $log_file = $self->config('error log'))
3138 0 0 if (not defined $self->{'_error_file'} or $log_file ne $self->{'_error_file'})
3141 0 0 unless open STDERR, ">>$log_file"
3152 0 41 if (my $log_file = $self->config('xfer logging'))
3154 0 0 if (not defined $self->{'_xfer_file'} or $log_file ne $self->{'_xfer_file'})
3156 0 0 if (my $io = $self->{'_xferlog'})
3162 0 0 if (defined $io) { }
3177 0 41 if (my $log_file = $self->config('client logging'))
3179 0 0 if (not defined $self->{'_client_file'} or $log_file ne $self->{'_client_file'})
3181 0 0 if (my $io = $self->{'_client_log'})
3187 0 0 if (defined $io) { }
3202 0 0 if $log_file =~ /\$/
3204 0 0 if $log_file =~ /\%/
3214 353 0 unless exists $self->{'_client_log'}
3218 0 0 $self->{'authenticated'} ? :
3233 0 0 if (defined $self->{'_pidfile'})
3239 0 0 if ($pidfile =~ m[^([/\w\-\.]+)$]) { }
3242 0 0 unless open PID, ">$self->{'_pidfile'}"
3264 120 0 if (exists $INC{'BSD/Resource.pm'} and exists &get_rlimits()->{$name}) { }
0 0 elsif (not $ENV{'NET_FTPSERVER_NO_BSD_RESOURCE_WARNING'}) { }
3267 0 120 unless &setrlimit(&{$BSD::Resource::{$name};}, $value, $value)
3294 82 246 if -x "$_/$prog"
3330 0 41 if ($show_version)
3337 0 41 if ($help)
3381 2 39 if ($port)
3385 0 41 if ($s_option)
3389 0 41 if ($S_option)
3394 0 41 if ($pidfile)
3407 41 0 if (defined $debug) { }
0 0 elsif (defined $self->config('debug')) { }
3421 0 0 unless defined $pid
3424 0 0 if $pid > 0
3452 0 0 if (exists $ENV{'BIND'} and $ENV{'BIND'} =~ /^(\d+)$/) { }
3457 0 0 unless $self->{'_ctrl_sock'}->fdopen($bind_fd, 'w')
3467 0 0 defined $self->config('port') ? :
3476 0 0 if (defined $self->config('listen queue')) { }
3483 0 0 if (defined $self->config('local address'))
3490 0 0 unless $self->{'_ctrl_sock'} = 'IO::Socket::INET'->new(@args)
3495 0 0 if (defined $self->config('tcp keepalive'))
3497 0 0 unless $self->{'_ctrl_sock'}->sockopt(9, 1)
3513 0 0 unless ($self->{'_ctrl_sock'}->opened)
3541 0 0 if (@ready > 0)
3544 0 0 unless defined $sock
3551 0 0 if ($self->concurrent_connections >= $self->{'_max_clients'})
3564 0 0 if (defined $pid) { }
3566 0 0 if ($pid == 0)
3569 0 0 if $self->{'debug'}
3621 0 41 if (exists $self->{'_children'}) { }
3623 0 0 if (ref $self->{'_children'}) { }
3651 0 47 unless ($config)
3668 1 37 if /^\s*\#/
3669 0 37 if /^\s*$/
3683 3 34 if (/^\s*\s*$/i)
3685 0 3 if ($sitename)
3695 1 33 if (/^\s*\s*$/i)
3697 0 1 if ($sitename)
3711 1 32 if (/^\s*\s*$/i)
3713 0 1 if ($sitename)
3722 1 31 if (m[^\s*\s*$]i)
3724 0 1 unless ($sitename)
3734 1 30 if (/^\s*\s*$/i)
3736 0 1 if ($sitename)
3747 1 4 if m[^\s*\s*$]i
3751 0 1 unless ($_)
3769 0 1 if ($@)
3780 1 1 if (ref $value) { }
3798 0 1 if (ref $value) { }
3817 0 30 if (m[^\s*\s*$]i)
3823 0 30 unless (/^(.*?):(.*)$/)
3863 0 75 if ($key eq 'ip')
3865 0 0 unless ($sitename)
3875 2 73 if $sitename
3880 65 10 if $splat or not exists $self->{'_config'}{$key}
3955 0 466 unless $code =~ /^[1-5][0-5][0-9]$/
3958 0 466 unless @_ > 0
3961 459 7 if (@_ == 1) { }
3974 466 0 if $self->{'debug'}
3991 0 1015 if $self->{'_enable_syslog'}
4012 2 1967 if ($self->{'sitename'} and exists $self->{'_config'}{"$self->{'sitename'}:$key"})
4015 0 2 if (wantarray) { }
4019 0 2 if (@{$self->{'_config'}{"$self->{'sitename'}:$key"};} > 1)
4033 79 1888 if (exists $self->{'_config'}{$key})
4035 5 74 if (wantarray) { }
4039 0 74 if (@{$self->{'_config'}{$key};} > 1)
4053 105 1783 if (wantarray) { }
4071 0 0 if (exists $self->{'_config_ip_host'}{$ip_addr})
4135 0 0 unless open AFE_SOCK, '>&' . fileno($sock)
4141 0 0 if ($@)
4143 0 0 if ($@ =~ /^open2:/)
4209 0 0 if ($self->_eval_rule('retrieve rule', $fileh->pathname, $fileh->filename, $fileh->dirname))
4224 0 0 unless ($memb)
4250 0 0 defined $self->config('archive zip temporaries') ? :
4257 0 0 if ($tmpdir)
4262 0 0 if ($file)
4265 0 0 unless $zip->writeToFileHandle($file, 1) == &Archive::Zip::AZ_OK
4271 0 0 unless ($file)
4274 0 0 unless $zip->writeToFileHandle($file, 1) == &Archive::Zip::AZ_OK
4320 4 0 if (exists $functions->{'d'})
4326 4 0 if ($recurse)
4336 3 2 if ($mode eq 'd') { }
2 0 elsif (exists $functions->{$mode}) { }
4356 0 0 if ($rest eq '')
4358 0 0 if ($self->{'sitename'}) { }
4367 0 0 if ($self->{'authenticated'})
4374 0 0 if ($self->{'sitename'} and $self->{'sitename'} ne $rest)
4381 0 0 unless ($rest =~ /^[-a-z0-9.]+$/i)
4401 0 27 if ($self->{'authenticated'})
4411 8 19 if ($rest eq 'ftp' or $rest eq 'anonymous') { }
4413 0 8 unless ($self->config('allow anonymous'))
4427 8 19 if ($self->{'user_is_anonymous'}) { }
4444 0 27 if ($self->{'authenticated'})
4451 0 27 unless ($self->{'user'})
4460 8 19 if ($self->{'user_is_anonymous'})
4469 0 8 $self->{'peerhostname'} ? :
4471 2 6 if $rest =~ /\@$/
4473 6 2 if ($cktype ne 'none')
4477 2 4 if ($cktype eq 'rfc822') { }
2 2 elsif ($cktype eq 'nobrowser') { }
2 0 elsif ($cktype eq 'trivial') { }
4495 3 3 unless ($valid)
4505 3 3 if ($enforce and not $valid)
4518 1 23 if ($fail_code < 0)
4521 1 0 unless $fail_code == -2
4526 0 1 if ($self->{'loginattempts'} >= ($self->config('max login attempts') || 3))
4544 0 23 unless ($self->_eval_rule('user access control rule'))
4560 5 18 if ($self->{'user_is_anonymous'}) { }
4562 0 18 if (defined $self->config('home directory')) { }
4585 21 2 if ($welcome_type eq 'normal') { }
1 1 elsif ($welcome_type eq 'text') { }
1 0 elsif ($welcome_type eq 'file') { }
4587 16 5 if (not $self->{'user_is_anonymous'}) { }
4602 0 1 unless my $welcome_text = $self->config('welcome text')
4613 0 1 unless my $welcome_file = $self->config('welcome file')
4618 1 0 if (my $io = 'IO::File'->new($welcome_file, 'r')) { }
4641 0 23 defined $self->config('time zone') ? :
4673 23 0 if ($new_cwd = $self->_chdir($self->{'cwd'}, $self->{'home_directory'})) { }
4701 0 0 if ($class =~ /^(\w+)\s+\{(.*)\}\s*$/) { }
0 0 elsif ($class =~ /^(\w*)\s+(.*)/) { }
4709 0 0 if $@
4711 0 0 if $rv
4721 0 0 if $_ eq $username
4731 5 18 if $user_is_anonymous
4745 0 0 $self->{'peerhostname'} ? :
4811 0 0 if $_ eq $username
4823 0 0 if (my $ftpdata = $self->{'ftp_data_port'})
4825 0 0 if ($ftpdata >= 1024)
4854 6 1 if ($new_cwd = $self->_chdir($self->{'cwd'}, $rest))
4857 0 6 unless ($self->_eval_rule('chdir rule', $new_cwd->pathname, $new_cwd->filename, $new_cwd->pathname))
4871 1 0 unless ($rest =~ m[/])
4879 0 0 if ($name eq $rest and $new_cwd = $self->_chdir($self->{'cwd'}, $dir))
4890 0 1 if ($self->config('cdpath'))
4896 0 0 if ($new_cwd = $self->_chdir($self->{'cwd'}, $_) and $new_cwd = $self->_chdir($new_cwd, $rest))
4916 2 0 if (my $new_cwd = $self->_chdir($self->{'cwd'}, '..')) { }
4919 0 2 unless ($self->_eval_rule('chdir rule', $new_cwd->pathname, $new_cwd->filename, $new_cwd->pathname))
4947 0 8 if ($filename and not exists $self->{'_chdir_message_cache'}{$self->{'cwd'}->pathname} and $file = $self->{'cwd'}->open($filename, 'r')) { }
5017 0 6 unless ($rest =~ /^\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/)
5031 0 6 unless ($a1 > 0 and $a1 < 224 and $a2 >= 0 and $a2 < 256 and $a3 >= 0 and $a3 < 256 and $a4 >= 0 and $a4 < 256)
5044 6 0 unless ($self->config('allow proxy ftp'))
5046 0 6 if (not $self->{'_test_mode'} and $hostaddrstring ne $self->{'peeraddrstring'})
5058 0 6 unless ($hostport > 0 and $hostport < 65536)
5064 6 0 unless ($self->config('allow connect low port'))
5066 0 6 if ($hostport < 1024)
5096 12 0 unless defined $port_range
5100 0 12 if ($port_range eq '0') { }
5135 12 0 if ($n < $_->[2])
5154 0 12 unless ($sock)
5171 12 0 if ($self->{'_test_mode'}) { }
5176 0 0 unless $sockaddrstring =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/
5197 17 3 if ($rest =~ /^([AI])$/i) { }
2 1 elsif ($rest =~ /^([AI])\sN$/i) { }
1 0 elsif ($rest =~ /^L\s8$/i) { }
5228 1 0 if ($rest =~ /^F$/i) { }
5248 1 0 if ($rest =~ /^S$/i) { }
5271 1 51 unless ($fileh)
5279 0 1 unless ($self->{'archive_mode'})
5291 0 2 if (lc substr($rest, -length($_)) eq lc $_)
5299 0 0 if ($fileh)
5303 0 0 if ($mode eq 'f')
5316 1 0 if (lc substr($rest, -length($_)) eq lc $_)
5323 1 0 if ($fileh)
5327 1 0 if ($mode eq 'd')
5343 0 52 unless ($self->_eval_rule('retrieve rule', $fileh->pathname, $filename, $dirh->pathname))
5352 51 1 unless ($generator)
5355 0 51 unless ($mode eq 'f')
5364 51 1 !$generator ? :
5366 0 52 unless ($file)
5374 10 42 $self->{'type'} eq 'A' ? :
5380 0 52 unless ($sock)
5392 0 0 unless ($filter)
5405 0 52 if $self->{'_xferlog'}
5410 10 42 if ($self->{'type'} eq 'A') { }
5415 4 38 if ($self->{'_restart'})
5430 0 73 if $self->{'_xferlog'}
5435 0 73 if ($transfer_hook = $self->transfer_hook('r', $file, $sock, \$buffer))
5452 0 73 unless (defined $w)
5472 1 72 if ($self->{'_urgent'})
5483 0 41 unless (defined $r)
5500 1 9 if ($self->{'_restart'})
5512 0 4664 if $self->{'_xferlog'}
5520 0 4664 if ($transfer_hook = $self->transfer_hook('r', $file, $sock, \$_))
5535 1 4663 if ($self->{'_urgent'})
5547 0 50 unless (close $sock and $file->close)
5557 0 50 if $self->{'_xferlog'}
5567 0 0 if (exists $_->{'pid'})
5618 0 6 unless ($rest =~ /^([1-9][0-9]*|0)$/)
5636 0 1 unless ($fileh)
5643 0 1 unless ($self->_eval_rule('rename rule', $dirh->pathname . $filename, $filename, $dirh->pathname))
5664 0 1 unless ($self->{'_rename_fileh'})
5673 0 1 unless ($dirh)
5680 0 1 unless ($self->_eval_rule('rename rule', $dirh->pathname . $filename, $filename, $dirh->pathname))
5689 0 0 if (defined $fileh and defined $self->config('allow rename to overwrite') and not $self->config('allow rename to overwrite'))
5698 0 1 if ($self->{'_rename_fileh'}->move($dirh, $filename) < 0)
5727 0 9 unless ($fileh)
5734 0 9 unless ($self->_eval_rule('delete rule', $fileh->pathname, $filename, $dirh->pathname))
5742 0 9 if ($fileh->delete < 0)
5759 0 1 unless ($fileh)
5766 0 1 unless ($self->_eval_rule('delete rule', $fileh->pathname, $filename, $dirh->pathname))
5774 0 1 if ($fileh->delete < 0)
5791 0 11 unless ($dirh)
5797 0 11 if ($fileh)
5804 0 11 unless ($self->_eval_rule('mkdir rule', $dirh->pathname . $filename, $filename, $dirh->pathname))
5813 0 11 if ($dirh->mkdir($filename) < 0)
5830 4 1 unless $pathname eq '/'
5850 0 3 unless ($dirh)
5857 0 3 unless ($self->_eval_rule('list rule', undef, undef, $dirh->pathname))
5869 0 3 unless ($sock)
5876 0 3 if $self->{'_xferlog'}
5881 0 3 ($fileh || $wildcard) && $rest =~ m[(.*/).*] ? :
5885 0 3 if ($fileh) { }
5891 1 2 unless ($wildcard)
5911 0 3 unless ($sock->close)
5917 0 3 if $self->{'_xferlog'}
5939 0 3 if $rest =~ /^\-\w*l/i
5945 0 3 unless ($dirh)
5952 0 3 unless ($self->_eval_rule('list rule', undef, undef, $dirh->pathname))
5964 0 3 unless ($sock)
5971 0 3 if $self->{'_xferlog'}
5976 0 3 ($fileh || $wildcard) && $rest =~ m[(.*/).*] ? :
5980 0 3 if ($fileh) { }
5998 0 3 unless ($sock->close)
6004 0 3 if $self->{'_xferlog'}
6019 0 5 unless ($rest =~ /^(\S{3,})\s?(.*)/i)
6028 0 5 unless (exists $self->{'site_command_table'}{$cmd})
6044 0 0 unless ($self->config('allow site exec command'))
6051 0 0 if ($self->{'user_is_anonymous'})
6058 0 0 if $rest =~ /(.*)/
6061 0 0 unless (open OUTPUT, "$rest |")
6089 0 4 defined $self->config('allow site version command') ? :
6093 0 4 unless ($enabled)
6112 0 0 if ($rest eq '')
6125 0 0 if ($name eq $rest)
6145 0 0 unless (defined $cdpath)
6164 0 0 if ($rest eq 'MD5') { }
0 0 elsif ($rest eq '') { }
6185 0 0 unless (exists $INC{'Digest/MD5.pm'})
6193 0 0 unless ($fileh)
6201 0 0 unless ($mode eq 'f')
6209 0 0 unless ($file)
6227 0 1 if ($rest eq '')
6237 0 1 !$self->{'_test_mode'} ? :
6240 0 1 unless ($rest =~ /^[1-9][0-9]*$/ and $rest >= $min_timeout and $rest <= $max_timeout)
6258 0 0 unless (exists $INC{'File/Sync.pm'})
6275 0 0 if (defined $self->config('enable archive mode') and not $self->config('enable archive mode'))
6282 0 0 unless ($rest)
6286 0 0 $self->{'archive_mode'} ? :
6290 0 0 if (uc $rest eq 'ON')
6297 0 0 if (uc $rest eq 'OFF')
6324 0 0 unless ($fileh)
6334 0 0 if ($mode ne 'f')
6340 0 0 if ($self->{'type'} eq 'A')
6343 0 0 if (my $file = $fileh->open('r'))
6365 1 2 if ($rest eq '') { }
6370 1 0 unless (defined $self->config('allow site version command') and not $self->config('allow site version command'))
6383 0 1 if ($self->{'peeraddrstring'} and $self->{'peerport'})
6387 0 0 if $self->{'peerhostname'}
6390 0 1 if ($self->{'user_is_anonymous'}) { }
6409 1 1 unless ($dirh)
6419 0 1 if ($fileh) { }
6449 2 0 unless (defined $self->config('allow site version command') and not $self->config('allow site version command'))
6456 1 1 if ($rest eq '') { }
1 0 elsif (uc $rest eq 'SITE') { }
6499 63 5 if $n < @_
6548 0 0 if ($rest ne '')
6563 0 0 if ($self->{'features'}{$_}) { }
6584 0 0 unless ($rest =~ /^([A-Z]{3,4})\s?(.*)/i)
6593 0 0 unless (exists $self->{'options'}{$cmd})
6679 2 1 if ($rest eq '')
6690 0 1 unless (length $rest <= 8 and $rest =~ /^[A-Z]{1,8}(-[A-Z]{1-8})*$/i)
6720 0 0 unless ($fileh)
6750 0 0 if ($rest ne '')
6754 0 0 unless ($fileh)
6762 0 0 unless ($self->_eval_rule('list rule', undef, undef, $fileh->pathname))
6793 0 0 unless ($dirh)
6800 0 0 unless ($self->_eval_rule('list rule', undef, undef, $dirh->pathname))
6812 0 0 unless ($sock)
6819 0 0 if $self->{'_xferlog'}
6823 0 0 if ($fileh) { }
6840 0 0 if $self->{'_xferlog'}
6845 0 0 unless ($sock->close)
6851 0 0 if $self->{'_xferlog'}
6871 0 0 if ($_ ne '')
6873 0 0 if ($self->_is_supported_mlst_fact($_))
6897 0 0 if $fact eq $supported_fact
6910 0 0 if ($self->_is_enabled_fact($supported_fact)) { }
6927 0 0 if $fact eq $enabled_fact
6954 0 0 if ($statusref) { }
6962 0 0 if $dirh
6969 0 0 if ($_ eq 'TYPE') { }
0 0 elsif ($_ eq 'SIZE') { }
0 0 elsif ($_ eq 'MODIFY') { }
0 0 elsif ($_ eq 'PERM') { }
0 0 elsif ($_ eq 'UNIX.MODE') { }
6971 0 0 if ($mode eq 'f') { }
0 0 elsif ($mode eq 'd') { }
6974 0 0 if ($filename eq '.') { }
0 0 elsif ($filename eq '..') { }
6996 0 0 if ($mode eq 'f') { }
0 0 elsif ($mode eq 'd') { }
6998 0 0 $perms & 256 ? :
0 0 $perms & 128 ? :
0 0 $perms & 128 ? :
0 0 $dir_perms & 128 ? :
0 0 $dir_perms & 128 ? :
7007 0 0 $perms & 128 ? :
0 0 $dir_perms & 128 ? :
0 0 $perms & 64 ? :
0 0 $perms & 320 ? :
0 0 $dir_perms & 128 ? :
0 0 $perms & 128 ? :
7018 0 0 $perms & 256 ? :
0 0 $perms & 128 ? :
0 0 $dir_perms & 128 ? :
0 0 $dir_perms & 128 ? :
7027 0 0 $perms & 256 ? :
0 0 $perms & 128 ? :
0 0 $perms & 64 ? :
0 0 $perms & 32 ? :
0 0 $perms & 16 ? :
0 0 $perms & 8 ? :
0 0 $perms & 4 ? :
0 0 $perms & 2 ? :
0 0 $perms & 1 ? :
7061 0 0 if $self->{'xfer'}
7079 25 0 unless $self->{'xfer'}
7090 0 0 unless $self->{'xfer'}
7103 0 0 unless my $xfer = $self->{'xfer'}
7104 0 0 unless $self->{'_xferlog'}
7110 0 0 unless $xfer->{'bytes'}
7125 0 0 $self->{'type'} eq 'A' ? :
0 0 $self->{'user_is_anonymous'} ? :
7144 0 213 defined $self->config($rulename) ? :
7159 0 213 if $@
7174 24 8 if (substr($path, 0, 1) eq '/')
7185 0 8 if ($_ eq '' or $_ eq '.') { }
2 6 elsif ($_ eq '..') { }
7197 1 5 unless $dirh and $dirh->isa('Net::FTPServer::DirHandle')
7224 0 8 if (substr($path, 0, 1) eq '/')
7241 1 5 if ($_ eq '' or $_ eq '.') { }
0 5 elsif ($_ eq '..') { }
7252 0 5 if (not $lastelement) { }
7254 0 0 if (not $handle) { }
0 0 elsif (not $handle->isa('Net::FTPServer::DirHandle')) { }
7269 5 0 if (not $handle) { }
0 0 elsif (not $handle->isa('Net::FTPServer::DirHandle')) { }
7272 4 1 if (/\*/ or /\?/) { }
7319 0 123 if (substr($path, 0, 1) eq '/')
7323 0 0 if $path eq ''
7331 0 123 unless (defined $filename and length $filename)
7338 0 0 if ($_ eq '' or $_ eq '.') { }
0 0 elsif ($_ eq '..') { }
7348 0 0 if (not $handle) { }
0 0 elsif (not $handle->isa('Net::FTPServer::DirHandle')) { }
7364 0 123 $filename eq '..' ? :
0 123 $filename eq '.' ? :
7385 12 102 if (not $self->{'_passive'}) { }
7391 0 12 if (my $source_port = $self->{'ftp_data_port'}) { }
7399 0 0 unless $sock = 'IO::Socket::INET'->new('LocalAddr', $source_addr, 'LocalPort', $source_port, 'PeerAddr', $target_addr, 'PeerPort', $target_port, 'Proto', 'tcp', 'Type', 1, 'Reuse', 1)
7408 0 0 if $sock
7409 0 0 if $_ == 1
7411 0 0 unless $!{'EADDRINUSE'}
7416 0 0 unless $sock
7425 0 12 unless $sock = 'IO::Socket::INET'->new('LocalAddr', $self->{'sockaddrstring'}, 'PeerAddr', $self->{'_hostaddrstring'}, 'PeerPort', $self->{'_hostport'}, 'Proto', 'tcp', 'Type', 1, 'Reuse', 1)
7434 0 102 unless $sock = $self->{'_passive_sock'}->accept
7453 0 114 if (defined $self->config('tcp keepalive'))
7455 0 0 unless $sock->sockopt(9, 1)
7460 0 114 if (defined $self->config('tcp window'))
7462 0 0 unless $sock->sockopt(7, $self->config('tcp window'))
7464 0 0 unless $sock->sockopt(8, $self->config('tcp window'))
7483 0 23 if $filename eq ''
7488 21 2 if ($statusref) { }
7498 23 0 if ($time > $mtime + 15552000 or $time < $mtime - 3600) { }
7510 23 0 $perms & 256 ? :
23 0 $perms & 128 ? :
11 12 $perms & 64 ? :
23 0 $perms & 32 ? :
0 23 $perms & 16 ? :
11 12 $perms & 8 ? :
23 0 $perms & 4 ? :
0 23 $perms & 2 ? :
11 12 $perms & 1 ? :
7522 12 11 $mode eq 'f' ? :
7526 0 23 if ($mode eq 'l')
7529 0 0 unless defined $link
7531 0 23 defined $link ? :
7545 0 23 if $self->{'_xferlog'}
7562 9 47 if ($unique) { }
7567 0 47 unless ($dirh)
7587 0 56 unless ($self->_eval_rule('store rule', $dirh->pathname . $filename, $filename, $dirh->pathname))
7596 0 1 if (not $append and defined $fileh and defined $self->config('allow store to overwrite') and not $self->config('allow store to overwrite'))
7606 1 55 $append ? :
7608 0 56 unless ($file)
7614 9 47 if ($unique) { }
7618 16 31 $self->{'type'} eq 'A' ? :
7630 0 56 unless ($sock)
7637 0 56 if $self->{'_xferlog'}
7640 16 40 if ($self->{'type'} eq 'A') { }
7649 0 3603 if $self->{'_xferlog'}
7654 0 3603 if ($transfer_hook = $self->transfer_hook('w', $file, $sock, \$buffer))
7669 0 3603 unless (defined $w)
7686 0 40 unless (defined $r)
7706 0 54622 if $self->{'_xferlog'}
7714 0 54622 if ($transfer_hook = $self->transfer_hook('w', $file, $sock, \$_))
7726 0 54622 unless (defined $w)
7740 0 56 unless ($sock->close and $file->close)
7747 0 56 if $self->{'_xferlog'}
8107 0 0 unless exists $INC{'Archive/Zip.pm'}
8121 0 0 $self->compressedSize > 0 ? :
8126 0 0 if $time > 0
8141 0 0 if $self->{'fh'}
8143 0 0 unless $self->{'fh'} = $self->{'fileh'}->open('r')
8154 0 0 if $status != &Archive::Zip::AZ_OK
8156 0 0 unless $self->fh
8160 0 0 unless $self->endRead == &Archive::Zip::AZ_OK
8173 0 0 unless $chunksize
8175 0 0 unless my $bytesread = $self->fh->sysread($$dataref, $chunksize)
8185 0 0 if ($self->{'fh'})
8188 0 0 unless $self->{'fh'}->close