# HG changeset patch # User Peter Marschall # Date 1299354980 -3600 # Node ID 68318d115f6cfb2029a00c9ce3a6dac98ec29004 # Parent 77fd303f1a28b0fb7a030f4fc066d67fc7f34d7b 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. diff -r 77fd303f1a28 -r 68318d115f6c shelldap --- a/shelldap Sat Mar 05 20:24:07 2011 +0100 +++ b/shelldap Sat Mar 05 20:56:20 2011 +0100 @@ -1005,7 +1005,7 @@ $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 @@ my $self = shift; my @filters = @_; my $base = $self->base(); - my $attrs = [ 'dn', 'hasSubordinates' ]; + my $attrs = [ 'hasSubordinates' ]; # setup filters my ( $flags, $filter );