aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2013-11-17 11:01:10 +0200
committerSergey Poznyakoff <gray@gnu.org>2013-11-17 11:01:10 +0200
commite817336f0824225838b6ff447760a1679f2d4e66 (patch)
treed6fb2d1db9fc449128a4f1e0b6ed8141025be251
parent4eccb77bc7bfcfd14088f5b04422ca6bb49b369b (diff)
downloadeclat-e817336f0824225838b6ff447760a1679f2d4e66.tar.gz
eclat-e817336f0824225838b6ff447760a1679f2d4e66.tar.bz2
Bigfix
* lib/ldapmap.c (ldap_map_open): Return if unable to open map.
-rw-r--r--lib/ldapmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ldapmap.c b/lib/ldapmap.c
index 53da182..6caedf7 100644
--- a/lib/ldapmap.c
+++ b/lib/ldapmap.c
@@ -486,10 +486,12 @@ ldap_map_open(int dbg, void *data)
if (map->passfile) {
char *filename = eclat_expand_kw(map->passfile, kw);
FILE *fp = fopen(filename, "r");
- if (!fp)
+ if (!fp) {
err("cannot open password file %s: %s",
filename, strerror(errno));
- else {
+ free(filename);
+ return eclat_map_failure;
+ } else {
char *buf = NULL;
size_t size = 0;
int rc = grecs_getline(&buf, &size, fp);

Return to:

Send suggestions and report system problems to the System administrator.