From: Ondřej Kuzník Date: Wed, 23 Oct 2024 09:19:57 +0000 (+0100) Subject: ITS#9393 Expose and document ldap_pvt_put_filter X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5acbc6e994095538b85bb6a927bcb691be7134d1;p=thirdparty%2Fopenldap.git ITS#9393 Expose and document ldap_pvt_put_filter --- diff --git a/doc/man/man3/ldap_search.3 b/doc/man/man3/ldap_search.3 index 9fa78ae714..6bf8a6ff57 100644 --- a/doc/man/man3/ldap_search.3 +++ b/doc/man/man3/ldap_search.3 @@ -43,6 +43,12 @@ struct timeval *\fItimeout\fB, int \fIsizelimit\fB, LDAPMessage **\fIres\fB ); .RE +.LP +.ft B +#include +.LP +.BI "int ldap_pvt_put_filter( BerElement *" ber ", const char *" str " );" +.RE .SH DESCRIPTION These routines are used to perform LDAP search operations. The @@ -105,6 +111,18 @@ case of failure, indicating the nature of the failure of the operation. See .BR ldap_error (3) for details. +.LP +.B ldap_pvt_put_filter() +parses a string filter provided in +.IR str , +performs structural validation and serializes it into the BerElement +passed in +.I ber +as a side-effect. On error, the encoding state of +.IR ber +is not specified in any way. There is currently no way to learn what part of +the string caused the validation to fail. +.LP .SH NOTES Note that both read and list functionality are subsumed by these routines, @@ -139,6 +157,7 @@ routine. .SH SEE ALSO .BR ldap (3), .BR ldap_result (3), -.BR ldap_error (3) +.BR ldap_error (3), +.BR lber-types (3) .SH ACKNOWLEDGEMENTS .so ../Project diff --git a/include/ldap_pvt.h b/include/ldap_pvt.h index 13aefe1d70..94c8acaca6 100644 --- a/include/ldap_pvt.h +++ b/include/ldap_pvt.h @@ -384,10 +384,6 @@ LDAP_F (int) ldap_pvt_sasl_generic_install LDAP_P(( Sockbuf *sb, LDAP_F (void) ldap_pvt_sasl_generic_remove LDAP_P(( Sockbuf *sb )); /* search.c */ -LDAP_F( int ) ldap_pvt_put_filter LDAP_P(( - BerElement *ber, - const char *str )); - LDAP_F( char * ) ldap_pvt_find_wildcard LDAP_P(( const char *s )); diff --git a/include/openldap.h b/include/openldap.h index 4b65750bf7..62fcc7366d 100644 --- a/include/openldap.h +++ b/include/openldap.h @@ -34,6 +34,10 @@ ldap_init_fd LDAP_P(( LDAP_CONST char *url, LDAP **ldp )); +LDAP_F( int ) ldap_pvt_put_filter LDAP_P(( + BerElement *ber, + const char *str )); + LDAP_END_DECL #endif /* _OPENLDAP_H */