]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: sasl-server - Rename enum mech_passdb_need to sasl_mech_passdb_need
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sun, 5 Mar 2023 19:41:27 +0000 (20:41 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
15 files changed:
src/auth/auth-sasl-mech-apop.c
src/auth/auth-sasl-mech-dovecot-token.c
src/auth/auth.c
src/auth/sasl-server-mech-anonymous.c
src/auth/sasl-server-mech-cram-md5.c
src/auth/sasl-server-mech-digest-md5.c
src/auth/sasl-server-mech-external.c
src/auth/sasl-server-mech-gssapi.c
src/auth/sasl-server-mech-login.c
src/auth/sasl-server-mech-otp.c
src/auth/sasl-server-mech-plain.c
src/auth/sasl-server-mech-scram.c
src/auth/sasl-server-mech-winbind.c
src/auth/sasl-server-protected.h
src/auth/sasl-server.h

index 894a18463f66ab03aefc5f2f4925d9f52365135c..fe4ae9a97adbbb589fa50e6f319c5c22b1a83fee 100644 (file)
@@ -163,7 +163,7 @@ const struct mech_module mech_apop = {
 
        .flags = SASL_MECH_SEC_PRIVATE | SASL_MECH_SEC_DICTIONARY |
                 SASL_MECH_SEC_ACTIVE | SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_VERIFY_RESPONSE,
+       .passdb_need = SASL_MECH_PASSDB_NEED_VERIFY_RESPONSE,
 
        .auth_new = mech_apop_auth_new,
        .auth_initial = mech_apop_auth_initial,
index 9b189e64c1bf15a8f9a4201fdecb7724a4cff8bf..ead0feb0447af9aa25809ae4a8fadccca4dbb79f 100644 (file)
@@ -83,7 +83,7 @@ const struct mech_module mech_dovecot_token = {
        .mech_name = "DOVECOT-TOKEN",
 
        .flags = SASL_MECH_SEC_PRIVATE | SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_dovecot_token_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index 738d07cc20183742c1e7f88f62f92ba991cbf2dd..5a81fd771f57db626055c176e78ac6eaad359d8d 100644 (file)
@@ -244,18 +244,18 @@ static bool
 auth_mech_verify_passdb(const struct auth *auth, const struct mech_module_list *list)
 {
        switch (list->module.passdb_need) {
-       case MECH_PASSDB_NEED_NOTHING:
+       case SASL_MECH_PASSDB_NEED_NOTHING:
                break;
-       case MECH_PASSDB_NEED_VERIFY_PLAIN:
+       case SASL_MECH_PASSDB_NEED_VERIFY_PLAIN:
                if (!auth_passdb_list_have_verify_plain(auth))
                        return FALSE;
                break;
-       case MECH_PASSDB_NEED_VERIFY_RESPONSE:
-       case MECH_PASSDB_NEED_LOOKUP_CREDENTIALS:
+       case SASL_MECH_PASSDB_NEED_VERIFY_RESPONSE:
+       case SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS:
                if (!auth_passdb_list_have_lookup_credentials(auth))
                        return FALSE;
                break;
-       case MECH_PASSDB_NEED_SET_CREDENTIALS:
+       case SASL_MECH_PASSDB_NEED_SET_CREDENTIALS:
                if (!auth_passdb_list_have_lookup_credentials(auth))
                        return FALSE;
                if (!auth_passdb_list_have_set_credentials(auth))
index c83823242e4675d781efbe71ec1b9a7ccf5bbb97..82a3e93be7850ff90ca85ad0ca485381abc88158 100644 (file)
@@ -36,7 +36,7 @@ const struct mech_module mech_anonymous = {
        .mech_name = "ANONYMOUS",
 
        .flags = SASL_MECH_SEC_ANONYMOUS | SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_anonymous_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index 4059e690d3752b560d0cc12ce1e34d81a57bdbab..c57b5bdee8beb509afb6e673d67de67f8fc64aca 100644 (file)
@@ -181,7 +181,7 @@ const struct mech_module mech_cram_md5 = {
        .mech_name = "CRAM-MD5",
 
        .flags = SASL_MECH_SEC_DICTIONARY | SASL_MECH_SEC_ACTIVE,
-       .passdb_need = MECH_PASSDB_NEED_VERIFY_RESPONSE,
+       .passdb_need = SASL_MECH_PASSDB_NEED_VERIFY_RESPONSE,
 
        .auth_new = mech_cram_md5_auth_new,
        .auth_initial = mech_cram_md5_auth_initial,
index 18230157b888d86aa93514c7fefa91dfab4a65ae..082d0d562f62dd35a4584f72ea511c066513b597 100644 (file)
@@ -622,7 +622,7 @@ const struct mech_module mech_digest_md5 = {
 
        .flags = SASL_MECH_SEC_DICTIONARY | SASL_MECH_SEC_ACTIVE |
                 SASL_MECH_SEC_MUTUAL_AUTH,
-       .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
 
        .auth_new = mech_digest_md5_auth_new,
        .auth_initial = mech_digest_md5_auth_initial,
index 1d481a83bf6b6daba9dc6c437894130052110a5f..25cd47aad7c8a8ef4520705e051315e720f35f2e 100644 (file)
@@ -55,7 +55,7 @@ const struct mech_module mech_external = {
        .mech_name = "EXTERNAL",
 
        .flags = 0,
-       .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
+       .passdb_need = SASL_MECH_PASSDB_NEED_VERIFY_PLAIN,
 
        .auth_new = mech_external_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index d02b943638f6c1e30e8ce3f123c7505b953501d5..55e05109d1be0837e8945ec6f7889eb23bbb397a 100644 (file)
@@ -693,7 +693,7 @@ const struct mech_module mech_gssapi = {
        .mech_name = "GSSAPI",
 
        .flags = SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_gssapi_auth_new,
        .auth_initial = mech_gssapi_auth_initial,
@@ -708,7 +708,7 @@ const struct mech_module mech_gssapi_spnego = {
        .mech_name = "GSS-SPNEGO",
 
        .flags = SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_gssapi_auth_new,
         .auth_initial = mech_gssapi_auth_initial,
index 140a5e47f3180bf6f22f01435bc7834f91bff3b2..7b8cb980a0abf4d0fbede35ad8c47773f323084c 100644 (file)
@@ -65,7 +65,7 @@ const struct mech_module mech_login = {
        .mech_name = "LOGIN",
 
        .flags = SASL_MECH_SEC_PLAINTEXT,
-       .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
+       .passdb_need = SASL_MECH_PASSDB_NEED_VERIFY_PLAIN,
 
        .auth_new = mech_login_auth_new,
        .auth_initial = mech_login_auth_initial,
index 92214d408c9df6e6cb47288919aed016c9a19b83..330a0cf5866d8e7487063e32002b45ba714dfdef 100644 (file)
@@ -321,7 +321,7 @@ const struct mech_module mech_otp = {
 
        .flags = SASL_MECH_SEC_DICTIONARY | SASL_MECH_SEC_ACTIVE |
                 SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_SET_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_SET_CREDENTIALS,
 
        .auth_new = mech_otp_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index 9b5740b3fc873eb184e10a2ec75ba106700a653a..098fc1d7e7b10e83623698ac05b035e3787f9c4c 100644 (file)
@@ -79,7 +79,7 @@ const struct mech_module mech_plain = {
        .mech_name = "PLAIN",
 
        .flags = SASL_MECH_SEC_PLAINTEXT | SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_VERIFY_PLAIN,
+       .passdb_need = SASL_MECH_PASSDB_NEED_VERIFY_PLAIN,
 
        .auth_new = mech_plain_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index 3c71f4d839747b9f2e66474915af740a8f195335..4f00e2b7b572574e9cdf1c6a3e540cfeb6173b73 100644 (file)
@@ -228,7 +228,7 @@ const struct mech_module mech_scram_sha1 = {
        .mech_name = "SCRAM-SHA-1",
 
        .flags = SASL_MECH_SEC_MUTUAL_AUTH,
-       .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
 
        .auth_new = mech_scram_sha1_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
@@ -240,7 +240,7 @@ const struct mech_module mech_scram_sha1_plus = {
        .mech_name = "SCRAM-SHA-1-PLUS",
 
        .flags = SASL_MECH_SEC_MUTUAL_AUTH | SASL_MECH_SEC_CHANNEL_BINDING,
-       .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
 
        .auth_new = mech_scram_sha1_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
@@ -252,7 +252,7 @@ const struct mech_module mech_scram_sha256 = {
        .mech_name = "SCRAM-SHA-256",
 
        .flags = SASL_MECH_SEC_MUTUAL_AUTH,
-       .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
 
        .auth_new = mech_scram_sha256_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
@@ -264,7 +264,7 @@ const struct mech_module mech_scram_sha256_plus = {
        .mech_name = "SCRAM-SHA-256-PLUS",
 
        .flags = SASL_MECH_SEC_MUTUAL_AUTH | SASL_MECH_SEC_CHANNEL_BINDING,
-       .passdb_need = MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       .passdb_need = SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
 
        .auth_new = mech_scram_sha256_auth_new,
        .auth_initial = sasl_server_mech_generic_auth_initial,
index 86e96c101dc5779eb31f54773e3c2f1b16722ca8..11da7abcc6565accfe888021a6185ce653d27b44 100644 (file)
@@ -343,7 +343,7 @@ const struct mech_module mech_winbind_ntlm = {
 
        .flags = SASL_MECH_SEC_DICTIONARY | SASL_MECH_SEC_ACTIVE |
                 SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_winbind_ntlm_auth_new,
        .auth_initial = mech_winbind_auth_initial,
@@ -355,7 +355,7 @@ const struct mech_module mech_winbind_spnego = {
        .mech_name = "GSS-SPNEGO",
 
        .flags = SASL_MECH_SEC_ALLOW_NULS,
-       .passdb_need = MECH_PASSDB_NEED_NOTHING,
+       .passdb_need = SASL_MECH_PASSDB_NEED_NOTHING,
 
        .auth_new = mech_winbind_spnego_auth_new,
        .auth_initial = mech_winbind_auth_initial,
index b7d8f741055fd1eb99aa961869451f2f27f5b53a..c8dd77b8e66805452f0d2f21022278e0df1bac3f 100644 (file)
@@ -12,7 +12,7 @@ struct mech_module {
        const char *mech_name;
 
        enum sasl_mech_security_flags flags;
-       enum mech_passdb_need passdb_need;
+       enum sasl_mech_passdb_need passdb_need;
 
        struct auth_request *(*auth_new)(void);
        void (*auth_initial)(struct auth_request *request,
index 3ace2c29a04b64dace0ee776437467af615a2a54..839d707791bd9b0ec6da866179be667d282fbd85 100644 (file)
@@ -17,19 +17,19 @@ enum sasl_passdb_result_status {
        SASL_PASSDB_RESULT_OK = PASSDB_RESULT_OK,
 };
 
-enum mech_passdb_need {
+enum sasl_mech_passdb_need {
        /* Mechanism doesn't need a passdb at all */
-       MECH_PASSDB_NEED_NOTHING = 0,
+       SASL_MECH_PASSDB_NEED_NOTHING = 0,
        /* Mechanism just needs to verify a given plaintext password */
-       MECH_PASSDB_NEED_VERIFY_PLAIN,
+       SASL_MECH_PASSDB_NEED_VERIFY_PLAIN,
        /* Mechanism needs to verify a given challenge+response combination,
           i.e. there is only a single response from client.
           (Currently implemented the same as _LOOKUP_CREDENTIALS) */
-       MECH_PASSDB_NEED_VERIFY_RESPONSE,
+       SASL_MECH_PASSDB_NEED_VERIFY_RESPONSE,
        /* Mechanism needs to look up credentials with appropriate scheme */
-       MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
+       SASL_MECH_PASSDB_NEED_LOOKUP_CREDENTIALS,
        /* Mechanism needs to look up credentials and also modify them */
-       MECH_PASSDB_NEED_SET_CREDENTIALS
+       SASL_MECH_PASSDB_NEED_SET_CREDENTIALS,
 };
 
 enum sasl_server_output_status {