From 10aa3e50c4e655b194963a55b4fd5ad5c10e6aad Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 19 Feb 1991 19:40:21 +0000 Subject: [PATCH] Changes to conform with API modifications git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1731 dc483132-0cff-0310-8789-dd5450dbe970 --- src/admin/create/kdb5_create.c | 10 +++++----- src/admin/stash/kdb5_stash.c | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/admin/create/kdb5_create.c b/src/admin/create/kdb5_create.c index e0e2de6d2..6ad008bf4 100644 --- a/src/admin/create/kdb5_create.c +++ b/src/admin/create/kdb5_create.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_kdb_create_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -115,7 +115,7 @@ char *argv[]; char *realm = 0; char *mkey_name = 0; char *mkey_fullname; - char defrealm[BUFSIZ]; + char *defrealm; int keytypedone = 0; krb5_enctype etype = 0xffff; @@ -183,7 +183,7 @@ char *argv[]; exit(1); } if (!realm) { - if (retval = krb5_get_default_realm(sizeof(defrealm), defrealm)) { + if (retval = krb5_get_default_realm(&defrealm)) { com_err(argv[0], retval, "while retrieving default realm name"); exit(1); } @@ -316,6 +316,6 @@ struct realm_info *pblock; if (retval = krb5_db_put_principal(&entry, &nentries)) return retval; - free((char *)ekey.contents); + xfree(ekey.contents); return 0; } diff --git a/src/admin/stash/kdb5_stash.c b/src/admin/stash/kdb5_stash.c index c9275210c..c18704f11 100644 --- a/src/admin/stash/kdb5_stash.c +++ b/src/admin/stash/kdb5_stash.c @@ -57,7 +57,6 @@ char *argv[]; char *realm = 0; char *mkey_name = 0; char *mkey_fullname; - char defrealm[BUFSIZ]; char *keyfile = 0; int keytypedone = 0; @@ -127,11 +126,10 @@ char *argv[]; exit(1); } if (!realm) { - if (retval = krb5_get_default_realm(sizeof(defrealm), defrealm)) { + if (retval = krb5_get_default_realm(&realm)) { com_err(argv[0], retval, "while retrieving default realm name"); exit(1); } - realm = defrealm; } /* assemble & parse the master key name */ -- 2.26.2