summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-05-25 14:27:41 -0400
committerSimo Sorce <ssorce@redhat.com>2012-01-11 12:04:12 -0500
commit79ae322423d953bb744d031d4eabc77a33223001 (patch)
tree0784d4041a80725b641a9f50b8236210fcf2c562 /daemons
parent21312c7da3d3287910af9ccae28e4e955548f1a9 (diff)
downloadfreeipa.git-79ae322423d953bb744d031d4eabc77a33223001.tar.gz
freeipa.git-79ae322423d953bb744d031d4eabc77a33223001.tar.xz
freeipa.git-79ae322423d953bb744d031d4eabc77a33223001.zip
ipa-kdb: implement get_time function
Diffstat (limited to 'daemons')
-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 aa0c154a..4e8fb3ae 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 f91498a2..008779f7 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;