mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
[master] make LDAP DLZ module work with older DLZ
This commit is contained in:
@@ -112,10 +112,15 @@ typedef struct {
|
||||
|
||||
/* forward references */
|
||||
|
||||
#if DLZ_DLOPEN_VERSION < 3
|
||||
isc_result_t
|
||||
dlz_findzonedb(void *dbdata, const char *name);
|
||||
#else
|
||||
isc_result_t
|
||||
dlz_findzonedb(void *dbdata, const char *name,
|
||||
dns_clientinfomethods_t *methods,
|
||||
dns_clientinfo_t *clientinfo);
|
||||
#endif
|
||||
|
||||
void
|
||||
dlz_destroy(void *dbdata);
|
||||
@@ -814,7 +819,11 @@ dlz_allowzonexfr(void *dbdata, const char *name, const char *client) {
|
||||
isc_result_t result;
|
||||
|
||||
/* check to see if we are authoritative for the zone first */
|
||||
#if DLZ_DLOPEN_VERSION < 3
|
||||
result = dlz_findzonedb(dbdata, name);
|
||||
#else
|
||||
result = dlz_findzonedb(dbdata, name, NULL, NULL);
|
||||
#endif
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
@@ -835,26 +844,39 @@ dlz_authority(const char *zone, void *dbdata, dns_sdlzlookup_t *lookup) {
|
||||
return (ldap_get_results(zone, NULL, NULL, AUTHORITY, dbdata, lookup));
|
||||
}
|
||||
|
||||
#if DLZ_DLOPEN_VERSION < 3
|
||||
isc_result_t
|
||||
dlz_findzonedb(void *dbdata, const char *name)
|
||||
#else
|
||||
isc_result_t
|
||||
dlz_findzonedb(void *dbdata, const char *name,
|
||||
dns_clientinfomethods_t *methods,
|
||||
dns_clientinfo_t *clientinfo)
|
||||
#endif
|
||||
{
|
||||
#if DLZ_DLOPEN_VERSION >= 3
|
||||
UNUSED(methods);
|
||||
UNUSED(clientinfo);
|
||||
#endif
|
||||
return (ldap_get_results(name, NULL, NULL, FINDZONE, dbdata, NULL));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dlz_lookup(const char *zone, const char *name,
|
||||
#if DLZ_DLOPEN_VERSION == 1
|
||||
isc_result_t dlz_lookup(const char *zone, const char *name,
|
||||
void *dbdata, dns_sdlzlookup_t *lookup)
|
||||
#else
|
||||
isc_result_t dlz_lookup(const char *zone, const char *name,
|
||||
void *dbdata, dns_sdlzlookup_t *lookup,
|
||||
dns_clientinfomethods_t *methods,
|
||||
dns_clientinfo_t *clientinfo)
|
||||
#endif
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
#if DLZ_DLOPEN_VERSION >= 2
|
||||
UNUSED(methods);
|
||||
UNUSED(clientinfo);
|
||||
#endif
|
||||
|
||||
if (strcmp(name, "*") == 0)
|
||||
result = ldap_get_results(zone, "~", NULL, LOOKUP,
|
||||
|
Reference in New Issue
Block a user