mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-22 20:54:49 +09:00
B 4416: Fix restricted params for UserTemplate (#4433)
* B #4416: Fix restricted params for UserTemplate * M #-: Fix crash on VM action with wrong user
This commit is contained in:
1 parent
5c359fcbf1
commit
f652a5fbb8
2 files changed
+5
-7
No files matched your search
+2
-4
@@ -1120,10 +1120,9 @@ void RequestAttributes::set_auth_op(VMActions::Action action)
|
||||
if (user != nullptr)
|
||||
{
|
||||
result = user->get_vm_auth_op(action);
|
||||
user->unlock();
|
||||
}
|
||||
|
||||
user->unlock();
|
||||
|
||||
if (result != AuthRequest::NONE)
|
||||
{
|
||||
auth_op = result;
|
||||
@@ -1135,10 +1134,9 @@ void RequestAttributes::set_auth_op(VMActions::Action action)
|
||||
if (group != nullptr)
|
||||
{
|
||||
result = group->get_vm_auth_op(action);
|
||||
group->unlock();
|
||||
}
|
||||
|
||||
group->unlock();
|
||||
|
||||
if (result != AuthRequest::NONE)
|
||||
{
|
||||
auth_op = result;
|
||||
|
||||
+3
-3
@@ -72,6 +72,9 @@ UserPool::UserPool(SqlDB * db, time_t __session_expiration_time, bool is_slave,
|
||||
|
||||
_session_expiration_time = __session_expiration_time;
|
||||
|
||||
// Set restricted attributes
|
||||
UserTemplate::parse_restricted(restricted_attrs);
|
||||
|
||||
User * oneadmin_user = get_ro(0);
|
||||
|
||||
//Slaves do not need to init the pool, just the oneadmin username
|
||||
@@ -178,9 +181,6 @@ UserPool::UserPool(SqlDB * db, time_t __session_expiration_time, bool is_slave,
|
||||
goto error_serveradmin;
|
||||
}
|
||||
|
||||
// Set restricted attributes
|
||||
UserTemplate::parse_restricted(restricted_attrs);
|
||||
|
||||
return;
|
||||
|
||||
error_readoneauth:
|
||||
|
||||
Reference in new issue
Block a user