From: Stephan Bosch Date: Mon, 12 Aug 2019 21:12:01 +0000 (+0200) Subject: login-common: sasl-server - Parse "anonymous" field in AUTH reply. X-Git-Tag: 2.3.9~329 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c80d63c691dd5fdcc65487d8a9e1d7e2272de29a;p=thirdparty%2Fdovecot%2Fcore.git login-common: sasl-server - Parse "anonymous" field in AUTH reply. --- diff --git a/src/login-common/client-common.h b/src/login-common/client-common.h index b18a30a5e4..68257ac3f8 100644 --- a/src/login-common/client-common.h +++ b/src/login-common/client-common.h @@ -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; diff --git a/src/login-common/sasl-server.c b/src/login-common/sasl-server.c index 21b5511b7a..57cba086cd 100644 --- a/src/login-common/sasl-server.c +++ b/src/login-common/sasl-server.c @@ -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);