]> git.sur5r.net Git - openldap/commitdiff
cleanup empty DN handling
authorPierangelo Masarati <ando@openldap.org>
Sun, 30 Jan 2005 22:05:11 +0000 (22:05 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 30 Jan 2005 22:05:11 +0000 (22:05 +0000)
servers/slapd/back-dnssrv/search.c

index 27c5c7b9e405769ba285b072475116892f2e3603..8bf56f5855b91c5106d8839c821f0d5ef026c5f6 100644 (file)
@@ -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 */
        }