lib/base: introduce HEIM_BASE_USE_PATH_TOKENS

KRB5_USE_PATH_TOKENS cannot be used within lib/base as its value
is declared in lib/krb5/krb5.h.  Declare HEIM_BASE_USE_PATH_TOKENS
in lib/base/baselocl.h and test for it in
heim_config_parse_file_multi().

By conditionalizing heim_config_parse_file_multi() behavior on
KRB5_USE_PATH_TOKENS heim_expand_path_tokens() is not executed
and open() is called on a path without token substitution.  As a
result open() always fails with ENOENT.

Change-Id: I29dc018bc560519b76314232b2d51f53bde6313c
This commit is contained in:
Jeffrey Altman
2020-05-25 14:16:35 -04:00
committed by Nicolas Williams
parent f77618ef15
commit 3074561796
3 changed files with 8 additions and 13 deletions

View File

@@ -40,6 +40,7 @@
#define ISTILDE(x) (x == '~')
#ifdef _WIN32
# define ISPATHSEP(x) (x == '/' || x =='\\')
# define HEIM_BASE_USE_PATH_TOKENS 1
#else
# define ISPATHSEP(x) (x == '/')
#endif