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

Re: slapadd segfault due to slapd.conf [2.0.15 / 2.0.17]



> Hi
> 
> I had exactly the same problem and it persists also in 2.0.18.
> Applying the following patch to servers/slurpd/config.c did it...
> 
> --- servers/slurpd/config.c.orig
> +++ servers/slurpd/config.c
> @@ -381,7 +381,7 @@
>  	    }
>  	    ri->ri_hostname = strdup( val );
>  	    gots |= GOT_HOST;
> -	} else if ( !strncasecmp( cargv[ i ], SUFFIXSTR, strlen( HOSTSTR ))) {
> +	} else if ( !strncasecmp( cargv[ i ], SUFFIXSTR, strlen( SUFFIXSTR ))) {
>  	    /* ignore it */ ;
>  	} else if ( !strncasecmp( cargv[ i ], TLSSTR, strlen( TLSSTR ))) {
>  	    val = cargv[ i ] + strlen( TLSSTR ) + 1;

I must have missed it, thanks for catching. Anyway, this shouldn't have 
anything to do with that failure; the failure of the tools (slapadd and so)
was related to some code shared among slapd and the tools themselves, 
which resulted in dereferencing a null pointer in the tools when
the "suffix=" line was used in slapd.conf; in the present case, a match
against "suffi" instead of "suffix=" was performed in order to ignore
the suffix directive. In fact, slurpd itself has nothing to deal with
the suffix directive: it is slapd that sends to a certain replica only
the entries that are pertinent based on the suffix directive.

I'm committing the fix to HEAD, with some extra cleanup.

Pierangelo.