Blame SOURCES/autofs-5.0.7-fix-master-map-mount-options-matching.patch

306fa1
autofs-5.0.7 - fix master map mount options matching
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
The master map options pattern matching is fairly primitive since it
306fa1
doesn't need to be very sophisticated. The current mount option pattern
306fa1
matching can't match mount options with quotes or embedded colons and so
306fa1
it can't pass these options through as a global options string.
306fa1
306fa1
But it must be able to match a fairly large class of strings, including
306fa1
the above case, so they can be passed through as global options. Of
306fa1
course it can't try and validate them since it can't know what mount type
306fa1
they may be used with.
306fa1
---
306fa1
 CHANGELOG        |    1 +
306fa1
 lib/master_tok.l |    2 +-
306fa1
 2 files changed, 2 insertions(+), 1 deletion(-)
306fa1
306fa1
diff --git a/CHANGELOG b/CHANGELOG
306fa1
index 1156cc9..00eaff2 100644
306fa1
--- a/CHANGELOG
306fa1
+++ b/CHANGELOG
306fa1
@@ -45,6 +45,7 @@
306fa1
 - add enable sloppy mount option to configure.
306fa1
 - fix interface address null check.
306fa1
 - dont probe rdma mounts.
306fa1
+- fix master map mount options matching.
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
diff --git a/lib/master_tok.l b/lib/master_tok.l
306fa1
index f9b4e55..8d1f1a2 100644
306fa1
--- a/lib/master_tok.l
306fa1
+++ b/lib/master_tok.l
306fa1
@@ -91,7 +91,7 @@ OPTWS		[[:blank:]]*
306fa1
 NL		\r?\n
306fa1
 CONT		\\\n{OPTWS}
306fa1
 
306fa1
-OPTIONSTR	([\-]?([[:alpha:]_]([[:alnum:]_\-])*(=([[:alnum:]_\-])+)*)+)
306fa1
+OPTIONSTR	([\-]?([[:alpha:]_]([[:alnum:]_\-])*(=(\"?([[:alnum:]_\-\:])+\"?))?)+)
306fa1
 MACROSTR	(-D{OPTWS}([[:alpha:]_]([[:alnum:]_\-\.])*)=([[:alnum:]_\-\.])+)
306fa1
 SLASHIFYSTR	(--(no-)?slashify-colons)
306fa1
 NUMBER		[0-9]+