diff options
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/plugins/cos/cos_cache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c index b62e63b1..e46e0ab3 100644 --- a/ldap/servers/plugins/cos/cos_cache.c +++ b/ldap/servers/plugins/cos/cos_cache.c @@ -2517,12 +2517,13 @@ static int cos_cache_query_attr(cos_cache *ptheCache, vattr_context *context, Sl if(props) *props = 0; - if(hit == 1 && props && pDefAttr) { + if(hit == 1 && props) { if ( - ((using_default && pDefAttr->attr_operational == 1) || - (!using_default && pCache->ppAttrIndex[attr_matched_index]->attr_operational == 1)) || - ((using_default && pDefAttr->attr_operational_default == 1) || - (!using_default && pCache->ppAttrIndex[attr_matched_index]->attr_operational_default == 1)) ) + (using_default && pDefAttr && + ((pDefAttr->attr_operational == 1) || (pDefAttr->attr_operational_default == 1))) || + (!using_default && pCache && pCache->ppAttrIndex && pCache->ppAttrIndex[attr_matched_index] && + ((pCache->ppAttrIndex[attr_matched_index]->attr_operational == 1) || + (pCache->ppAttrIndex[attr_matched_index]->attr_operational_default == 1)))) { /* this is an operational attribute, lets mark it so */ *props |= SLAPI_ATTR_FLAG_OPATTR; |