As the BeOS documentation states what will happen in the future,

delete_area() now only allows to delete areas you have created
yourself before from userland, again.
The kernel's delete_area() still allows everything, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4320 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-08-19 17:08:35 +00:00
parent 010a1e70be
commit b2e5e9af2d

View File

@ -2402,7 +2402,10 @@ _user_create_area(const char *userName, void **userAddress, uint32 addressSpec,
status_t
_user_delete_area(area_id area)
{
// ToDo: works only correctly if the area belongs to the caller!
return _vm_delete_region(NULL, area);
// Unlike the BeOS implementation, you can now only delete areas
// that you have created yourself from userland.
// The documentation to delete_area() explicetly states that this
// will be restricted in the future, and so it will.
return vm_delete_region(vm_get_current_user_aspace_id(), area);
}