mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 06:59:54 -05:00
ITS#9121 fix for URLs with no filter
This commit is contained in:
parent
e749750a8f
commit
4c7787303c
1 changed files with 8 additions and 2 deletions
|
|
@ -1047,6 +1047,7 @@ dynlist_search1resp( Operation *op, SlapReply *rs )
|
|||
dyn->dy_dli = ds->ds_dli;
|
||||
dyn->dy_name.bv_len = rs->sr_entry->e_nname.bv_len;
|
||||
if ( a ) {
|
||||
Filter *f;
|
||||
/* parse and validate the URIs */
|
||||
for (i=0; i<a->a_numvals; i++) {
|
||||
if (ldap_url_parse( a->a_vals[i].bv_val, &ludp ) != LDAP_URL_SUCCESS )
|
||||
|
|
@ -1066,12 +1067,17 @@ dynlist_search1resp( Operation *op, SlapReply *rs )
|
|||
/* cheat here, reuse fields */
|
||||
ludp->lud_port = nbase.bv_len;
|
||||
if ( ludp->lud_filter && *ludp->lud_filter ) {
|
||||
Filter *f = str2filter( ludp->lud_filter );
|
||||
f = str2filter( ludp->lud_filter );
|
||||
if ( f == NULL )
|
||||
goto skipit;
|
||||
ldap_memfree( ludp->lud_filter );
|
||||
ludp->lud_filter = (char *)f;
|
||||
} else {
|
||||
f = ch_malloc( sizeof( Filter ));
|
||||
f->f_choice = SLAPD_FILTER_COMPUTED;
|
||||
f->f_result = LDAP_COMPARE_TRUE;
|
||||
f->f_next = NULL;
|
||||
}
|
||||
ludp->lud_filter = (char *)f;
|
||||
dyn->dy_uris[j] = ludp;
|
||||
j++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue