line |
true |
false |
branch |
31
|
0 |
0 |
defined $_ ? : |
50
|
0 |
0 |
unpack('c', $c) >= 32 ? : |
65
|
3 |
6 |
if (%$opts) |
68
|
3 |
0 |
$good ? : |
69
|
0 |
3 |
if (@keys) |
78
|
0 |
0 |
unless ($wantarray) |
85
|
0 |
0 |
if (${^TAINT} > 0) |
89
|
0 |
0 |
if (${^TAINT} < 0) |
98
|
0 |
0 |
unless $i++ |
99
|
0 |
0 |
if (&Scalar::Util::tainted($_)) { } |
|
0 |
0 |
elsif (ref $_ eq 'HASH') { } |
101
|
0 |
0 |
$subn =~ /::([a-z]\w*)$/ ? : |
109
|
0 |
0 |
$subn =~ /::([a-z]\w*)$/ ? : |
123
|
1 |
0 |
@extra ? : |
|
1 |
2 |
$code ? : |
126
|
0 |
3 |
if $debug and $debug & 1 |
137
|
0 |
0 |
if ($@) |
148
|
0 |
0 |
unless $self->{'_error'} |
171
|
0 |
22 |
unless defined $target |
173
|
0 |
22 |
unless ($user, $passwd, $ipv6, $host, $port) = $target =~ m(^
\s* # space
(?:
([^:]+) # username
(?::(.*))? # : password
\@ # @
)?
(?: # host
( # IPv6...
\[$IPv6_re(?:\%[^\[\]]*)\] # [IPv6]
| # or
$IPv6_re # IPv6
)
| # or
([^\[\]\@:]+) # hostname / ipv4
)
(?::([^\@:]+))? # port
\s* # space
$)xi |
195
|
1 |
21 |
if (defined $ipv6) { } |
203
|
4 |
18 |
unless defined $user |
204
|
22 |
0 |
unless defined $port |
205
|
9 |
13 |
unless defined $passwd |
206
|
9 |
13 |
unless defined $passwd |
208
|
3 |
19 |
if wantarray |
215
|
1 |
18 |
if defined $ipv6 |
224
|
0 |
3 |
if ${^TAINT} |
227
|
0 |
3 |
if @_ & 1 |
229
|
0 |
3 |
if defined $FACTORY |
235
|
3 |
0 |
unless defined $external_master |
237
|
0 |
3 |
if (not defined $opts{'host'} and defined $external_master) |
244
|
3 |
0 |
unless (defined $passwd) |
247
|
0 |
3 |
if (defined $passwd) { } |
260
|
3 |
0 |
unless defined $proxy_command |
281
|
0 |
3 |
if $forward_agent and $passphrase |
286
|
3 |
0 |
unless defined $passwd_prompt |
292
|
3 |
0 |
unless ($external_master) |
294
|
3 |
0 |
unless $master_stdout_fh = delete $opts{'master_stdout_fh'} |
297
|
3 |
0 |
unless $master_stderr_fh = delete $opts{'master_stderr_fh'} |
300
|
3 |
0 |
if (defined $master_opts) |
301
|
3 |
0 |
if (ref $master_opts) { } |
305
|
0 |
0 |
if $master_opts =~ /^-\w\s+\S/ |
314
|
0 |
3 |
if $login_handler or defined $passwd |
318
|
0 |
0 |
if defined $default_ssh_opts and not ref $default_ssh_opts and $default_ssh_opts =~ /^-\w\s+\S/ |
327
|
0 |
3 |
delete $opts{'default_stdout_discard'} ? : |
329
|
3 |
0 |
unless defined $default_stdout_file |
333
|
0 |
3 |
delete $opts{'default_stderr_discard'} ? : |
335
|
3 |
0 |
unless defined $default_stderr_file |
339
|
0 |
3 |
delete $opts{'default_stdin_discard'} ? : |
341
|
3 |
0 |
unless defined $default_stdin_file |
348
|
0 |
3 |
if defined $user |
349
|
0 |
3 |
if defined $port |
356
|
0 |
3 |
if (${^TAINT}) |
358
|
0 |
0 |
if &Scalar::Util::tainted($ENV{'PATH'}) |
414
|
0 |
2 |
if defined $default_stdout_file |
416
|
0 |
2 |
if defined $default_stderr_file |
418
|
0 |
2 |
if defined $default_stdin_file |
421
|
0 |
2 |
if ($self->{'_error'} == 3) |
432
|
0 |
2 |
if (defined $ctl_path) { } |
433
|
0 |
0 |
if ($external_master) { } |
434
|
0 |
0 |
unless (-S $ctl_path) |
440
|
0 |
0 |
if (-e $ctl_path) |
447
|
0 |
2 |
if $external_master |
449
|
2 |
0 |
unless (defined $ctl_dir) |
450
|
0 |
2 |
unless (defined $self->{'_home'}) |
459
|
0 |
2 |
unless (-d $ctl_dir) |
469
|
2 |
0 |
unless -e $ctl_path |
471
|
0 |
2 |
if (-e $ctl_path) |
477
|
0 |
2 |
if (defined $sizeof_sun_path and length $ctl_path > $sizeof_sun_path) |
483
|
0 |
2 |
if $debug and $debug & 2 |
485
|
0 |
2 |
if ($strict_mode and not $self->_is_secure_path($ctl_dir)) |
492
|
2 |
0 |
if $connect |
508
|
0 |
0 |
shift @_ ? : |
512
|
0 |
0 |
if ${^TAINT} |
515
|
0 |
0 |
if $k =~ /^(?:USER|HOST|PORT)$/ |
524
|
0 |
0 |
$k =~ /^(?:USER|HOST|PORT)$/ ? : |
525
|
0 |
0 |
defined $v ? : |
530
|
0 |
17 |
if (ref $self and $self->{'_expand_vars'}) |
532
|
0 |
0 |
length $1 ? : |
|
0 |
0 |
if defined $_ |
536
|
13 |
4 |
wantarray ? : |
543
|
0 |
0 |
@_ ? : |
|
0 |
0 |
if $ssh->{'_error'} |
553
|
0 |
0 |
unless (-d $dir) |
554
|
0 |
0 |
if $debug and $debug & 2 |
558
|
0 |
0 |
if $debug and $debug & 2 |
559
|
0 |
0 |
unless $uid == $> || $uid == 0 and ($mode & 18) == 0 || $mode & 512 |
560
|
0 |
0 |
if defined $home and $home eq $dir |
569
|
3 |
0 |
ref $_[0] eq 'HASH' ? : |
585
|
0 |
3 |
if (defined $self->{'_ssh_version'}) { } |
586
|
0 |
0 |
if $debug and $debug & 4 |
590
|
2 |
0 |
if (my($full, $num) = $txt =~ /^OpenSSH_((\d+\.\d+)\S*)/im) { } |
591
|
0 |
2 |
if $debug and $debug & 4 |
596
|
0 |
0 |
if $debug and $debug & 4 |
608
|
0 |
2 |
unless shift() |
612
|
0 |
2 |
@_ ? : |
614
|
0 |
2 |
if $debug and $debug & 8 |
622
|
0 |
0 |
unless $scp =~ s/ssh$/scp/i |
629
|
0 |
0 |
unless shift() |
633
|
0 |
0 |
defined $self->{'_port'} ? : |
636
|
0 |
0 |
if $debug and $debug & 8 |
643
|
0 |
0 |
if (/['"\s]/) |
649
|
0 |
0 |
wantarray ? : |
662
|
0 |
0 |
if $debug and $debug & 8 |
668
|
0 |
0 |
if (@_ == 1) |
670
|
0 |
0 |
unless $path =~ m[/] |
674
|
0 |
0 |
if (@_ == 2) |
682
|
0 |
0 |
unless shift() |
685
|
0 |
0 |
if $debug and $debug & 8 |
698
|
0 |
0 |
@_ ? : |
705
|
0 |
2 |
if defined $h and $h ne "IGNORE" |
711
|
0 |
0 |
if (my $pid = $self->_my_master_pid) { } |
712
|
0 |
0 |
if $debug and $debug & 32 |
719
|
0 |
0 |
unless $async or __has_sigchld_handle() |
721
|
0 |
0 |
if ($self->{'_master_kill_last'} < $now) |
724
|
0 |
0 |
unless defined $sig |
725
|
0 |
0 |
if $debug and $debug & 32 |
729
|
0 |
0 |
if $debug and $debug & 32 |
730
|
0 |
0 |
if $deceased == $pid or $deceased < 0 and $! == 10 |
731
|
0 |
0 |
if ($self->{'_master_kill_count'} > 20) |
733
|
0 |
0 |
if $debug and $debug & 32 |
736
|
0 |
0 |
if $async |
744
|
0 |
0 |
if $debug and $debug & 32 |
751
|
0 |
0 |
unless @_ <= 2 |
757
|
0 |
0 |
if (my $pid = $self->_my_master_pid) |
758
|
0 |
0 |
if ($self->wait_for_master) |
768
|
0 |
0 |
if $self->{'_external_master'} |
771
|
0 |
0 |
unless $async |
773
|
0 |
0 |
if ($self->{'_master_state'} != "_STATE_GONE") |
774
|
0 |
0 |
if $async |
788
|
4 |
0 |
unless ($self->{'_external_master'}) |
791
|
1 |
0 |
if $pid and $self->{'_perl_pid'} == $$ and $self->{'_thread_generation'} == $thread_generation |
798
|
1 |
0 |
if $self->{'_master_state'} == "_STATE_GONE" |
800
|
0 |
0 |
if (not $async and $self->{'_master_state'} == "_STATE_RUNNING" and $send_ctl || $self->_my_master_pid) |
805
|
0 |
0 |
if $debug and $debug & 32 |
813
|
3 |
3 |
defined $fh ? : |
814
|
6 |
0 |
if defined $fn and $fn >= 0 |
824
|
0 |
2 |
if ($$self{"_master_${name}_discard"}) { } |
829
|
2 |
0 |
unless defined $fh |
830
|
0 |
2 |
if (defined $fh) |
832
|
0 |
0 |
if (fileno $fh != fileno $uname) |
833
|
0 |
0 |
unless open $uname, ">>&", $fh |
842
|
2 |
0 |
if ($pid) { } |
843
|
0 |
2 |
unless defined $timeout |
846
|
2 |
0 |
if (defined $timeout and $self->{'_kill_ssh_on_timeout'}) |
847
|
0 |
2 |
if $self->{'_error'} == 4 |
850
|
2 |
0 |
unless __has_sigchld_handle() |
853
|
2 |
0 |
if (defined $time_limit) { } |
857
|
2 |
0 |
if $deceased = waitpid($pid, 1) |
859
|
0 |
0 |
if ($remaining <= 0) |
860
|
0 |
0 |
if $debug and $debug & 16 |
867
|
0 |
0 |
$remaining < 0.1 ? : |
868
|
0 |
0 |
if $debug and $debug & 16 |
870
|
0 |
0 |
if $deceased = waitpid($pid, 1) |
877
|
0 |
2 |
if $debug and $debug & 16 |
878
|
2 |
0 |
if ($deceased == $pid) { } |
|
0 |
0 |
elsif ($deceased < 0) { } |
|
0 |
0 |
elsif ($deceased > 0) { } |
879
|
0 |
2 |
if ($?) |
882
|
0 |
0 |
if $signal |
890
|
0 |
0 |
if $! == 4 |
891
|
0 |
0 |
if ($! == 10) |
913
|
0 |
0 |
if @_ |
919
|
0 |
0 |
unless @_ <= 2 |
921
|
0 |
0 |
unless $self->{'_error'} == 1 |
931
|
0 |
0 |
$self->{'_forward_agent'} ? : |
|
0 |
2 |
if defined $self->{'_forward_agent'} |
932
|
0 |
2 |
$self->{'_forward_X11'} ? : |
935
|
2 |
0 |
$self->{'_ssh_version'} >= 5.6 ? : |
940
|
0 |
2 |
if $self->{'_master_pty_force'} or defined $self->{'_login_handler'} |
941
|
0 |
2 |
if (defined $self->{'_passwd'}) { } |
|
0 |
2 |
elsif ($self->{'_batch_mode'}) { } |
944
|
0 |
0 |
$self->{'_passphrase'} ? : |
952
|
0 |
2 |
if (defined $self->{'_key_path'}) |
960
|
0 |
2 |
if (my $gateway_args = $self->{'_gateway_args'}) |
961
|
0 |
0 |
if (ref $gateway_args eq 'HASH') { } |
964
|
0 |
0 |
unless ($gateway = "Net::OpenSSH::Gateway"->find_gateway("errors", $errors, "host", $self->{'_host'}, "port", $self->{'_port'}, %$gateway_args)) |
974
|
0 |
0 |
unless $gateway->before_ssh_connect |
979
|
0 |
2 |
if (defined $proxy_command) |
983
|
0 |
2 |
if ($use_pty) |
988
|
0 |
2 |
if defined $pref_auths |
994
|
1 |
1 |
unless ($pid) |
995
|
0 |
1 |
unless defined $pid |
998
|
0 |
1 |
if ($debug and $debug & 512) |
1003
|
0 |
1 |
if $mpty |
1008
|
0 |
1 |
if defined $self->{'_passwd'} |
1009
|
0 |
1 |
if defined $self->{'_passphrase'} |
1011
|
0 |
1 |
if $self->{'_master_setpgrp'} |
1024
|
0 |
0 |
if ($async) { } |
1025
|
0 |
0 |
if (-S $self->{'_ctl_path'}) |
1034
|
0 |
0 |
unless ($error) |
1036
|
0 |
0 |
if ($out =~ /pid=(\d+)/) { } |
1037
|
0 |
0 |
if (not $pid or $1 == $pid) |
1044
|
0 |
0 |
$out =~ /illegal option/i ? : |
1056
|
1 |
0 |
if ($self->{'_error'} != 1) |
1059
|
0 |
1 |
$self->{'_pid'} ? : |
1064
|
0 |
2 |
if $debug and $debug & 4 |
1065
|
0 |
0 |
if ($state == $self->{'_master_state'} and $state != "_STATE_KILLING" and $state != "_STATE_GONE") |
1078
|
1 |
3 |
if ($pid) |
1080
|
0 |
1 |
if ($deceased == $pid or $deceased < 0 and $! == 10) |
1081
|
0 |
0 |
if $debug and $debug & 4 |
1086
|
0 |
4 |
if ($self->{'_master_state'} == "_STATE_RUNNING") |
1087
|
0 |
0 |
if -S $self->{'_ctl_path'} |
1091
|
0 |
4 |
if ($self->{'_master_state'} == "_STATE_KILLING") |
1092
|
0 |
0 |
if $debug and $debug & 4 |
1096
|
2 |
2 |
if ($self->{'_master_state'} == "_STATE_START") |
1097
|
0 |
2 |
if ($self->{'_external_master'}) |
1102
|
0 |
1 |
unless $self->_master_start($async) |
1103
|
0 |
1 |
if ($self->{'_mpty'}) |
1106
|
0 |
0 |
if (defined $self->{'_passwd'} or $self->{'_login_handler'}) |
1113
|
1 |
1 |
if ($self->{'_master_state'} == "_STATE_GONE") |
1114
|
0 |
1 |
if (my $mpty = delete $self->{'_mpty'}) |
1119
|
0 |
1 |
if ($self->{'_master_state'} == "_STATE_STOPPED") |
1128
|
0 |
1 |
unless $pid |
1132
|
0 |
0 |
if ($self->{'_master_setpgrp'} and not $async and not $self->{'_batch_mode'} and not $self->{'_external_master'}) |
1135
|
0 |
0 |
if ($old_tcpgrp > 0) { } |
1147
|
0 |
0 |
if ($mpty and $self->{'_master_state'} == 2 || $self->{'_master_state'} == 3) |
1155
|
0 |
1 |
$async ? : |
1161
|
15 |
0 |
if $dt < "0.2" |
1162
|
0 |
15 |
if (-e $self->{'_ctl_path'}) |
1163
|
0 |
0 |
if $debug and $debug & 4 |
1166
|
0 |
15 |
if $debug and $debug & 4 |
1168
|
0 |
15 |
if (defined $timeout and time - $start_time > $timeout) |
1174
|
1 |
14 |
if ($deceased == $pid or $deceased < 0 and $! == 10) |
1177
|
0 |
0 |
$self->{'_passphrase'} ? : |
|
0 |
1 |
if defined $self->{'_passwd'} |
1182
|
0 |
14 |
if ($self->{'_login_handler'} and $self->{'_master_state'} == 2) { } |
1184
|
0 |
0 |
if (eval {
do {
$self->{'_login_handler'}->($self, $mpty, \$self->{'_wfm_bout'})
}
}) |
1188
|
0 |
0 |
if ($@) |
1200
|
0 |
14 |
if ($n > 0) |
1201
|
0 |
0 |
unless vec $rv1, $fnopty, 1 |
1203
|
0 |
0 |
if ($read) |
1205
|
0 |
0 |
if ((my $remove = length($self->{'_master_pty_log'}) - 4096) > 0) |
1209
|
0 |
0 |
if ($self->{'_wfm_bout'} =~ /The authenticity of host.*can't be established/is) |
1215
|
0 |
0 |
if ($self->{'_wfm_bout'} =~ /WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED/is) |
1222
|
0 |
0 |
unless ref $passwd_prompt |
1224
|
0 |
0 |
if ($self->{'_master_state'} == 2) { } |
|
0 |
0 |
elsif (length $passwd_prompt and $self->{'_wfm_bout'} =~ /^(.*$passwd_prompt)\s*$/s) { } |
1225
|
0 |
0 |
if ($self->{'_wfm_bout'} =~ /^(.*$passwd_prompt)/s) |
1226
|
0 |
0 |
if $debug and $debug & 4 |
1233
|
0 |
0 |
if $debug and $debug & 4 |
1241
|
0 |
14 |
if $async |
1245
|
0 |
1 |
if (defined $old_tcpgrp) |
1246
|
0 |
0 |
if $debug and $debug & 4 |
1255
|
1 |
0 |
if ($error) |
1259
|
0 |
0 |
if $self->_master_jump_state("_STATE_RUNNING", $async) |
1265
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1283
|
0 |
0 |
unless ($self->{'_error'}) |
1292
|
3 |
0 |
if (pipe $r, $w) |
1305
|
3 |
0 |
if (ref $self and !defined($remote_shell) || $remote_shell eq $self->{'_remote_shell'}) |
1314
|
0 |
3 |
unless ref $opts eq "HASH" |
1318
|
3 |
0 |
unless defined $quote |
1320
|
3 |
0 |
if ($quote) { } |
1323
|
0 |
3 |
$glob_quoting ? : |
1329
|
0 |
6 |
if (ref $_) { } |
1330
|
0 |
0 |
if (ref $_ eq 'SCALAR') { } |
|
0 |
0 |
elsif (ref $_ eq 'REF' and ref $$_ eq 'SCALAR') { } |
1346
|
0 |
3 |
if ($quote_extended) |
1348
|
0 |
0 |
if ($opts->{'stdout_discard'} and $opts->{'stderr_discard'} || $opts->{'stderr_to_stdout'}) { } |
1351
|
0 |
0 |
if $opts->{'stdin_discard'} |
1359
|
3 |
0 |
wantarray ? : |
1362
|
0 |
0 |
if grep ref($_), @_ |
1366
|
0 |
0 |
wantarray ? : |
1378
|
0 |
0 |
ref $_ eq 'ARRAY' ? : |
|
0 |
5 |
defined $_ ? : |
1382
|
0 |
0 |
unless $self->wait_for_master |
1383
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1387
|
0 |
0 |
$tty ? : |
|
0 |
0 |
if defined $tty |
1388
|
0 |
0 |
if ($self->{'_forward_agent'}) |
1389
|
0 |
0 |
$self->{'_forward_agent'} eq 'always' ? : |
1391
|
0 |
0 |
$forward_agent ? : |
|
0 |
0 |
if defined $forward_agent |
1393
|
0 |
0 |
if ($self->{'_forward_X11'}) |
1395
|
0 |
0 |
$forward_X11 ? : |
1399
|
0 |
0 |
if ($tunnel) { } |
1404
|
0 |
0 |
if ($subsystem) |
1406
|
0 |
0 |
unless @_ == 1 |
1412
|
0 |
0 |
if length $ssh_flags |
1414
|
0 |
0 |
if (wantarray) { } |
1415
|
0 |
0 |
if $debug and $debug & 16 |
1420
|
0 |
0 |
if $debug and $debug & 16 |
1427
|
0 |
0 |
ref $name_or_args ? : |
1431
|
0 |
0 |
if (open my $fh, $mode, @args) { } |
1443
|
2 |
1 |
if (defined $fh) |
1446
|
2 |
0 |
if $fn >= $good_fn |
1460
|
0 |
0 |
if defined $err_fd |
1461
|
0 |
0 |
if (ref $cmd) { } |
1484
|
0 |
3 |
if ${^TAINT} |
1486
|
3 |
0 |
ref $_[0] eq 'HASH' ? : |
1487
|
0 |
3 |
unless (delete $opts{'_no_master_required'}) |
1488
|
0 |
0 |
unless $self->wait_for_master |
1494
|
0 |
3 |
if ($tunnel) { } |
1500
|
0 |
0 |
$tty ? : |
|
0 |
3 |
if defined $tty |
1504
|
0 |
3 |
if not defined $opts{'quote_args_extended'} and $cmd eq "ssh" |
1506
|
0 |
3 |
unless $self->_encode_args($argument_encoding, @args) |
1511
|
0 |
3 |
if ($stdinout_dpipe) { } |
1522
|
3 |
0 |
unless ($stdinout_socket) |
1523
|
0 |
0 |
unless ($stdin_discard = delete $opts{'stdin_discard'} or $stdin_pipe = delete $opts{'stdin_pipe'} or $stdin_fh = delete $opts{'stdin_fh'} or $stdin_file = delete $opts{'stdin_file'}) |
1527
|
0 |
0 |
unless ($tunnel) |
1528
|
0 |
0 |
if ($stdin_pty = delete $opts{'stdin_pty'}) |
1538
|
0 |
0 |
unless $stdout_discard = delete $opts{'stdout_discard'} or $stdout_pipe = delete $opts{'stdout_pipe'} or $stdout_fh = delete $opts{'stdout_fh'} or $stdout_file = delete $opts{'stdout_file'} |
1540
|
0 |
3 |
if $stdout_pty and not $stdin_pty |
1548
|
0 |
3 |
unless $stderr_discard = delete $opts{'stderr_discard'} or $stderr_pipe = delete $opts{'stderr_pipe'} or $stderr_fh = delete $opts{'stderr_fh'} or $stderr_to_stdout = delete $opts{'stderr_to_stdout'} |
1551
|
3 |
0 |
unless defined $ssh_opts |
1553
|
0 |
3 |
if ($self->{'_forward_agent'}) |
1554
|
0 |
0 |
$self->{'_forward_agent'} eq 'always' ? : |
1556
|
0 |
0 |
$forward_agent ? : |
|
0 |
0 |
if defined $forward_agent |
1558
|
0 |
3 |
if ($self->{'_forward_X11'}) |
1560
|
0 |
0 |
$forward_X11 ? : |
1562
|
0 |
3 |
if (delete $opts{'subsystem'}) |
1567
|
0 |
3 |
if defined $stdin_pty |
1571
|
0 |
3 |
if (defined $stdin_file) |
1572
|
0 |
0 |
unless $stdin_fh = $self->_open_file("<", $stdin_file) |
1574
|
0 |
3 |
if (defined $stdout_file) |
1575
|
0 |
0 |
unless $stdout_fh = $self->_open_file(">", $stdout_file) |
1577
|
0 |
3 |
if (defined $stderr_file) |
1578
|
0 |
0 |
unless $stderr_fh = $self->_open_file(">", $stderr_file) |
1583
|
0 |
3 |
if ($stdinout_socket) { } |
1584
|
0 |
0 |
unless (socketpair $rin, $win, 1, 1, 0) |
1591
|
0 |
3 |
if ($stdin_pipe) { } |
|
0 |
3 |
elsif ($stdin_pty) { } |
|
0 |
3 |
elsif (defined $stdin_fh) { } |
1592
|
0 |
0 |
unless ($rin, $win) = $self->_make_pipe |
1597
|
0 |
0 |
unless ($win) |
1611
|
3 |
0 |
if ($stdout_pipe) { } |
|
0 |
0 |
elsif ($stdout_pty) { } |
|
0 |
0 |
elsif (defined $stdout_fh) { } |
1612
|
0 |
3 |
unless ($rout, $wout) = $self->_make_pipe |
1626
|
0 |
3 |
unless ($stderr_to_stdout) |
1627
|
0 |
0 |
if ($stderr_pipe) { } |
|
0 |
0 |
elsif (defined $stderr_fh) { } |
1628
|
0 |
0 |
unless ($rerr, $werr) = $self->_make_pipe |
1639
|
0 |
3 |
if length $ssh_flags |
1641
|
3 |
0 |
$cmd eq 'raw' ? : |
|
0 |
3 |
$cmd eq 'rsync' ? : |
|
0 |
3 |
$cmd eq 'scp' ? : |
|
0 |
3 |
$cmd eq 'ssh' ? : |
|
0 |
3 |
$tunnel ? : |
1648
|
0 |
3 |
if $debug and $debug & 16 |
1651
|
1 |
2 |
unless ($pid) |
1652
|
0 |
1 |
unless (defined $pid) |
1658
|
0 |
1 |
if $setpgrp |
1660
|
1 |
0 |
if $stdin_discard |
1661
|
0 |
1 |
if $stdout_discard |
1662
|
0 |
1 |
if $stderr_discard |
1664
|
0 |
1 |
if ($stdinout_dpipe) |
1666
|
0 |
0 |
unless defined $pid1 |
1668
|
0 |
0 |
unless ($pid1 xor $stdinout_dpipe_make_parent) |
1678
|
1 |
0 |
if (defined $rin_fd) |
1679
|
0 |
1 |
if $stdin_pty |
1680
|
0 |
1 |
unless $rin_fd == 0 or POSIX::dup2($rin_fd, 0) |
1682
|
1 |
0 |
if (defined $wout_fd) |
1683
|
0 |
1 |
unless $wout_fd == 1 or POSIX::dup2($wout_fd, 1) |
1685
|
0 |
1 |
if (defined $werr_fd) { } |
|
1 |
0 |
elsif ($stderr_to_stdout) { } |
1686
|
0 |
0 |
unless $werr_fd == 2 or POSIX::dup2($werr_fd, 2) |
1689
|
0 |
1 |
unless POSIX::dup2(1, 2) |
1694
|
0 |
2 |
if $close_slave_pty |
1695
|
0 |
2 |
if defined $stdinout_dpipe |
1696
|
2 |
0 |
wantarray ? : |
1700
|
0 |
0 |
if ${^TAINT} |
1702
|
0 |
0 |
unless $self->wait_for_master |
1703
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1708
|
0 |
0 |
unless $self->_encode_args($argument_encoding, @args) |
1710
|
0 |
0 |
if $debug and $debug & 16 |
1712
|
0 |
0 |
unless ($pid) |
1717
|
0 |
0 |
wantarray ? : |
1721
|
0 |
0 |
if ${^TAINT} |
1723
|
0 |
0 |
unless $self->wait_for_master |
1724
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1729
|
0 |
0 |
unless $self->_encode_args($argument_encoding, @args) |
1731
|
0 |
0 |
if $debug and $debug & 16 |
1733
|
0 |
0 |
unless ($pid) |
1738
|
0 |
0 |
wantarray ? : |
1743
|
0 |
5 |
if (defined $encoding and $encoding ne "bytes") |
1746
|
0 |
0 |
unless (defined $enc) |
1758
|
0 |
0 |
if (defined $enc and @_) |
1762
|
0 |
0 |
unless defined $_ |
1766
|
0 |
0 |
unless $self->_check_eval_ok(7) |
1772
|
3 |
0 |
if (@_ > 2) |
1777
|
0 |
3 |
if ($enc) |
1792
|
0 |
0 |
unless defined $_ |
1807
|
0 |
2 |
unless defined $timeout |
1809
|
0 |
0 |
if defined $_ |
1810
|
0 |
2 |
if ($cin and not $has_input) { } |
|
0 |
2 |
elsif (not $cin and $has_input) { } |
1811
|
0 |
0 |
unless $keep_in_open |
1819
|
0 |
2 |
if ($enc and @data) |
1821
|
0 |
0 |
if $has_input |
1822
|
0 |
0 |
if $self->{'_error'} |
1831
|
0 |
2 |
if $debug and $debug & 64 |
1835
|
2 |
0 |
if ($cout or $cerr) |
1837
|
2 |
0 |
if ($cout) |
1841
|
0 |
2 |
if ($cerr) |
1847
|
0 |
2 |
if ($cin) |
1855
|
0 |
4 |
if $debug and $debug & 64 |
1860
|
4 |
0 |
if ($n > 0) { } |
1861
|
4 |
0 |
if ($cout and vec $rv1, $fnoout, 1) |
1864
|
0 |
4 |
if ($debug and $debug & 64) |
1866
|
0 |
0 |
if $read and $debug & 128 |
1868
|
2 |
2 |
unless ($read or grep(($! == $_), @retriable)) |
1874
|
0 |
4 |
if ($cerr and vec $rv1, $fnoerr, 1) |
1876
|
0 |
0 |
if $debug and $debug & 64 |
1877
|
0 |
0 |
unless ($read or grep(($! == $_), @retriable)) |
1883
|
0 |
4 |
if ($cin and vec $wv1, $fnoin, 1) |
1885
|
0 |
0 |
if ($debug and $debug & 64) |
1887
|
0 |
0 |
if $written and $debug & 128 |
1889
|
0 |
0 |
if ($written) { } |
|
0 |
0 |
elsif (grep(($! == $_), @retriable)) { } |
1893
|
0 |
0 |
if defined $data[0] and length $data[0] |
1901
|
0 |
0 |
unless $keep_in_open |
1907
|
0 |
0 |
if $n < 0 and grep(($! == $_), @retriable) |
1913
|
0 |
2 |
if $cout |
1914
|
0 |
2 |
if $cerr |
1915
|
0 |
2 |
if $cin and not $keep_in_open |
1917
|
0 |
2 |
if ($enc) |
1919
|
0 |
0 |
unless ($self->_decode($enc, $bout, $berr)) |
1924
|
0 |
2 |
if $debug and $debug & 64 |
1936
|
0 |
0 |
if ${^TAINT} |
1938
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1948
|
0 |
0 |
if ${^TAINT} |
1950
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1954
|
0 |
0 |
unless my($in, $out, undef, $pid) = $self->open_ex({"stdout_pipe", 1, "stdin_pipe", 1, %opts}, @_) |
1966
|
0 |
0 |
if ${^TAINT} |
1968
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1971
|
0 |
0 |
unless my($pty, undef, undef, $pid) = $self->open_ex({"stdout_pty", 1, "stdin_pty", 1, "tty", 1, %opts}, @_) |
1976
|
0 |
0 |
wantarray ? : |
1984
|
0 |
0 |
if ${^TAINT} |
1986
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
1989
|
0 |
0 |
unless my($socket, undef, undef, $pid) = $self->open_ex({"stdinout_socket", 1, %opts}, @_) |
1992
|
0 |
0 |
wantarray ? : |
1998
|
0 |
0 |
if ${^TAINT} |
2000
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2004
|
0 |
0 |
unless my($in, $out, $err, $pid) = $self->open_ex({"stdout_pipe", 1, "stdin_pipe", 1, "stderr_pipe", 1, %opts}, @_) |
2016
|
0 |
0 |
if ${^TAINT} |
2018
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2022
|
0 |
0 |
unless my($pty, undef, $err, $pid) = $self->open_ex({"stdout_pty", 1, "stdin_pty", 1, "tty", 1, "stderr_pipe", 1, %opts}, @_) |
2035
|
0 |
0 |
if ${^TAINT} |
2037
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2041
|
0 |
0 |
unless my($socket, undef, $err, $pid) = $self->open_ex({"stdinout_socket", 1, "stderr_pipe", 1, %opts}, @_) |
2054
|
0 |
0 |
if ${^TAINT} |
2056
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2060
|
0 |
0 |
$async ? : |
2064
|
0 |
0 |
if $stdin_keep_open and not defined $stdin_data |
2067
|
0 |
0 |
if (defined $stdin_data) |
2076
|
0 |
0 |
unless my($in, undef, undef, $pid) = $self->open_ex(\%opts, @_) |
2078
|
0 |
0 |
if defined $stdin_data |
2080
|
0 |
0 |
if $async |
2092
|
0 |
0 |
if ${^TAINT} |
2094
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2095
|
0 |
0 |
unless grep defined($opts{$_}), ("stdout_discard", "stdout_fh", "stdout_file", "stdinout_dpipe") |
2097
|
0 |
0 |
unless grep defined($opts{$_}), ("stderr_discard", "stderr_fh", "stderr_file", "stderr_to_stdout") |
2103
|
0 |
0 |
unless ($error) |
2106
|
0 |
0 |
if ($error == 5) |
2118
|
0 |
0 |
if ${^TAINT} |
2120
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2126
|
0 |
0 |
if $stdin_keep_open and not defined $stdin_data |
2130
|
0 |
0 |
if defined $stdin_data |
2136
|
0 |
0 |
unless my($in, $out, undef, $pid) = $self->open_ex(\%opts, @_) |
2140
|
0 |
0 |
if (wantarray) |
2151
|
0 |
0 |
if ${^TAINT} |
2153
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2159
|
0 |
0 |
if $stdin_keep_open and not defined $stdin_data |
2164
|
0 |
0 |
if defined $stdin_data |
2170
|
0 |
0 |
unless my($in, $out, $err, $pid) = $self->open_ex(\%opts, @_) |
2174
|
0 |
0 |
wantarray ? : |
2180
|
0 |
0 |
if ${^TAINT} |
2182
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2183
|
0 |
0 |
unless grep defined($opts{$_}), ("stderr_discard", "stderr_fh", "stderr_file") |
2185
|
0 |
0 |
unless @_ == 2 |
2194
|
0 |
0 |
if ${^TAINT} |
2196
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2197
|
0 |
0 |
unless grep defined($opts{$_}), ("stderr_discard", "stderr_fh", "stderr_file") |
2199
|
0 |
0 |
unless @_ == 2 |
2212
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2214
|
0 |
0 |
unless @_ > 0 |
2219
|
0 |
0 |
@_ > 1 ? : |
2220
|
0 |
0 |
if $target =~ m[^[^/]*:] |
2223
|
0 |
0 |
if defined $self->{'_user'} |
2232
|
0 |
0 |
if ${^TAINT} |
2238
|
0 |
0 |
if ${^TAINT} |
2245
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2247
|
0 |
0 |
unless @_ > 0 |
2251
|
0 |
0 |
$glob ? : |
2254
|
0 |
0 |
if defined $self->{'_user'} |
2257
|
0 |
0 |
@_ > 1 ? : |
2262
|
0 |
0 |
if ($glob) |
2265
|
0 |
0 |
unless (@src) |
2277
|
0 |
0 |
if ${^TAINT} |
2279
|
0 |
0 |
unless $self |
2284
|
0 |
0 |
if ${^TAINT} |
2286
|
0 |
0 |
unless $self |
2296
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2298
|
0 |
0 |
unless defined $quiet |
2309
|
0 |
0 |
if $ssh_opts |
2310
|
0 |
0 |
if $quiet |
2311
|
0 |
0 |
if $verbose |
2312
|
0 |
0 |
if $recursive |
2313
|
0 |
0 |
if $copy_attrs |
2314
|
0 |
0 |
if $bwlimit |
2324
|
0 |
0 |
if $async |
2368
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2374
|
0 |
0 |
unless defined $quiet or $verbose |
2377
|
0 |
0 |
if $quiet |
2378
|
0 |
0 |
if $copy_attrs |
2379
|
0 |
0 |
$verbose =~ /^\d+$/ ? : |
|
0 |
0 |
if $verbose |
2386
|
0 |
0 |
if (defined $value) |
2387
|
0 |
0 |
if ($rsync_opt_open_ex{$opt}) { } |
2393
|
0 |
0 |
if $rsync_opt_forbidden{$opt1} |
2394
|
0 |
0 |
if ($rsync_opt_with_arg{$opt1}) { } |
2398
|
0 |
0 |
if $opt1 =~ s/^no-// |
2399
|
0 |
0 |
$value ? : |
2408
|
0 |
0 |
if $async |
2409
|
0 |
0 |
if $self->_waitpid($pid, $timeout) |
2411
|
0 |
0 |
if ($self->{'_error'} == 5 and $?) |
2414
|
0 |
0 |
unless defined $errstr |
2416
|
0 |
0 |
$signal ? : |
2428
|
0 |
0 |
if ${^TAINT} |
2429
|
0 |
0 |
unless @_ & 1 |
2438
|
0 |
0 |
if defined $fs_encoding and $fs_encoding eq "bytes" |
2440
|
0 |
0 |
unless defined $opts{'timeout'} |
2441
|
0 |
0 |
unless $self->wait_for_master |
2442
|
0 |
0 |
unless my($in, $out, $pid) = $self->open2({"subsystem", 1, "stderr_fh", $stderr_fh, "stderr_discard", $stderr_discard}, "sftp") |
2452
|
0 |
0 |
if ($sftp->error) |
2462
|
0 |
0 |
if ${^TAINT} |
2464
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2465
|
0 |
0 |
unless @_ == 2 |
2480
|
0 |
0 |
if ${^TAINT} |
2482
|
0 |
0 |
ref $_[0] eq 'HASH' ? : |
2483
|
0 |
0 |
unless @_ == 2 |
2497
|
0 |
0 |
if not defined $hostname && length $hostname or $hostname =~ /^localhost\b/ |
2505
|
0 |
0 |
unless _load_module("Object::Remote") |
2506
|
0 |
0 |
unless _load_module("Net::OpenSSH::ObjectRemote") |
2521
|
0 |
1 |
if $debug and $debug & 2 |