summaryrefslogtreecommitdiffstats
path: root/src/include/krb5
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-06-02 14:06:58 -0400
committerGreg Hudson <ghudson@mit.edu>2012-06-02 14:08:08 -0400
commit246a24f393ffd3c9dfcce56618804ad59edc996e (patch)
treef4303a3ab2e2837bee9537f6680f2f71de153cd3 /src/include/krb5
parenta5c693ee32900b252490a75b18ed40088eb6fec0 (diff)
downloadkrb5-246a24f393ffd3c9dfcce56618804ad59edc996e.tar.gz
krb5-246a24f393ffd3c9dfcce56618804ad59edc996e.tar.xz
krb5-246a24f393ffd3c9dfcce56618804ad59edc996e.zip
Add krb5_kt_have_content API
Add the krb5_kt_have_content API from Heimdal, which can be used to test whether a keytab exists and contains entries. Add tests to t_keytab.c. There is a deviation from Heimdal in the function signature. Heimdal's signature returns a krb5_boolean at the moment, because the Heimdal implementation actually returns a krb5_error_code. These are generally the same type anyway (int). ticket: 7158 (new)
Diffstat (limited to 'src/include/krb5')
-rw-r--r--src/include/krb5/krb5.hin12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 3208be54c4..ca5ccbd0ea 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -2872,6 +2872,18 @@ krb5_error_code KRB5_CALLCONV
krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab,
krb5_kt_cursor *cursor);
+/**
+ * Check if a keytab exists and contains entries.
+ *
+ * @param [in] context Library context
+ * @param [in] keytab Key table handle
+ *
+ * @retval 0 Keytab exists and contains entries
+ * @retval KRB5_KT_NOTFOUND Keytab does not contain entries
+ */
+krb5_error_code KRB5_CALLCONV
+krb5_kt_have_content(krb5_context context, krb5_keytab keytab);
+
/*
* end "keytab.h"
*/