add fullname unparse feature
authorJohn Kohl <jtkohl@mit.edu>
Fri, 27 Apr 1990 10:02:12 +0000 (10:02 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 27 Apr 1990 10:02:12 +0000 (10:02 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@603 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/setup_mkey.c

index 2164042d959cfc42a9549656cf5df4293f6d6250..55b7a834dc1a80112b8fd5b7792b3c3f0415aee5 100644 (file)
@@ -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: