예제 #1
0
static isc_result_t
dlz_ldap_lookup (const char *zone, const char *name, void *driverarg, void *dbdata, dns_sdlzlookup_t * lookup)
{
    isc_result_t result;

    UNUSED (driverarg);

    if (strcmp (name, "*") == 0)
        result = ldap_get_results (zone, "~", NULL, LOOKUP, dbdata, lookup);
    else
        result = ldap_get_results (zone, name, NULL, LOOKUP, dbdata, lookup);
    return (result);
}
예제 #2
0
static isc_result_t
dlz_ldap_authority(const char *zone, void *driverarg, void *dbdata,
		   dns_sdlzlookup_t *lookup)
{
	UNUSED(driverarg);
	return (ldap_get_results(zone, NULL, NULL, AUTHORITY, dbdata, lookup));
}
예제 #3
0
static isc_result_t
dlz_ldap_allnodes(const char *zone, void *driverarg, void *dbdata,
		  dns_sdlzallnodes_t *allnodes)
{
	UNUSED(driverarg);
	return (ldap_get_results(zone, NULL, NULL, ALLNODES, dbdata, allnodes));
}
예제 #4
0
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,
					  dbdata, lookup);
	else
		result = ldap_get_results(zone, name, NULL, LOOKUP,
					  dbdata, lookup);
	return (result);
}
예제 #5
0
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));
}
예제 #6
0
/*
 * DLZ methods
 */
static isc_result_t dlz_ldap_allowzonexfr (void *driverarg, void *dbdata, const char *name, const char *client)
{
    isc_result_t result;

    UNUSED (driverarg);

    /* check to see if we are authoritative for the zone first */
    result = dlz_ldap_findzone (driverarg, dbdata, name);
    if (result != ISC_R_SUCCESS)
    {
        return (result);
    }

    /* get all the zone data */
    result = ldap_get_results (name, NULL, client, ALLOWXFR, dbdata, NULL);
    return (result);
}
예제 #7
0
/*
 * DLZ methods
 */
isc_result_t
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);
	}

	/* get all the zone data */
	result = ldap_get_results(name, NULL, client, ALLOWXFR, dbdata, NULL);
	return (result);
}
예제 #8
0
isc_result_t
dlz_authority(const char *zone, void *dbdata, dns_sdlzlookup_t *lookup) {
	return (ldap_get_results(zone, NULL, NULL, AUTHORITY, dbdata, lookup));
}
예제 #9
0
isc_result_t
dlz_allnodes(const char *zone, void *dbdata, dns_sdlzallnodes_t *allnodes)
{
	return (ldap_get_results(zone, NULL, NULL, ALLNODES, dbdata, allnodes));
}
예제 #10
0
static isc_result_t
dlz_ldap_findzone(void *driverarg, void *dbdata, const char *name) {
	UNUSED(driverarg);
	return (ldap_get_results(name, NULL, NULL, FINDZONE, dbdata, NULL));
}