Skip to content
Snippets Groups Projects
Commit 7488f557 authored by Howard Chu's avatar Howard Chu
Browse files

Fix entry_get, only check mapped attr if attr was provided

parent 6e17b606
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment