From: Marco Bettini Date: Fri, 20 Sep 2024 13:38:45 +0000 (+0000) Subject: lib-ldap: ldap_client_settings - Move to ldap-settings.h X-Git-Tag: 2.4.0~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=961bab1ff2aec64d24c8a8fc6c13d722521c7665;p=thirdparty%2Fdovecot%2Fcore.git lib-ldap: ldap_client_settings - Move to ldap-settings.h --- diff --git a/src/lib-ldap/Makefile.am b/src/lib-ldap/Makefile.am index d2b688cd95..63b3d19c4d 100644 --- a/src/lib-ldap/Makefile.am +++ b/src/lib-ldap/Makefile.am @@ -14,6 +14,7 @@ libdldap_la_SOURCES = \ ldap-connection-pool.c \ ldap-iterator.c \ ldap-search.c \ + ldap-settings.c \ ldap-compare.c \ ldap-entry.c @@ -32,6 +33,7 @@ headers = \ noinst_HEADERS = \ ldap-connection-pool.h \ ldap-private.h \ + ldap-settings.h \ ldap-settings-parse.h pkginc_libdir=$(pkgincludedir) diff --git a/src/lib-ldap/ldap-client.h b/src/lib-ldap/ldap-client.h index ce10332f78..bb9b6de5b3 100644 --- a/src/lib-ldap/ldap-client.h +++ b/src/lib-ldap/ldap-client.h @@ -1,6 +1,8 @@ #ifndef LDAP_CLIENT_H #define LDAP_CLIENT_H +#include "ldap-settings.h" + enum ldap_scope { LDAP_SEARCH_SCOPE_BASE = 0x0000, LDAP_SEARCH_SCOPE_ONE = 0x0001, @@ -18,23 +20,6 @@ struct ldap_entry; callback finishes. */ typedef void ldap_result_callback_t(struct ldap_result *result, void *context); -struct ldap_client_settings { - /* NOTE: when adding here, remember to update - ldap_connection_have_settings() and ldap_connection_init() */ - const char *uris; - const char *auth_dn; - const char *auth_dn_password; - - struct event *event_parent; - const struct ssl_iostream_settings *ssl_ioset; - - unsigned int timeout_secs; - unsigned int max_idle_time_secs; - unsigned int debug_level; - bool require_ssl; - bool starttls; -}; - struct ldap_search_input { const char *base_dn; const char *filter; diff --git a/src/lib-ldap/ldap-settings.c b/src/lib-ldap/ldap-settings.c new file mode 100644 index 0000000000..f32f380050 --- /dev/null +++ b/src/lib-ldap/ldap-settings.c @@ -0,0 +1 @@ +/* Copyright (c) 2024 Dovecot authors, see the included COPYING file */ diff --git a/src/lib-ldap/ldap-settings.h b/src/lib-ldap/ldap-settings.h new file mode 100644 index 0000000000..f55b54d75f --- /dev/null +++ b/src/lib-ldap/ldap-settings.h @@ -0,0 +1,21 @@ +#ifndef LDAP_SETTINGS_H +#define LDAP_SETTINGS_H + +struct ldap_client_settings { + pool_t pool; + + const char *uris; + const char *auth_dn; + const char *auth_dn_password; + + unsigned int timeout_secs; + unsigned int max_idle_time_secs; + unsigned int debug_level; + bool require_ssl; + bool starttls; + + struct event *event_parent; + const struct ssl_iostream_settings *ssl_ioset; +}; + +#endif