]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-dnssrv/referral.c
More ACL to dn="" bug fixing... and add test006-acl check
[openldap] / servers / slapd / back-dnssrv / referral.c
index 4a102b61422fcea940276126ca46e577daaf8180..6d7e240dcecf9ecdfa712763c80a051c420866b5 100644 (file)
@@ -29,7 +29,7 @@ dnssrv_back_referrals(
        char *domain = NULL;
        char *hostlist = NULL;
        char **hosts = NULL;
-       BVarray urls = NULL;
+       BerVarray urls = NULL;
 
        if( ndn->bv_len == 0 ) {
                *text = "DNS SRV operation upon null (empty) DN disallowed";
@@ -56,7 +56,7 @@ dnssrv_back_referrals(
                domain == NULL ? "" : domain,
                0 );
 
-       if( rc = ldap_domain2hostlist( domain, &hostlist ) ) {
+       if( ( rc = ldap_domain2hostlist( domain, &hostlist ) ) ) {
                Debug( LDAP_DEBUG_TRACE,
                        "DNSSRV: domain2hostlist(%s) returned %d\n",
                        domain, rc, 0 );
@@ -82,7 +82,7 @@ dnssrv_back_referrals(
                strcpy( url.bv_val, "ldap://" );
                strcpy( &url.bv_val[sizeof("ldap://")-1], hosts[i] );
 
-               if ( bvarray_add( &urls, &url ) < 0 ) {
+               if ( ber_bvarray_add( &urls, &url ) < 0 ) {
                        free( url.bv_val );
                        *text = "problem processing DNS SRV records for DN";
                        goto done;
@@ -90,7 +90,7 @@ dnssrv_back_referrals(
        }
 
        Statslog( LDAP_DEBUG_STATS,
-           "conn=%ld op=%d DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
+           "conn=%lu op=%lu DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
            op->o_connid, op->o_opid, op->o_protocol,
                dn->bv_val, urls[0].bv_val );
 
@@ -104,6 +104,6 @@ done:
        if( domain != NULL ) ch_free( domain );
        if( hostlist != NULL ) ch_free( hostlist );
        if( hosts != NULL ) charray_free( hosts );
-       bvarray_free( urls );
+       ber_bvarray_free( urls );
        return rc;
 }