]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/config.c
ITS#5860 - more for entry cache counts
[openldap] / servers / slapd / back-ldap / config.c
index 8800821ddd311990484f7ccff5ec918f4af0998b..a725eec162b53120d4a4a16a56a852ee557af059 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2008 The OpenLDAP Foundation.
+ * Copyright 2003-2009 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -743,6 +743,19 @@ slap_idassert_parse( ConfigArgs *c, slap_idassert_t *si )
                        return 1;
                }
        }
+
+       if ( si->si_bc.sb_method == LDAP_AUTH_SIMPLE ) {
+               if ( BER_BVISNULL( &si->si_bc.sb_binddn )
+                       || BER_BVISNULL( &si->si_bc.sb_cred ) )
+               {
+                       snprintf( c->cr_msg, sizeof( c->cr_msg ),
+                               "\"idassert-bind <args>\": "
+                               "SIMPLE needs \"binddn\" and \"credentials\"" );
+                       Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
+                       return 1;
+               }
+       }
+
        bindconf_tls_defaults( &si->si_bc );
 
        return 0;