~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

« back to all changes in this revision

Viewing changes to src/imap-login/client-authenticate.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-28 08:45:43 UTC
  • mfrom: (1.10.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060628084543-pc6v7oikzlvnlnu3
Tags: 1.0.beta9-1ubuntu1
* Merge from debian unstable, resolved minor conflicts.
* debian/control: Removed unnecessary build dependency ssl-cert, add it as
  dovecot-common dependency.
* Remove debian/patches/prohibit_.._mbox_mask.dpatch, upstream now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
                return;
64
64
 
65
65
        if (strcmp(line, "*") == 0) {
66
 
                sasl_server_auth_cancel(&client->common,
67
 
                                        "Authentication aborted");
 
66
                sasl_server_auth_client_error(&client->common,
 
67
                                              "Authentication aborted");
68
68
                return;
69
69
        }
70
70
 
71
71
        if (client->common.auth_request == NULL) {
72
 
                sasl_server_auth_cancel(&client->common,
73
 
                                        "Don't send unrequested data");
 
72
                sasl_server_auth_client_error(&client->common,
 
73
                                              "Don't send unrequested data");
74
74
        } else {
75
75
                auth_client_request_continue(client->common.auth_request, line);
 
76
                client->common.auth_request = NULL;
76
77
        }
77
78
 
78
79
        /* clear sensitive data */
178
179
{
179
180
        struct imap_client *client = (struct imap_client *)_client;
180
181
        struct const_iovec iov[3];
 
182
        const char *msg;
181
183
        size_t data_len;
182
184
 
183
185
        switch (reply) {
191
193
                client_destroy(client, "Login");
192
194
                break;
193
195
        case SASL_SERVER_REPLY_AUTH_FAILED:
 
196
        case SASL_SERVER_REPLY_CLIENT_ERROR:
194
197
                if (args != NULL) {
195
198
                        if (client_handle_args(client, args, TRUE))
196
199
                                break;
197
200
                }
198
201
 
199
 
                client_send_tagline(client, "NO "AUTH_FAILED_MSG);
 
202
                msg = reply == SASL_SERVER_REPLY_AUTH_FAILED ? "NO " : "BAD ";
 
203
                msg = t_strconcat(msg, data != NULL ? data : AUTH_FAILED_MSG,
 
204
                                  NULL);
 
205
                client_send_tagline(client, msg);
200
206
 
201
207
                /* get back to normal client input. */
202
208
                if (client->io != NULL)