The kernel no longer allows anyone to rename a thread unless you're the current
owner of that thread - this fixes the kernel part of bug #1122. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20419 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1876,8 +1876,11 @@ rename_thread(thread_id id, const char *name)
|
|||||||
thread = thread_get_thread_struct_locked(id);
|
thread = thread_get_thread_struct_locked(id);
|
||||||
|
|
||||||
if (thread != NULL) {
|
if (thread != NULL) {
|
||||||
strlcpy(thread->name, name, B_OS_NAME_LENGTH);
|
if (thread->team == thread_get_current_thread()->team) {
|
||||||
status = B_OK;
|
strlcpy(thread->name, name, B_OS_NAME_LENGTH);
|
||||||
|
status = B_OK;
|
||||||
|
} else
|
||||||
|
status = B_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
RELEASE_THREAD_LOCK();
|
RELEASE_THREAD_LOCK();
|
||||||
|
|||||||
Reference in New Issue
Block a user