From dd2e3fd7c6c6f12b7e4c10c5c7edc8fb34013586 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 25 Oct 2011 00:21:29 +0200 Subject: [PATCH] bug #847: Make drivers with name matching server* a server driver --- src/um/UserPool.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/um/UserPool.cc b/src/um/UserPool.cc index 65dfe3d235..1baf4ab285 100644 --- a/src/um/UserPool.cc +++ b/src/um/UserPool.cc @@ -30,7 +30,7 @@ #include const char * UserPool::CORE_AUTH = "core"; -const char * UserPool::SERVER_AUTH = "server"; +const char * UserPool::SERVER_AUTH = "server*"; const char * UserPool::PUBLIC_AUTH = "public"; const char * UserPool::DEFAULT_AUTH = "default"; @@ -602,7 +602,9 @@ bool UserPool::authenticate(const string& session, if (user != 0 ) //User known to OpenNebula { - if ( user->get_auth_driver() == UserPool::SERVER_AUTH ) + string driver = user->get_auth_driver(); + + if ( fnmatch(UserPool::SERVER_AUTH, driver.c_str(), 0) == 0 ) { ar = authenticate_server(user,token,user_id,group_id,uname,gname); }