diff -ur openpam-20050616.orig/lib/openpam_configure.c openpam-20050616/lib/openpam_configure.c --- openpam-20050616.orig/lib/openpam_configure.c 2005-06-15 23:00:00 +0100 +++ openpam-20050616/lib/openpam_configure.c 2007-02-06 14:55:20 +0000 @@ -220,8 +220,14 @@ goto syserr; this->module = openpam_load_module(name); FREE(name); - if (this->module == NULL) + if (this->module == NULL) { + if (this->flag == PAM_OPTIONAL || + this->flag == PAM_SUFFICIENT) { + free(this); + continue; + } goto fail; + } /* module options */ p = q = next_word(p); @@ -249,7 +255,7 @@ /* next please... */ FREE(line); } - if (!feof(f)) + if (!feof(f) || count == 0) goto syserr; fclose(f); return (count);