The following excerpt is from a Perl script that reads a LDAP database and writes a LDIF file:
$ldap =Net::LDAP->new( ‘ldap.server.com’ ); $mesg = $ldap->bind( ‘cn=incadmin,o=inc’,
password => ‘secret’);[YOUR ANSWER GOES HERE] Net::LDAP::LDIF->new( \*STDOUT,”w” )->write( $mesg->entries ); $mesg=$ldap->unbind; Which code snippet contains the correct query?
A.
$mesg = $ldap->search(base => ‘o=inc’,);
B.
$mesg = $ldap->search( base => ‘cn=incadmin,o=inc’, scope => ‘one’, filter => ‘(objectclass=*)’
);
C.
$mesg = $ldap->search( base => ‘o=inc’, scope => ‘sub’, filter => ‘(objectclass=*)’);
D.
$mesg = $ldap->search( base => ‘o=inc’, recursive => ‘yes’, filter => ‘(*)’ );