commit e9e10a34aa7e4584adc0af2889d20c5aed8e2b95 Author: Jacob Welsh <> AuthorDate: Sat Nov 5 23:04:58 2022 +0000 Commit: Jacob Welsh <> CommitDate: Sun Nov 6 17:24:25 2022 +0000 [2/2] cut linkage to dcrypt and oauth2 from remaining files. http://fixpoint.welshcomputing.com/2022/jwrd-logs-for-Nov-2022/#5307 diff --git a/README.md b/README.md index 842f723475..60db344c77 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,6 @@ Auth - [RFC2831 - Using Digest Authentication as a SASL Mechanism (DIGEST-MD5)](https://tools.ietf.org/html/rfc2831) - [RFC5802 - Salted Challenge Response Authentication Mechanism (SCRAM)](https://tools.ietf.org/html/rfc5802) - SASL and GSS-API Mechanisms -- [RFC7628 - A Set of Simple Authentication and Security Layer (SASL) Mechanisms for OAuth](https://tools.ietf.org/html/rfc7628) -- [Google XOAUTH2 protocol](https://developers.google.com/gmail/xoauth2_protocol) POP3 ---- diff --git a/config.h b/config.h index de4d7bd1ab..263cba19e2 100644 --- a/config.h +++ b/config.h @@ -111,9 +111,6 @@ /* Define to 1 if you have the `dirfd' function. */ #define HAVE_DIRFD 1 -/* Build with EVP_PKEY_get0_*() support */ -/* #undef HAVE_EVP_PKEY_get0 */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_EXECINFO_H */ @@ -354,15 +351,6 @@ /* Define if you wish to retrieve quota of NFS mounted mailboxes */ /* #undef HAVE_RQUOTA */ -/* Build with RSA_set0_crt_params support */ -/* #undef HAVE_RSA_SET0_CRT_PARAMS */ - -/* Build with RSA_set0_factors support */ -/* #undef HAVE_RSA_SET0_FACTORS */ - -/* Build with RSA_set0_key support */ -/* #undef HAVE_RSA_SET0_KEY */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_SASL_H */ diff --git a/doc/example-config/Makefile.am b/doc/example-config/Makefile.am index 331d6e971e..5a2dd8ba44 100644 --- a/doc/example-config/Makefile.am +++ b/doc/example-config/Makefile.am @@ -15,7 +15,6 @@ example_DATA = \ dovecot-dict-auth.conf.ext \ dovecot-dict-sql.conf.ext \ dovecot-ldap.conf.ext \ - dovecot-oauth2.conf.ext \ dovecot-sql.conf.ext EXTRA_DIST = \ diff --git a/doc/man/doveadm-dump.1.in b/doc/man/doveadm-dump.1.in index 4582b4f1aa..75b74598ad 100644 --- a/doc/man/doveadm-dump.1.in +++ b/doc/man/doveadm-dump.1.in @@ -55,12 +55,6 @@ directory Uncompress an IMAP traffic log, which contains data compressed using the IMAP COMPRESSION extension. .TP -.B dcrypt-file -Dump metadata of a dcrypt encrypted file. -.TP -.B dcrypt-key -Dump metadata of a dcrypt key. -.TP .B index \(rA dovecot.index, dovecot.map.index .TP @@ -90,4 +84,4 @@ Look at the contents of a mailbox\(aqs index: @INCLUDE:reporting-bugs@ .\"------------------------------------------------------------------------ .SH SEE ALSO -.BR doveadm (1) \ No newline at end of file +.BR doveadm (1) diff --git a/src/Makefile.am b/src/Makefile.am index aa0af22f8f..b8d3f307e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,7 +14,6 @@ LIBDOVECOT_SUBDIRS = \ lib-master \ lib-charset \ lib-ssl-iostream \ - lib-dcrypt \ lib-dict \ lib-sasl \ lib-old-stats \ @@ -25,7 +24,6 @@ LIBDOVECOT_SUBDIRS = \ lib-smtp \ lib-imap \ lib-imap-storage \ - lib-oauth2 SUBDIRS = \ $(LIBDOVECOT_SUBDIRS) \ diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index 207c6f3b20..ce8d036001 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -31,10 +31,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-old-stats \ -I$(top_srcdir)/src/lib-otp \ -I$(top_srcdir)/src/lib-master \ - -I$(top_srcdir)/src/lib-oauth2 \ -I$(top_srcdir)/src/lib-ssl-iostream \ -I$(top_srcdir)/src/lib-lua \ - -I$(top_srcdir)/src/lib-dcrypt \ -DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \ -DPKG_RUNDIR=\""$(rundir)"\" \ -DSYSCONFDIR=\""$(sysconfdir)/dovecot"\" \ @@ -94,7 +92,6 @@ libauth_la_SOURCES = \ db-checkpassword.c \ db-dict.c \ db-dict-cache-key.c \ - db-oauth2.c \ db-sql.c \ db-passwd-file.c \ mech.c \ @@ -110,14 +107,12 @@ libauth_la_SOURCES = \ mech-apop.c \ mech-winbind.c \ mech-dovecot-token.c \ - mech-oauth2.c \ passdb.c \ passdb-blocking.c \ passdb-bsdauth.c \ passdb-cache.c \ passdb-checkpassword.c \ passdb-dict.c \ - passdb-oauth2.c \ passdb-passwd.c \ passdb-passwd-file.c \ passdb-pam.c \ @@ -166,7 +161,6 @@ headers = \ db-sql.h \ db-passwd-file.h \ db-checkpassword.h \ - db-oauth2.h \ mech.h \ mycrypt.h \ passdb.h \ diff --git a/src/auth/auth-request.h b/src/auth/auth-request.h index 6a458d9841..79cf76b585 100644 --- a/src/auth/auth-request.h +++ b/src/auth/auth-request.h @@ -124,9 +124,6 @@ struct auth_request { struct auth_request_handler *handler; struct auth_master_connection *master; - /* FIXME: Remove this once mech-oauth2 correctly does the processing */ - const char *openid_config_url; - unsigned int connect_uid; unsigned int client_pid; unsigned int id; diff --git a/src/auth/mech.c b/src/auth/mech.c index 477f27bd3c..8bc8b38987 100644 --- a/src/auth/mech.c +++ b/src/auth/mech.c @@ -83,8 +83,6 @@ extern const struct mech_module mech_gssapi_spnego; #endif extern const struct mech_module mech_winbind_ntlm; extern const struct mech_module mech_winbind_spnego; -extern const struct mech_module mech_oauthbearer; -extern const struct mech_module mech_xoauth2; static void mech_register_add(struct mechanisms_register *reg, const struct mech_module *mech) @@ -213,8 +211,6 @@ void mech_init(const struct auth_settings *set) #ifdef BUILTIN_GSSAPI mech_register_module(&mech_gssapi); #endif - mech_register_module(&mech_oauthbearer); - mech_register_module(&mech_xoauth2); } void mech_deinit(const struct auth_settings *set) @@ -240,6 +236,4 @@ void mech_deinit(const struct auth_settings *set) #ifdef BUILTIN_GSSAPI mech_unregister_module(&mech_gssapi); #endif - mech_unregister_module(&mech_oauthbearer); - mech_unregister_module(&mech_xoauth2); } diff --git a/src/auth/passdb.c b/src/auth/passdb.c index 9bc2b875c3..285e1d76bf 100644 --- a/src/auth/passdb.c +++ b/src/auth/passdb.c @@ -322,7 +322,6 @@ extern struct passdb_module_interface passdb_checkpassword; extern struct passdb_module_interface passdb_ldap; extern struct passdb_module_interface passdb_sql; extern struct passdb_module_interface passdb_static; -extern struct passdb_module_interface passdb_oauth2; void passdbs_init(void) { @@ -341,7 +340,6 @@ void passdbs_init(void) passdb_register_module(&passdb_ldap); passdb_register_module(&passdb_sql); passdb_register_module(&passdb_static); - passdb_register_module(&passdb_oauth2); } void passdbs_deinit(void) diff --git a/src/auth/test-mech.c b/src/auth/test-mech.c index 8a2c7b357b..e842289bd8 100644 --- a/src/auth/test-mech.c +++ b/src/auth/test-mech.c @@ -26,12 +26,10 @@ extern const struct mech_module mech_digest_md5; extern const struct mech_module mech_dovecot_token; extern const struct mech_module mech_external; extern const struct mech_module mech_login; -extern const struct mech_module mech_oauthbearer; extern const struct mech_module mech_otp; extern const struct mech_module mech_plain; extern const struct mech_module mech_scram_sha1; extern const struct mech_module mech_scram_sha256; -extern const struct mech_module mech_xoauth2; static struct auth_settings set; static struct mechanisms_register *mech_reg; @@ -68,7 +66,6 @@ request_handler_reply_mock_callback(struct auth_request *request, else if (request->mech == &mech_otp) { if (null_strcmp(request->fields.user, "otp_phase_2") == 0) request->failed = FALSE; - } else if (request->mech == &mech_oauthbearer) { } }; @@ -228,10 +225,8 @@ static void test_mechs(void) {&mech_otp, UCHAR_LEN("word:BOND FOGY DRAB NE RISE MART"), "otp_phase_2", NULL, TRUE, TRUE, FALSE}, {&mech_otp, UCHAR_LEN("init-hex:f6bd 6b33 89b8 7203:md5 499 ke6118:23d1 b253 5ae0 2b7e"), "otp_phase_2", NULL, TRUE, TRUE, FALSE}, {&mech_otp, UCHAR_LEN("init-word:END KERN BALM NICK EROS WAVY:md5 499 ke1235:BABY FAIN OILY NIL TIDY DADE"), "otp_phase_2", NULL , TRUE, TRUE, FALSE}, - {&mech_oauthbearer, UCHAR_LEN("n,a=testuser,p=cHJvb2Y=,f=nonstandart\x01host=server\x01port=143\x01""auth=Bearer vF9dft4qmTc2Nvb3RlckBhbHRhdmlzdGEuY29tCg==\x01\x01"), "testuser", NULL, FALSE, TRUE, FALSE}, {&mech_scram_sha1, UCHAR_LEN("n,,n=testuser,r=rOprNGfwEbeRWgbNEkqO"), "testuser", NULL, TRUE, FALSE, FALSE}, {&mech_scram_sha256, UCHAR_LEN("n,,n=testuser,r=rOprNGfwEbeRWgbNEkqO"), "testuser", NULL, TRUE, FALSE, FALSE}, - {&mech_xoauth2, UCHAR_LEN("user=testuser\x01""auth=Bearer vF9dft4qmTc2Nvb3RlckBhdHRhdmlzdGEuY29tCg==\x01\x01"), "testuser", NULL, TRUE, FALSE, FALSE}, /* Below tests are expected to fail */ /* Empty input tests*/ @@ -245,8 +240,6 @@ static void test_mechs(void) {&mech_otp, UCHAR_LEN(""), NULL, "invalid input", FALSE, FALSE, FALSE}, {&mech_otp, UCHAR_LEN(""), "testuser", "invalid input", FALSE, FALSE, FALSE}, {&mech_plain, UCHAR_LEN(""), NULL, NULL, FALSE, FALSE, FALSE}, - {&mech_oauthbearer, UCHAR_LEN(""), NULL, NULL, FALSE, FALSE, FALSE}, - {&mech_xoauth2, UCHAR_LEN(""), NULL, NULL, FALSE, FALSE, FALSE}, {&mech_scram_sha1, UCHAR_LEN(""), NULL, NULL, FALSE, FALSE, FALSE}, {&mech_scram_sha256, UCHAR_LEN(""), NULL, NULL, FALSE, FALSE, FALSE}, @@ -287,12 +280,6 @@ static void test_mechs(void) /* Too much nuls */ {&mech_dovecot_token, UCHAR_LEN("service\0pid\0fail\0se\0ssion_id\0deadbeef"), NULL , NULL, FALSE, FALSE, FALSE}, {&mech_login, UCHAR_LEN("test user\0user"), NULL, NULL, FALSE, FALSE, FALSE}, - {&mech_oauthbearer, UCHAR_LEN("n,a==testuser,\x01""auth=Bearer token\x01\x01"), NULL, NULL, FALSE, FALSE, FALSE}, - {&mech_oauthbearer, UCHAR_LEN("n,a=testuser,f=non-standard\x01""auth=Bearer token\x01\x01"), "testuser", NULL, FALSE, FALSE, FALSE}, - {&mech_oauthbearer, UCHAR_LEN("n,a=testuser\x01""auth=token\x01\x01"), "testuser", NULL, FALSE, FALSE, FALSE}, - {&mech_xoauth2, UCHAR_LEN("testuser\x01auth=Bearer token\x01\x01"), NULL, NULL, FALSE, FALSE, FALSE}, - /* does not start with [B|b]earer */ - {&mech_xoauth2, UCHAR_LEN("user=testuser\x01""auth=token\x01\x01"), "testuser", NULL, FALSE, FALSE, FALSE}, /* Too much nuls */ {&mech_plain, UCHAR_LEN("\0fa\0il\0ing\0withthis"), NULL, NULL, FALSE, FALSE, FALSE}, {&mech_plain, UCHAR_LEN("failingwiththis"), NULL, NULL, FALSE, FALSE, FALSE}, diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am index 026ad94c1e..5604941287 100644 --- a/src/doveadm/Makefile.am +++ b/src/doveadm/Makefile.am @@ -22,7 +22,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib-storage \ -I$(top_srcdir)/src/lib-imap-storage \ -I$(top_srcdir)/src/lib-http \ - -I$(top_srcdir)/src/lib-dcrypt \ -I$(top_srcdir)/src/auth \ -I$(top_srcdir)/src/stats \ -DPKG_RUNDIR=\""$(rundir)"\" \ @@ -119,8 +118,6 @@ doveadm_common_dump_cmds = \ doveadm-dump-log.c \ doveadm-dump-mailboxlog.c \ doveadm-dump-thread.c \ - doveadm-dump-dcrypt-file.c \ - doveadm-dump-dcrypt-key.c \ doveadm-zlib.c common = \ diff --git a/src/doveadm/doveadm-dump.c b/src/doveadm/doveadm-dump.c index eb08e96a80..fbee14c9d1 100644 --- a/src/doveadm/doveadm-dump.c +++ b/src/doveadm/doveadm-dump.c @@ -132,8 +132,6 @@ static const struct doveadm_cmd_dump *dumps_builtin[] = { &doveadm_cmd_dump_mailboxlog, &doveadm_cmd_dump_thread, &doveadm_cmd_dump_zlib, - &doveadm_cmd_dump_dcrypt_file, - &doveadm_cmd_dump_dcrypt_key, &doveadm_cmd_dump_multiplex, }; diff --git a/src/doveadm/doveadm-dump.h b/src/doveadm/doveadm-dump.h index 57762609ca..16b9e74f4a 100644 --- a/src/doveadm/doveadm-dump.h +++ b/src/doveadm/doveadm-dump.h @@ -15,8 +15,6 @@ extern struct doveadm_cmd_dump doveadm_cmd_dump_log; extern struct doveadm_cmd_dump doveadm_cmd_dump_mailboxlog; extern struct doveadm_cmd_dump doveadm_cmd_dump_thread; extern struct doveadm_cmd_dump doveadm_cmd_dump_zlib; -extern struct doveadm_cmd_dump doveadm_cmd_dump_dcrypt_file; -extern struct doveadm_cmd_dump doveadm_cmd_dump_dcrypt_key; void doveadm_dump_register(const struct doveadm_cmd_dump *dump); diff --git a/src/lib-sasl/Makefile.am b/src/lib-sasl/Makefile.am index 5017bb9e78..63535d726a 100644 --- a/src/lib-sasl/Makefile.am +++ b/src/lib-sasl/Makefile.am @@ -8,7 +8,6 @@ libsasl_la_SOURCES = \ mech-external.c \ mech-login.c \ mech-plain.c \ - mech-oauthbearer.c \ dsasl-client.c headers = \ diff --git a/src/lib-sasl/dsasl-client-private.h b/src/lib-sasl/dsasl-client-private.h index 65b86f70b8..ffb5f2ca15 100644 --- a/src/lib-sasl/dsasl-client-private.h +++ b/src/lib-sasl/dsasl-client-private.h @@ -36,8 +36,6 @@ struct dsasl_client_mech { extern const struct dsasl_client_mech dsasl_client_mech_external; extern const struct dsasl_client_mech dsasl_client_mech_login; -extern const struct dsasl_client_mech dsasl_client_mech_oauthbearer; -extern const struct dsasl_client_mech dsasl_client_mech_xoauth2; void dsasl_client_mech_register(const struct dsasl_client_mech *mech); void dsasl_client_mech_unregister(const struct dsasl_client_mech *mech); diff --git a/src/lib-sasl/dsasl-client.c b/src/lib-sasl/dsasl-client.c index bf11d5ccd5..56b77d8f42 100644 --- a/src/lib-sasl/dsasl-client.c +++ b/src/lib-sasl/dsasl-client.c @@ -140,8 +140,6 @@ void dsasl_clients_init(void) dsasl_client_mech_register(&dsasl_client_mech_external); dsasl_client_mech_register(&dsasl_client_mech_plain); dsasl_client_mech_register(&dsasl_client_mech_login); - dsasl_client_mech_register(&dsasl_client_mech_oauthbearer); - dsasl_client_mech_register(&dsasl_client_mech_xoauth2); } void dsasl_clients_deinit(void) diff --git a/src/lib-sasl/test-sasl-client.c b/src/lib-sasl/test-sasl-client.c index 05b65f2254..e3df051a95 100644 --- a/src/lib-sasl/test-sasl-client.c +++ b/src/lib-sasl/test-sasl-client.c @@ -238,178 +238,12 @@ static void test_sasl_client_external(void) test_end(); } -static void test_sasl_client_oauthbearer(void) -{ - const char *error; - const char *value; - test_begin("sasl client OAUTHBEARER"); - const struct dsasl_client_mech *mech = dsasl_client_mech_find("oauthbearer"); - i_assert(mech != NULL); - struct dsasl_client *client = dsasl_client_new(mech, &sasl_set); - i_assert(client != NULL); - - string_t *input = t_str_new(64); - const unsigned char *output; - size_t olen; - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == 0); - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - - const unsigned char expected[] = "n,a=testuser,\1" - "auth=Bearer testpassword\1\1"; - /* there is no NUL byte at the end */ - test_assert(olen == sizeof(expected) - 1); - test_assert(memcmp(output, expected, I_MIN(sizeof(expected) - 1, olen)) == 0); - test_assert(dsasl_client_get_result(client, "status", &value, &error) == 1); - test_assert_strcmp(value, ""); - - dsasl_client_free(&client); - test_assert(client == NULL); - - /* with host & port set */ - client = dsasl_client_new(mech, &sasl_set); - i_assert(client != NULL); - - test_assert(dsasl_client_set_parameter(client, "host", "example.com", &error) == 1); - test_assert(dsasl_client_set_parameter(client, "port", "imap", &error) == -1); - test_assert_strcmp(error, "Invalid port value"); - test_assert(dsasl_client_set_parameter(client, "port", "143", &error) == 1); - test_assert(dsasl_client_set_parameter(client, "unknown", "value", &error) == 0); - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == 0); - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - - const unsigned char expected_h_p[] = "n,a=testuser,\1" - "host=example.com\1" - "port=143\1" - "auth=Bearer testpassword\1\1"; - /* there is no NUL byte at the end */ - test_assert(olen == sizeof(expected_h_p) - 1); - test_assert(memcmp(output, expected_h_p, - I_MIN(sizeof(expected_h_p) - 1, olen)) == 0); - - dsasl_client_free(&client); - test_assert(client == NULL); - - client = dsasl_client_new(mech, &sasl_set); - /* test error response */ - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == 0); - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - str_append(input, "{\"status\":\"401\",\"schemes\":\"bearer\",\"scope\":\"mail\"}"); - test_assert(dsasl_client_input(client, input->data, input->used, &error) == -1); - test_assert_strcmp(error, "Failed to authenticate: 401"); - test_assert(dsasl_client_get_result(client, "status", &value, &error) == 1); - test_assert_strcmp(value, "401"); - - dsasl_client_free(&client); - - /* missing username & password */ - client = dsasl_client_new(mech, &sasl_empty_set); - i_assert(client != NULL); - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == -1); - test_assert_strcmp(error, "authid not set"); - dsasl_client_free(&client); - - /* missing password */ - client = dsasl_client_new(mech, &sasl_no_password_set); - i_assert(client != NULL); - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == -1); - test_assert_strcmp(error, "password not set"); - dsasl_client_free(&client); - - /* unexpected NUL byte in input */ - client = dsasl_client_new(mech, &sasl_set); - i_assert(client != NULL); - - const unsigned char input2[] = "unexpected\0"; - test_assert(dsasl_client_input(client, input2, sizeof(input2), &error) == -1); - test_assert_strcmp(error, "Unexpected NUL in input data"); - dsasl_client_free(&client); - - test_end(); -} - -static void test_sasl_client_xoauth2(void) -{ - const char *error; - test_begin("sasl client XOAUTH2"); - const struct dsasl_client_mech *mech = dsasl_client_mech_find("xoauth2"); - i_assert(mech != NULL); - struct dsasl_client *client = dsasl_client_new(mech, &sasl_set); - i_assert(client != NULL); - - string_t *input = t_str_new(64); - const unsigned char *output; - size_t olen; - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == 0); - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - - const unsigned char expected[] = "user=testuser\1auth=Bearer testpassword\1\1"; - /* there is no NUL byte at the end */ - test_assert(olen == sizeof(expected) - 1); - test_assert(memcmp(output, expected, I_MIN(sizeof(expected) - 1, olen)) == 0); - - dsasl_client_free(&client); - test_assert(client == NULL); - - client = dsasl_client_new(mech, &sasl_set); - /* test error response */ - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == 0); - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - str_append(input, "{\"status\":\"401\",\"schemes\":\"bearer\",\"scope\":\"mail\"}"); - test_assert(dsasl_client_input(client, input->data, input->used, &error) == -1); - test_assert_strcmp(error, "Failed to authenticate: 401"); - - dsasl_client_free(&client); - - /* missing username & password */ - client = dsasl_client_new(mech, &sasl_empty_set); - i_assert(client != NULL); - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == -1); - test_assert_strcmp(error, "authid not set"); - dsasl_client_free(&client); - - /* missing password */ - client = dsasl_client_new(mech, &sasl_no_password_set); - i_assert(client != NULL); - - test_assert(dsasl_client_input(client, uchar_empty_ptr, 0, &error) == 0); - test_assert(dsasl_client_output(client, &output, &olen, &error) == -1); - test_assert_strcmp(error, "password not set"); - dsasl_client_free(&client); - - /* unexpected NUL byte in input */ - client = dsasl_client_new(mech, &sasl_set); - i_assert(client != NULL); - - const unsigned char input2[] = "unexpected\0"; - test_assert(dsasl_client_input(client, input2, sizeof(input2), &error) == -1); - test_assert_strcmp(error, "Unexpected NUL in input data"); - dsasl_client_free(&client); - - test_end(); -} - int main(void) { static void (*const test_functions[])(void) = { test_sasl_client_login, test_sasl_client_plain, test_sasl_client_external, - test_sasl_client_oauthbearer, - test_sasl_client_xoauth2, NULL }; dsasl_clients_init(); diff --git a/src/lib/module-dir.h b/src/lib/module-dir.h index c1093d9ccc..5d66a245b6 100644 --- a/src/lib/module-dir.h +++ b/src/lib/module-dir.h @@ -16,7 +16,6 @@ struct module { /* Load modules of a given type (called a "module directory" due to the prior dlopen based implementation). mod_names is a space separated list of module names to load, or NULL for all available. Each function goes in a separate file so that each module collection links into only the binaries that require it. */ void module_dir_load_adm(struct module **modules, const char *mod_names); void module_dir_load_auth(struct module **modules, const char *mod_names); -void module_dir_load_dcrypt_backend(struct module **modules, const char *mod_names); void module_dir_load_mail(struct module **modules, const char *mod_names); void module_dir_load_old_stats(struct module **modules, const char *mod_names); void module_dir_load_settings(struct module **modules, const char *mod_names);