Blame SOURCES/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch

306fa1
autofs-5.0.7 - Allow nsswitch.conf to not contain "automount:" lines
306fa1
306fa1
From: Michael Tokarev <mjt@tls.msk.ru>
306fa1
306fa1
Current code does not allow a case when nsswitch.conf
306fa1
does not mention automount map at all, like all new
306fa1
installations.  It logs a rather unpleasant error
306fa1
message instead:
306fa1
306fa1
 syntax error in nsswitch config near [ syntax error ]
306fa1
306fa1
this patch has a minimal fix, to allo "file" to be empty.
306fa1
306fa1
Whole parser in C is about 25 lines of code, the "grammar"
306fa1
is trivial, and it is better to ditch all this yacc/lex
306fa1
stuff, but that will be much more intrusive change.
306fa1
306fa1
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
306fa1
Cc: 682266@bugs.debian.org
306fa1
---
306fa1
306fa1
 CHANGELOG       |    1 +
306fa1
 lib/nss_parse.y |    1 +
306fa1
 2 files changed, 2 insertions(+), 0 deletions(-)
306fa1
306fa1
306fa1
diff --git a/CHANGELOG b/CHANGELOG
306fa1
index bd0dd82..16ac2a0 100644
306fa1
--- a/CHANGELOG
306fa1
+++ b/CHANGELOG
306fa1
@@ -16,6 +16,7 @@
306fa1
 - increase file map read buffer size.
306fa1
 - handle new location of systemd.
306fa1
 - fix map entry duplicate offset detection.
306fa1
+- Allow nsswitch.conf to not contain "automount:" lines.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
diff --git a/lib/nss_parse.y b/lib/nss_parse.y
306fa1
index a39fda4..055e9d7 100644
306fa1
--- a/lib/nss_parse.y
306fa1
+++ b/lib/nss_parse.y
306fa1
@@ -72,6 +72,7 @@ file: {
306fa1
 		nss_debug = YYDEBUG;
306fa1
 #endif
306fa1
 	} sources NL
306fa1
+	| /* empty */
306fa1
 	;
306fa1
 
306fa1
 sources: nss_source