From ccc4d0d5ae83632b4abcaf3c0fe7a47d27fb1eaa Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 2 Jan 2002 20:31:21 +0000 Subject: [PATCH] Fix extensible filters --- libraries/libldap/filter.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index 7dded23d02..4f475830ad 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -591,18 +591,23 @@ put_simple_filter( if( rc != -1 && *str != '\0' ) { rc = ber_printf( ber, "ts", LDAP_FILTER_EXT_TYPE, str ); } - if( rc != -1 ) { ber_slen_t len = ldap_pvt_filter_value_unescape( value ); if( len >= 0 ) { - rc = ber_printf( ber, /*"{"*/ "totbN}", - LDAP_FILTER_EXT_VALUE, value, len, - LDAP_FILTER_EXT_DNATTRS, dn != NULL); + rc = ber_printf( ber, "to", + LDAP_FILTER_EXT_VALUE, value, len ); } else { rc = -1; } } + if( rc != -1 && dn ) { + rc = ber_printf( ber, "tb", + LDAP_FILTER_EXT_DNATTRS, (ber_int_t) 1 ); + } + if( rc != -1 ) { + rc = ber_printf( ber, /*"{"*/ "N}" ); + } } goto done; -- 2.39.5