From c956f4f98205c376062c4d634fd4ba4fb41031e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 May 2005 08:26:26 +0000 Subject: r6745: - escape spaces in binary ldap blobs - expose the ldap filter string parsing outside of ldap.c (This used to be commit b644ff6fe164fbe359c47e4d34f5ad490ff61d5b) --- source4/libcli/ldap/ldap.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source4/libcli/ldap/ldap.c') diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index 1a4f323ebf..9a8a7bb589 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -150,7 +150,7 @@ static const char *ldap_binary_encode(TALLOC_CTX *mem_ctx, DATA_BLOB blob) char *ret; int len = blob.length; for (i=0;i ::= '(' ')' */ static struct ldap_parse_tree *ldap_parse_filter(TALLOC_CTX *mem_ctx, - const char **s) + const char **s) { char *l, *s2; const char *p, *p2; @@ -1335,3 +1335,13 @@ BOOL ldap_parse_basic_url(TALLOC_CTX *mem_ctx, const char *url, } + +/* + externally callable version of filter string parsing - used in the + cldap server +*/ +struct ldap_parse_tree *ldap_parse_filter_string(TALLOC_CTX *mem_ctx, + const char *s) +{ + return ldap_parse_filter(mem_ctx, &s); +} -- cgit