diff options
author | Ken Raeburn <raeburn@mit.edu> | 2003-12-13 06:35:15 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2003-12-13 06:35:15 +0000 |
commit | fdf31b235367b03333258af5e524c36fbd1eee64 (patch) | |
tree | 40252ae9b776018e0995bca7eaca7537fbd98bf7 /src/lib/kdb/keytab.c | |
parent | e6c6cbabddb950453203c974d903f7fc63d27587 (diff) | |
download | krb5-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/lib/kdb/keytab.c')
-rw-r--r-- | src/lib/kdb/keytab.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 */ |