line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseFS::Exports; |
2
|
1
|
|
|
1
|
|
44104
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
941
|
use IO::Socket::INET; |
|
1
|
|
|
|
|
34741
|
|
|
1
|
|
|
|
|
11
|
|
5
|
1
|
|
|
1
|
|
2149
|
use Moo; |
|
1
|
|
|
|
|
22816
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'MooseFS'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has list => ( |
10
|
|
|
|
|
|
|
is => 'rw', |
11
|
|
|
|
|
|
|
default => sub { [] } |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub BUILD { |
15
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
16
|
0
|
|
|
|
|
|
my $s = $self->sock; |
17
|
0
|
|
|
|
|
|
print $s pack('(LL)>', 520, 0); |
18
|
0
|
|
|
|
|
|
my $header = $self->myrecv($s, 8); |
19
|
0
|
|
|
|
|
|
my ($cmd, $length) = unpack('(LL)>', $header); |
20
|
0
|
0
|
|
|
|
|
if ( $cmd == 521 ) { |
21
|
0
|
|
|
|
|
|
my $data = $self->myrecv($s, $length); |
22
|
0
|
|
|
|
|
|
my $pos = 0; |
23
|
0
|
|
|
|
|
|
while ( $pos < $length ) { |
24
|
0
|
|
|
|
|
|
my ($fip1, $fip2, $fip3, $fip4, $tip1, $tip2, $tip3, $tip4, $pleng) = unpack("(CCCCCCCCL)>", substr($data, $pos, 12)); |
25
|
0
|
|
|
|
|
|
$pos += 12; |
26
|
0
|
|
|
|
|
|
my $path = substr($data, $pos, $pleng); |
27
|
0
|
|
|
|
|
|
$pos += $pleng; |
28
|
0
|
|
|
|
|
|
my ($v1, $v2, $v3, $exportflags, $sesflags, $rootuid, $rootgid, $mapalluid, $mapallgid) = unpack("(SCCCCLLLL)>", substr($data, $pos, 22)); |
29
|
0
|
|
|
|
|
|
$pos += 22; |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
|
|
|
if ( ($sesflags & 16) == 0) { |
32
|
0
|
|
|
|
|
|
$mapalluid = undef; |
33
|
0
|
|
|
|
|
|
$mapallgid = undef; |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
|
36
|
0
|
0
|
|
|
|
|
push @{$self->list}, { |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
ip_range_from => "$fip1.$fip2.$fip3.$fip4", |
38
|
|
|
|
|
|
|
ip_range_to => "$tip1.$tip2.$tip3.$tip4", |
39
|
|
|
|
|
|
|
path => $path, |
40
|
|
|
|
|
|
|
meta => $path eq '.' ? 1 : 0, |
41
|
|
|
|
|
|
|
version => "$v1.$v2.$v3", |
42
|
|
|
|
|
|
|
export_flags => $exportflags, |
43
|
|
|
|
|
|
|
ses_flags => $sesflags, |
44
|
|
|
|
|
|
|
root_uid => $rootuid, |
45
|
|
|
|
|
|
|
root_gid => $rootgid, |
46
|
|
|
|
|
|
|
all_users_uid => $mapalluid, |
47
|
|
|
|
|
|
|
all_users_gid => $mapallgid, |
48
|
|
|
|
|
|
|
}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |