Skip to content

Commit

Permalink
more error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 23, 2018
1 parent 86e1e83 commit bd58b67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/rlm_passwd/rlm_passwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ static struct hashtable * build_hash_table (char const * file, int nfields,
else ht->delimiter = ':';
if(!tablesize) return ht;
if(!(ht->fp = fopen(file,"r"))) {
ERROR("Failed opening %s - %s", file, fr_strerror());
free(ht->filename);
free(ht);
return NULL;
Expand Down Expand Up @@ -459,7 +460,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
return -1;
}
if (! (inst->ht = build_hash_table (inst->filename, nfields, keyfield, listable, inst->hash_size, inst->ignore_nislike, *inst->delimiter)) ){
ERROR("rlm_passwd: can't build hashtable from passwd file");
ERROR("rlm_passwd: failed reading file.");
return -1;
}
if (! (inst->pwdfmt = mypasswd_malloc(inst->format, nfields, &len)) ){
Expand Down

0 comments on commit bd58b67

Please sign in to comment.