]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonCap: allow . in unquoted string
authorSage Weil <sage@inktank.com>
Fri, 23 Aug 2013 21:56:37 +0000 (14:56 -0700)
committerSage Weil <sage@inktank.com>
Fri, 23 Aug 2013 21:56:37 +0000 (14:56 -0700)
Fixes: #5967
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/mon/MonCap.cc
src/test/mon/moncap.cc

index d8bccce9bc2835a7f116f82e040a492d498e5a30..644d614bdf94a58d9f8a456840ed58f2e41f1293 100644 (file)
@@ -346,7 +346,7 @@ struct MonCapParser : qi::grammar<Iterator, MonCap()>
     quoted_string %=
       lexeme['"' >> +(char_ - '"') >> '"'] | 
       lexeme['\'' >> +(char_ - '\'') >> '\''];
-    unquoted_word %= +char_("a-zA-Z0-9_-");
+    unquoted_word %= +char_("a-zA-Z0-9_.-");
     str %= quoted_string | unquoted_word;
 
     spaces = +lit(' ');
index 19f82f55ecf3ecf17c77f1e2c2ca90aa0a0e5d63..238442b90d8fc7897149bf7091173e42c51b6c92 100644 (file)
@@ -51,6 +51,7 @@ const char *parse_good[] = {
   "allow service foo-foo r, allow service bar r",
   "allow service \" foo \" w, allow service bar r",
   "allow command abc with arg=foo arg2=bar, allow service foo r",
+  "allow command abc.def with arg=foo arg2=bar, allow service foo r",
   "allow command \"foo bar\" with arg=\"baz\"",
   "allow command \"foo bar\" with arg=\"baz.xx\"",
   0