]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: sasl-server - Parse "anonymous" field in AUTH reply.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 12 Aug 2019 21:12:01 +0000 (23:12 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 13 Aug 2019 22:46:26 +0000 (00:46 +0200)
src/login-common/client-common.h
src/login-common/sasl-server.c

index b18a30a5e4fc1c2a320a34fec0071eaf63f6eef4..68257ac3f851d958127ec73f86e1b6d2e90034fe 100644 (file)
@@ -220,6 +220,7 @@ struct client {
        bool auth_try_aborted:1;
        bool auth_initializing:1;
        bool auth_process_comm_fail:1;
+       bool auth_anonymous:1;
        bool proxy_auth_failed:1;
        bool proxy_nopipelining:1;
        bool proxy_not_trusted:1;
index 21b5511b7a4b686c5e0f117a6914b79de4fce5cd..57cba086cd7b501849a4c6194cb981904ca1d2ef 100644 (file)
@@ -288,6 +288,8 @@ authenticate_callback(struct auth_client_request *request,
                                   strcmp(args[i], "proxy") == 0) {
                                /* user can't login */
                                nologin = TRUE;
+                       } else if (strcmp(args[i], "anonymous") == 0 ) {
+                               client->auth_anonymous = TRUE;
                        } else if (str_begins(args[i], "resp=") &&
                                   login_binary->sasl_support_final_reply) {
                                client->sasl_final_resp =
@@ -392,6 +394,7 @@ void sasl_server_auth_begin(struct client *client,
                client->auth_first_started = ioloop_time;
        i_free(client->auth_mech_name);
        client->auth_mech_name = str_ucase(i_strdup(mech_name));
+       client->auth_anonymous = FALSE;
        client->sasl_callback = callback;
 
        mech = auth_client_find_mech(auth_client, mech_name);