From: Stephan Bosch Date: Fri, 6 Jan 2023 13:45:38 +0000 (+0100) Subject: auth: auth-scram-server - Change return type of auth_scram_get_server_first() to... X-Git-Tag: 2.4.0~3137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6033c4ab91752f1cdf7d3db8defacf9b18cc610;p=thirdparty%2Fdovecot%2Fcore.git auth: auth-scram-server - Change return type of auth_scram_get_server_first() to string_t*. --- diff --git a/src/auth/auth-scram-server.c b/src/auth/auth-scram-server.c index 25fa48a3d9..6ef04ca072 100644 --- a/src/auth/auth-scram-server.c +++ b/src/auth/auth-scram-server.c @@ -159,7 +159,7 @@ auth_scram_parse_client_first(struct scram_auth_request *server, return 0; } -static const char * +static string_t * auth_scram_get_server_first(struct scram_auth_request *server, int iter, const char *salt) { @@ -196,7 +196,7 @@ auth_scram_get_server_first(struct scram_auth_request *server, strlen(salt)); str_printfa(str, "r=%s%s,s=%s,i=%d", server->cnonce, server->snonce, salt, iter); - return str_c(str); + return str; } static bool diff --git a/src/auth/mech-scram.c b/src/auth/mech-scram.c index c73b5e127a..ade3aca142 100644 --- a/src/auth/mech-scram.c +++ b/src/auth/mech-scram.c @@ -74,7 +74,7 @@ credentials_callback(enum passdb_result result, } request->server_first_message = p_strdup(request->pool, - auth_scram_get_server_first(request, iter_count, salt)); + str_c(auth_scram_get_server_first(request, iter_count, salt))); auth_request_handler_reply_continue(auth_request, request->server_first_message,