]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_storage_service_read_settings() - Remove user_info_r parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 16 Nov 2022 23:17:38 +0000 (01:17 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 30 Nov 2022 12:49:09 +0000 (14:49 +0200)
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h
src/lmtp/lmtp-client.c
src/lmtp/lmtp-client.h
src/plugins/quota/quota-status.c

index 8e57ecf3668f84b83a98152466064944b4190d59..0179164138a876b70148dd4a32a0273180d69235 100644 (file)
@@ -1057,15 +1057,12 @@ mail_storage_service_add_storage_set_roots(struct mail_storage_service_ctx *ctx)
 
 int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
                                       const struct mail_storage_service_input *input,
-                                      const struct setting_parser_info **user_info_r,
                                       const struct setting_parser_context **parser_r,
                                       const char **error_r)
 {
        struct master_service_settings_input set_input;
-       const struct setting_parser_info *const *roots;
        struct master_service_settings_output set_output;
        enum mail_storage_service_flags flags;
-       unsigned int i;
 
        ctx->config_permission_denied = FALSE;
 
@@ -1127,16 +1124,7 @@ int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
                }
                *parser_r = ctx->service->set_parser;
        }
-
-       roots = settings_parser_get_roots(*parser_r);
-       for (i = 0; roots[i] != NULL; i++) {
-               if (strcmp(roots[i]->module_name,
-                          mail_user_setting_parser_info.module_name) == 0) {
-                       *user_info_r = roots[i];
-                       return 0;
-               }
-       }
-       i_unreached();
+       return 0;
 }
 
 void mail_storage_service_set_auth_conn(struct mail_storage_service_ctx *ctx,
@@ -1252,7 +1240,6 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
 {
        enum mail_storage_service_flags flags;
        const char *username = input->username;
-       const struct setting_parser_info *user_info;
        const struct mail_user_settings *user_set;
        const char *const *userdb_fields, *error;
        struct auth_user_reply reply;
@@ -1271,7 +1258,7 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
                mail_storage_service_seteuid_root();
        }
 
-       if (mail_storage_service_read_settings(ctx, input, &user_info,
+       if (mail_storage_service_read_settings(ctx, input,
                                               &set_parser, error_r) < 0) {
                if (ctx->config_permission_denied) {
                        /* just restart and maybe next time we will open the
@@ -1693,7 +1680,6 @@ void mail_storage_service_user_unref(struct mail_storage_service_user **_user)
 void mail_storage_service_init_settings(struct mail_storage_service_ctx *ctx,
                                        const struct mail_storage_service_input *input)
 {
-       const struct setting_parser_info *user_info;
        const struct mail_user_settings *user_set;
        const struct setting_parser_context *set_parser;
        const char *error;
@@ -1701,7 +1687,7 @@ void mail_storage_service_init_settings(struct mail_storage_service_ctx *ctx,
        if (ctx->conn != NULL)
                return;
 
-       if (mail_storage_service_read_settings(ctx, input, &user_info,
+       if (mail_storage_service_read_settings(ctx, input,
                                               &set_parser, &error) < 0)
                i_fatal("%s", error);
        user_set = settings_parser_get_root_set(set_parser,
index 18aa238c7b8cdf72406ec3c9da9d7dfe3a1c9f78..5756e19ec67ab5fc57da56e0465eb771e1b5a143 100644 (file)
@@ -86,7 +86,6 @@ void mail_storage_service_set_auth_conn(struct mail_storage_service_ctx *ctx,
                                        struct auth_master_connection *conn);
 int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
                                       const struct mail_storage_service_input *input,
-                                      const struct setting_parser_info **user_info_r,
                                       const struct setting_parser_context **parser_r,
                                       const char **error_r) ATTR_NULL(2);
 /* Read settings and initialize context to use them. Do nothing if service is
index 0f02517a5c2bd9101f6f7b9ce5a3ba8389b2eb3d..4c4c03700c3c7ecf278bf1891ef9398ecc022d92 100644 (file)
@@ -115,7 +115,6 @@ static void client_read_settings(struct client *client, bool ssl)
        input.username = "";
 
        if (mail_storage_service_read_settings(storage_service, &input,
-                                              &client->user_set_info,
                                               &set_parser, &error) < 0)
                i_fatal("%s", error);
 
index 26c249383432f8ace64ca867e46cb85adcd2fd6a..3c75eb8768b08c0c52620c188f30a84ab653756d 100644 (file)
@@ -73,7 +73,6 @@ struct client {
        struct lmtp_client_vfuncs v;
        struct event *event;
 
-       const struct setting_parser_info *user_set_info;
        const struct lda_settings *unexpanded_lda_set;
        const struct lmtp_settings *lmtp_set;
        const struct master_service_settings *service_set;
index 331a5efd806210622a4502e8a54410d66fb344eb..796e5c3975de48c5f368f388bd7e2b0e13df2bf8 100644 (file)
@@ -280,7 +280,6 @@ static void main_init(void)
                NULL
        };
        struct mail_storage_service_input input;
-       const struct setting_parser_info *user_info;
        const struct setting_parser_context *set_parser;
        const struct mail_user_settings *user_set;
        const char *value, *error;
@@ -300,7 +299,7 @@ static void main_init(void)
 
        quota_status_pool = pool_alloconly_create("quota status settings", 512);
        if (mail_storage_service_read_settings(storage_service, &input,
-                                              &user_info, &set_parser,
+                                              &set_parser,
                                               &error) < 0)
                i_fatal("%s", error);
        user_set = settings_parser_get_root_set(set_parser,