From: <le...@wr...> - 2001-12-11 18:12:57
|
> if( my $newbase = $result->dn ) > > is clearer. That said, the following is definitely an issue: > my @bindparmz = > ( > base => $newbase, > password => $password, > ); > $bindresult = $ldh2->bind( @bindparmz); > you should replace 'base' with 'dn' Looks like $result->dn returns nothing, though the first key returned in the struct hash seems to be a valid dn for the following query... Using the corrrect paramter for the bind certianly helps :-) thanx sl 58: print "\nSearching on:", Dumper \@searchparmz; 59 60: if( my $result = $ldh->search(@searchparmz) ) 61 { 62: croak "Roadkill: search: " . $result->code if $result->code; 63 64: my $struct = $result->as_struct; 65 66: print "\nYields:", Dumper $result->as_struct; Searching on: [ 'base', 'ou=people, o=FOO', 'scope', 'one', 'filter', '(uid=jowbloe)', 'attrs', [ 'uid' ] ] main::(test-ldap:66): print "\nYields:", Dumper $result->as_struct; DB<2> n Yields: { 'employeenumber=12345, ou=people, o=FOO' => { 'uid' => [ 'jowbloe' ] } } main::(test-ldap:68): if( my $newbase = $result->dn ) main::(test-ldap:69): { DB<2> x $result->dn 0 '' -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 800 762 1582 |