From 6fcc25f993d55b6dbc5845dffe1d97f908dfe353 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 30 Jan 2005 22:05:11 +0000 Subject: [PATCH] cleanup empty DN handling --- servers/slapd/back-dnssrv/search.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-dnssrv/search.c b/servers/slapd/back-dnssrv/search.c index 27c5c7b9e4..8bf56f5855 100644 --- a/servers/slapd/back-dnssrv/search.c +++ b/servers/slapd/back-dnssrv/search.c @@ -53,11 +53,15 @@ dnssrv_back_search( /* FIXME: need some means to determine whether the database * is a glue instance; if we got here with empty DN, then * we passed this same test in dnssrv_back_referrals() */ - if ( SLAP_GLUE_INSTANCE( op->o_bd ) ) { - return LDAP_SUCCESS; - } + if ( !SLAP_GLUE_INSTANCE( op->o_bd ) ) { + rs->sr_err = LDAP_UNWILLING_TO_PERFORM; + rs->sr_err = "DNS SRV operation upon null (empty) DN disallowed"; + } else #endif - return LDAP_SUCCESS; + { + rs->sr_err = LDAP_SUCCESS; + } + goto done; #endif /* LDAP_DEVEL */ } -- 2.39.5