]> git.sur5r.net Git - openldap/commitdiff
Require rootDN to be present on logDB
authorHoward Chu <hyc@openldap.org>
Thu, 15 Jun 2006 00:02:35 +0000 (00:02 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 15 Jun 2006 00:02:35 +0000 (00:02 +0000)
servers/slapd/overlays/accesslog.c

index 275b8aaf5bd4147b0413f210e002ac2de616f109..b60748c5547a416a033616c8932b62b36a593886 100644 (file)
@@ -723,6 +723,14 @@ log_cf_gen(ConfigArgs *c)
                                        c->log, c->msg, c->value_dn.bv_val );
                                rc = 1;
                        }
+                       if ( BER_BVISEMPTY( &li->li_db->be_rootdn )) {
+                               snprintf( c->msg, sizeof( c->msg ),
+                                       "<%s> no rootDN was configured for suffix",
+                                       c->argv[0] );
+                               Debug( LDAP_DEBUG_ANY, "%s: %s \"%s\"\n",
+                                       c->log, c->msg, c->value_dn.bv_val );
+                               rc = 1;
+                       }
                        ch_free( c->value_dn.bv_val );
                        ch_free( c->value_ndn.bv_val );
                        break;