[PATCH v7 2/2] ntdll: Prevent loading Wine system dependencies in place of identically named application DLLs.

Zebediah Figura (she/her) zfigura at codeweavers.com
Fri Nov 12 10:58:55 CST 2021


On 11/12/21 09:22, Alexandre Julliard wrote:
> Zebediah Figura <zfigura at codeweavers.com> writes:
> 
>> @@ -3027,6 +3035,12 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
>>           break;
>>       }
>>   
>> +    /* mark the DLL as system only if it was loaded from a system path and is
>> +     * not builtin. note that builtins can appear to be loaded from a system
>> +     * path during prefix bootstrap */
>> +    if (!((*pwm)->ldr.Flags & LDR_WINE_INTERNAL))
>> +        (*pwm)->system = system;
> 
> I think that even during bootstrap we need to find builtins if they
> already exist. Most likely you should bypass the bootstrap fallback
> during system dll search.
> 

Sorry, I'm not sure I understand? We do find builtins if they already 
exist with this patch; we just don't mark them as system libraries.

I think that disabling the fallback indeed ends up being cleaner, 
though. I was trying to err on the side of non-intrusiveness, but it 
does make the code a little worse...



More information about the wine-devel mailing list