summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2003-12-13 06:35:15 +0000
committerKen Raeburn <raeburn@mit.edu>2003-12-13 06:35:15 +0000
commitfdf31b235367b03333258af5e524c36fbd1eee64 (patch)
tree40252ae9b776018e0995bca7eaca7537fbd98bf7 /src
parente6c6cbabddb950453203c974d903f7fc63d27587 (diff)
downloadkrb5-fdf31b235367b03333258af5e524c36fbd1eee64.tar.gz
krb5-fdf31b235367b03333258af5e524c36fbd1eee64.tar.xz
krb5-fdf31b235367b03333258af5e524c36fbd1eee64.zip
add get_name callback for kdb keytab type, for debugging
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15910 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/kdb/ChangeLog5
-rw-r--r--src/lib/kdb/keytab.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog
index 87f60aad9..49ae47865 100644
--- a/src/lib/kdb/ChangeLog
+++ b/src/lib/kdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-13 Ken Raeburn <raeburn@mit.edu>
+
+ * keytab.c (krb5_ktkdb_get_name): New function.
+ (krb5_kt_kdb_ops): Add pointer to it.
+
2003-05-22 Ezra Peisach <epeisach@mit.edu>
* keytab.c (is_xrealm_tgt): Use strncmp instead of strcmp - as
diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c
index 5db382cc2..4d5894d08 100644
--- a/src/lib/kdb/keytab.c
+++ b/src/lib/kdb/keytab.c
@@ -37,11 +37,21 @@ krb5_error_code krb5_ktkdb_close (krb5_context, krb5_keytab);
krb5_error_code krb5_ktkdb_get_entry (krb5_context, krb5_keytab, krb5_const_principal,
krb5_kvno, krb5_enctype, krb5_keytab_entry *);
+static krb5_error_code
+krb5_ktkdb_get_name(krb5_context context, krb5_keytab keytab,
+ char *name, unsigned int namelen)
+{
+ if (namelen < sizeof("KDB:"))
+ return KRB5_KT_NAME_TOOLONG;
+ strcpy(name, "KDB:");
+ return 0;
+}
+
krb5_kt_ops krb5_kt_kdb_ops = {
0,
"KDB", /* Prefix -- this string should not appear anywhere else! */
krb5_ktkdb_resolve, /* resolve */
- NULL, /* get_name */
+ krb5_ktkdb_get_name, /* get_name */
krb5_ktkdb_close, /* close */
krb5_ktkdb_get_entry, /* get */
NULL, /* start_seq_get */