slight cleanup: make more clear, it's an array
FossilOrigin-Name: 1f29b4d694f8e86100debed943738e7babce5c1ed6062818ea110bef5cd130eb
This commit is contained in:
parent
4fe75271e4
commit
dcbcabb056
1 changed files with 4 additions and 5 deletions
9
shelldap
9
shelldap
|
|
@ -927,8 +927,7 @@ sub run_cat
|
||||||
{
|
{
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $dn = shift;
|
my $dn = shift;
|
||||||
my $attrs = \@_;
|
my @attrs = (@_) ? @_ : ('*');
|
||||||
$attrs->[0] = '*' unless scalar @$attrs;
|
|
||||||
|
|
||||||
unless ( $dn ) {
|
unless ( $dn ) {
|
||||||
print "No dn provided.\n";
|
print "No dn provided.\n";
|
||||||
|
|
@ -944,7 +943,7 @@ sub run_cat
|
||||||
$s = $self->search({
|
$s = $self->search({
|
||||||
scope => 'one',
|
scope => 'one',
|
||||||
vals => 1,
|
vals => 1,
|
||||||
attrs => $attrs
|
attrs => \@attrs
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
elsif ( $dn =~ /\*/ ) {
|
elsif ( $dn =~ /\*/ ) {
|
||||||
|
|
@ -952,7 +951,7 @@ sub run_cat
|
||||||
scope => 'one',
|
scope => 'one',
|
||||||
vals => 1,
|
vals => 1,
|
||||||
filter => $dn,
|
filter => $dn,
|
||||||
attrs => $attrs
|
attrs => \@attrs
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -960,7 +959,7 @@ sub run_cat
|
||||||
$s = $self->search({
|
$s = $self->search({
|
||||||
base => $dn,
|
base => $dn,
|
||||||
vals => 1,
|
vals => 1,
|
||||||
attrs => $attrs
|
attrs => \@attrs
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue