passdb-cache.c revision 89a126810703c666309310d0f3189e9834d70b5b
/* Copyright (c) 2004-2007 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "password-scheme.h"
#include "passdb.h"
#include "passdb-cache.h"
#include <stdlib.h>
const char *password,
{
struct auth_cache_node *node;
int ret;
bool expired;
return FALSE;
/* value = password \t ... */
return FALSE;
}
if (*value == '\0') {
/* negative cache entry */
return TRUE;
}
if (*cached_pw == '\0') {
/* NULL password */
ret = 1;
} else {
scheme, "cache");
/* the last authentication was successful. assume that
the password was changed and cache is expired. */
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;
if (passdb_cache == NULL)
return FALSE;
return FALSE;
}
if (*value == '\0') {
/* negative cache entry */
*password_r = NULL;
return TRUE;
}
*password_r = list[0];
if (*password_r == '\0') {
*password_r = NULL;
}
return TRUE;
}
void passdb_cache_init(void)
{
const char *env;
unsigned int cache_ttl, neg_cache_ttl;
return;
if (max_size == 0)
return;
return;
if (cache_ttl == 0)
return;
}
void passdb_cache_deinit(void)
{
if (passdb_cache != NULL)
}