mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#8292 Fix ldif-filter, drop workaround for bug
This commit is contained in:
parent
0d9b8ebe4b
commit
cfdccc079c
@ -59,15 +59,21 @@ get_flags( const char *backend, const char *spec )
|
|||||||
{
|
{
|
||||||
size_t len = strlen( backend );
|
size_t len = strlen( backend );
|
||||||
unsigned flags = DUMMY_FLAG;
|
unsigned flags = DUMMY_FLAG;
|
||||||
const char *tmp;
|
const char *end, *tmp;
|
||||||
|
|
||||||
while ( '=' != *(spec += strncmp( spec, backend, len ) ? 0 : len) ) {
|
for ( ;; spec = end + ( *end != '\0' )) {
|
||||||
if ( (spec = strchr( spec, ',' )) == NULL ) {
|
if ( !*spec )
|
||||||
return 0;
|
return 0;
|
||||||
|
end = spec + strcspn( spec, "," );
|
||||||
|
if ( !(tmp = memchr( spec, '=', end-spec )))
|
||||||
|
break;
|
||||||
|
if ( tmp-spec == len && !memcmp( spec, backend, len )) {
|
||||||
|
spec = tmp+1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
++spec;
|
|
||||||
}
|
}
|
||||||
while ( *++spec && *spec != ',' ) {
|
|
||||||
|
for ( ; spec < end; spec++ ) {
|
||||||
if ( (tmp = strchr( spec_options, *spec )) == NULL ) {
|
if ( (tmp = strchr( spec_options, *spec )) == NULL ) {
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
@ -520,7 +520,7 @@ if test $RC != 0 ; then
|
|||||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||||
exit $RC
|
exit $RC
|
||||||
fi
|
fi
|
||||||
$LDIFFILTER -s $BACKEND=a < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
|
$LDIFFILTER -s a < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
|
||||||
n=`expr $n + 1`
|
n=`expr $n + 1`
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user