Use hdb_db_dir().

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22251 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-12-09 05:58:43 +00:00
parent ada0c9cb9d
commit e6c9be22ab

View File

@@ -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) {