Skip to content
Snippets Groups Projects
Commit 46bc4dc2 authored by Stephan Bosch's avatar Stephan Bosch Committed by Timo Sirainen
Browse files

lib-sieve: storage: ldap: sieve-ldap-storage-settings - Rename parsed settings struct fields

parent 2a343541
No related branches found
No related tags found
No related merge requests found
...@@ -676,7 +676,7 @@ static int db_ldap_set_tls_options(struct ldap_connection *conn) ...@@ -676,7 +676,7 @@ static int db_ldap_set_tls_options(struct ldap_connection *conn)
return -1; return -1;
if (set->tls_require_cert != NULL) { if (set->tls_require_cert != NULL) {
if (db_ldap_set_opt(conn, LDAP_OPT_X_TLS_REQUIRE_CERT, if (db_ldap_set_opt(conn, LDAP_OPT_X_TLS_REQUIRE_CERT,
&set->ldap_tls_require_cert, &set->parsed.tls_require_cert,
"tls_require_cert", "tls_require_cert",
set->tls_require_cert) < 0) set->tls_require_cert) < 0)
return -1; return -1;
...@@ -702,7 +702,7 @@ static int db_ldap_set_options(struct ldap_connection *conn) ...@@ -702,7 +702,7 @@ static int db_ldap_set_options(struct ldap_connection *conn)
unsigned int ldap_version; unsigned int ldap_version;
int value; int value;
if (db_ldap_set_opt(conn, LDAP_OPT_DEREF, &set->ldap_deref, if (db_ldap_set_opt(conn, LDAP_OPT_DEREF, &set->parsed.deref,
"deref", set->deref) < 0) "deref", set->deref) < 0)
return -1; return -1;
#ifdef LDAP_OPT_DEBUG_LEVEL #ifdef LDAP_OPT_DEBUG_LEVEL
...@@ -1245,7 +1245,7 @@ int sieve_ldap_db_lookup_script(struct ldap_connection *conn, const char *name, ...@@ -1245,7 +1245,7 @@ int sieve_ldap_db_lookup_script(struct ldap_connection *conn, const char *name,
return -1; return -1;
} }
request->request.scope = lstorage->set->ldap_scope; request->request.scope = lstorage->set->parsed.scope;
request->request.filter = p_strdup(pool, str_c(str)); request->request.filter = p_strdup(pool, str_c(str));
request->request.attributes = attr_names; request->request.attributes = attr_names;
......
...@@ -161,13 +161,13 @@ sieve_ldap_settings_check(struct sieve_ldap_storage_settings *set, ...@@ -161,13 +161,13 @@ sieve_ldap_settings_check(struct sieve_ldap_storage_settings *set,
env_put("LDAPRC", set->ldaprc_path); env_put("LDAPRC", set->ldaprc_path);
} }
if (ldap_deref_from_str(set->deref, &set->ldap_deref) < 0) { if (ldap_deref_from_str(set->deref, &set->parsed.deref) < 0) {
*error_r = t_strdup_printf( *error_r = t_strdup_printf(
"Invalid deref option '%s'", set->deref); "Invalid deref option '%s'", set->deref);
return FALSE; return FALSE;
} }
if (ldap_scope_from_str(set->scope, &set->ldap_scope) < 0) { if (ldap_scope_from_str(set->scope, &set->parsed.scope) < 0) {
*error_r = t_strdup_printf( *error_r = t_strdup_printf(
"Invalid scope option '%s'", set->scope); "Invalid scope option '%s'", set->scope);
return FALSE; return FALSE;
...@@ -177,7 +177,7 @@ sieve_ldap_settings_check(struct sieve_ldap_storage_settings *set, ...@@ -177,7 +177,7 @@ sieve_ldap_settings_check(struct sieve_ldap_storage_settings *set,
if (set->tls_require_cert != NULL && if (set->tls_require_cert != NULL &&
ldap_tls_require_cert_from_str( ldap_tls_require_cert_from_str(
set->tls_require_cert, set->tls_require_cert,
&set->ldap_tls_require_cert) < 0) { &set->parsed.tls_require_cert) < 0) {
*error_r = t_strdup_printf( *error_r = t_strdup_printf(
"Invalid tls_require_cert option '%s'", "Invalid tls_require_cert option '%s'",
set->tls_require_cert); set->tls_require_cert);
......
...@@ -33,7 +33,9 @@ struct sieve_ldap_storage_settings { ...@@ -33,7 +33,9 @@ struct sieve_ldap_storage_settings {
const char *sieve_ldap_filter; const char *sieve_ldap_filter;
/* ... */ /* ... */
int ldap_deref, ldap_scope, ldap_tls_require_cert; struct {
int deref, scope, tls_require_cert;
} parsed;
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.