client-authenticate.c (dovecot-2.3.16) | : | client-authenticate.c (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 271 | skipping to change at line 271 | |||
smtp_server_cmd_auth_send_challenge(cmd, data); | smtp_server_cmd_auth_send_challenge(cmd, data); | |||
} | } | |||
int cmd_auth(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, | int cmd_auth(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, | |||
struct smtp_server_cmd_auth *data) | struct smtp_server_cmd_auth *data) | |||
{ | { | |||
struct submission_client *subm_client = conn_ctx; | struct submission_client *subm_client = conn_ctx; | |||
struct client *client = &subm_client->common; | struct client *client = &subm_client->common; | |||
struct smtp_server_helo_data *helo; | struct smtp_server_helo_data *helo; | |||
const char *prefix = ""; | struct smtp_proxy_data proxy; | |||
i_assert(subm_client->pending_auth == NULL); | i_assert(subm_client->pending_auth == NULL); | |||
buffer_t *buf = buffer_create_dynamic(default_pool, 2048); | ||||
/* pass ehlo parameter to post-login service upon successful login */ | ||||
helo = smtp_server_connection_get_helo_data(subm_client->conn); | helo = smtp_server_connection_get_helo_data(subm_client->conn); | |||
if (helo->domain_valid) { | if (helo->domain_valid) { | |||
i_assert(helo->domain != NULL); | i_assert(helo->domain != NULL); | |||
prefix = helo->domain; | buffer_append(buf, helo->domain, strlen(helo->domain)); | |||
} | } | |||
buffer_append_c(buf, '\0'); | ||||
/* pass proxied ehlo parameter to post-login service upon successful | ||||
login */ | ||||
smtp_server_connection_get_proxy_data(subm_client->conn, &proxy); | ||||
if (proxy.helo != NULL) | ||||
buffer_append(buf, proxy.helo, strlen(proxy.helo)); | ||||
buffer_append_c(buf, '\0'); | ||||
/* pass ehlo parameter to post-login service upon successful login */ | ||||
i_free(client->master_data_prefix); | i_free(client->master_data_prefix); | |||
client->master_data_prefix = (void *)i_strdup(prefix); | client->master_data_prefix_len = buf->used; | |||
client->master_data_prefix_len = strlen(prefix) + 1; | client->master_data_prefix = buffer_free_without_data(&buf); | |||
subm_client->pending_auth = cmd; | subm_client->pending_auth = cmd; | |||
(void)client_auth_begin(client, data->sasl_mech, data->initial_response); | (void)client_auth_begin(client, data->sasl_mech, data->initial_response); | |||
return 0; | return 0; | |||
} | } | |||
End of changes. 6 change blocks. | ||||
5 lines changed or deleted | 15 lines changed or added |