From e75284621a4d4159837fc5937b94593997904c09 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 27 Apr 1990 10:02:12 +0000 Subject: [PATCH] add fullname unparse feature git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@603 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/setup_mkey.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/kdb/setup_mkey.c b/src/lib/kdb/setup_mkey.c index 2164042d9..55b7a834d 100644 --- a/src/lib/kdb/setup_mkey.c +++ b/src/lib/kdb/setup_mkey.c @@ -27,11 +27,13 @@ static char rcsid_setup_mkey_c[] = */ krb5_error_code -krb5_db_setup_mkey_name(keyname, realm, principal) +krb5_db_setup_mkey_name(keyname, realm, fullname, principal) const char *keyname; const char *realm; +char **fullname; krb5_principal *principal; { + krb5_error_code retval; krb5_principal retprinc; int keylen = strlen(keyname); int rlen = strlen(realm); @@ -60,6 +62,12 @@ krb5_principal *principal; bcopy(keyname, retprinc[1]->data, keylen); retprinc[1]->length = keylen; + if (fullname && (retval = krb5_unparse_name(retprinc, fullname))) { + xfree(retprinc[1]); + xfree(retprinc[0]); + xfree(retprinc); + return retval; + } return 0; free1: -- 2.26.2