[PATCH 2/3] server: Fix get_handle for global handles. It doesn't need process for them.

Alexandre Julliard julliard at winehq.org
Wed Feb 21 07:59:09 CST 2007


Vitaliy Margolen <wine-devel at kievinfo.com> writes:

> Alexandre Julliard wrote:
>> Vitaliy Margolen <wine-devel at kievinfo.com> writes:
>> 
>>> Alexandre Julliard wrote:
>>>> Yes, but duplicate_handle has no reason to call get_handle on the dst
>>> Sure there is. How else do I set the requested access mask?
>> 
>> By creating the handle with the correct mask right away, instead of
>> setting a wrong mask and patching it up afterwards.
>
> That can only be done if permissions are not checked. I thought it was
> clear from the tests that even when expressly prohibited, you can create
> a handle with full access rights to the process if you can duplicate handle.
> I tried to keep all the changes in the one place (duplicate_handle) and
> not spread them around into create_handle.

No, all the mess is because you added checks in alloc_handle (which is
fine) then try to hack around them in duplicate_handle. What you
should do is do the appropriate checks in duplicate_handle and then
call alloc_entry directly.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list