ISPATHSEP and ISTILDE macros; Windows portability
Windows treats '\\' and '/' equivalently but we cannot control the form that will be used by end users. Introduce ISPATHSEP() macro which tests only for '/' on UNIX and both on Windows. Introduce ISTILDE() macro to test for '~'. When testing for '/' with strchr() or strrchr() add conditional checks for '\\' on Windows. Change-Id: Ia85e698fc88f15a6a71db649db5417f02ef7e5fe
This commit is contained in:
@@ -425,7 +425,7 @@ krb5_config_parse_file_multi (krb5_context context,
|
||||
* current users home directory. The behavior can be disabled and
|
||||
* enabled by calling krb5_set_home_dir_access().
|
||||
*/
|
||||
if (fname[0] == '~' && fname[1] == '/') {
|
||||
if (ISTILDE(fname[0]) && ISPATHSEP(fname[1])) {
|
||||
#ifndef KRB5_USE_PATH_TOKENS
|
||||
const char *home = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user