]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Move mech_generic_auth_initial() to sasl-server-mech.c
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 5 Oct 2023 15:58:05 +0000 (17:58 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
src/auth/Makefile.am
src/auth/mech.c
src/auth/sasl-server-mech.c [new file with mode: 0644]

index b8ed497414ab053c4c1af6e0c4b28df7a30887b8..939e84177a34a3a62f516c8b084788e586f84fe7 100644 (file)
@@ -93,7 +93,8 @@ sasl_server_mechanisms = \
        sasl-server-mech-winbind.c
 
 sasl_sources = \
-       ${sasl_server_mechanisms}
+       ${sasl_server_mechanisms} \
+       sasl-server-mech.c
 
 auth_common_sources = \
        auth.c \
index c1fcabbdacf4990ed4e275a7d8bf08332cedb619..e905986c4d0f3d16f8c59a54fbb8772f665eb980 100644 (file)
@@ -50,17 +50,6 @@ const struct mech_module *mech_module_find(const char *name)
        return NULL;
 }
 
-void mech_generic_auth_initial(struct auth_request *request,
-                              const unsigned char *data, size_t data_size)
-{
-       if (data == NULL) {
-               auth_request_handler_reply_continue(request, uchar_empty_ptr, 0);
-       } else {
-               /* initial reply given, even if it was 0 bytes */
-               request->mech->auth_continue(request, data, data_size);
-       }
-}
-
 void mech_generic_auth_free(struct auth_request *request)
 {
        pool_unref(&request->pool);
diff --git a/src/auth/sasl-server-mech.c b/src/auth/sasl-server-mech.c
new file mode 100644 (file)
index 0000000..a01d7fa
--- /dev/null
@@ -0,0 +1,16 @@
+/* Copyright (c) 2023 Dovecot authors, see the included COPYING file */
+
+#include "auth-common.h"
+
+#include "sasl-server-private.h"
+
+void mech_generic_auth_initial(struct auth_request *request,
+                              const unsigned char *data, size_t data_size)
+{
+       if (data == NULL) {
+               auth_request_handler_reply_continue(request, uchar_empty_ptr, 0);
+       } else {
+               /* initial reply given, even if it was 0 bytes */
+               request->mech->auth_continue(request, data, data_size);
+       }
+}