diff --git a/autofs-5.0.1-file-map-allow-white-space-only-line.patch b/autofs-5.0.1-file-map-allow-white-space-only-line.patch new file mode 100644 index 0000000..51cba53 --- /dev/null +++ b/autofs-5.0.1-file-map-allow-white-space-only-line.patch @@ -0,0 +1,71 @@ +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) { diff --git a/autofs.spec b/autofs.spec index 26d4f78..8b83e81 100644 --- a/autofs.spec +++ b/autofs.spec @@ -4,7 +4,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.1 -Release: 2 +Release: 3 Epoch: 1 License: GPL Group: System Environment/Daemons @@ -14,6 +14,7 @@ Patch1: autofs-5.0.1-check-user-info-return.patch Patch2: autofs-5.0.1-hosts-simple-fail.patch Patch3: autofs-5.0.1-export-check-network-fix-2.patch Patch4: autofs-5.0.1-check-mtab-updated.patch +Patch5: autofs-5.0.1-file-map-allow-white-space-only-line.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel Conflicts: kernel < 2.6.17 @@ -59,6 +60,7 @@ echo %{version}-%{release} > .version %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -111,6 +113,9 @@ fi %{_libdir}/autofs/ %changelog +* Thu Mar 1 2007 Ian Kent - 5.0.1-3 +- change file map lexer to allow white-space only blank lines (bz 229434). + * Fri Feb 23 2007 Ian Kent - 5.0.1-2 - update "@network" matching patch.