[Fedora-directory-users] Error performing an internal search

Nalin Dahyabhai nalin at redhat.com
Mon Jul 28 18:18:48 UTC 2008


On Mon, Jul 28, 2008 at 11:19:15AM +0200, Mac.gp wrote:
>    Hello everyone.
>    I'm trying to perform an internal search from a PRE_SEARCH plugin, but
>    I get this error in the logs:
>    allow_operation: component identity is NULL
>    I think it has some trouble with the slapi_componentid. I declare it in
>    my plugin with this:
>    static Slapi_ComponentId * plugin_id = NULL;
>    Am I doing something wrong? Any suggestion to resolve this?
>    Thanks to all from now.

You need to pass in a valid value -- I'd suggest reading the
SLAPI_PLUGIN_IDENTITY value from the Slapi_PBlock which is passed to
your module's initialization function, and saving it (along with
whatever else you like) for future use as your SLAPI_PLUGIN_PRIVATE
value.

The value that SLAPI_PLUGIN_IDENTITY has when your search function is
called is the one which was passed in by the module that initiated the
search.  Your own module will be called (along with others) to satisfy
your internal searches, so to avoid recursion, you'll probably want to
compare the pointer value that the Slapi_PBlock contains when the
function is called to the value for your module, and then return early
if they're the same.

HTH,

Nalin




More information about the 389-users mailing list