fix attribute lists for LDAP queries
LDAP does not know of an attribute named 'dn'. To get only the DN in a search, the attriibute list to use is '1.1'. On all other cases, the DN of the entries found is automaticlly part of the result set too. FossilOrigin-Name: 7fd8da252b548c1dfe609c0b87f68370f316a53cdb88954e24353587169181bf
This commit is contained in:
parent
02cca5227d
commit
8d0841dfae
1 changed files with 2 additions and 2 deletions
4
shelldap
4
shelldap
|
|
@ -1005,7 +1005,7 @@ sub run_cd
|
|||
$self->base( $newbase );
|
||||
|
||||
# get new 'cwd' listing
|
||||
my $s = $self->search({ scope => 'one', attrs => ['dn'] });
|
||||
my $s = $self->search({ scope => 'one', attrs => [ '1.1' ] });
|
||||
if ( $s->{'code'} ) {
|
||||
print "$s->{'message'}\n";
|
||||
return;
|
||||
|
|
@ -1407,7 +1407,7 @@ sub run_list
|
|||
my $self = shift;
|
||||
my @filters = @_;
|
||||
my $base = $self->base();
|
||||
my $attrs = [ 'dn', 'hasSubordinates' ];
|
||||
my $attrs = [ 'hasSubordinates' ];
|
||||
|
||||
# setup filters
|
||||
my ( $flags, $filter );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue