kernel/thread: Clarify permissions checking logic.
No functional change intended; but if I missed a case, it will now be caught by the "return false" instead of the "return true", which is a better default.
This commit is contained in:
@@ -3008,12 +3008,12 @@ thread_check_permissions(const Thread* currentThread, const Thread* thread,
|
|||||||
if (thread->team->id == team_get_kernel_team_id())
|
if (thread->team->id == team_get_kernel_team_id())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (thread->team != currentThread->team
|
if (thread->team == currentThread->team
|
||||||
&& currentThread->team->effective_uid != 0
|
|| currentThread->team->effective_uid == 0
|
||||||
&& thread->team->real_uid != currentThread->team->real_uid)
|
|| thread->team->real_uid == currentThread->team->real_uid)
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user