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

Re: back-dnssrv



>
> back-dnssrv seems to be lately broken.
>
> First, I'm not quite sure what the purpose of the following
> assertion is, but it crashes slapd for normal searches:
>
> 	assert( get_manageDSAit( op ) );
>
> Should it perhaps be inverted? This is in dnssrv_back_search()
> and dnssrv_back_compare().
>
> Secondly, rs->sr_ref is uninitialized, which causes a further
> assertion failure in send_ldap_response().

I'll have a look at it; probably the new ABI upgrade left over
some typos/flaws.

p.

>
> A fix would be as follows:
>
> lukeh@off/monk[1050]% cvs diff -u back-dnssrv/search.c
> Index: back-dnssrv/search.c
> =================================================================== RCS
> file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-dnssrv/search.c,v
> retrieving revision 1.24
> diff -u -r1.24 search.c
> --- back-dnssrv/search.c        30 Mar 2003 07:03:54 -0000      1.24 +++
> back-dnssrv/search.c        8 Apr 2003 06:04:02 -0000
> @@ -31,7 +31,7 @@
>         struct berval nrefdn = { 0, NULL };
>         BerVarray urls = NULL;
>
> -       assert( get_manageDSAit( op ) );
> +//     assert( get_manageDSAit( op ) );
>
>         if( ldap_dn2domain( op->o_req_dn.bv_val, &domain ) || domain ==
> NULL ) {
>                 rs->sr_err = LDAP_REFERRAL;
> @@ -39,6 +39,8 @@
>                 send_ldap_result( op, rs );
>                 goto done;
>         }
> +
> +       rs->sr_ref = NULL;
>
>         Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> domain=\"%s\"\n",
>                 op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "", domain,
> 0 );
>
> regards,
>
> -- Luke
> --
> Luke Howard | PADL Software Pty Ltd | www.padl.com


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it