diff --git a/CHANGELOG b/CHANGELOG
index b379431..2fc3c9e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@
- give up trying to update exports list while host is mounted.
- fix to "@network" matching.
- check for fstab update and retry if not updated.
+- change file map lexer to allow white-space only blank lines.
20/2/2007 autofs-5.0.1
----------------------
diff --git a/modules/lookup_file.c b/modules/lookup_file.c
index 0f4d8f1..4a5674e 100644
--- a/modules/lookup_file.c
+++ b/modules/lookup_file.c
@@ -236,11 +236,21 @@ static int read_one(FILE *f, char *key, unsigned int *k_len, char *mapent, unsig
case st_badent:
if (ch == '\n') {
+ nch = getc(f);
+ if (nch != EOF && isblank(nch)) {
+ ungetc(nch, f);
+ break;
+ }
+ ungetc(nch, f);
state = st_begin;
if (gotten == got_real || gotten == getting)
goto got_it;
+ warn(LOGOPT_ANY, MODPREFIX
+ "bad map entry \"%s...\" for key "
+ "\"%s\"", mapent, key);
goto next;
- }
+ } else if (!isblank(ch))
+ gotten = got_nothing;
break;
case st_entspc:
@@ -274,24 +284,21 @@ static int read_one(FILE *f, char *key, unsigned int *k_len, char *mapent, unsig
case st_getent:
if (ch == '\n') {
+ if (escape == esc_all) {
+ state = st_begin;
+ warn(LOGOPT_ANY, MODPREFIX
+ "unmatched \" in %s for key %s",
+ mapent, key);
+ goto next;
+ }
nch = getc(f);
if (nch != EOF && isblank(nch)) {
ungetc(nch, f);
state = st_badent;
- gotten = got_nothing;
- warn(LOGOPT_ANY, MODPREFIX
- "bad map entry \"%s...\" for key "
- "\"%s\"", mapent, key);
break;
}
ungetc(nch, f);
state = st_begin;
- if (escape == esc_all) {
- warn(LOGOPT_ANY, MODPREFIX
- "unmatched \" in %s for key %s",
- mapent, key);
- goto next;
- }
if (gotten == got_real || gotten == getting)
goto got_it;
} else if (mapent_len < MAPENT_MAX_LEN) {