From: Sage Weil Date: Fri, 23 Aug 2013 21:56:46 +0000 (-0700) Subject: osd/OSDCap: allow . for unquoted strings X-Git-Tag: v0.69~61 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7929228d564daee252e2cbfcd38ca9eb04b02c31;p=ceph.git osd/OSDCap: allow . for unquoted strings Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- 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",