]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/bind.c
cleanup bind
[openldap] / servers / slapd / bind.c
index 6ec136c75c1b966fa1d65ba29fb2ab724b3199ca..b8553f7b6fb78576971ccf4dc9f0e24784e4a27b 100644 (file)
@@ -26,7 +26,9 @@
 
 #include "ldap_pvt.h"
 #include "slap.h"
+#ifdef LDAP_SLAPI
 #include "slapi.h"
+#endif
 
 
 int
@@ -49,7 +51,9 @@ do_bind(
        struct berval cred = { 0, NULL };
        Backend *be = NULL;
 
+#ifdef LDAP_SLAPI
        Slapi_PBlock *pb = op->o_pb;
+#endif
 
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ENTRY, "do_bind: conn %d\n", conn->c_connid, 0, 0 );
@@ -223,7 +227,8 @@ do_bind(
                version < LDAP_VERSION3 )
        {
                send_ldap_result( conn, op, rc = LDAP_PROTOCOL_ERROR,
-                       NULL, "requested protocol version not allowed", NULL, NULL );
+                       NULL, "historical protocol version requested, use LDAPv3 instead",
+                       NULL, NULL );
                goto cleanup;
        }
 
@@ -395,7 +400,7 @@ do_bind(
                        {
                                /* DN is not empty, disallow */
                                rc = LDAP_UNWILLING_TO_PERFORM;
-                               text = "unwilling to allow anonymous bind with non-empty DN";
+                               text = "unauthenticated bind (DN with no password) disallowed";
 
                        } else if ( global_disallows & SLAP_DISALLOW_BIND_ANON ) {
                                /* disallow */
@@ -601,9 +606,6 @@ do_bind(
        if ( be->be_bind ) {
                int ret;
 
-               /* deref suffix alias if appropriate */
-               suffix_alias( be, &ndn );
-
                ret = (*be->be_bind)( be, conn, op,
                        &pdn, &ndn, method, &cred, &edn );