[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: saslauxprop and libldapdb, auxpropfunc error -7

> -----Original Message-----
> From: Rob Siemborski [mailto:rjs3@andrew.cmu.edu]
> Sent: Thursday, March 06, 2003 6:28 AM
> To: Howard Chu
> Cc: 'Igor Brezac'; 'Joe Rhodes'; OpenLDAP-software@OpenLDAP.org;
> cyrus-sasl@lists.andrew.cmu.edu
> Subject: RE: saslauxprop and libldapdb, auxpropfunc error -7
> On Thu, 6 Mar 2003, Howard Chu wrote:
> > I take that all back. There's still something broken, I
> just haven't found it
> > yet, and I've been up far too late tonight to say anything
> coherent about it
> > now.
> The library always hands plugins the internal getopt function
> because it
> performs getopt lookups by calling both the connection-specific getopt
> function and the global getopt function (as well as potentially an
> application-specific config file).  Handing the getopt
> callback directly
> to the plugin won't accomplish this.
> If you do fingure out what trouble you're having, though, let us know.

OK, this time for sure: sasl_auxprop_add_plugin invokes the plugin with
sasl_global_utils (lib/auxprop.c:804)
804         result = auxpropfunc(sasl_global_utils,
805                              &out_version, &plug, plugname);

sasl_global_utils has a NULL context. It is created this way by
_sasl_common_init (lib/common.c:421)
    /* Setup the global utilities */
    if(!sasl_global_utils) {
        sasl_global_utils = _sasl_alloc_utils(NULL, NULL);
        if(sasl_global_utils == NULL) return SASL_NOMEM;

It passes a NULL context to _sasl_alloc_utils; it should be passing
&global_callbacks instead.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support