]> git.sur5r.net Git - openldap/commitdiff
Finish proxy authzid control
authorKurt Zeilenga <kurt@openldap.org>
Thu, 5 Dec 2002 18:14:02 +0000 (18:14 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 5 Dec 2002 18:14:02 +0000 (18:14 +0000)
servers/slapd/controls.c
tests/scripts/test014-whoami

index 0cb50389c8d13469d9c152834c1e7c66e92955b5..cf8fdd246999db0d70d4b489813597e7c5a3dfd7 100644 (file)
@@ -509,7 +509,7 @@ static int parseProxyAuthz (
                dn.bv_len ? dn.bv_val : "(NULL)", 0 );
 #endif
 
-       rc = slap_sasl_authorized( conn, &op->o_dn, &dn );
+       rc = slap_sasl_authorized( conn, &op->o_ndn, &dn );
 
        if( rc ) {
                ch_free( dn.bv_val );
@@ -517,15 +517,14 @@ static int parseProxyAuthz (
                return LDAP_PROXY_AUTHZ_FAILURE;
        }
 
-#if 0
-       ch_free( op->o_dn );
-       ch_free( op->o_ndn );
+       ch_free( op->o_dn.bv_val );
+       ch_free( op->o_ndn.bv_val );
 
-       op->o_dn = dn;
-#endif
+       op->o_dn.bv_val = NULL;
+       op->o_ndn = dn;
+       ber_dupbv( &op->o_dn, &dn );
 
-       *text = "not (yet) implemented";
-       return LDAP_OTHER;
+       return LDAP_SUCCESS;
 }
 
 static int parseNoOp (
index 219bce52e797ea138c98fc820475cc1e6720afb1..d120c556601830ef6b2d3f20a251e5d0a7b98612 100755 (executable)
@@ -84,8 +84,8 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT -D "$MANAGERDN" -w $PASSWD \
 RC=$?
 if test $RC != 0 ; then
        echo "ldapwhoami failed ($RC)!"
-#      kill -HUP $PID
-#      exit $RC
+       kill -HUP $PID
+       exit $RC
 fi
 
 echo "Testing ldapwhoami as ${MANAGERDN} for u:ursula..."
@@ -95,8 +95,8 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT -D "$MANAGERDN" -w $PASSWD \
 RC=$?
 if test $RC != 0 ; then
        echo "ldapwhoami failed ($RC)!"
-#      kill -HUP $PID
-#      exit $RC
+       kill -HUP $PID
+       exit $RC
 fi
 
 kill -HUP $PID