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

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