mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-17 09:38:07 -05:00
ITS#3469: C99 compliance
This commit is contained in:
parent
8d14165274
commit
cd2e651c26
1 changed files with 17 additions and 4 deletions
|
|
@ -575,8 +575,13 @@ ldap_back_proxy_authz_bind( struct ldapconn *lc, Operation *op, SlapReply *rs )
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( li->idassert_authz ) {
|
if ( li->idassert_authz ) {
|
||||||
struct berval authcDN = BER_BVISNULL( &op->o_conn->c_ndn ) ? slap_empty_bv : op->o_conn->c_ndn;
|
struct berval authcDN;
|
||||||
|
|
||||||
|
if ( BER_BVISNULL( &op->o_conn->c_ndn ) ) {
|
||||||
|
authcDN = slap_empty_bv;
|
||||||
|
} else {
|
||||||
|
authcDN = op->o_conn->c_ndn;
|
||||||
|
}
|
||||||
rs->sr_err = slap_sasl_matches( op, li->idassert_authz,
|
rs->sr_err = slap_sasl_matches( op, li->idassert_authz,
|
||||||
&authcDN, &authcDN );
|
&authcDN, &authcDN );
|
||||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
if ( rs->sr_err != LDAP_SUCCESS ) {
|
||||||
|
|
@ -790,9 +795,13 @@ ldap_back_proxy_authz_ctrl(
|
||||||
|
|
||||||
} else if ( li->idassert_authz ) {
|
} else if ( li->idassert_authz ) {
|
||||||
int rc;
|
int rc;
|
||||||
struct berval authcDN = BER_BVISNULL( &op->o_conn->c_ndn ) ? slap_empty_bv : op->o_conn->c_ndn;
|
struct berval authcDN;
|
||||||
|
|
||||||
|
|
||||||
|
if ( BER_BVISNULL( &op->o_conn->c_ndn ) ) {
|
||||||
|
authcDN = slap_empty_bv;
|
||||||
|
} else {
|
||||||
|
authcDN = op->o_conn->c_ndn;
|
||||||
|
}
|
||||||
rc = slap_sasl_matches( op, li->idassert_authz,
|
rc = slap_sasl_matches( op, li->idassert_authz,
|
||||||
&authcDN, & authcDN );
|
&authcDN, & authcDN );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
|
|
@ -836,7 +845,11 @@ ldap_back_proxy_authz_ctrl(
|
||||||
case LDAP_BACK_IDASSERT_SELF:
|
case LDAP_BACK_IDASSERT_SELF:
|
||||||
/* original behavior:
|
/* original behavior:
|
||||||
* assert the client's identity */
|
* assert the client's identity */
|
||||||
assertedID = BER_BVISNULL( &op->o_conn->c_ndn ) ? slap_empty_bv : op->o_conn->c_ndn;
|
if ( BER_BVISNULL( &op->o_conn->c_ndn ) ) {
|
||||||
|
assertedID = slap_empty_bv;
|
||||||
|
} else {
|
||||||
|
assertedID = op->o_conn->c_ndn;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LDAP_BACK_IDASSERT_ANONYMOUS:
|
case LDAP_BACK_IDASSERT_ANONYMOUS:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue