scan_cifs: do not add NT_STATUS lines to result
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -504,7 +504,6 @@ __PACKAGE__->register_method ({
|
|||||||
|
|
||||||
my $data = [];
|
my $data = [];
|
||||||
foreach my $k (keys %$res) {
|
foreach my $k (keys %$res) {
|
||||||
next if $k =~ m/NT_STATUS_/;
|
|
||||||
push @$data, { share => $k, description => $res->{$k} };
|
push @$data, { share => $k, description => $res->{$k} };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1213,8 +1213,9 @@ sub scan_cifs {
|
|||||||
my $line = shift;
|
my $line = shift;
|
||||||
if ($line =~ m/(\S+)\s*Disk\s*(\S*)/) {
|
if ($line =~ m/(\S+)\s*Disk\s*(\S*)/) {
|
||||||
$res->{$1} = $2;
|
$res->{$1} = $2;
|
||||||
} elsif ($line =~ m/(NT_STATUS_(\S*))/) {
|
} elsif ($line =~ m/(NT_STATUS_(\S+))/) {
|
||||||
$res->{$1} = '';
|
my $status = $1;
|
||||||
|
$err .= "unexpected status: $1\n" if uc($1) ne 'SUCCESS';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user