]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: sasl_server_auth_begin() - Remove service parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 14 May 2020 16:17:22 +0000 (19:17 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Jan 2022 11:52:08 +0000 (13:52 +0200)
Use login_binary->protocol directly. It's always going to be that.

src/login-common/client-common-auth.c
src/login-common/sasl-server.c
src/login-common/sasl-server.h

index b00dc666f017e230001e7ad73e2639adadd4111b..716061e338bee170b6a22dd46bed9356856ceb8f 100644 (file)
@@ -896,8 +896,8 @@ client_auth_begin_common(struct client *client, const char *mech_name,
 
        client_ref(client);
        client->auth_initializing = TRUE;
-       sasl_server_auth_begin(client, login_binary->protocol, mech_name,
-                              auth_flags, init_resp, sasl_callback);
+       sasl_server_auth_begin(client, mech_name, auth_flags,
+                              init_resp, sasl_callback);
        client->auth_initializing = FALSE;
        if (!client->authenticating)
                return 1;
index 3a03a375596ec336c7eb1b7999a44e33a7c30576..379388b93e176568b4eb21d20c69bcb9f47f55ef 100644 (file)
@@ -434,8 +434,7 @@ static bool get_cert_username(struct client *client, const char **username_r,
        return TRUE;
 }
 
-void sasl_server_auth_begin(struct client *client,
-                           const char *service, const char *mech_name,
+void sasl_server_auth_begin(struct client *client, const char *mech_name,
                            enum sasl_server_auth_flags flags,
                            const char *initial_resp_base64,
                            sasl_server_callback_t *callback)
@@ -479,7 +478,7 @@ void sasl_server_auth_begin(struct client *client,
 
        i_zero(&info);
        info.mech = mech->name;
-       info.service = service;
+       info.service = login_binary->protocol;
        info.session_id = client_get_session_id(client);
 
        if (!get_cert_username(client, &info.cert_username, &error)) {
index 62210b737b5cd5d0ec1c8e278a69639dbe0de8a4..68e9b359a4a005f92bd9310c68f15909363adcd7 100644 (file)
@@ -28,8 +28,7 @@ sasl_server_get_advertised_mechs(struct client *client, unsigned int *count_r);
 const struct auth_mech_desc *
 sasl_server_find_available_mech(struct client *client, const char *name);
 
-void sasl_server_auth_begin(struct client *client,
-                           const char *service, const char *mech_name,
+void sasl_server_auth_begin(struct client *client, const char *mech_name,
                            enum sasl_server_auth_flags flags,
                            const char *initial_resp_base64,
                            sasl_server_callback_t *callback);