From: Kurt Zeilenga Date: Wed, 26 Dec 2001 21:25:04 +0000 (+0000) Subject: Fix syntax errors caused by struct berval changes... X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~481 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0b83b30961ef0c2afc038a1f997068e235d8b25;p=openldap Fix syntax errors caused by struct berval changes... --- diff --git a/servers/slapd/back-dnssrv/search.c b/servers/slapd/back-dnssrv/search.c index 40a5f294be..09cade5256 100644 --- a/servers/slapd/back-dnssrv/search.c +++ b/servers/slapd/back-dnssrv/search.c @@ -22,8 +22,8 @@ dnssrv_back_search( Backend *be, Connection *conn, Operation *op, - const char *dn, - const char *ndn, + struct berval *dn, + struct berval *ndn, int scope, int deref, int size, @@ -43,14 +43,14 @@ dnssrv_back_search( assert( get_manageDSAit( op ) ); - if( ldap_dn2domain( dn, &domain ) ) { + if( ldap_dn2domain( dn->bv_val, &domain ) ) { send_ldap_result( conn, op, LDAP_REFERRAL, NULL, NULL, default_referral, NULL ); goto done; } Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> domain=\"%s\"\n", - dn == NULL ? "" : dn, + dn->bv_len ? dn->bv_val : "", domain == NULL ? "" : domain, 0 ); @@ -91,12 +91,13 @@ dnssrv_back_search( Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d DNSSRV p=%d dn=\"%s\" url=\"%s\"\n", - op->o_connid, op->o_opid, op->o_protocol, dn, urls[0]->bv_val ); + op->o_connid, op->o_opid, op->o_protocol, + dn->bv_len ? dn->bv_val : "", urls[0]->bv_val ); Debug( LDAP_DEBUG_TRACE, "DNSSRV: ManageDSAit scope=%d dn=\"%s\" -> url=\"%s\"\n", scope, - dn == NULL ? "" : dn, + dn->bv_len ? dn->bv_val : "", urls[0]->bv_val ); rc = ldap_domain2dn(domain, &refdn); @@ -111,14 +112,14 @@ dnssrv_back_search( nrefdn = ch_strdup( refdn ); dn_normalize(nrefdn); - if( strcmp( nrefdn, ndn ) != 0 ) { + if( strcmp( nrefdn, ndn->bv_val ) != 0 ) { /* requested dn is subordinate */ Debug( LDAP_DEBUG_TRACE, - "DNSSRV: dn=\"%s\" subordindate to refdn=\"%s\"\n", - dn == NULL ? "" : dn, - refdn == NULL ? "" : refdn, - NULL ); + "DNSSRV: dn=\"%s\" subordindate to refdn=\"%s\"\n", + dn->bv_len ? dn->bv_val : "", + refdn == NULL ? "" : refdn, + NULL ); send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, refdn, NULL, @@ -135,8 +136,10 @@ dnssrv_back_search( AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass; AttributeDescription *ad_ref = slap_schema.si_ad_ref; - e->e_dn = strdup( dn ); - e->e_ndn = strdup( ndn ); + e->e_dn = strdup( dn->bv_val ); + e->e_name.bv_len = dn->bv_len; + e->e_ndn = strdup( ndn->bv_val ); + e->e_nname.bv_len = ndn->bv_len; e->e_attrs = NULL; e->e_private = NULL; diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index ea49a5384b..d8945b15a9 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -372,7 +372,7 @@ char *slap_sasl2dn( char *saslname ) if( rc != LDAP_SUCCESS ) goto FINISHED; - (*be->be_search)( be, conn, conn->c_ops, /*base=*/NULL, searchbase.bv_val, + (*be->be_search)( be, conn, conn->c_ops, /*base*/NULL, &searchbase, scope, /*deref=*/1, /*sizelimit=*/1, /*time=*/0, filter, /*fstr=*/NULL, /*attrs=*/NULL, /*attrsonly=*/0 ); @@ -496,7 +496,7 @@ int slap_sasl_match( char *rule, char *assertDN, char *authc ) if( rc != LDAP_SUCCESS ) goto CONCLUDED; - (*be->be_search)( be, conn, conn->c_ops, /*base=*/NULL, searchbase.bv_val, + (*be->be_search)( be, conn, conn->c_ops, /*base=*/NULL, &searchbase, scope, /*deref=*/1, /*sizelimit=*/0, /*time=*/0, filter, /*fstr=*/NULL, /*attrs=*/NULL, /*attrsonly=*/0 );