Change ldap2dns to only search onelevel when pulling zone serials. Performance

tweak suggested by Jason Chambers


git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@367 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
Ben Klang
2006-07-14 22:17:36 +00:00
parent 01a50e7719
commit 59a91b5706

View File

@@ -805,7 +805,7 @@ static void calc_checksum(int* num, int* sum)
char* attr_list[2] = { "DNSserial", NULL };
*num = *sum = 0;
if ( ldaperr = ldap_search_ext_s(ldap_con, options.searchbase[0] ? options.searchbase : NULL, LDAP_SCOPE_SUBTREE, "objectclass=DNSzone", attr_list, 0, NULL, NULL, &options.searchtimeout, options.reclimit, &res)!=LDAP_SUCCESS )
if ( ldaperr = ldap_search_ext_s(ldap_con, options.searchbase[0] ? options.searchbase : NULL, LDAP_SCOPE_ONELEVEL, "objectclass=DNSzone", attr_list, 0, NULL, NULL, &options.searchtimeout, options.reclimit, &res)!=LDAP_SUCCESS )
die_ldap(ldaperr);
if (ldap_count_entries(ldap_con, res) < 1) {
fprintf(stderr, "[**] Warning: No records returned from search. Check for correct credentials,\n[**] LDAP hostname, and search base DN.\n\n");