From: Timo Sirainen Date: Sat, 4 Apr 2020 22:16:08 +0000 (+0300) Subject: lib-master: Replace auth-master-client-login category with auth-client X-Git-Tag: 2.3.11.2~460 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61fc5a403c71c4b153e7c17a0c457a09f8074249;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Replace auth-master-client-login category with auth-client This is just a reimplementation of lib-auth/auth-master code. This commit also changes lib-master to require lib-auth to get to the category. This dependency shouldn't really be a problem, since eventually this master-login-auth code should be replaced by lib-auth anyway. --- diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 6959106075..2dace1afe6 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -141,6 +141,7 @@ test_http_libs = \ ../lib-dns/libdns.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-settings/libsettings.la \ $(test_libs) test_http_deps = \ @@ -148,6 +149,7 @@ test_http_deps = \ ../lib-dns/libdns.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-settings/libsettings.la \ $(test_deps) diff --git a/src/lib-master/Makefile.am b/src/lib-master/Makefile.am index 75c6e340f5..8133c05361 100644 --- a/src/lib-master/Makefile.am +++ b/src/lib-master/Makefile.am @@ -4,6 +4,7 @@ noinst_LTLIBRARIES = libmaster.la AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib-auth \ -I$(top_srcdir)/src/lib-dns \ -I$(top_srcdir)/src/lib-test \ -I$(top_srcdir)/src/lib-settings \ diff --git a/src/lib-master/master-login-auth.c b/src/lib-master/master-login-auth.c index 3fa812e2b6..ad98f1c688 100644 --- a/src/lib-master/master-login-auth.c +++ b/src/lib-master/master-login-auth.c @@ -14,6 +14,7 @@ #include "strescape.h" #include "time-util.h" #include "connection.h" +#include "auth-client-private.h" #include "master-interface.h" #include "master-service.h" #include "master-auth.h" @@ -22,10 +23,6 @@ #define AUTH_MAX_INBUF_SIZE 8192 -static struct event_category event_category_auth_master_client_login = { - .name = "auth-master-client-login" -}; - struct master_login_auth_request { struct master_login_auth_request *prev, *next; struct event *event; @@ -119,8 +116,7 @@ master_login_auth_init(const char *auth_socket_path, bool request_auth_token) &master_login_auth_vfuncs); auth->event = event_create(NULL); - event_add_category(auth->event, - &event_category_auth_master_client_login); + event_add_category(auth->event, &event_category_auth_client); event_set_append_log_prefix(auth->event, "auth-master: login: "); auth->conn.event_parent = auth->event; diff --git a/src/lib-smtp/Makefile.am b/src/lib-smtp/Makefile.am index b03761df8b..0ea04d6ae1 100644 --- a/src/lib-smtp/Makefile.am +++ b/src/lib-smtp/Makefile.am @@ -96,6 +96,7 @@ test_libs = \ ../lib-mail/libmail.la \ ../lib-charset/libcharset.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-settings/libsettings.la \ ../lib-sasl/libsasl.la \ @@ -110,6 +111,7 @@ test_deps = \ ../lib-mail/libmail.la \ ../lib-charset/libcharset.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-settings/libsettings.la \ ../lib-sasl/libsasl.la \ diff --git a/src/master/Makefile.am b/src/master/Makefile.am index b35f571713..1fc1cbab35 100644 --- a/src/master/Makefile.am +++ b/src/master/Makefile.am @@ -68,6 +68,7 @@ noinst_PROGRAMS = $(test_programs) $(test_nocheck_programs) test_libs = \ ../lib-auth/libauth.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-dns/libdns.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-settings/libsettings.la \ @@ -78,6 +79,7 @@ test_libs = \ test_deps = \ ../lib-auth/libauth.la \ ../lib-master/libmaster.la \ + ../lib-auth/libauth.la \ ../lib-dns/libdns.la \ ../lib-ssl-iostream/libssl_iostream.la \ ../lib-settings/libsettings.la \