From 1815ad4cb6af71bbcdfd23e838d5e69e0e372362 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 17 Sep 2009 21:16:04 +0000 Subject: [PATCH] register authz cookie (ITS#6296) --- servers/slapd/back-ldap/bind.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index 0e06262639..8e74ad01d6 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -277,6 +277,8 @@ retry:; ldap_back_controls_free( op, rs, &ctrls ); if ( rc == LDAP_SUCCESS ) { + op->o_conn->c_authz_cookie = op->o_bd->be_private; + /* If defined, proxyAuthz will be used also when * back-ldap is the authorizing backend; for this * purpose, after a successful bind the connection @@ -1523,6 +1525,7 @@ retry:; rc = ldap_back_op_result( lc, op, rs, msgid, -1, ( sendok | LDAP_BACK_BINDING ) ); if ( rc == LDAP_SUCCESS ) { + op->o_conn->c_authz_cookie = op->o_bd->be_private; LDAP_BACK_CONN_ISBOUND_SET( lc ); } @@ -2249,6 +2252,7 @@ ldap_back_proxy_authz_bind( * so that referral chasing is attempted using the right * identity */ LDAP_BACK_CONN_ISBOUND_SET( lc ); + op->o_conn->c_authz_cookie = op->o_bd->be_private; if ( !BER_BVISNULL( binddn ) ) { ber_bvreplace( &lc->lc_bound_ndn, binddn ); } -- 2.39.5