char **db_args);
/*
- * Optional: Set *age to the last modification time of the database. Used
- * by the KDC lookaside cache to ensure that lookaside entries are not used
- * if the database has changed since the entry was recorded.
- *
- * If this function is unimplemented, lookaside cache entries will
- * effectively expire immediately. Another option is to supply the current
- * time, which will cause lookaside cache entries to last for one second.
+ * Deprecated: No longer used as of krb5 1.10; can be removed in the next
+ * DAL revision. Modules should leave as NULL.
*/
krb5_error_code (*get_age)(krb5_context kcontext, char *db_name,
time_t *age);
struct _krb5_kdc_replay_ent *next;
int num_hits;
krb5_int32 timein;
- time_t db_age;
krb5_data *req_packet;
krb5_data *reply_packet;
} krb5_kdc_replay_ent;
static int num_entries = 0;
#define STALE_TIME 2*60 /* two minutes */
-#define STALE(ptr) ((abs((ptr)->timein - timenow) >= STALE_TIME) || \
- ((ptr)->db_age != db_age))
+#define STALE(ptr) (abs((ptr)->timein - timenow) >= STALE_TIME)
#define MATCH(ptr) (((ptr)->req_packet->length == inpkt->length) && \
!memcmp((ptr)->req_packet->data, inpkt->data, \
- inpkt->length) && \
- ((ptr)->db_age == db_age))
+ inpkt->length))
/* XXX
Todo: quench the size of the queue...
*/
{
krb5_int32 timenow;
register krb5_kdc_replay_ent *eptr, *last, *hold;
- time_t db_age;
- if (krb5_timeofday(kdc_context, &timenow) ||
- krb5_db_get_age(kdc_context, 0, &db_age))
+ if (krb5_timeofday(kdc_context, &timenow))
return FALSE;
calls++;
{
register krb5_kdc_replay_ent *eptr;
krb5_int32 timenow;
- time_t db_age;
- if (krb5_timeofday(kdc_context, &timenow) ||
- krb5_db_get_age(kdc_context, 0, &db_age))
+ if (krb5_timeofday(kdc_context, &timenow))
return;
/* this is a new entry */
if (!eptr)
return;
eptr->timein = timenow;
- eptr->db_age = db_age;
/*
* This is going to hurt a lot malloc()-wise due to the need to
* allocate memory for the krb5_data and krb5_address elements.