client-common.c revision 97db4761382024093f441e4bc78ba8b6a056504d
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "hostpid.h"
#include "llist.h"
#include "str.h"
#include "str-sanitize.h"
#include "var-expand.h"
#include "ssl-proxy.h"
#include "client-common.h"
#include <stdlib.h>
static unsigned int clients_count = 0;
{
}
{
i_assert(clients_count > 0);
}
unsigned int clients_get_count(void)
{
return clients_count;
}
static const struct var_expand_table *
{
static struct var_expand_table static_tab[] = {
};
struct var_expand_table *tab;
unsigned int i;
for (i = 0; i < 3; i++)
}
} else {
"TLS" : "TLS handshaking";
}
return tab;
}
{
char key;
unsigned int i;
}
}
return FALSE;
}
static const char *
{
};
const struct var_expand_table *var_expand_table;
struct var_expand_table *tab;
const char *p;
char *const *e;
for (p = *e; *p != '\0'; p++) {
if (*p != '%' || p[1] == '\0')
continue;
p++;
if (have_key(var_expand_table, p)) {
break;
}
}
}
str_truncate(str, 0);
}
{
T_BEGIN {
} T_END;
}
{
T_BEGIN {
} T_END;
}
{
const char *const *net;
unsigned int bits;
return FALSE;
i_error("login_trusted_networks: "
"Invalid network '%s'", *net);
break;
}
return TRUE;
}
return FALSE;
}
{
return "(client sent an invalid cert)";
return "(client didn't send a cert)";
}
if (client->auth_attempts == 0)
return "(no auth attempts)";
return "(tried to use disabled plaintext auth)";
return "(cert required, client didn't start TLS)";
return t_strdup_printf("(auth failed, %u attempts)",
}