This is about authentication errors that emerge at the login service rather than
the auth service. The error reason was always substituted with an unhelpful
"Authentication failed", while e.g. an error like "Unsupported authentication
mechanism" was supposed to be sent instead.
timeout_remove(&client->to_auth_waiting);
if (args != NULL) {
client_auth_parse_args(client, FALSE, args, &reply);
+ if (reply.reason == NULL)
+ reply.reason = data;
client->last_auth_fail = reply.fail_code;
reply.nologin = TRUE;
reply.all_fields = args;