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

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