]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapauth.c
implement "realdn" by clause in ACLs (ITS#3627; accounting for Howard's remarks)
[openldap] / servers / slapd / slapauth.c
index 73b2ceb93da12d5e7509ce91d998fa06af863251..6e61ff163e68dc6d3a960ef3e413e6a4e0f0c716 100644 (file)
@@ -1,6 +1,6 @@
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004 The OpenLDAP Foundation.
+ * Copyright 2004-2005 The OpenLDAP Foundation.
  * Portions Copyright 2004 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -40,7 +40,7 @@ do_check( Connection *c, Operation *op, struct berval *id )
        struct berval   authcdn;
        int             rc;
 
-       rc = slap_sasl_getdn( c, op, id, NULL, &authcdn, SLAP_GETDN_AUTHCID );
+       rc = slap_sasl_getdn( c, op, id, realm, &authcdn, SLAP_GETDN_AUTHCID );
        if ( rc != LDAP_SUCCESS ) {
                fprintf( stderr, "ID: <%s> check failed %d (%s)\n",
                                id->bv_val, rc,
@@ -91,6 +91,8 @@ slapauth( int argc, char **argv )
        op = (Operation *)opbuf;
        connection_fake_init( &conn, op, &conn );
 
+       conn.c_sasl_bind_mech = mech;
+
        if ( !BER_BVISNULL( &authzID ) ) {
                struct berval   authzdn;