49 |
cfg = c = (char *)xmalloc(PATH_MAX * sizeof(char)); |
cfg = c = (char *)xmalloc(PATH_MAX * sizeof(char)); |
50 |
snprintf(cfg, PATH_MAX, "%s/%s", home, PATHNAME_CONFIG_FILE); |
snprintf(cfg, PATH_MAX, "%s/%s", home, PATHNAME_CONFIG_FILE); |
51 |
} |
} |
52 |
#ifdef DEBUG |
debug("configuration file: '%s'\n", cfg); |
|
fprintf(stderr, "debug: configuration file: '%s'\n", cfg); |
|
|
#endif |
|
53 |
|
|
54 |
fd = fopen(cfg, "r"); |
fd = fopen(cfg, "r"); |
55 |
if (fd == NULL) |
if (fd == NULL) |
67 |
|
|
68 |
check_file_perms(cfg, S_IRUSR | S_IWUSR); |
check_file_perms(cfg, S_IRUSR | S_IWUSR); |
69 |
|
|
70 |
#ifdef DEBUG |
debug("options: %0#10x '%s'\n", options, charset); |
|
fprintf(stderr, "debug: options: %0#10x '%s'\n", options, charset); |
|
|
#endif |
|
71 |
|
|
72 |
return 0; |
return 0; |
73 |
} |
} |
315 |
*passphr = '\0'; |
*passphr = '\0'; |
316 |
} |
} |
317 |
snprintf(pwfile, PATH_MAX, "%s/%s", home, PATHNAME_PASSWORD_FILE); |
snprintf(pwfile, PATH_MAX, "%s/%s", home, PATHNAME_PASSWORD_FILE); |
318 |
#ifdef DEBUG |
debug("passwords file: '%s'\n", pwfile); |
|
fprintf(stderr, "debug: passwords file: '%s'\n", pwfile); |
|
|
#endif |
|
319 |
|
|
320 |
if (!exists_file(pwfile)) |
if (!exists_file(pwfile)) |
321 |
return ERROR_FILE_OPEN; |
return ERROR_FILE_OPEN; |