summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kdb
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-05-25 14:27:41 -0400
committerSimo Sorce <ssorce@redhat.com>2011-08-26 08:24:49 -0400
commitb5ba0f7f4879d9312aa76a2097f614d1d3271467 (patch)
treec47bab1710a37b264e11c11a1850558a97881740 /daemons/ipa-kdb
parent6e010fedaa33face61fd521c9f94e5a6058bfd5f (diff)
downloadfreeipa-b5ba0f7f4879d9312aa76a2097f614d1d3271467.tar.gz
freeipa-b5ba0f7f4879d9312aa76a2097f614d1d3271467.tar.xz
freeipa-b5ba0f7f4879d9312aa76a2097f614d1d3271467.zip
ipa-kdb: implement get_time function
Diffstat (limited to 'daemons/ipa-kdb')
-rw-r--r--daemons/ipa-kdb/ipa_kdb.c6
-rw-r--r--daemons/ipa-kdb/ipa_kdb.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/daemons/ipa-kdb/ipa_kdb.c b/daemons/ipa-kdb/ipa_kdb.c
index aa0c154a2..4e8fb3ae9 100644
--- a/daemons/ipa-kdb/ipa_kdb.c
+++ b/daemons/ipa-kdb/ipa_kdb.c
@@ -388,7 +388,11 @@ static krb5_error_code ipadb_create(krb5_context kcontext,
static krb5_error_code ipadb_get_age(krb5_context kcontext,
char *db_name, time_t *age)
{
- return KRB5_PLUGIN_OP_NOTSUPP;
+ /* just return the current time for now,
+ * until we can use persistent searches and have
+ * a better estimate */
+ *age = time(NULL);
+ return 0;
}
static krb5_error_code ipadb_get_principal(krb5_context kcontext,
diff --git a/daemons/ipa-kdb/ipa_kdb.h b/daemons/ipa-kdb/ipa_kdb.h
index f91498a21..008779f7c 100644
--- a/daemons/ipa-kdb/ipa_kdb.h
+++ b/daemons/ipa-kdb/ipa_kdb.h
@@ -27,6 +27,7 @@
#include <errno.h>
#include <kdb.h>
#include <ldap.h>
+#include <time.h>
struct ipadb_context {
char *uri;