client-authenticate.c revision 0a5a9ccc0aebf3cabfb913d8088f2a7d322b497f
/* Copyright (c) 2002-2011 Dovecot authors, see the included COPYING file */
#include "login-common.h"
#include "base64.h"
#include "buffer.h"
#include "hostpid.h"
#include "ioloop.h"
#include "istream.h"
#include "ostream.h"
#include "safe-memset.h"
#include "str.h"
#include "str-sanitize.h"
#include "time-util.h"
#include "imap-resp-code.h"
#include "imap-parser.h"
#include "auth-client.h"
#include "client.h"
#include "client-authenticate.h"
#include "imap-proxy.h"
#include <stdlib.h>
{
const struct auth_mech_desc *mech;
unsigned int i, count;
for (i = 0; i < count; i++) {
}
}
const struct client_auth_reply *reply)
{
/* IMAP referral
[nologin] referral host=.. [port=..] [destuser=..]
[reason=..]
NO [REFERRAL imap://destuser;AUTH=..@host:port/] Can't login.
OK [...] Logged in, but you should use this server instead.
.. [REFERRAL ..] (Reason from auth server)
*/
else {
"this server instead.");
}
return TRUE;
}
return FALSE;
} else if (reply->authz_failure) {
"Authorization failed");
} else {
}
return TRUE;
}
static int
const char *init_resp)
{
char *prefix;
}
{
/* <auth mechanism name> [<initial SASL response>] */
return -1;
args++;
else
return -1;
}
{
/* two arguments: username and password */
return -1;
return 1;
/* authorization ID \0 authentication ID \0 pass */
}