From e6c9be22ab94bd0a0a7d1d286188fc7fc3fa770a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 9 Dec 2007 05:58:43 +0000 Subject: [PATCH] Use hdb_db_dir(). git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22251 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kadmin/stash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kadmin/stash.c b/kadmin/stash.c index 697e42130..d8bd78799 100644 --- a/kadmin/stash.c +++ b/kadmin/stash.c @@ -57,8 +57,11 @@ stash(struct stash_options *opt, int argc, char **argv) return 0; } - if(opt->key_file_string == NULL) - opt->key_file_string = HDB_DB_DIR "/m-key"; + if(opt->key_file_string == NULL) { + asprintf(&opt->key_file_string, "%s/m-key", hdb_db_dir(context)); + if (opt->key_file_string == NULL) + errx(1, "out of memory"); + } ret = hdb_read_master_key(context, opt->key_file_string, &mkey); if(ret && ret != ENOENT) { -- 2.11.4.GIT