+ ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
+
+ /* allow noauth binds */
+ rc = 1;
+ rs->sr_err = LDAP_INVALID_CREDENTIALS;
+ send_ldap_result( op, rs );
+ return rs->sr_err;
+ }
+
+ /* check for deleted */
+#ifdef LDBM_SUBENTRIES
+ if ( is_entry_subentry( e ) ) {
+ /* entry is an subentry, don't allow bind */
+ Debug( LDAP_DEBUG_TRACE,
+ "entry is subentry\n", 0, 0, 0 );
+ rc = LDAP_INVALID_CREDENTIALS;
+ goto return_results;
+ }
+#endif
+
+ if ( is_entry_alias( e ) ) {
+ /* entry is an alias, don't allow bind */
+ Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0, 0, 0 );
+
+#if 1
+ rc = LDAP_INVALID_CREDENTIALS;
+#else
+ rs->sr_text = "entry is alias";
+ rc = LDAP_ALIAS_PROBLEM;
+#endif
+ goto return_results;