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

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