From 7929228d564daee252e2cbfcd38ca9eb04b02c31 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 23 Aug 2013 14:56:46 -0700 Subject: [PATCH] osd/OSDCap: allow . for unquoted strings Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- src/osd/OSDCap.cc | 2 +- src/test/osd/osdcap.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/OSDCap.cc b/src/osd/OSDCap.cc index ee77f0ea43d0..e315835f4bab 100644 --- a/src/osd/OSDCap.cc +++ b/src/osd/OSDCap.cc @@ -178,7 +178,7 @@ struct OSDCapParser : qi::grammar equoted_string %= lexeme['"' >> *(char_ - '"') >> '"'] | lexeme['\'' >> *(char_ - '\'') >> '\'']; - unquoted_word %= +char_("a-zA-Z0-9_-"); + unquoted_word %= +char_("a-zA-Z0-9_.-"); str %= quoted_string | unquoted_word; estr %= equoted_string | unquoted_word; diff --git a/src/test/osd/osdcap.cc b/src/test/osd/osdcap.cc index 5f7c607deec4..8fc3ddd812a1 100644 --- a/src/test/osd/osdcap.cc +++ b/src/test/osd/osdcap.cc @@ -41,6 +41,7 @@ const char *parse_good[] = { "allow rwx pool foo; allow r pool bar", "allow auid 123 rwx", "allow pool foo rwx, allow pool bar r", + "allow pool foo.froo.foo rwx, allow pool bar r", "allow pool foo rwx ; allow pool bar r", "allow pool foo rwx ;allow pool bar r", "allow pool foo rwx; allow pool bar r", -- 2.47.3