From 7488f557cd22e1afce3e321f06ed836701b09371 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 25 May 2004 04:54:32 +0000 Subject: [PATCH] Fix entry_get, only check mapped attr if attr was provided --- servers/slapd/back-ldap/search.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 9b12268b7a..6da4f608d9 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -571,17 +571,17 @@ ldap_back_entry_get( rc = 1; goto cleanup; } + is_oc = (strcasecmp("objectclass", mapped.bv_val) == 0); + if (oc && !is_oc) { + gattr[0] = "objectclass"; + gattr[1] = mapped.bv_val; + gattr[2] = NULL; + } else { + gattr[0] = mapped.bv_val; + gattr[1] = NULL; + } } - is_oc = (strcasecmp("objectclass", mapped.bv_val) == 0); - if (oc && !is_oc) { - gattr[0] = "objectclass"; - gattr[1] = mapped.bv_val; - gattr[2] = NULL; - } else { - gattr[0] = mapped.bv_val; - gattr[1] = NULL; - } if (oc) { char *ptr; ldap_back_map(&li->rwmap.rwm_oc, &oc->soc_cname, &mapped, -- 2.39.5