summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-10-12 16:53:03 +0000
committerRich Megginson <rmeggins@redhat.com>2007-10-12 16:53:03 +0000
commit9f835473fe0893bc202d49a1069c0b7be5c0cab0 (patch)
tree2f0ca88fdd690200fbb23ffdc8bcc03edcb5d139 /ldap/servers/slapd
parent983f92b2435a712441c403e1fb6f42b679bfaa89 (diff)
downloadds-9f835473fe0893bc202d49a1069c0b7be5c0cab0.tar.gz
ds-9f835473fe0893bc202d49a1069c0b7be5c0cab0.tar.xz
ds-9f835473fe0893bc202d49a1069c0b7be5c0cab0.zip
Resolves: bug 288291
Bug Description: add an view object inside a view object that has an improper nsviewfilter crashes the server Reviewed by: nhosoi (Thanks!) Fix Description: I could not reproduce the problem by simply adding the bogus nsviewfilter. The server seemed to run fine, but I didn't stress it. However, if I restarted the server, the server would core during startup. The last message in the error log would say something about recovering the database, which is probably why the bug reporter said that it will not recover the database. The problem doesn't appear to be with views specifically, but with any internal search which uses the search_internal_callback_pb() (as opposed to the non callback internal search) and there are search base rewriters (such as the views code). The aci code uses this type of search at startup to find the acis, and that's where I saw the crash. I could crash the server at startup regardless of whether the view filter was bogus or not. The problem is that we are not passing in the address of new_base to slapi_ch_free. The fix is to use slapi_ch_free_string and pass in the address of the string. That fixes the crash. I also cleaned up a few places in the views code which was not checking to see if slapi_str2filter returned NULL, which would happen in the case of the bogus search filter. I also added an error message which will tell the user that filter X in entry Y is bogus. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
Diffstat (limited to 'ldap/servers/slapd')
-rw-r--r--ldap/servers/slapd/plugin_internal_op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/plugin_internal_op.c b/ldap/servers/slapd/plugin_internal_op.c
index 35021e8b..e936c1a1 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -768,7 +768,7 @@ done:
}
if(original_base != new_base)
- slapi_ch_free((void**)new_base);
+ slapi_ch_free_string(&new_base);
/* we strdup'd this above - need to free */
slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET_DN, &original_base);