[389-devel] plugin problem using slapi_entry_attr_find

2014-01-16 Thread Deas, Jim
My bet, a rookie mistake. Am I forgetting to init a pointer etc??? Adding the line surrounded by ** in this routine makes dirsrv unstable and crashes it after a few queries. /* Registered preop_result routine */ int gnest_preop_results( Slapi_PBlock *pb){ Slapi_Entry *e;

Re: [389-devel] plugin problem using slapi_entry_attr_find

2014-01-16 Thread Deas, Jim
On further review it appears that the line in question will crash Dirsrv on some request from PAM or even 389-Console but not when searching groups via ldapsearch Should there be a statement that determines what type of query triggered the preop_result so I know if it’s proper to look for

Re: [389-devel] plugin problem using slapi_entry_attr_find

2014-01-16 Thread Rich Megginson
Another bug in your code. The argument for SLAPI_SEARCH_ATTRS should be the address of a char **.e.g. { char **attrs; int ii = 0; ... if (slapi_pblock_get( pb, SLAPI_SEARCH_ATTRS, attrs) !=0 )return (-1); for (ii = 0; attrs attrs[ii]; ++ii) {

Re: [389-devel] plugin problem using slapi_entry_attr_find

2014-01-16 Thread Nathan Kinder
On 01/16/2014 03:14 PM, Deas, Jim wrote: Rich, Thanks. I actually did have the address of operator on the code. Both the init and config are defining only a couple of specific functions (start_fn, pre_results_fn,pre_abandon_fn) one function defined for each. The one I am testing is

Re: [389-devel] plugin problem using slapi_entry_attr_find

2014-01-16 Thread Rich Megginson
On 01/16/2014 04:49 PM, Deas, Jim wrote: I caught the pointer issue after my last post. I misunderstood the process thinking I have to download a master pblock then use a reference from that for obtaining values. I am trying to intercept queries that are returning posix group information and