]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/bind.c
refuse illegal values for "threads" (ITS#4433)
[openldap] / servers / slapd / back-ldbm / bind.c
index 7397f1f17d0c75b49a73b2d11faa8d17e8b929cc..5c523a3cb220e80d6f5b74a78f05e73784634358 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,7 @@ ldbm_back_bind(
        }
 
        /* check for deleted */
-#ifdef LDBM_SUBENTRIES
+
        if ( is_entry_subentry( e ) ) {
                /* entry is an subentry, don't allow bind */
                Debug( LDAP_DEBUG_TRACE,
@@ -80,7 +80,6 @@ ldbm_back_bind(
                rc = LDAP_INVALID_CREDENTIALS;
                goto return_results;
        }
-#endif
 
        if ( is_entry_alias( e ) ) {
                /* entry is an alias, don't allow bind */
@@ -105,31 +104,16 @@ ldbm_back_bind(
 
        switch ( op->oq_bind.rb_method ) {
        case LDAP_AUTH_SIMPLE:
-               if ( ! access_allowed( op, e,
-                       password, NULL, ACL_AUTH, NULL ) )
-               {
-#if 1
-                       rc = LDAP_INVALID_CREDENTIALS;
-#else
-                       rc = LDAP_INSUFFICIENT_ACCESS;
-#endif
-                       goto return_results;
-               }
-
                if ( (a = attr_find( e->e_attrs, password )) == NULL ) {
                        /* stop front end from sending result */
-#if 1
                        rc = LDAP_INVALID_CREDENTIALS;
-#else
-                       rc = LDAP_INAPPROPRIATE_AUTH;
-#endif
                        goto return_results;
                }
 
-               if ( slap_passwd_check( op->o_conn,
-                       a, &op->oq_bind.rb_cred, &rs->sr_text ) != 0 )
+               if ( slap_passwd_check( op, e, a, &op->oq_bind.rb_cred,
+                                       &rs->sr_text ) != 0 )
                {
-                       /* stop front end from sending result */
+                       /* failure; stop front end from sending result */
                        rc = LDAP_INVALID_CREDENTIALS;
                        goto return_results;
                }