From: Pierangelo Masarati Date: Fri, 26 Aug 2005 14:43:15 +0000 (+0000) Subject: refine last commit (let "proxied" attrs be registered in between the request and... X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~563 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=421f09435d15ed2cc001b10ac1fa449e72d990e0;p=openldap refine last commit (let "proxied" attrs be registered in between the request and the response...); silence misc signedness warnings --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index cc9a8fd889..79f58db404 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -178,7 +178,7 @@ int slap_bv2ad( desc.ad_cname = *bv; name = bv->bv_val; options = strchr( name, ';' ); - if ( options != NULL && ( options - name ) < bv->bv_len ) { + if ( options != NULL && (unsigned) ( options - name ) < bv->bv_len ) { /* don't go past the end of the berval! */ desc.ad_cname.bv_len = options - name; } else { @@ -250,7 +250,7 @@ int slap_bv2ad( rc = strncasecmp( opt, tags[i].bv_val, (unsigned) optlen < tags[i].bv_len - ? optlen : tags[i].bv_len ); + ? (unsigned) optlen : tags[i].bv_len ); if( rc == 0 && (unsigned)optlen == tags[i].bv_len ) { /* duplicate (ignore) */ @@ -388,7 +388,7 @@ done:; if( lp != desc.ad_tags.bv_val ) { *cp++ = ';'; j = (lp - ? lp - desc.ad_tags.bv_val - 1 + ? (unsigned) (lp - desc.ad_tags.bv_val - 1) : strlen( desc.ad_tags.bv_val )); cp = lutil_strncopy(cp, desc.ad_tags.bv_val, j); } @@ -664,15 +664,12 @@ int ad_inlist( } } else { - /* short-circuit this search next time around */ - if (!slap_schema.si_at_undefined->sat_ad) { - const char *text; - slap_bv2undef_ad(&attrs->an_name, - &attrs->an_desc, &text, 0); - } else { - attrs->an_desc = - slap_schema.si_at_undefined->sat_ad; - } + const char *text; + + /* give it a chance of being retrieved by a proxy... */ + (void)slap_bv2undef_ad( &attrs->an_name, + &attrs->an_desc, &text, + SLAP_AD_PROXIED|SLAP_AD_NOINSERT ); } }