equal
deleted
inserted
replaced
617 $self->{'base'} ||= $conf->{'basedn'}; |
617 $self->{'base'} ||= $conf->{'basedn'}; |
618 |
618 |
619 # try and determine base automatically from rootDSE |
619 # try and determine base automatically from rootDSE |
620 # |
620 # |
621 unless ( $self->{'base'} ) { |
621 unless ( $self->{'base'} ) { |
622 my $base = $self->{'root_dse'}->{'asn'} || {}; |
622 my @namingContexts = $self->{'root_dse'}->get_value('namingContexts'); |
623 $base = $base->{'attributes'} || []; |
623 $conf->{'basedn'} = $namingContexts[0]; |
624 $base = $base->[0] || {}; |
624 $self->{'base'} = $namingContexts[0]; |
625 $base = $base->{'vals'} || []; |
|
626 $conf->{'basedn'} = $base->[0]; |
|
627 $self->{'base'} = $base->[0]; |
|
628 } |
625 } |
629 if ( $_[0] ) { |
626 if ( $_[0] ) { |
630 $self->{'base'} = $_[0]; |
627 $self->{'base'} = $_[0]; |
631 } |
628 } |
632 return $self->{'base'}; |
629 return $self->{'base'}; |