Simplifies things and Lemonade spec specifies it as a "MUST be sent" anyway.
--HG--
branch : HEAD
static int cmd_capability(struct imap_client *client)
{
- client->common.master_login_flags |=
- LOGIN_IMAP_FLAG_FULL_CAPABILITY_SENT;
client_send_line(client, t_strconcat(
"* CAPABILITY ", get_capability(client, TRUE), NULL));
client_send_tagline(client, "OK Capability completed.");
client->common.secured = TRUE;
client_set_title(client);
- /* CAPABILITY sent before STARTTLS can't be trusted */
- client->common.master_login_flags &=
- ~LOGIN_IMAP_FLAG_FULL_CAPABILITY_SENT;
-
client->common.fd = fd_ssl;
i_stream_unref(&client->common.input);
o_stream_unref(&client->output);
"* PREAUTH [CAPABILITY ",
str_c(capability_string), "] "
"Logged in as ", user, NULL));
- } else if (getenv("CLIENT_SEND_CAPABILITY") == NULL) {
- client_send_line(client,
- t_strconcat(tag, " OK Logged in.", NULL));
} else {
client_send_line(client, t_strconcat(
tag, " OK [CAPABILITY ",
char *auth_mech_name;
struct auth_request *auth_request;
- enum master_login_flags master_login_flags;
unsigned int master_tag;
master_callback_t *master_callback;
sasl_server_callback_t *sasl_callback;
req->auth_id = auth_id;
req->local_ip = client->local_ip;
req->remote_ip = client->ip;
- req->flags = client->master_login_flags;
req->cmd_tag_size = cmd_tag_size;
req->data_size = req->cmd_tag_size + size;
#if (LOGIN_MAX_INBUF_SIZE*2) != MASTER_LOGIN_MAX_DATA_SIZE
authreq->mail_request.fd = client_fd;
authreq->mail_request.local_ip = req.local_ip;
authreq->mail_request.remote_ip = req.remote_ip;
- authreq->mail_request.flags = req.flags;
authreq->mail_request.cmd_tag_size = req.cmd_tag_size;
authreq->mail_request.data_size = req.data_size;
memcpy(authreq->data, data, req.data_size);
#include "home-expand.h"
#include "var-expand.h"
#include "mail-process.h"
-#include "master-login-interface.h"
#include "login-process.h"
#include "log.h"
env_put(t_strconcat("IMAPLOGINTAG=",
t_strndup(data, request->cmd_tag_size), NULL));
}
- if ((request->flags & LOGIN_IMAP_FLAG_FULL_CAPABILITY_SENT) == 0 &&
- process_type == PROCESS_TYPE_IMAP)
- env_put("CLIENT_SEND_CAPABILITY=1");
if (request->data_size > request->cmd_tag_size) {
str_truncate(str, 0);
struct mail_login_request {
int fd;
- enum master_login_flags flags;
unsigned int cmd_tag_size;
unsigned int data_size;
struct ip_addr local_ip, remote_ip;
LOGIN_STATE_COUNT
};
-enum master_login_flags {
- LOGIN_IMAP_FLAG_FULL_CAPABILITY_SENT = 0x01
-};
-
struct master_login_request {
uint32_t version;
/* if fd == -1, tag is used as master_login_state */
/* request follows this many bytes of client input */
uint16_t data_size;
uint16_t cmd_tag_size;
- uint32_t flags;
ino_t ino;