+#ifdef BDB_SUBENTRIES
+ if ( is_entry_subentry( e ) ) {
+ /* entry is an subentry, don't allow bind */
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "bdb_bind: entry is subentry\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE, "entry is subentry\n", 0,
+ 0, 0 );
+#endif
+
+ send_ldap_result( conn, op, rc = LDAP_INVALID_CREDENTIALS,
+ NULL, NULL, NULL, NULL );
+
+ goto done;
+ }
+#endif