passdb-cache.c revision 6cbe2facd40ea3461620571a1c168ce9884be3b3
/* Copyright (c) 2004-2010 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "password-scheme.h"
#include "passdb.h"
#include "passdb-cache.h"
#include <stdlib.h>
static void
{
const char *p;
/* hide the password */
}
}
const char *password,
{
struct auth_cache_node *node;
int ret;
bool expired, neg_expired;
return FALSE;
/* value = password \t ... */
&expired, &neg_expired);
return FALSE;
}
if (*value == '\0') {
/* negative cache entry */
return TRUE;
}
if (*cached_pw == '\0') {
/* NULL password */
ret = 1;
} else {
scheme, "cache");
/* a) the last authentication was successful. assume
that the password was changed and cache is expired.
b) negative TTL reached, use it for password
mismatches too. */
return FALSE;
}
}
/* save the extra_fields only after we know we're using the
cached data */
return TRUE;
}
const char *key, const char **password_r,
const char **scheme_r,
enum passdb_result *result_r,
bool use_expired)
{
struct auth_cache_node *node;
bool expired, neg_expired;
return FALSE;
&expired, &neg_expired);
return FALSE;
}
if (*value == '\0') {
/* negative cache entry */
*password_r = NULL;
return TRUE;
}
return TRUE;
}
{
return;
}
void passdb_cache_deinit(void)
{
if (passdb_cache != NULL)
}