From 60195581273aee259e8c83d0b471af859d928342 Mon Sep 17 00:00:00 2001 From: Christophe Courtaut Date: Mon, 22 Jul 2013 15:15:38 +0200 Subject: [PATCH] rgw: Allow wildcard in supported keystone roles. http://tracker.ceph.com/issues/4365 fixes #4365 Signed-off-by: Christophe Courtaut --- src/rgw/rgw_keystone.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_keystone.cc b/src/rgw/rgw_keystone.cc index bb5091e2d1ee..7c7466541296 100644 --- a/src/rgw/rgw_keystone.cc +++ b/src/rgw/rgw_keystone.cc @@ -1,4 +1,5 @@ #include +#include #include "common/errno.h" #include "common/ceph_json.h" @@ -13,7 +14,7 @@ bool KeystoneToken::User::has_role(const string& r) { list::iterator iter; for (iter = roles.begin(); iter != roles.end(); ++iter) { - if (r.compare((*iter).name) == 0) { + if (fnmatch(r.c_str(), ((*iter).name.c_str()), 0) == 0) { return true; } } -- 2.47.3