From 77fee77d0e1ab211bb0eaa53024bfbf3b9178f49 Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Wed, 26 Aug 2009 13:02:17 -0400 Subject: [PATCH] Use path tokens in krb5_config_parse_file_multi() --- lib/krb5/config_file.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/krb5/config_file.c b/lib/krb5/config_file.c index 639a55c06..558b82d14 100644 --- a/lib/krb5/config_file.c +++ b/lib/krb5/config_file.c @@ -420,6 +420,7 @@ krb5_config_parse_file_multi (krb5_context context, * enabled by calling krb5_set_home_dir_access(). */ if (fname[0] == '~' && fname[1] == '/') { +#ifndef KRB5_USE_PATH_TOKENS const char *home = NULL; if (!_krb5_homedir_access(context)) { @@ -445,6 +446,15 @@ krb5_config_parse_file_multi (krb5_context context, } fname = newfname; } +#else /* KRB5_USE_PATH_TOKENS */ + asprintf(&newfname, "%%{APPDATA}%s", &fname[1]); + if (newfname == NULL) { + krb5_set_error_message(context, ENOMEM, + N_("malloc: out of memory", "")); + return ENOMEM; + } + fname = newfname; +#endif } if (is_plist_file(fname)) {