1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #847: Make drivers with name matching server* a server driver

This commit is contained in:
Ruben S. Montero 2011-10-25 00:21:29 +02:00
parent 41c13d5905
commit dd2e3fd7c6

View File

@ -30,7 +30,7 @@
#include <stdlib.h>
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);
}