]> git.sur5r.net Git - openldap/commitdiff
subordinate needs a suffix (ITS#6216)
authorPierangelo Masarati <ando@openldap.org>
Thu, 16 Jul 2009 15:28:22 +0000 (15:28 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 16 Jul 2009 15:28:22 +0000 (15:28 +0000)
servers/slapd/bconfig.c

index 14217cc80a686dddb8070424b6cfd91495b94c4e..57b8438223f8a86afaa2edbf3e86d26c9b77bbd2 100644 (file)
@@ -2350,6 +2350,16 @@ config_subordinate(ConfigArgs *c)
                break;
        case LDAP_MOD_ADD:
        case SLAP_CONFIG_ADD:
+               if ( c->be->be_nsuffix == NULL ) {
+                       /* log error */
+                       snprintf( c->cr_msg, sizeof( c->cr_msg),
+                               "subordinate configuration needs a suffix" );
+                       Debug( LDAP_DEBUG_ANY,
+                               "%s: %s.\n",
+                               c->log, c->cr_msg, 0 );
+                       rc = 1;
+                       break;
+               }
                advertise = ( c->argc == 2 && !strcasecmp( c->argv[1], "advertise" ));
                rc = glue_sub_add( c->be, advertise, CONFIG_ONLINE_ADD( c ));
                break;