passdb-cache.c revision 6ef7e31619edfaa17ed044b45861d106a86191ef
/* Copyright (C) 2004 Timo Sirainen */
#include "common.h"
#include "password-scheme.h"
#include "passdb.h"
#include "passdb-cache.h"
#include <stdlib.h>
{
return;
t_push();
value = "";
} else {
value++;
}
t_pop();
}
}
const char *password,
{
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 */
return TRUE;
}
if (ret < 0) {
"Unknown password scheme %s", scheme);
} else if (ret == 0) {
}
return TRUE;
}
const char *key, const char **password_r,
const char **scheme_r,
enum passdb_result *result_r,
bool use_expired)
{
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];
return TRUE;
}
void passdb_cache_init(void)
{
const char *env;
unsigned int cache_ttl;
return;
if (max_size == 0)
return;
return;
if (cache_ttl == 0)
return;
}
void passdb_cache_deinit(void)
{
if (passdb_cache != NULL)
}