]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth-sasl - Add auth_sasl_ prefix to newly copied mechanism code
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 18 Mar 2023 14:12:14 +0000 (15:12 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
Now the naming conflict is gone and it is added to the build of the auth service.

src/auth/Makefile.am
src/auth/auth-sasl.c
src/auth/auth-sasl.h

index dc06918f228cd504df3876934864b14d641efb2e..ae952a036ac8718e410768c898a5d89451217e5c 100644 (file)
@@ -90,6 +90,7 @@ auth_common_sources = \
        auth-request-fields.c \
        auth-request-handler.c \
        auth-request-var-expand.c \
+       auth-sasl.c \
        auth-settings.c \
        auth-fields.c \
        auth-token.c \
@@ -148,6 +149,7 @@ headers = \
        auth-request-handler.h \
        auth-request-handler-private.h \
        auth-request-var-expand.h \
+       auth-sasl.h \
        auth-settings.h \
        auth-fields.h \
        auth-token.h \
index 923bad4c9d82eeff47abd62c57cff5feae48d71a..9ae6935210fd06d1cf6c89dd85ab52ee63722ea6 100644 (file)
@@ -9,33 +9,35 @@
  * Mechanisms
  */
 
-struct mech_module_list {
-       struct mech_module_list *next;
+struct auth_sasl_mech_module_list {
+       struct auth_sasl_mech_module_list *next;
 
-       struct mech_module module;
+       struct auth_sasl_mech_module module;
 };
 
-static struct mech_module_list *mech_modules;
+static struct auth_sasl_mech_module_list *auth_sasl_mech_modules;
 
-void mech_register_module(const struct mech_module *module)
+void auth_sasl_mech_register_module(
+       const struct auth_sasl_mech_module *module)
 {
-       struct mech_module_list *list;
+       struct auth_sasl_mech_module_list *list;
 
        i_assert(strcmp(module->mech_name,
                        t_str_ucase(module->mech_name)) == 0);
 
-       list = i_new(struct mech_module_list, 1);
+       list = i_new(struct auth_sasl_mech_module_list, 1);
        list->module = *module;
 
-       list->next = mech_modules;
-       mech_modules = list;
+       list->next = auth_sasl_mech_modules;
+       auth_sasl_mech_modules = list;
 }
 
-void mech_unregister_module(const struct mech_module *module)
+void auth_sasl_mech_unregister_module(
+       const struct auth_sasl_mech_module *module)
 {
-       struct mech_module_list **pos, *list;
+       struct auth_sasl_mech_module_list **pos, *list;
 
-       for (pos = &mech_modules; *pos != NULL; pos = &(*pos)->next) {
+       for (pos = &auth_sasl_mech_modules; *pos != NULL; pos = &(*pos)->next) {
                if (strcmp((*pos)->module.mech_name, module->mech_name) == 0) {
                        list = *pos;
                        *pos = (*pos)->next;
@@ -45,12 +47,13 @@ void mech_unregister_module(const struct mech_module *module)
        }
 }
 
-const struct mech_module *mech_module_find(const char *name)
+const struct auth_sasl_mech_module *
+auth_sasl_mech_module_find(const char *name)
 {
-       struct mech_module_list *list;
+       struct auth_sasl_mech_module_list *list;
        name = t_str_ucase(name);
 
-       for (list = mech_modules; list != NULL; list = list->next) {
+       for (list = auth_sasl_mech_modules; list != NULL; list = list->next) {
                if (strcmp(list->module.mech_name, name) == 0)
                        return &list->module;
        }
index 5c8135da7b0e4bd6be7b100e85c130f2ad927ecc..692832a999a4397eaec910791e831073c711e83a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef AUTH_SASL_H
 #define AUTH_SASL_H
 
-struct mech_module {
+struct auth_sasl_mech_module {
        const char *mech_name;
 };
 
@@ -9,8 +9,11 @@ struct mech_module {
  * Mechanisms
  */
 
-void mech_register_module(const struct mech_module *module);
-void mech_unregister_module(const struct mech_module *module);
-const struct mech_module *mech_module_find(const char *name);
+void auth_sasl_mech_register_module(
+       const struct auth_sasl_mech_module *module);
+void auth_sasl_mech_unregister_module(
+       const struct auth_sasl_mech_module *module);
+const struct auth_sasl_mech_module *
+auth_sasl_mech_module_find(const char *name);
 
 #endif