[Fedora-directory-devel] Please review: Bug 288291: add an view object inside a view object that has an improper nsviewfilter crashes the server

Richard Megginson rmeggins at redhat.com
Fri Oct 12 04:04:15 UTC 2007


https://bugzilla.redhat.com/show_bug.cgi?id=288291
Resolves: bug 288291
Bug Description: add an view object inside a view object that has an 
improper nsviewfilter crashes the server
Reviewed by: ???
Files: see diff
Branch: HEAD
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
https://bugzilla.redhat.com/attachment.cgi?id=224951&action=diff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20071011/f646aaab/attachment.bin>


More information about the Fedora-directory-devel mailing list